@lcap/nasl 2.22.2-beta.3 → 2.22.2-beta.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/out/automate/engine/index.d.ts +4 -0
- package/out/automate/engine/index.js +443 -0
- package/out/automate/engine/index.js.map +1 -0
- package/out/automate/engine/operators.d.ts +24 -0
- package/out/automate/engine/operators.js +252 -0
- package/out/automate/engine/operators.js.map +1 -0
- package/out/automate/engine/uniqueName.d.ts +12 -0
- package/out/automate/engine/uniqueName.js +112 -0
- package/out/automate/engine/uniqueName.js.map +1 -0
- package/out/automate/engine/utils.d.ts +25 -0
- package/out/automate/engine/utils.js +428 -0
- package/out/automate/engine/utils.js.map +1 -0
- package/out/automate/engine/viewCache.d.ts +19 -0
- package/out/automate/engine/viewCache.js +45 -0
- package/out/automate/engine/viewCache.js.map +1 -0
- package/out/automate/template/myProcess.d.ts +10 -0
- package/out/automate/template/myProcess.js +11498 -0
- package/out/automate/template/myProcess.js.map +1 -0
- package/out/bak/translator.d.ts +1 -0
- package/out/bak/translator.js +130 -0
- package/out/bak/translator.js.map +1 -0
- package/out/common/BaseNode.d.ts +306 -0
- package/out/common/BaseNode.js +1222 -0
- package/out/common/BaseNode.js.map +1 -0
- package/out/common/Command.d.ts +20 -0
- package/out/common/Command.js +66 -0
- package/out/common/Command.js.map +1 -0
- package/out/common/ComponentAPI.d.ts +110 -0
- package/out/common/ComponentAPI.js +3 -0
- package/out/common/ComponentAPI.js.map +1 -0
- package/out/common/EventEmitter.d.ts +59 -0
- package/out/common/EventEmitter.js +69 -0
- package/out/common/EventEmitter.js.map +1 -0
- package/out/common/Messager.d.ts +91 -0
- package/out/common/Messager.js +208 -0
- package/out/common/Messager.js.map +1 -0
- package/out/common/index.d.ts +3 -0
- package/out/common/index.js +20 -0
- package/out/common/index.js.map +1 -0
- package/out/concepts/Abort__.d.ts +26 -0
- package/out/concepts/Abort__.js +79 -0
- package/out/concepts/Abort__.js.map +1 -0
- package/out/concepts/Anchor__.d.ts +45 -0
- package/out/concepts/Anchor__.js +182 -0
- package/out/concepts/Anchor__.js.map +1 -0
- package/out/concepts/AnonymousFunction__.d.ts +173 -0
- package/out/concepts/AnonymousFunction__.js +484 -0
- package/out/concepts/AnonymousFunction__.js.map +1 -0
- package/out/concepts/App__.d.ts +1166 -0
- package/out/concepts/App__.js +1885 -0
- package/out/concepts/App__.js.map +1 -0
- package/out/concepts/Argument__.d.ts +66 -0
- package/out/concepts/Argument__.js +267 -0
- package/out/concepts/Argument__.js.map +1 -0
- package/out/concepts/Assignee__.d.ts +289 -0
- package/out/concepts/Assignee__.js +426 -0
- package/out/concepts/Assignee__.js.map +1 -0
- package/out/concepts/AssignmentLine__.d.ts +42 -0
- package/out/concepts/AssignmentLine__.js +111 -0
- package/out/concepts/AssignmentLine__.js.map +1 -0
- package/out/concepts/Assignment__.d.ts +74 -0
- package/out/concepts/Assignment__.js +287 -0
- package/out/concepts/Assignment__.js.map +1 -0
- package/out/concepts/Attribute__.d.ts +98 -0
- package/out/concepts/Attribute__.js +206 -0
- package/out/concepts/Attribute__.js.map +1 -0
- package/out/concepts/BatchAssignment__.d.ts +252 -0
- package/out/concepts/BatchAssignment__.js +806 -0
- package/out/concepts/BatchAssignment__.js.map +1 -0
- package/out/concepts/BinaryExpression__.d.ts +71 -0
- package/out/concepts/BinaryExpression__.js +347 -0
- package/out/concepts/BinaryExpression__.js.map +1 -0
- package/out/concepts/BindAttribute__.d.ts +319 -0
- package/out/concepts/BindAttribute__.js +896 -0
- package/out/concepts/BindAttribute__.js.map +1 -0
- package/out/concepts/BindDirective__.d.ts +162 -0
- package/out/concepts/BindDirective__.js +538 -0
- package/out/concepts/BindDirective__.js.map +1 -0
- package/out/concepts/BindEvent__.d.ts +240 -0
- package/out/concepts/BindEvent__.js +764 -0
- package/out/concepts/BindEvent__.js.map +1 -0
- package/out/concepts/BindStyle__.d.ts +140 -0
- package/out/concepts/BindStyle__.js +433 -0
- package/out/concepts/BindStyle__.js.map +1 -0
- package/out/concepts/BooleanLiteral__.d.ts +35 -0
- package/out/concepts/BooleanLiteral__.js +100 -0
- package/out/concepts/BooleanLiteral__.js.map +1 -0
- package/out/concepts/CallFunction__.d.ts +159 -0
- package/out/concepts/CallFunction__.js +503 -0
- package/out/concepts/CallFunction__.js.map +1 -0
- package/out/concepts/CallInterface__.d.ts +116 -0
- package/out/concepts/CallInterface__.js +570 -0
- package/out/concepts/CallInterface__.js.map +1 -0
- package/out/concepts/CallLogic__.d.ts +187 -0
- package/out/concepts/CallLogic__.js +1007 -0
- package/out/concepts/CallLogic__.js.map +1 -0
- package/out/concepts/CallQueryComponent__.d.ts +433 -0
- package/out/concepts/CallQueryComponent__.js +1267 -0
- package/out/concepts/CallQueryComponent__.js.map +1 -0
- package/out/concepts/Comment__.d.ts +32 -0
- package/out/concepts/Comment__.js +96 -0
- package/out/concepts/Comment__.js.map +1 -0
- package/out/concepts/CompletionProperty__.d.ts +105 -0
- package/out/concepts/CompletionProperty__.js +262 -0
- package/out/concepts/CompletionProperty__.js.map +1 -0
- package/out/concepts/ConfigGroup__.d.ts +124 -0
- package/out/concepts/ConfigGroup__.js +237 -0
- package/out/concepts/ConfigGroup__.js.map +1 -0
- package/out/concepts/ConfigPropertyValue__.d.ts +45 -0
- package/out/concepts/ConfigPropertyValue__.js +107 -0
- package/out/concepts/ConfigPropertyValue__.js.map +1 -0
- package/out/concepts/ConfigProperty__.d.ts +154 -0
- package/out/concepts/ConfigProperty__.js +324 -0
- package/out/concepts/ConfigProperty__.js.map +1 -0
- package/out/concepts/Configuration__.d.ts +124 -0
- package/out/concepts/Configuration__.js +228 -0
- package/out/concepts/Configuration__.js.map +1 -0
- package/out/concepts/Constant__.d.ts +106 -0
- package/out/concepts/Constant__.js +249 -0
- package/out/concepts/Constant__.js.map +1 -0
- package/out/concepts/DataElement__.d.ts +47 -0
- package/out/concepts/DataElement__.js +119 -0
- package/out/concepts/DataElement__.js.map +1 -0
- package/out/concepts/DataSource__.d.ts +165 -0
- package/out/concepts/DataSource__.js +442 -0
- package/out/concepts/DataSource__.js.map +1 -0
- package/out/concepts/DatabaseTypeAnnotation__.d.ts +32 -0
- package/out/concepts/DatabaseTypeAnnotation__.js +79 -0
- package/out/concepts/DatabaseTypeAnnotation__.js.map +1 -0
- package/out/concepts/Destination__.d.ts +157 -0
- package/out/concepts/Destination__.js +740 -0
- package/out/concepts/Destination__.js.map +1 -0
- package/out/concepts/End__.d.ts +25 -0
- package/out/concepts/End__.js +86 -0
- package/out/concepts/End__.js.map +1 -0
- package/out/concepts/EntityIndex__.d.ts +96 -0
- package/out/concepts/EntityIndex__.js +221 -0
- package/out/concepts/EntityIndex__.js.map +1 -0
- package/out/concepts/EntityProperty__.d.ts +274 -0
- package/out/concepts/EntityProperty__.js +824 -0
- package/out/concepts/EntityProperty__.js.map +1 -0
- package/out/concepts/Entity__.d.ts +339 -0
- package/out/concepts/Entity__.js +711 -0
- package/out/concepts/Entity__.js.map +1 -0
- package/out/concepts/EnumItem__.d.ts +64 -0
- package/out/concepts/EnumItem__.js +146 -0
- package/out/concepts/EnumItem__.js.map +1 -0
- package/out/concepts/Enum__.d.ts +138 -0
- package/out/concepts/Enum__.js +322 -0
- package/out/concepts/Enum__.js.map +1 -0
- package/out/concepts/Event__.d.ts +144 -0
- package/out/concepts/Event__.js +249 -0
- package/out/concepts/Event__.js.map +1 -0
- package/out/concepts/ExternalDestination__.d.ts +76 -0
- package/out/concepts/ExternalDestination__.js +286 -0
- package/out/concepts/ExternalDestination__.js.map +1 -0
- package/out/concepts/ForEachStatement__.d.ts +189 -0
- package/out/concepts/ForEachStatement__.js +446 -0
- package/out/concepts/ForEachStatement__.js.map +1 -0
- package/out/concepts/FrontendLibrary__.d.ts +214 -0
- package/out/concepts/FrontendLibrary__.js +353 -0
- package/out/concepts/FrontendLibrary__.js.map +1 -0
- package/out/concepts/Frontend__.d.ts +374 -0
- package/out/concepts/Frontend__.js +690 -0
- package/out/concepts/Frontend__.js.map +1 -0
- package/out/concepts/Function__.d.ts +417 -0
- package/out/concepts/Function__.js +717 -0
- package/out/concepts/Function__.js.map +1 -0
- package/out/concepts/Identifier__.d.ts +52 -0
- package/out/concepts/Identifier__.js +296 -0
- package/out/concepts/Identifier__.js.map +1 -0
- package/out/concepts/IfStatement__.d.ts +158 -0
- package/out/concepts/IfStatement__.js +305 -0
- package/out/concepts/IfStatement__.js.map +1 -0
- package/out/concepts/Integration__.d.ts +54 -0
- package/out/concepts/Integration__.js +143 -0
- package/out/concepts/Integration__.js.map +1 -0
- package/out/concepts/InterfaceParam__.d.ts +111 -0
- package/out/concepts/InterfaceParam__.js +266 -0
- package/out/concepts/InterfaceParam__.js.map +1 -0
- package/out/concepts/Interface__.d.ts +284 -0
- package/out/concepts/Interface__.js +749 -0
- package/out/concepts/Interface__.js.map +1 -0
- package/out/concepts/JSBlock__.d.ts +34 -0
- package/out/concepts/JSBlock__.js +106 -0
- package/out/concepts/JSBlock__.js.map +1 -0
- package/out/concepts/JavaLogic__.d.ts +43 -0
- package/out/concepts/JavaLogic__.js +124 -0
- package/out/concepts/JavaLogic__.js.map +1 -0
- package/out/concepts/LogicItem__.d.ts +126 -0
- package/out/concepts/LogicItem__.js +253 -0
- package/out/concepts/LogicItem__.js.map +1 -0
- package/out/concepts/Logic__.d.ts +633 -0
- package/out/concepts/Logic__.js +1568 -0
- package/out/concepts/Logic__.js.map +1 -0
- package/out/concepts/MatchCase__.d.ts +258 -0
- package/out/concepts/MatchCase__.js +591 -0
- package/out/concepts/MatchCase__.js.map +1 -0
- package/out/concepts/Match__.d.ts +124 -0
- package/out/concepts/Match__.js +628 -0
- package/out/concepts/Match__.js.map +1 -0
- package/out/concepts/MemberExpression__.d.ts +73 -0
- package/out/concepts/MemberExpression__.js +319 -0
- package/out/concepts/MemberExpression__.js.map +1 -0
- package/out/concepts/MetadataType__.d.ts +245 -0
- package/out/concepts/MetadataType__.js +473 -0
- package/out/concepts/MetadataType__.js.map +1 -0
- package/out/concepts/MicroApp__.d.ts +52 -0
- package/out/concepts/MicroApp__.js +119 -0
- package/out/concepts/MicroApp__.js.map +1 -0
- package/out/concepts/Module__.d.ts +978 -0
- package/out/concepts/Module__.js +1386 -0
- package/out/concepts/Module__.js.map +1 -0
- package/out/concepts/Namespace__.d.ts +1069 -0
- package/out/concepts/Namespace__.js +1380 -0
- package/out/concepts/Namespace__.js.map +1 -0
- package/out/concepts/NewComposite__.d.ts +346 -0
- package/out/concepts/NewComposite__.js +1086 -0
- package/out/concepts/NewComposite__.js.map +1 -0
- package/out/concepts/NewList__.d.ts +133 -0
- package/out/concepts/NewList__.js +385 -0
- package/out/concepts/NewList__.js.map +1 -0
- package/out/concepts/NewMap__.d.ts +224 -0
- package/out/concepts/NewMap__.js +530 -0
- package/out/concepts/NewMap__.js.map +1 -0
- package/out/concepts/New__.d.ts +21 -0
- package/out/concepts/New__.js +68 -0
- package/out/concepts/New__.js.map +1 -0
- package/out/concepts/NullLiteral__.d.ts +27 -0
- package/out/concepts/NullLiteral__.js +81 -0
- package/out/concepts/NullLiteral__.js.map +1 -0
- package/out/concepts/NumericLiteral__.d.ts +56 -0
- package/out/concepts/NumericLiteral__.js +174 -0
- package/out/concepts/NumericLiteral__.js.map +1 -0
- package/out/concepts/OqlQueryComponent__.d.ts +73 -0
- package/out/concepts/OqlQueryComponent__.js +327 -0
- package/out/concepts/OqlQueryComponent__.js.map +1 -0
- package/out/concepts/Param__.d.ts +161 -0
- package/out/concepts/Param__.js +431 -0
- package/out/concepts/Param__.js.map +1 -0
- package/out/concepts/Point__.d.ts +32 -0
- package/out/concepts/Point__.js +79 -0
- package/out/concepts/Point__.js.map +1 -0
- package/out/concepts/ProcessComponent__.d.ts +220 -0
- package/out/concepts/ProcessComponent__.js +339 -0
- package/out/concepts/ProcessComponent__.js.map +1 -0
- package/out/concepts/ProcessElement__.d.ts +647 -0
- package/out/concepts/ProcessElement__.js +1220 -0
- package/out/concepts/ProcessElement__.js.map +1 -0
- package/out/concepts/ProcessOutcome__.d.ts +32 -0
- package/out/concepts/ProcessOutcome__.js +90 -0
- package/out/concepts/ProcessOutcome__.js.map +1 -0
- package/out/concepts/ProcessOutcomes__.d.ts +32 -0
- package/out/concepts/ProcessOutcomes__.js +89 -0
- package/out/concepts/ProcessOutcomes__.js.map +1 -0
- package/out/concepts/Process__.d.ts +614 -0
- package/out/concepts/Process__.js +1031 -0
- package/out/concepts/Process__.js.map +1 -0
- package/out/concepts/QueryAggregateExpression__.d.ts +52 -0
- package/out/concepts/QueryAggregateExpression__.js +149 -0
- package/out/concepts/QueryAggregateExpression__.js.map +1 -0
- package/out/concepts/QueryFieldExpression__.d.ts +54 -0
- package/out/concepts/QueryFieldExpression__.js +160 -0
- package/out/concepts/QueryFieldExpression__.js.map +1 -0
- package/out/concepts/QueryFromExpression__.d.ts +97 -0
- package/out/concepts/QueryFromExpression__.js +197 -0
- package/out/concepts/QueryFromExpression__.js.map +1 -0
- package/out/concepts/QueryGroupByExpression__.d.ts +47 -0
- package/out/concepts/QueryGroupByExpression__.js +142 -0
- package/out/concepts/QueryGroupByExpression__.js.map +1 -0
- package/out/concepts/QueryJoinExpression__.d.ts +184 -0
- package/out/concepts/QueryJoinExpression__.js +318 -0
- package/out/concepts/QueryJoinExpression__.js.map +1 -0
- package/out/concepts/QueryLimitExpression__.d.ts +58 -0
- package/out/concepts/QueryLimitExpression__.js +160 -0
- package/out/concepts/QueryLimitExpression__.js.map +1 -0
- package/out/concepts/QueryOrderByExpression__.d.ts +69 -0
- package/out/concepts/QueryOrderByExpression__.js +173 -0
- package/out/concepts/QueryOrderByExpression__.js.map +1 -0
- package/out/concepts/QuerySelectExpression__.d.ts +204 -0
- package/out/concepts/QuerySelectExpression__.js +295 -0
- package/out/concepts/QuerySelectExpression__.js.map +1 -0
- package/out/concepts/Rect__.d.ts +40 -0
- package/out/concepts/Rect__.js +95 -0
- package/out/concepts/Rect__.js.map +1 -0
- package/out/concepts/Return__.d.ts +129 -0
- package/out/concepts/Return__.js +345 -0
- package/out/concepts/Return__.js.map +1 -0
- package/out/concepts/Role__.d.ts +63 -0
- package/out/concepts/Role__.js +170 -0
- package/out/concepts/Role__.js.map +1 -0
- package/out/concepts/SelectMembers__.d.ts +143 -0
- package/out/concepts/SelectMembers__.js +293 -0
- package/out/concepts/SelectMembers__.js.map +1 -0
- package/out/concepts/Slot__.d.ts +75 -0
- package/out/concepts/Slot__.js +165 -0
- package/out/concepts/Slot__.js.map +1 -0
- package/out/concepts/SqlQueryComponent__.d.ts +71 -0
- package/out/concepts/SqlQueryComponent__.js +271 -0
- package/out/concepts/SqlQueryComponent__.js.map +1 -0
- package/out/concepts/Start__.d.ts +25 -0
- package/out/concepts/Start__.js +73 -0
- package/out/concepts/Start__.js.map +1 -0
- package/out/concepts/StringInterpolation__.d.ts +117 -0
- package/out/concepts/StringInterpolation__.js +252 -0
- package/out/concepts/StringInterpolation__.js.map +1 -0
- package/out/concepts/StringLiteral__.d.ts +38 -0
- package/out/concepts/StringLiteral__.js +134 -0
- package/out/concepts/StringLiteral__.js.map +1 -0
- package/out/concepts/StructureProperty__.d.ts +131 -0
- package/out/concepts/StructureProperty__.js +303 -0
- package/out/concepts/StructureProperty__.js.map +1 -0
- package/out/concepts/Structure__.d.ts +252 -0
- package/out/concepts/Structure__.js +447 -0
- package/out/concepts/Structure__.js.map +1 -0
- package/out/concepts/SwitchCase__.d.ts +94 -0
- package/out/concepts/SwitchCase__.js +232 -0
- package/out/concepts/SwitchCase__.js.map +1 -0
- package/out/concepts/SwitchStatement__.d.ts +84 -0
- package/out/concepts/SwitchStatement__.js +177 -0
- package/out/concepts/SwitchStatement__.js.map +1 -0
- package/out/concepts/Theme__.d.ts +38 -0
- package/out/concepts/Theme__.js +88 -0
- package/out/concepts/Theme__.js.map +1 -0
- package/out/concepts/Transactional__.d.ts +83 -0
- package/out/concepts/Transactional__.js +162 -0
- package/out/concepts/Transactional__.js.map +1 -0
- package/out/concepts/TypeAnnotation__.d.ts +290 -0
- package/out/concepts/TypeAnnotation__.js +885 -0
- package/out/concepts/TypeAnnotation__.js.map +1 -0
- package/out/concepts/TypeParam__.d.ts +25 -0
- package/out/concepts/TypeParam__.js +73 -0
- package/out/concepts/TypeParam__.js.map +1 -0
- package/out/concepts/UnaryExpression__.d.ts +49 -0
- package/out/concepts/UnaryExpression__.js +176 -0
- package/out/concepts/UnaryExpression__.js.map +1 -0
- package/out/concepts/Unparsed__.d.ts +32 -0
- package/out/concepts/Unparsed__.js +94 -0
- package/out/concepts/Unparsed__.js.map +1 -0
- package/out/concepts/UseComponent__.d.ts +32 -0
- package/out/concepts/UseComponent__.js +79 -0
- package/out/concepts/UseComponent__.js.map +1 -0
- package/out/concepts/ValidationRule__.d.ts +142 -0
- package/out/concepts/ValidationRule__.js +473 -0
- package/out/concepts/ValidationRule__.js.map +1 -0
- package/out/concepts/Variable__.d.ts +139 -0
- package/out/concepts/Variable__.js +386 -0
- package/out/concepts/Variable__.js.map +1 -0
- package/out/concepts/ViewBlock__.d.ts +36 -0
- package/out/concepts/ViewBlock__.js +87 -0
- package/out/concepts/ViewBlock__.js.map +1 -0
- package/out/concepts/ViewComponent__.d.ts +566 -0
- package/out/concepts/ViewComponent__.js +762 -0
- package/out/concepts/ViewComponent__.js.map +1 -0
- package/out/concepts/ViewElement__.d.ts +597 -0
- package/out/concepts/ViewElement__.js +1777 -0
- package/out/concepts/ViewElement__.js.map +1 -0
- package/out/concepts/View__.d.ts +714 -0
- package/out/concepts/View__.js +1733 -0
- package/out/concepts/View__.js.map +1 -0
- package/out/concepts/WhileStatement__.d.ts +97 -0
- package/out/concepts/WhileStatement__.js +211 -0
- package/out/concepts/WhileStatement__.js.map +1 -0
- package/out/concepts/basics/stdlib/index.d.ts +4 -0
- package/out/concepts/basics/stdlib/index.js +29 -0
- package/out/concepts/basics/stdlib/index.js.map +1 -0
- package/out/concepts/basics/stdlib/nasl.auth.d.ts +7 -0
- package/out/concepts/basics/stdlib/nasl.auth.js +140 -0
- package/out/concepts/basics/stdlib/nasl.auth.js.map +1 -0
- package/out/concepts/basics/stdlib/nasl.browser.d.ts +3 -0
- package/out/concepts/basics/stdlib/nasl.browser.js +133 -0
- package/out/concepts/basics/stdlib/nasl.browser.js.map +1 -0
- package/out/concepts/basics/stdlib/nasl.collection.d.ts +7 -0
- package/out/concepts/basics/stdlib/nasl.collection.js +52 -0
- package/out/concepts/basics/stdlib/nasl.collection.js.map +1 -0
- package/out/concepts/basics/stdlib/nasl.configuration.d.ts +3 -0
- package/out/concepts/basics/stdlib/nasl.configuration.js +33 -0
- package/out/concepts/basics/stdlib/nasl.configuration.js.map +1 -0
- package/out/concepts/basics/stdlib/nasl.core.d.ts +5 -0
- package/out/concepts/basics/stdlib/nasl.core.js +49 -0
- package/out/concepts/basics/stdlib/nasl.core.js.map +1 -0
- package/out/concepts/basics/stdlib/nasl.event.d.ts +3 -0
- package/out/concepts/basics/stdlib/nasl.event.js +25 -0
- package/out/concepts/basics/stdlib/nasl.event.js.map +1 -0
- package/out/concepts/basics/stdlib/nasl.interface.d.ts +7 -0
- package/out/concepts/basics/stdlib/nasl.interface.js +43 -0
- package/out/concepts/basics/stdlib/nasl.interface.js.map +1 -0
- package/out/concepts/basics/stdlib/nasl.io.d.ts +3 -0
- package/out/concepts/basics/stdlib/nasl.io.js +52 -0
- package/out/concepts/basics/stdlib/nasl.io.js.map +1 -0
- package/out/concepts/basics/stdlib/nasl.logging.d.ts +3 -0
- package/out/concepts/basics/stdlib/nasl.logging.js +56 -0
- package/out/concepts/basics/stdlib/nasl.logging.js.map +1 -0
- package/out/concepts/basics/stdlib/nasl.process.d.ts +7 -0
- package/out/concepts/basics/stdlib/nasl.process.js +638 -0
- package/out/concepts/basics/stdlib/nasl.process.js.map +1 -0
- package/out/concepts/basics/stdlib/nasl.ui.d.ts +7 -0
- package/out/concepts/basics/stdlib/nasl.ui.js +1043 -0
- package/out/concepts/basics/stdlib/nasl.ui.js.map +1 -0
- package/out/concepts/basics/stdlib/nasl.util.d.ts +3 -0
- package/out/concepts/basics/stdlib/nasl.util.js +1798 -0
- package/out/concepts/basics/stdlib/nasl.util.js.map +1 -0
- package/out/concepts/basics/stdlib/nasl.validation.d.ts +3 -0
- package/out/concepts/basics/stdlib/nasl.validation.js +565 -0
- package/out/concepts/basics/stdlib/nasl.validation.js.map +1 -0
- package/out/concepts/basics/stdlib/reference2TypeAnnotationList.d.ts +5 -0
- package/out/concepts/basics/stdlib/reference2TypeAnnotationList.js +26 -0
- package/out/concepts/basics/stdlib/reference2TypeAnnotationList.js.map +1 -0
- package/out/concepts/basics/types/coreTypeList.d.ts +2 -0
- package/out/concepts/basics/types/coreTypeList.js +15 -0
- package/out/concepts/basics/types/coreTypeList.js.map +1 -0
- package/out/concepts/basics/types/index.d.ts +15 -0
- package/out/concepts/basics/types/index.js +32 -0
- package/out/concepts/basics/types/index.js.map +1 -0
- package/out/concepts/index.d.ts +5 -0
- package/out/concepts/index.js +24 -0
- package/out/concepts/index.js.map +1 -0
- package/out/concepts/index__.d.ts +108 -0
- package/out/concepts/index__.js +125 -0
- package/out/concepts/index__.js.map +1 -0
- package/out/config.d.ts +44 -0
- package/out/config.js +73 -0
- package/out/config.js.map +1 -0
- package/out/decorators/index.d.ts +56 -0
- package/out/decorators/index.js +159 -0
- package/out/decorators/index.js.map +1 -0
- package/out/enums/KEYWORDS.d.ts +6 -0
- package/out/enums/KEYWORDS.js +1243 -0
- package/out/enums/KEYWORDS.js.map +1 -0
- package/out/enums/LEVEL_NAME_MAP.d.ts +26 -0
- package/out/enums/LEVEL_NAME_MAP.js +30 -0
- package/out/enums/LEVEL_NAME_MAP.js.map +1 -0
- package/out/eventBus.d.ts +3 -0
- package/out/eventBus.js +7 -0
- package/out/eventBus.js.map +1 -0
- package/out/generator/compileComponent.d.ts +11 -0
- package/out/generator/compileComponent.js +12 -0
- package/out/generator/compileComponent.js.map +1 -0
- package/out/generator/genBundleFiles.d.ts +33 -0
- package/out/generator/genBundleFiles.js +501 -0
- package/out/generator/genBundleFiles.js.map +1 -0
- package/out/generator/genHash.d.ts +7 -0
- package/out/generator/genHash.js +39 -0
- package/out/generator/genHash.js.map +1 -0
- package/out/generator/genMetaData.d.ts +28 -0
- package/out/generator/genMetaData.js +288 -0
- package/out/generator/genMetaData.js.map +1 -0
- package/out/generator/genReleaseBody.d.ts +60 -0
- package/out/generator/genReleaseBody.js +493 -0
- package/out/generator/genReleaseBody.js.map +1 -0
- package/out/generator/icestark.d.ts +2 -0
- package/out/generator/icestark.js +48 -0
- package/out/generator/icestark.js.map +1 -0
- package/out/generator/index.d.ts +7 -0
- package/out/generator/index.js +24 -0
- package/out/generator/index.js.map +1 -0
- package/out/generator/microApp.d.ts +2 -0
- package/out/generator/microApp.js +35 -0
- package/out/generator/microApp.js.map +1 -0
- package/out/generator/permission.d.ts +10 -0
- package/out/generator/permission.js +269 -0
- package/out/generator/permission.js.map +1 -0
- package/out/generator/qiankun.d.ts +2 -0
- package/out/generator/qiankun.js +52 -0
- package/out/generator/qiankun.js.map +1 -0
- package/out/generator/styleReplacer.d.ts +3 -0
- package/out/generator/styleReplacer.js +71 -0
- package/out/generator/styleReplacer.js.map +1 -0
- package/out/index.d.ts +13 -0
- package/out/index.js +64 -0
- package/out/index.js.map +1 -0
- package/out/manager/diagnostic.d.ts +35 -0
- package/out/manager/diagnostic.js +63 -0
- package/out/manager/diagnostic.js.map +1 -0
- package/out/manager/stepRecorder.d.ts +20 -0
- package/out/manager/stepRecorder.js +110 -0
- package/out/manager/stepRecorder.js.map +1 -0
- package/out/sentry/index.d.ts +29 -0
- package/out/sentry/index.js +111 -0
- package/out/sentry/index.js.map +1 -0
- package/out/server/createUiTs.d.ts +16 -0
- package/out/server/createUiTs.js +248 -0
- package/out/server/createUiTs.js.map +1 -0
- package/out/server/entity2LogicNamespace.d.ts +10 -0
- package/out/server/entity2LogicNamespace.js +380 -0
- package/out/server/entity2LogicNamespace.js.map +1 -0
- package/out/server/event.d.ts +30 -0
- package/out/server/event.js +151 -0
- package/out/server/event.js.map +1 -0
- package/out/server/extendBaseNode.d.ts +1 -0
- package/out/server/extendBaseNode.js +475 -0
- package/out/server/extendBaseNode.js.map +1 -0
- package/out/server/formatTsUtils.d.ts +36 -0
- package/out/server/formatTsUtils.js +788 -0
- package/out/server/formatTsUtils.js.map +1 -0
- package/out/server/getExtensionModules.d.ts +3 -0
- package/out/server/getExtensionModules.js +20 -0
- package/out/server/getExtensionModules.js.map +1 -0
- package/out/server/getFunctions.d.ts +3 -0
- package/out/server/getFunctions.js +20 -0
- package/out/server/getFunctions.js.map +1 -0
- package/out/server/getInterfaces.d.ts +2 -0
- package/out/server/getInterfaces.js +48 -0
- package/out/server/getInterfaces.js.map +1 -0
- package/out/server/getLogging.d.ts +1 -0
- package/out/server/getLogging.js +9 -0
- package/out/server/getLogging.js.map +1 -0
- package/out/server/getLogics.d.ts +4 -0
- package/out/server/getLogics.js +352 -0
- package/out/server/getLogics.js.map +1 -0
- package/out/server/getMemberIdentifier.d.ts +15 -0
- package/out/server/getMemberIdentifier.js +290 -0
- package/out/server/getMemberIdentifier.js.map +1 -0
- package/out/server/getProcessComponents.d.ts +2 -0
- package/out/server/getProcessComponents.js +13 -0
- package/out/server/getProcessComponents.js.map +1 -0
- package/out/server/getProcesses.d.ts +33 -0
- package/out/server/getProcesses.js +599 -0
- package/out/server/getProcesses.js.map +1 -0
- package/out/server/getScope.d.ts +13 -0
- package/out/server/getScope.js +61 -0
- package/out/server/getScope.js.map +1 -0
- package/out/server/getValidates.d.ts +3 -0
- package/out/server/getValidates.js +14 -0
- package/out/server/getValidates.js.map +1 -0
- package/out/server/index.d.ts +5 -0
- package/out/server/index.js +38 -0
- package/out/server/index.js.map +1 -0
- package/out/server/naslServer.d.ts +363 -0
- package/out/server/naslServer.js +4382 -0
- package/out/server/naslServer.js.map +1 -0
- package/out/server/naslStdlibMap.d.ts +2 -0
- package/out/server/naslStdlibMap.js +50 -0
- package/out/server/naslStdlibMap.js.map +1 -0
- package/out/server/process2LogicNamespace.d.ts +26 -0
- package/out/server/process2LogicNamespace.js +109 -0
- package/out/server/process2LogicNamespace.js.map +1 -0
- package/out/server/translator.d.ts +26 -0
- package/out/server/translator.js +787 -0
- package/out/server/translator.js.map +1 -0
- package/out/service/creator/add.configs.d.ts +1 -0
- package/out/service/creator/add.configs.js +74 -0
- package/out/service/creator/add.configs.js.map +1 -0
- package/out/service/creator/errHandles.d.ts +18 -0
- package/out/service/creator/errHandles.js +75 -0
- package/out/service/creator/errHandles.js.map +1 -0
- package/out/service/creator/index.d.ts +1 -0
- package/out/service/creator/index.js +74 -0
- package/out/service/creator/index.js.map +1 -0
- package/out/service/datasource/api.d.ts +12 -0
- package/out/service/datasource/api.js +14 -0
- package/out/service/datasource/api.js.map +1 -0
- package/out/service/datasource/index.d.ts +2 -0
- package/out/service/datasource/index.js +10 -0
- package/out/service/datasource/index.js.map +1 -0
- package/out/service/defaultErrorMessage.json +98 -0
- package/out/service/logic/api.d.ts +9 -0
- package/out/service/logic/api.js +11 -0
- package/out/service/logic/api.js.map +1 -0
- package/out/service/logic/index.d.ts +2 -0
- package/out/service/logic/index.js +10 -0
- package/out/service/logic/index.js.map +1 -0
- package/out/service/storage/api.d.ts +45 -0
- package/out/service/storage/api.js +36 -0
- package/out/service/storage/api.js.map +1 -0
- package/out/service/storage/index.d.ts +2 -0
- package/out/service/storage/index.js +10 -0
- package/out/service/storage/index.js.map +1 -0
- package/out/service/storage/init.d.ts +65 -0
- package/out/service/storage/init.js +798 -0
- package/out/service/storage/init.js.map +1 -0
- package/out/service/storage/jsoner.d.ts +36 -0
- package/out/service/storage/jsoner.js +131 -0
- package/out/service/storage/jsoner.js.map +1 -0
- package/out/service/storage/map.d.ts +4 -0
- package/out/service/storage/map.js +54 -0
- package/out/service/storage/map.js.map +1 -0
- package/out/service/storage/service.d.ts +22 -0
- package/out/service/storage/service.js +70 -0
- package/out/service/storage/service.js.map +1 -0
- package/out/service/storage/storagePoint.d.ts +17 -0
- package/out/service/storage/storagePoint.js +76 -0
- package/out/service/storage/storagePoint.js.map +1 -0
- package/out/templator/genCallComponentLogic.d.ts +17 -0
- package/out/templator/genCallComponentLogic.js +30 -0
- package/out/templator/genCallComponentLogic.js.map +1 -0
- package/out/templator/genCreateBlock.d.ts +10 -0
- package/out/templator/genCreateBlock.js +338 -0
- package/out/templator/genCreateBlock.js.map +1 -0
- package/out/templator/genCurdEditMultipleKeyBlock.d.ts +8 -0
- package/out/templator/genCurdEditMultipleKeyBlock.js +516 -0
- package/out/templator/genCurdEditMultipleKeyBlock.js.map +1 -0
- package/out/templator/genCurdMultipleKeyBlock.d.ts +34 -0
- package/out/templator/genCurdMultipleKeyBlock.js +709 -0
- package/out/templator/genCurdMultipleKeyBlock.js.map +1 -0
- package/out/templator/genEditTableBlock.d.ts +51 -0
- package/out/templator/genEditTableBlock.js +299 -0
- package/out/templator/genEditTableBlock.js.map +1 -0
- package/out/templator/genEnumSelectBlock.d.ts +10 -0
- package/out/templator/genEnumSelectBlock.js +26 -0
- package/out/templator/genEnumSelectBlock.js.map +1 -0
- package/out/templator/genGetBlock.d.ts +6 -0
- package/out/templator/genGetBlock.js +138 -0
- package/out/templator/genGetBlock.js.map +1 -0
- package/out/templator/genGridViewBlock.d.ts +55 -0
- package/out/templator/genGridViewBlock.js +350 -0
- package/out/templator/genGridViewBlock.js.map +1 -0
- package/out/templator/genListViewBlock.d.ts +19 -0
- package/out/templator/genListViewBlock.js +143 -0
- package/out/templator/genListViewBlock.js.map +1 -0
- package/out/templator/genQueryComponent.d.ts +34 -0
- package/out/templator/genQueryComponent.js +342 -0
- package/out/templator/genQueryComponent.js.map +1 -0
- package/out/templator/genSelectBlock.d.ts +45 -0
- package/out/templator/genSelectBlock.js +406 -0
- package/out/templator/genSelectBlock.js.map +1 -0
- package/out/templator/genTableBlock.d.ts +53 -0
- package/out/templator/genTableBlock.js +280 -0
- package/out/templator/genTableBlock.js.map +1 -0
- package/out/templator/genUpdateBlock.d.ts +6 -0
- package/out/templator/genUpdateBlock.js +380 -0
- package/out/templator/genUpdateBlock.js.map +1 -0
- package/out/templator/index.d.ts +18 -0
- package/out/templator/index.js +34 -0
- package/out/templator/index.js.map +1 -0
- package/out/templator/utils.d.ts +676 -0
- package/out/templator/utils.js +469 -0
- package/out/templator/utils.js.map +1 -0
- package/out/translator/constant.d.ts +6 -0
- package/out/translator/constant.js +10 -0
- package/out/translator/constant.js.map +1 -0
- package/out/translator/index.d.ts +3 -0
- package/out/translator/index.js +20 -0
- package/out/translator/index.js.map +1 -0
- package/out/translator/types.d.ts +32 -0
- package/out/translator/types.js +3 -0
- package/out/translator/types.js.map +1 -0
- package/out/translator/utils.d.ts +25 -0
- package/out/translator/utils.js +120 -0
- package/out/translator/utils.js.map +1 -0
- package/out/utils/index.d.ts +42 -0
- package/out/utils/index.js +213 -0
- package/out/utils/index.js.map +1 -0
- package/out/utils/logger.d.ts +7 -0
- package/out/utils/logger.js +23 -0
- package/out/utils/logger.js.map +1 -0
- package/out/utils/sortTsString.d.ts +1 -0
- package/out/utils/sortTsString.js +36 -0
- package/out/utils/sortTsString.js.map +1 -0
- package/out/utils/string.d.ts +51 -0
- package/out/utils/string.js +110 -0
- package/out/utils/string.js.map +1 -0
- package/out/utils/time.d.ts +1 -0
- package/out/utils/time.js +6 -0
- package/out/utils/time.js.map +1 -0
- package/out/utils/traverse.d.ts +36 -0
- package/out/utils/traverse.js +145 -0
- package/out/utils/traverse.js.map +1 -0
- package/out/utils/types.d.ts +1 -0
- package/out/utils/types.js +3 -0
- package/out/utils/types.js.map +1 -0
- package/out/utils/window.d.ts +7 -0
- package/out/utils/window.js +14 -0
- package/out/utils/window.js.map +1 -0
- package/package.json +1 -1
- package/src/concepts/BindEvent__.ts +5 -6
- package/src/concepts/Module__.ts +2 -2
- package/src/concepts/View__.ts +2 -2
- package/src/server/naslServer.ts +4 -4
- package/src/service/storage/init.ts +3 -2
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const uuid_1 = require("uuid");
|
|
4
|
+
/**
|
|
5
|
+
* 用于两个 window 之间通信
|
|
6
|
+
* 除了基本的发送消息,提供了如命令式等更多方法
|
|
7
|
+
*/
|
|
8
|
+
class Messager {
|
|
9
|
+
options;
|
|
10
|
+
requests;
|
|
11
|
+
constructor(options) {
|
|
12
|
+
this.options = Object.assign({
|
|
13
|
+
protocol: 'vusion',
|
|
14
|
+
sender: 'platform',
|
|
15
|
+
logLevel: 'info',
|
|
16
|
+
timeout: 90000,
|
|
17
|
+
onlySend: false,
|
|
18
|
+
getSender() {
|
|
19
|
+
return window.parent;
|
|
20
|
+
},
|
|
21
|
+
getReceiver() {
|
|
22
|
+
return window;
|
|
23
|
+
},
|
|
24
|
+
handleMessage(message) {
|
|
25
|
+
// handle
|
|
26
|
+
},
|
|
27
|
+
}, options);
|
|
28
|
+
this.requests = new Map();
|
|
29
|
+
this.onMessageReceived = this.onMessageReceived.bind(this);
|
|
30
|
+
this.onDataReceived = this.onDataReceived.bind(this);
|
|
31
|
+
if (!this.options.onlySend) {
|
|
32
|
+
const receiver = this.options.getReceiver.call(this.options.context);
|
|
33
|
+
if (receiver.addEventListener)
|
|
34
|
+
receiver.addEventListener('message', this.onMessageReceived);
|
|
35
|
+
else if (receiver.addListener)
|
|
36
|
+
receiver.addListener('message', this.onDataReceived);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
destroy() {
|
|
40
|
+
if (!this.options.onlySend) {
|
|
41
|
+
const receiver = this.options.getReceiver.call(this.options.context);
|
|
42
|
+
if (receiver.removeEventListener)
|
|
43
|
+
receiver.removeEventListener('message', this.onMessageReceived);
|
|
44
|
+
else if (receiver.addListener)
|
|
45
|
+
receiver.removeListener('message', this.onDataReceived);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* 发送信息
|
|
50
|
+
* 所有下面方法的基础方法
|
|
51
|
+
* 比较原生,直接给目标 window 中 postMessage
|
|
52
|
+
*/
|
|
53
|
+
sendMessage(message) {
|
|
54
|
+
const logLevel = message.logLevel || this.options.logLevel;
|
|
55
|
+
if (logLevel === 'info') {
|
|
56
|
+
const str = JSON.stringify(message);
|
|
57
|
+
// console.info(`[messager]`, str);
|
|
58
|
+
}
|
|
59
|
+
const sender = this.options.getSender.call(this.options.context);
|
|
60
|
+
if (typeof window !== 'undefined' && sender instanceof Window)
|
|
61
|
+
sender.postMessage(message, '*');
|
|
62
|
+
else
|
|
63
|
+
sender.postMessage(message);
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* 发送数据
|
|
67
|
+
* 包装了协议和发送者。Window 的 message 可能来自不同地方,统一格式区分。
|
|
68
|
+
* @param data 数据
|
|
69
|
+
*/
|
|
70
|
+
sendData(data) {
|
|
71
|
+
return this.sendMessage({
|
|
72
|
+
protocol: this.options.protocol,
|
|
73
|
+
sender: this.options.sender,
|
|
74
|
+
type: 'send',
|
|
75
|
+
data,
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* 发送命令
|
|
80
|
+
* 直接发送一个命令
|
|
81
|
+
* 包装了协议和发送者。Window 的 message 可能来自不同地方,统一格式区分。
|
|
82
|
+
* @param command 命令名
|
|
83
|
+
* @param args 参数
|
|
84
|
+
*/
|
|
85
|
+
sendCommand(command, ...args) {
|
|
86
|
+
return this.sendMessage({
|
|
87
|
+
protocol: this.options.protocol,
|
|
88
|
+
sender: this.options.sender,
|
|
89
|
+
type: 'send',
|
|
90
|
+
command,
|
|
91
|
+
args,
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* 请求信息
|
|
96
|
+
* 与 send 系列的区别是接收返回数据
|
|
97
|
+
*/
|
|
98
|
+
requestMessage(message, options) {
|
|
99
|
+
if (options) {
|
|
100
|
+
Object.assign(message, options);
|
|
101
|
+
}
|
|
102
|
+
this.sendMessage(message);
|
|
103
|
+
return new Promise((res, rej) => {
|
|
104
|
+
this.requests.set(message.id, Object.assign({ res, rej }, message));
|
|
105
|
+
setTimeout(() => {
|
|
106
|
+
this.requests.delete(message.id);
|
|
107
|
+
rej(Object.assign({ error: 'Timeout' }, message));
|
|
108
|
+
}, this.options.timeout || 2000);
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* 请求数据
|
|
113
|
+
* 与 sendData 系列的区别是接收返回数据
|
|
114
|
+
*/
|
|
115
|
+
requestData(data) {
|
|
116
|
+
const message = {
|
|
117
|
+
id: (0, uuid_1.v4)(),
|
|
118
|
+
protocol: this.options.protocol,
|
|
119
|
+
sender: this.options.sender,
|
|
120
|
+
type: 'request',
|
|
121
|
+
data,
|
|
122
|
+
};
|
|
123
|
+
return this.requestMessage(message);
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* 请求命令
|
|
127
|
+
* 与 sendCommand 系列的区别是接收返回数据
|
|
128
|
+
*/
|
|
129
|
+
requestCommand(command, ...args) {
|
|
130
|
+
const message = {
|
|
131
|
+
id: (0, uuid_1.v4)(),
|
|
132
|
+
protocol: this.options.protocol,
|
|
133
|
+
sender: this.options.sender,
|
|
134
|
+
type: 'request',
|
|
135
|
+
command,
|
|
136
|
+
args,
|
|
137
|
+
};
|
|
138
|
+
return this.requestMessage(message);
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* 内置处理接收的 MessageEvent 事件
|
|
142
|
+
* @override
|
|
143
|
+
*/
|
|
144
|
+
onMessageReceived(e) {
|
|
145
|
+
if (!e.data)
|
|
146
|
+
return;
|
|
147
|
+
this.onDataReceived(e.data);
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* 内置处理接收的数据
|
|
151
|
+
* @override
|
|
152
|
+
*/
|
|
153
|
+
onDataReceived(data) {
|
|
154
|
+
// console.log('nasl onDataReceived: ', data);
|
|
155
|
+
if (data.protocol !== this.options.protocol)
|
|
156
|
+
return;
|
|
157
|
+
if (data.type === 'response') {
|
|
158
|
+
const message = this.requests.get(data.id);
|
|
159
|
+
if (message) {
|
|
160
|
+
message.error ? message.rej(data.error) : message.res(data.result);
|
|
161
|
+
}
|
|
162
|
+
return;
|
|
163
|
+
}
|
|
164
|
+
if (data.command) {
|
|
165
|
+
const func = this.options.context[data.command];
|
|
166
|
+
if (!func)
|
|
167
|
+
// 函数不存在时不 response
|
|
168
|
+
return;
|
|
169
|
+
let res;
|
|
170
|
+
if (typeof func === 'function')
|
|
171
|
+
res = func.call(this.options.context, ...data.args, data.id);
|
|
172
|
+
else
|
|
173
|
+
res = func;
|
|
174
|
+
if (data.type === 'request') {
|
|
175
|
+
return Promise.resolve(res)
|
|
176
|
+
.then((result) => {
|
|
177
|
+
this.sendMessage({
|
|
178
|
+
id: data.id,
|
|
179
|
+
protocol: this.options.protocol,
|
|
180
|
+
sender: this.options.sender,
|
|
181
|
+
logLevel: data.logLevel,
|
|
182
|
+
type: 'response',
|
|
183
|
+
command: data.command,
|
|
184
|
+
result,
|
|
185
|
+
});
|
|
186
|
+
})
|
|
187
|
+
.catch((error) => {
|
|
188
|
+
console.error(error);
|
|
189
|
+
this.sendMessage({
|
|
190
|
+
id: data.id,
|
|
191
|
+
protocol: this.options.protocol,
|
|
192
|
+
sender: this.options.sender,
|
|
193
|
+
logLevel: data.logLevel,
|
|
194
|
+
type: 'response',
|
|
195
|
+
command: data.command,
|
|
196
|
+
error,
|
|
197
|
+
});
|
|
198
|
+
});
|
|
199
|
+
}
|
|
200
|
+
else {
|
|
201
|
+
return;
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
this.options.handleMessage(data);
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
exports.default = Messager;
|
|
208
|
+
//# sourceMappingURL=Messager.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Messager.js","sourceRoot":"","sources":["../../src/common/Messager.ts"],"names":[],"mappings":";;AAAA,+BAAoC;AAsCpC;;;GAGG;AACH,MAAqB,QAAQ;IACz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,GAAG,GAAG,IAAI,CAAC;YACf,IAAI,IAAI,CAAC,IAAI,KAAK,SAAS,EAAE;gBACzB,OAAO,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC;qBACtB,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE;oBACb,IAAI,CAAC,WAAW,CAAC;wBACb,EAAE,EAAE,IAAI,CAAC,EAAE;wBACX,QAAQ,EAAE,IAAI,CAAC,OAAO,CAAC,QAAQ;wBAC/B,MAAM,EAAE,IAAI,CAAC,OAAO,CAAC,MAAM;wBAC3B,QAAQ,EAAE,IAAI,CAAC,QAAQ;wBACvB,IAAI,EAAE,UAAU;wBAChB,OAAO,EAAE,IAAI,CAAC,OAAO;wBACrB,MAAM;qBACT,CAAC,CAAC;gBACP,CAAC,CAAC;qBACD,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;oBACb,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;oBACrB,IAAI,CAAC,WAAW,CAAC;wBACb,EAAE,EAAE,IAAI,CAAC,EAAE;wBACX,QAAQ,EAAE,IAAI,CAAC,OAAO,CAAC,QAAQ;wBAC/B,MAAM,EAAE,IAAI,CAAC,OAAO,CAAC,MAAM;wBAC3B,QAAQ,EAAE,IAAI,CAAC,QAAQ;wBACvB,IAAI,EAAE,UAAU;wBAChB,OAAO,EAAE,IAAI,CAAC,OAAO;wBACrB,KAAK;qBACR,CAAC,CAAC;gBACP,CAAC,CAAC,CAAC;aACV;iBAAM;gBACH,OAAO;aACV;SACJ;QACD,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;IACrC,CAAC;CACJ;AA3MD,2BA2MC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./BaseNode"), exports);
|
|
18
|
+
__exportStar(require("./EventEmitter"), exports);
|
|
19
|
+
__exportStar(require("./Command"), exports);
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/common/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA2B;AAC3B,iDAA+B;AAC/B,4CAA0B"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { TranslatorState } from '../translator';
|
|
2
|
+
import LogicItem from './LogicItem__';
|
|
3
|
+
/**
|
|
4
|
+
* 中止表达式
|
|
5
|
+
*/
|
|
6
|
+
export declare class Abort extends LogicItem {
|
|
7
|
+
/** 类名 */
|
|
8
|
+
static readonly ConceptName = "Abort";
|
|
9
|
+
/**
|
|
10
|
+
* 产品概念
|
|
11
|
+
*/
|
|
12
|
+
readonly concept: 'Abort';
|
|
13
|
+
/**
|
|
14
|
+
* 中止表达式标题
|
|
15
|
+
*/
|
|
16
|
+
label: string;
|
|
17
|
+
/**
|
|
18
|
+
* @param source 需要合并的部分参数
|
|
19
|
+
*/
|
|
20
|
+
constructor(source?: Partial<Abort>);
|
|
21
|
+
static from(source: any, parentNode?: any, parentKey?: string): Abort;
|
|
22
|
+
toUI(): string;
|
|
23
|
+
toJS(state?: TranslatorState): string;
|
|
24
|
+
toEmbeddedTS(state?: TranslatorState): string;
|
|
25
|
+
}
|
|
26
|
+
export default Abort;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
9
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
10
|
+
};
|
|
11
|
+
var Abort_1;
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
exports.Abort = void 0;
|
|
14
|
+
const decorators_1 = require("../decorators");
|
|
15
|
+
const LogicItem__1 = __importDefault(require("./LogicItem__"));
|
|
16
|
+
/**
|
|
17
|
+
* 中止表达式
|
|
18
|
+
*/
|
|
19
|
+
let Abort = Abort_1 =
|
|
20
|
+
// @ts-ignore
|
|
21
|
+
class Abort extends LogicItem__1.default {
|
|
22
|
+
/** 类名 */
|
|
23
|
+
static ConceptName = 'Abort';
|
|
24
|
+
/**
|
|
25
|
+
* 产品概念
|
|
26
|
+
*/
|
|
27
|
+
// @ts-ignore
|
|
28
|
+
concept;
|
|
29
|
+
/**
|
|
30
|
+
* 中止表达式标题
|
|
31
|
+
*/
|
|
32
|
+
label = '中止表达式';
|
|
33
|
+
/**
|
|
34
|
+
* @param source 需要合并的部分参数
|
|
35
|
+
*/
|
|
36
|
+
constructor(source) {
|
|
37
|
+
source = Object.assign({}, Abort_1.getDefaultOptions(), source);
|
|
38
|
+
super(source);
|
|
39
|
+
super.subConstructor(source);
|
|
40
|
+
}
|
|
41
|
+
static from(source, parentNode, parentKey) {
|
|
42
|
+
return super.from(source, parentNode, parentKey);
|
|
43
|
+
}
|
|
44
|
+
//================================================================================
|
|
45
|
+
// ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
|
|
46
|
+
// 自动生成的代码已结束。下面可以手动编写。
|
|
47
|
+
//================================================================================
|
|
48
|
+
toUI() {
|
|
49
|
+
return '中止';
|
|
50
|
+
}
|
|
51
|
+
toJS(state) {
|
|
52
|
+
const code = `throw Error('程序中止');`;
|
|
53
|
+
return code;
|
|
54
|
+
}
|
|
55
|
+
toEmbeddedTS(state) {
|
|
56
|
+
let code = '';
|
|
57
|
+
// 中止放入表达式中,处理翻译就跳过
|
|
58
|
+
// 别的就增加一个 return;
|
|
59
|
+
if (this.parentNode?.concept !== 'MatchCase') {
|
|
60
|
+
code += 'return;';
|
|
61
|
+
}
|
|
62
|
+
return code;
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
__decorate([
|
|
66
|
+
(0, decorators_1.property)()
|
|
67
|
+
], Abort.prototype, "label", void 0);
|
|
68
|
+
Abort = Abort_1 = __decorate([
|
|
69
|
+
decorators_1.className,
|
|
70
|
+
(0, decorators_1.concept)('中止表达式')
|
|
71
|
+
// @ts-ignore
|
|
72
|
+
], Abort);
|
|
73
|
+
exports.Abort = Abort;
|
|
74
|
+
exports.default = Abort;
|
|
75
|
+
//================================================================================
|
|
76
|
+
// ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
|
|
77
|
+
// 自动生成的代码已结束。下面可以手动编写。
|
|
78
|
+
//================================================================================
|
|
79
|
+
//# sourceMappingURL=Abort__.js.map
|
|
@@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IAHjB,sBAAS;IACT,IAAA,oBAAO,EAAC,OAAO,CAAC;IACjB,aAAa;GACA,KAAK,CAgEjB;AAhEY,sBAAK;AAkElB,kBAAe,KAAK,CAAC;AACrB,kFAAkF;AAClF,gEAAgE;AAChE,uBAAuB;AACvB,kFAAkF"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { TranslatorState } from '../translator';
|
|
2
|
+
import { ElementToVueOptions } from './ViewElement__';
|
|
3
|
+
import { Params } from '../common/EventEmitter';
|
|
4
|
+
import LogicItem from './LogicItem__';
|
|
5
|
+
/**
|
|
6
|
+
* 锚点参数
|
|
7
|
+
*/
|
|
8
|
+
export declare class Anchor extends LogicItem {
|
|
9
|
+
/** 类名 */
|
|
10
|
+
static readonly ConceptName = "Anchor";
|
|
11
|
+
/**
|
|
12
|
+
* 产品概念
|
|
13
|
+
*/
|
|
14
|
+
readonly concept: 'Anchor';
|
|
15
|
+
/**
|
|
16
|
+
* 参数值
|
|
17
|
+
*/
|
|
18
|
+
expression: LogicItem;
|
|
19
|
+
/**
|
|
20
|
+
* @param source 需要合并的部分参数
|
|
21
|
+
*/
|
|
22
|
+
constructor(source?: Partial<Anchor>);
|
|
23
|
+
static from(source: any, parentNode?: any, parentKey?: string): Anchor;
|
|
24
|
+
/**
|
|
25
|
+
* 设置参数值
|
|
26
|
+
*/
|
|
27
|
+
setExpression(expression: LogicItem): void;
|
|
28
|
+
/**
|
|
29
|
+
* 删除逻辑项
|
|
30
|
+
* @param name 逻辑项名称
|
|
31
|
+
*/
|
|
32
|
+
removeExpression(name: string): void;
|
|
33
|
+
/**
|
|
34
|
+
* 删除逻辑项
|
|
35
|
+
* @param expression 已有的逻辑项实例
|
|
36
|
+
*/
|
|
37
|
+
removeExpression(expression: LogicItem): void;
|
|
38
|
+
__removeLogicItem(logicItem: LogicItem): Params;
|
|
39
|
+
toVue(options?: ElementToVueOptions): string;
|
|
40
|
+
toUI(state?: TranslatorState): string;
|
|
41
|
+
toJS(state?: TranslatorState): string;
|
|
42
|
+
toBrief(): string;
|
|
43
|
+
toEmbeddedTS(state?: TranslatorState, isHaveKeyWord?: boolean): string;
|
|
44
|
+
}
|
|
45
|
+
export default Anchor;
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
19
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
20
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
21
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
22
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
23
|
+
};
|
|
24
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
25
|
+
if (mod && mod.__esModule) return mod;
|
|
26
|
+
var result = {};
|
|
27
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
28
|
+
__setModuleDefault(result, mod);
|
|
29
|
+
return result;
|
|
30
|
+
};
|
|
31
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
32
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
33
|
+
};
|
|
34
|
+
var Anchor_1;
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.Anchor = void 0;
|
|
37
|
+
const translator_1 = require("../translator");
|
|
38
|
+
const decorators_1 = require("../decorators");
|
|
39
|
+
const utils = __importStar(require("../utils"));
|
|
40
|
+
const LogicItem__1 = __importDefault(require("./LogicItem__"));
|
|
41
|
+
/**
|
|
42
|
+
* 锚点参数
|
|
43
|
+
*/
|
|
44
|
+
let Anchor = Anchor_1 =
|
|
45
|
+
// @ts-ignore
|
|
46
|
+
class Anchor extends LogicItem__1.default {
|
|
47
|
+
/** 类名 */
|
|
48
|
+
static ConceptName = 'Anchor';
|
|
49
|
+
/**
|
|
50
|
+
* 产品概念
|
|
51
|
+
*/
|
|
52
|
+
// @ts-ignore
|
|
53
|
+
concept;
|
|
54
|
+
/**
|
|
55
|
+
* 参数值
|
|
56
|
+
*/
|
|
57
|
+
// @ts-ignore
|
|
58
|
+
expression;
|
|
59
|
+
/**
|
|
60
|
+
* @param source 需要合并的部分参数
|
|
61
|
+
*/
|
|
62
|
+
constructor(source) {
|
|
63
|
+
source = Object.assign({}, Anchor_1.getDefaultOptions(), source);
|
|
64
|
+
super(source);
|
|
65
|
+
super.subConstructor(source);
|
|
66
|
+
}
|
|
67
|
+
static from(source, parentNode, parentKey) {
|
|
68
|
+
return super.from(source, parentNode, parentKey);
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* 设置参数值
|
|
72
|
+
*/
|
|
73
|
+
setExpression(expression) {
|
|
74
|
+
expression._delete();
|
|
75
|
+
const relationOptions = { parentNode: this, parentKey: 'expression' };
|
|
76
|
+
Object.assign(expression, relationOptions);
|
|
77
|
+
const object = {
|
|
78
|
+
expression,
|
|
79
|
+
};
|
|
80
|
+
this.update({
|
|
81
|
+
...object,
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
removeExpression(options) {
|
|
85
|
+
let expression;
|
|
86
|
+
if (typeof options === 'string') {
|
|
87
|
+
expression = this.expression;
|
|
88
|
+
if (!expression) {
|
|
89
|
+
throw new Error('找不到逻辑项 ' + options);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
else {
|
|
93
|
+
expression = options;
|
|
94
|
+
}
|
|
95
|
+
return expression.delete();
|
|
96
|
+
}
|
|
97
|
+
__removeLogicItem(logicItem) {
|
|
98
|
+
const parentKey = logicItem.parentKey;
|
|
99
|
+
const params = {
|
|
100
|
+
parentNode: this,
|
|
101
|
+
parentKey,
|
|
102
|
+
index: -1,
|
|
103
|
+
object: null,
|
|
104
|
+
oldObject: logicItem,
|
|
105
|
+
};
|
|
106
|
+
if (parentKey) {
|
|
107
|
+
params.parentKey = parentKey;
|
|
108
|
+
if (Array.isArray(this[parentKey])) {
|
|
109
|
+
const index = this[parentKey].indexOf(logicItem);
|
|
110
|
+
~index && this[parentKey].splice(index, 1);
|
|
111
|
+
params.index = index;
|
|
112
|
+
}
|
|
113
|
+
else if (this[parentKey] === logicItem) {
|
|
114
|
+
params.index = 0;
|
|
115
|
+
this[parentKey] = undefined;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
return params;
|
|
119
|
+
}
|
|
120
|
+
//================================================================================
|
|
121
|
+
// ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
|
|
122
|
+
// 自动生成的代码已结束。下面可以手动编写。
|
|
123
|
+
//================================================================================
|
|
124
|
+
toVue(options) {
|
|
125
|
+
return this.expression ? this.expression.toVue(options) : '';
|
|
126
|
+
}
|
|
127
|
+
toUI(state) {
|
|
128
|
+
let code = '';
|
|
129
|
+
if (this.expression) {
|
|
130
|
+
code += this.expression.toUI((0, translator_1.shiftState)(state, code));
|
|
131
|
+
}
|
|
132
|
+
else {
|
|
133
|
+
code += '';
|
|
134
|
+
}
|
|
135
|
+
return code;
|
|
136
|
+
}
|
|
137
|
+
toJS(state) {
|
|
138
|
+
let code = '';
|
|
139
|
+
if (this.expression) {
|
|
140
|
+
code += this.expression.toJS((0, translator_1.shiftState)(state, code));
|
|
141
|
+
}
|
|
142
|
+
else {
|
|
143
|
+
code += '';
|
|
144
|
+
}
|
|
145
|
+
return code;
|
|
146
|
+
}
|
|
147
|
+
toBrief() {
|
|
148
|
+
const expr = utils.toBriefExpr(this.expression);
|
|
149
|
+
return `<span style="color: #AAAAAA">锚点 = </span><span style="color: #FFFFFF">${expr}</span>`;
|
|
150
|
+
}
|
|
151
|
+
toEmbeddedTS(state, isHaveKeyWord) {
|
|
152
|
+
let code = '';
|
|
153
|
+
if (isHaveKeyWord) {
|
|
154
|
+
code += `_anchor: `;
|
|
155
|
+
}
|
|
156
|
+
if (this.expression) {
|
|
157
|
+
code += this.expression.toEmbeddedTS((0, translator_1.shiftState)(state, code), false);
|
|
158
|
+
}
|
|
159
|
+
else {
|
|
160
|
+
code += 'undefined';
|
|
161
|
+
}
|
|
162
|
+
return code;
|
|
163
|
+
}
|
|
164
|
+
};
|
|
165
|
+
__decorate([
|
|
166
|
+
(0, decorators_1.property)('LogicItem')
|
|
167
|
+
], Anchor.prototype, "expression", void 0);
|
|
168
|
+
__decorate([
|
|
169
|
+
(0, translator_1.withSourceMap)()
|
|
170
|
+
], Anchor.prototype, "toEmbeddedTS", null);
|
|
171
|
+
Anchor = Anchor_1 = __decorate([
|
|
172
|
+
decorators_1.className,
|
|
173
|
+
(0, decorators_1.concept)('锚点参数')
|
|
174
|
+
// @ts-ignore
|
|
175
|
+
], Anchor);
|
|
176
|
+
exports.Anchor = Anchor;
|
|
177
|
+
exports.default = Anchor;
|
|
178
|
+
//================================================================================
|
|
179
|
+
// ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
|
|
180
|
+
// 自动生成的代码已结束。下面可以手动编写。
|
|
181
|
+
//================================================================================
|
|
182
|
+
//# sourceMappingURL=Anchor__.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Anchor__.js","sourceRoot":"","sources":["../../src/concepts/Anchor__.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,8CAA2E;AAQ3E,8CAA6E;AAE7E,gDAAkC;AAGlC,+DAAsC;AAEtC;;GAEG;AAIH,IAAa,MAAM;AADnB,aAAa;AACb,MAAa,MAAO,SAAQ,oBAAS;IACjC,SAAS;IACT,MAAM,CAAU,WAAW,GAAG,QAAQ,CAAC;IAEvC;;OAEG;IACH,aAAa;IACJ,OAAO,CAAY;IAE5B;;OAEG;IAGH,AADA,aAAa;IACb,UAAU,CAAa;IAIvB;;OAEG;IACH,YAAY,MAAwB;QAChC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,QAAM,CAAC,iBAAiB,EAAE,EAAE,MAAM,CAAC,CAAC;QAC/D,KAAK,CAAC,MAAM,CAAC,CAAC;QACd,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;IACjC,CAAC;IAED,MAAM,CAAC,IAAI,CAAC,MAAW,EAAE,UAAgB,EAAE,SAAkB;QACzD,OAAO,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,UAAU,EAAE,SAAS,CAAW,CAAC;IAC/D,CAAC;IAGD;;OAEG;IACH,aAAa,CAAC,UAAqB;QAC/B,UAAU,CAAC,OAAO,EAAE,CAAC;QACrB,MAAM,eAAe,GAAG,EAAE,UAAU,EAAE,IAAI,EAAE,SAAS,EAAE,YAAY,EAAE,CAAC;QACtE,MAAM,CAAC,MAAM,CAAC,UAAU,EAAE,eAAe,CAAC,CAAC;QAC3C,MAAM,MAAM,G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