@magic-xpa/engine 4.1100.0-dev4110.99 → 4.1101.0-dev4111.271
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +7 -7
- package/{esm2020 → esm2022}/index.mjs +188 -188
- package/{esm2020 → esm2022}/magic-xpa-engine.mjs +1 -1
- package/esm2022/src/AccessHelper.mjs +15 -0
- package/esm2022/src/ClientManager.mjs +421 -0
- package/esm2022/src/CommandsProcessorBase.mjs +56 -0
- package/{esm2020 → esm2022}/src/CommandsProcessorManager.mjs +25 -25
- package/esm2022/src/CommandsTable.mjs +162 -0
- package/esm2022/src/ConstInterface.mjs +517 -0
- package/{esm2020 → esm2022}/src/CurrentClientVersion.mjs +2 -2
- package/esm2022/src/FlowMonitorInterface.mjs +16 -0
- package/esm2022/src/GUIManager.mjs +62 -0
- package/esm2022/src/GlobalCommandsManager.mjs +34 -0
- package/esm2022/src/GuiEventsProcessor.mjs +156 -0
- package/{esm2020 → esm2022}/src/ICommandsTable.mjs +1 -1
- package/esm2022/src/ServerConfig.mjs +122 -0
- package/{esm2020 → esm2022}/src/bridge/IGuiEvent.mjs +19 -19
- package/esm2022/src/bridge/MagicBridge.mjs +41 -0
- package/esm2022/src/commands/ClientOriginatedCommandTaskTag.mjs +12 -0
- package/{esm2020 → esm2022}/src/commands/ClientToServer/AddUserLocateDataViewCommand.mjs +8 -8
- package/{esm2020 → esm2022}/src/commands/ClientToServer/AddUserRangeDataviewCommand.mjs +9 -9
- package/{esm2020 → esm2022}/src/commands/ClientToServer/AddUserSortDataViewCommand.mjs +9 -9
- package/esm2022/src/commands/ClientToServer/BrowserEscEventCommand.mjs +26 -0
- package/{esm2020 → esm2022}/src/commands/ClientToServer/ClientOriginatedCommand.mjs +14 -14
- package/{esm2020 → esm2022}/src/commands/ClientToServer/ClientOriginatedCommandSerializer.mjs +59 -59
- package/esm2022/src/commands/ClientToServer/ColumnSortEventCommand.mjs +29 -0
- package/esm2022/src/commands/ClientToServer/CommandFactory.mjs +261 -0
- package/esm2022/src/commands/ClientToServer/CommandSerializationHelper.mjs +67 -0
- package/esm2022/src/commands/ClientToServer/ComputeEventCommand.mjs +26 -0
- package/{esm2020 → esm2022}/src/commands/ClientToServer/ContextTerminationEventCommand.mjs +24 -21
- package/{esm2020 → esm2022}/src/commands/ClientToServer/ContextTimeoutResetCommand.mjs +23 -20
- package/{esm2020 → esm2022}/src/commands/ClientToServer/ControlItemsRefreshCommand.mjs +8 -8
- package/esm2022/src/commands/ClientToServer/DataViewOutputCommand.mjs +13 -0
- package/{esm2020 → esm2022}/src/commands/ClientToServer/DataviewCommand.mjs +44 -44
- package/esm2022/src/commands/ClientToServer/EvaluateCommand.mjs +40 -0
- package/{esm2020 → esm2022}/src/commands/ClientToServer/EventCommand.mjs +43 -40
- package/esm2022/src/commands/ClientToServer/ExecOperCommand.mjs +70 -0
- package/esm2022/src/commands/ClientToServer/FetchDataControlValuesEventCommand.mjs +25 -0
- package/{esm2020 → esm2022}/src/commands/ClientToServer/GlobalParamsQueryCommand.mjs +10 -10
- package/{esm2020 → esm2022}/src/commands/ClientToServer/ICommandTaskTag.mjs +1 -1
- package/esm2022/src/commands/ClientToServer/IndexChangeEventCommand.mjs +24 -0
- package/esm2022/src/commands/ClientToServer/IniputForceWriteCommand.mjs +26 -0
- package/{esm2020 → esm2022}/src/commands/ClientToServer/NonReversibleExitEventCommand.mjs +26 -23
- package/{esm2020 → esm2022}/src/commands/ClientToServer/QueryCommand.mjs +20 -20
- package/esm2022/src/commands/ClientToServer/RecomputeCommand.mjs +30 -0
- package/esm2022/src/commands/ClientToServer/RefreshEventCommand.mjs +30 -0
- package/esm2022/src/commands/ClientToServer/RefreshScreenEventCommand.mjs +27 -0
- package/esm2022/src/commands/ClientToServer/RollbackEventCommand.mjs +43 -0
- package/esm2022/src/commands/ClientToServer/SelectProgramCommand.mjs +19 -0
- package/{esm2020 → esm2022}/src/commands/ClientToServer/SetTransactionStateDataviewCommand.mjs +9 -9
- package/esm2022/src/commands/ClientToServer/SubformOpenEventCommand.mjs +24 -0
- package/esm2022/src/commands/ClientToServer/SubformRefreshEventCommand.mjs +27 -0
- package/esm2022/src/commands/ClientToServer/TransactionCommand.mjs +34 -0
- package/{esm2020 → esm2022}/src/commands/ClientToServer/UnloadCommand.mjs +18 -15
- package/esm2022/src/commands/ClientToServer/WriteMessageToServerLogCommand.mjs +18 -0
- package/esm2022/src/commands/DataViewCommandBase.mjs +8 -0
- package/{esm2020 → esm2022}/src/commands/IClientCommand.mjs +1 -1
- package/esm2022/src/commands/IClientTargetedCommand.mjs +13 -0
- package/{esm2020 → esm2022}/src/commands/IClientToServerCommandInfo.mjs +2 -2
- package/esm2022/src/commands/ServerToClient/AbortCommand.mjs +65 -0
- package/{esm2020 → esm2022}/src/commands/ServerToClient/AddLocateCommand.mjs +21 -21
- package/{esm2020 → esm2022}/src/commands/ServerToClient/AddRangeCommand.mjs +62 -62
- package/{esm2020 → esm2022}/src/commands/ServerToClient/AddSortCommand.mjs +33 -33
- package/esm2022/src/commands/ServerToClient/ClientRefreshCommand.mjs +25 -0
- package/esm2022/src/commands/ServerToClient/ClientTargetedCommandBase.mjs +24 -0
- package/esm2022/src/commands/ServerToClient/EnhancedVerifyCommand.mjs +45 -0
- package/esm2022/src/commands/ServerToClient/OpenURLCommand.mjs +221 -0
- package/{esm2020 → esm2022}/src/commands/ServerToClient/ResetLocateCommand.mjs +14 -14
- package/{esm2020 → esm2022}/src/commands/ServerToClient/ResetRangeCommand.mjs +14 -14
- package/{esm2020 → esm2022}/src/commands/ServerToClient/ResetSortCommand.mjs +14 -14
- package/esm2022/src/commands/ServerToClient/ResultCommand.mjs +37 -0
- package/esm2022/src/commands/ServerToClient/VerifyCommand.mjs +83 -0
- package/{esm2020 → esm2022}/src/commands/ServerToClient/XMLBasedCommandBuilder.mjs +132 -132
- package/{esm2020 → esm2022}/src/communications/IConnectionStateManager.mjs +1 -1
- package/esm2022/src/communications/InteractiveCommunicationsFailureHandler.mjs +15 -0
- package/{esm2020 → esm2022}/src/data/DataSourceIdKey.mjs +2 -2
- package/esm2022/src/data/DataView.mjs +1613 -0
- package/{esm2020 → esm2022}/src/data/DataViewBase.mjs +3 -3
- package/esm2022/src/data/DataviewManager.mjs +28 -0
- package/esm2022/src/data/DataviewManagerBase.mjs +15 -0
- package/esm2022/src/data/DvCache.mjs +67 -0
- package/esm2022/src/data/Field.mjs +646 -0
- package/esm2022/src/data/FieldBase.mjs +15 -0
- package/esm2022/src/data/FieldsTable.mjs +103 -0
- package/{esm2020 → esm2022}/src/data/IRecordsTable.mjs +1 -1
- package/{esm2020 → esm2022}/src/data/Key.mjs +88 -88
- package/esm2022/src/data/Record.mjs +880 -0
- package/{esm2020 → esm2022}/src/data/RecordOutOfDataViewException.mjs +15 -15
- package/esm2022/src/data/RecordsTable.mjs +267 -0
- package/{esm2020 → esm2022}/src/data/TaskTransactionManager.mjs +107 -103
- package/{esm2020 → esm2022}/src/data/XMLBasedDcValuesBuilder.mjs +74 -74
- package/{esm2020 → esm2022}/src/enums.mjs +23 -23
- package/esm2022/src/env/EnvVariablesTable.mjs +340 -0
- package/esm2022/src/env/Environment.mjs +487 -0
- package/{esm2020 → esm2022}/src/env/ILanguageData.mjs +1 -1
- package/esm2022/src/env/LanguageData.mjs +227 -0
- package/{esm2020 → esm2022}/src/env/MirrorString.mjs +65 -65
- package/esm2022/src/event/ActionManager.mjs +91 -0
- package/esm2022/src/event/Event.mjs +1333 -0
- package/esm2022/src/event/EventHandler.mjs +766 -0
- package/esm2022/src/event/EventHandlerPosition.mjs +204 -0
- package/esm2022/src/event/EventsManager.mjs +2988 -0
- package/{esm2020 → esm2022}/src/event/IEventsManager.mjs +6 -6
- package/esm2022/src/event/RunTimeEvent.mjs +399 -0
- package/{esm2020 → esm2022}/src/event/RunTimeEventBase.mjs +3 -3
- package/esm2022/src/event/UserEventsTable.mjs +47 -0
- package/esm2022/src/exp/ExpTable.mjs +57 -0
- package/esm2022/src/exp/Expression.mjs +200 -0
- package/esm2022/src/exp/ExpressionDict.mjs +727 -0
- package/esm2022/src/exp/ExpressionEvaluator.mjs +4206 -0
- package/esm2022/src/exp/ExpressionLocalJpn.mjs +314 -0
- package/{esm2020 → esm2022}/src/exp/GlobalParamsTable.mjs +85 -85
- package/esm2022/src/exp/YesNoExp.mjs +36 -0
- package/esm2022/src/gui/CreatedFormVector.mjs +23 -0
- package/esm2022/src/gui/FormsTable.mjs +66 -0
- package/esm2022/src/gui/MgControl.mjs +363 -0
- package/esm2022/src/gui/MgForm.mjs +1224 -0
- package/esm2022/src/http/HttpManager.mjs +97 -0
- package/esm2022/src/http/client/HttpClientAsync.mjs +68 -0
- package/{esm2020 → esm2022}/src/http/client/HttpClientBase.mjs +132 -132
- package/esm2022/src/http/client/HttpClientEvents.mjs +39 -0
- package/esm2022/src/http/client/HttpClientSync.mjs +42 -0
- package/esm2022/src/http/client/HttpUtility.mjs +84 -0
- package/{esm2020 → esm2022}/src/http/client/ICommunicationsFailureHandler.mjs +1 -1
- package/{esm2020 → esm2022}/src/remote/AddUserLocateRemoteDataViewCommand.mjs +18 -18
- package/{esm2020 → esm2022}/src/remote/AddUserRangeRemoteDataViewCommand.mjs +18 -18
- package/{esm2020 → esm2022}/src/remote/AddUserSortRemoteDataViewCommand.mjs +18 -18
- package/esm2022/src/remote/RemoteCommandsProcessor.mjs +883 -0
- package/{esm2020 → esm2022}/src/remote/RemoteControlItemsRefreshCommand.mjs +25 -25
- package/{esm2020 → esm2022}/src/remote/RemoteDataViewCommandBase.mjs +24 -24
- package/{esm2020 → esm2022}/src/remote/RemoteDataViewCommandFactory.mjs +60 -60
- package/{esm2020 → esm2022}/src/remote/RemoteDataViewCommandUpdateNonModifiable.mjs +15 -15
- package/{esm2020 → esm2022}/src/remote/RemoteDataviewManager.mjs +17 -17
- package/{esm2020 → esm2022}/src/remote/RemoteInitDataViewCommand.mjs +10 -10
- package/{esm2020 → esm2022}/src/remote/ResetUserLocateRemoteDataviewCommand.mjs +16 -16
- package/{esm2020 → esm2022}/src/remote/ResetUserRangeRemoteDataviewCommand.mjs +12 -12
- package/{esm2020 → esm2022}/src/remote/ResetUserSortRemoteDataviewCommand.mjs +15 -15
- package/esm2022/src/remote/ServerError.mjs +40 -0
- package/{esm2020 → esm2022}/src/remote/SetTransactionStateRemoteDataViewCommand.mjs +19 -19
- package/esm2022/src/rt/Argument.mjs +265 -0
- package/esm2022/src/rt/ArgumentsList.mjs +103 -0
- package/esm2022/src/rt/Boundary.mjs +152 -0
- package/esm2022/src/rt/CompMainPrgTable.mjs +63 -0
- package/esm2022/src/rt/DataviewHeaderBase.mjs +98 -0
- package/{esm2020 → esm2022}/src/rt/DataviewHeaderFactory.mjs +6 -6
- package/esm2022/src/rt/DataviewHeaders.mjs +53 -0
- package/{esm2020 → esm2022}/src/rt/DataviewHeadersSaxHandler.mjs +38 -38
- package/{esm2020 → esm2022}/src/rt/ExecutionStack.mjs +94 -94
- package/{esm2020 → esm2022}/src/rt/ExecutionStackEntry.mjs +17 -17
- package/{esm2020 → esm2022}/src/rt/HandlersTable.mjs +96 -96
- package/{esm2020 → esm2022}/src/rt/IDataSourceViewDefinition.mjs +1 -1
- package/{esm2020 → esm2022}/src/rt/IDataviewHeader.mjs +1 -1
- package/{esm2020 → esm2022}/src/rt/IResultValue.mjs +1 -1
- package/esm2022/src/rt/LastFocusedManager.mjs +65 -0
- package/esm2022/src/rt/Operation.mjs +735 -0
- package/esm2022/src/rt/OperationTable.mjs +67 -0
- package/esm2022/src/rt/Recompute.mjs +355 -0
- package/{esm2020 → esm2022}/src/rt/RecomputeTable.mjs +62 -62
- package/{esm2020 → esm2022}/src/rt/RemoteDataviewHeader.mjs +108 -108
- package/esm2022/src/rt/ResultValue.mjs +10 -0
- package/esm2022/src/rt/TableCache.mjs +177 -0
- package/esm2022/src/rt/TableCacheManager.mjs +67 -0
- package/esm2022/src/rt/Transaction.mjs +53 -0
- package/esm2022/src/security/UserDetails.mjs +71 -0
- package/{esm2020 → esm2022}/src/tasks/IMGDataCollection.mjs +1 -1
- package/esm2022/src/tasks/MGData.mjs +552 -0
- package/esm2022/src/tasks/MGDataCollection.mjs +252 -0
- package/esm2022/src/tasks/RCTimer.mjs +63 -0
- package/{esm2020 → esm2022}/src/tasks/RemoteTaskService.mjs +44 -44
- package/esm2022/src/tasks/Task.mjs +2499 -0
- package/esm2022/src/tasks/TaskBase.mjs +83 -0
- package/{esm2020 → esm2022}/src/tasks/TaskServiceBase.mjs +24 -24
- package/esm2022/src/tasks/TasksTable.mjs +80 -0
- package/esm2022/src/tasks/sort/Sort.mjs +5 -0
- package/{esm2020 → esm2022}/src/tasks/sort/SortCollection.mjs +67 -67
- package/{esm2020 → esm2022}/src/util/ConstUtils.mjs +13 -13
- package/esm2022/src/util/FlowMonitorQueue.mjs +451 -0
- package/{esm2020 → esm2022}/src/util/HeapSort.mjs +69 -69
- package/{esm2020 → esm2022}/src/util/IMirrorXML.mjs +1 -1
- package/{esm2020 → esm2022}/src/util/IServerConfig.mjs +1 -1
- package/{esm2020 → esm2022}/src/util/MgBlockingQueue.mjs +1 -1
- package/esm2022/src/util/MgPriorityBlockingQueue.mjs +74 -0
- package/esm2022/src/util/MgPriorityQueue.mjs +66 -0
- package/{esm2020 → esm2022}/src/util/ParamParseResult.mjs +7 -7
- package/esm2022/src/util/PrmMap.mjs +152 -0
- package/esm2022/src/util/ReturnResult.mjs +46 -0
- package/esm2022/src/util/ReturnResultBase.mjs +18 -0
- package/esm2022/src/util/Scrambler.mjs +89 -0
- package/esm2022/src/util/UniqueIDUtils.mjs +13 -0
- package/{esm2020 → esm2022}/src/util/cookie.service.mjs +92 -92
- package/{fesm2020 → fesm2022}/magic-xpa-engine.mjs +29888 -29690
- package/fesm2022/magic-xpa-engine.mjs.map +1 -0
- package/index.d.ts +187 -187
- package/package.json +8 -14
- package/src/AccessHelper.d.ts +20 -20
- package/src/ClientManager.d.ts +35 -32
- package/src/CommandsProcessorBase.d.ts +23 -23
- package/src/CommandsProcessorManager.d.ts +6 -6
- package/src/CommandsTable.d.ts +22 -22
- package/src/ConstInterface.d.ts +516 -515
- package/src/CurrentClientVersion.d.ts +1 -1
- package/src/FlowMonitorInterface.d.ts +15 -15
- package/src/GUIManager.d.ts +17 -17
- package/src/GlobalCommandsManager.d.ts +17 -17
- package/src/GuiEventsProcessor.d.ts +24 -24
- package/src/ICommandsTable.d.ts +9 -9
- package/src/ServerConfig.d.ts +35 -34
- package/src/bridge/IGuiEvent.d.ts +19 -19
- package/src/bridge/MagicBridge.d.ts +16 -16
- package/src/commands/ClientOriginatedCommandTaskTag.d.ts +8 -8
- package/src/commands/ClientToServer/AddUserLocateDataViewCommand.d.ts +4 -4
- package/src/commands/ClientToServer/AddUserRangeDataviewCommand.d.ts +6 -6
- package/src/commands/ClientToServer/AddUserSortDataViewCommand.d.ts +6 -6
- package/src/commands/ClientToServer/BrowserEscEventCommand.d.ts +9 -8
- package/src/commands/ClientToServer/ClientOriginatedCommand.d.ts +8 -8
- package/src/commands/ClientToServer/ClientOriginatedCommandSerializer.d.ts +6 -6
- package/src/commands/ClientToServer/ColumnSortEventCommand.d.ts +11 -10
- package/src/commands/ClientToServer/CommandFactory.d.ts +64 -64
- package/src/commands/ClientToServer/CommandSerializationHelper.d.ts +20 -20
- package/src/commands/ClientToServer/ComputeEventCommand.d.ts +9 -8
- package/src/commands/ClientToServer/ContextTerminationEventCommand.d.ts +8 -7
- package/src/commands/ClientToServer/ContextTimeoutResetCommand.d.ts +8 -7
- package/src/commands/ClientToServer/ControlItemsRefreshCommand.d.ts +6 -6
- package/src/commands/ClientToServer/DataViewOutputCommand.d.ts +9 -9
- package/src/commands/ClientToServer/DataviewCommand.d.ts +32 -32
- package/src/commands/ClientToServer/EvaluateCommand.d.ts +16 -15
- package/src/commands/ClientToServer/EventCommand.d.ts +16 -15
- package/src/commands/ClientToServer/ExecOperCommand.d.ts +24 -23
- package/src/commands/ClientToServer/FetchDataControlValuesEventCommand.d.ts +9 -8
- package/src/commands/ClientToServer/GlobalParamsQueryCommand.d.ts +5 -5
- package/src/commands/ClientToServer/ICommandTaskTag.d.ts +3 -3
- package/src/commands/ClientToServer/IndexChangeEventCommand.d.ts +9 -8
- package/src/commands/ClientToServer/IniputForceWriteCommand.d.ts +11 -10
- package/src/commands/ClientToServer/NonReversibleExitEventCommand.d.ts +9 -8
- package/src/commands/ClientToServer/QueryCommand.d.ts +8 -8
- package/src/commands/ClientToServer/RecomputeCommand.d.ts +12 -11
- package/src/commands/ClientToServer/RefreshEventCommand.d.ts +13 -12
- package/src/commands/ClientToServer/RefreshScreenEventCommand.d.ts +11 -10
- package/src/commands/ClientToServer/RollbackEventCommand.d.ts +15 -14
- package/src/commands/ClientToServer/SelectProgramCommand.d.ts +7 -6
- package/src/commands/ClientToServer/SetTransactionStateDataviewCommand.d.ts +5 -5
- package/src/commands/ClientToServer/SubformOpenEventCommand.d.ts +9 -8
- package/src/commands/ClientToServer/SubformRefreshEventCommand.d.ts +10 -9
- package/src/commands/ClientToServer/TransactionCommand.d.ts +14 -12
- package/src/commands/ClientToServer/UnloadCommand.d.ts +8 -7
- package/src/commands/ClientToServer/WriteMessageToServerLogCommand.d.ts +6 -6
- package/src/commands/DataViewCommandBase.d.ts +6 -6
- package/src/commands/IClientCommand.d.ts +2 -2
- package/src/commands/IClientTargetedCommand.d.ts +12 -12
- package/src/commands/IClientToServerCommandInfo.d.ts +4 -3
- package/src/commands/ServerToClient/AbortCommand.d.ts +11 -11
- package/src/commands/ServerToClient/AddLocateCommand.d.ts +6 -6
- package/src/commands/ServerToClient/AddRangeCommand.d.ts +10 -10
- package/src/commands/ServerToClient/AddSortCommand.d.ts +9 -9
- package/src/commands/ServerToClient/ClientRefreshCommand.d.ts +7 -7
- package/src/commands/ServerToClient/ClientTargetedCommandBase.d.ts +12 -12
- package/src/commands/ServerToClient/EnhancedVerifyCommand.d.ts +13 -13
- package/src/commands/ServerToClient/OpenURLCommand.d.ts +21 -21
- package/src/commands/ServerToClient/ResetLocateCommand.d.ts +6 -6
- package/src/commands/ServerToClient/ResetRangeCommand.d.ts +6 -6
- package/src/commands/ServerToClient/ResetSortCommand.d.ts +6 -6
- package/src/commands/ServerToClient/ResultCommand.d.ts +10 -10
- package/src/commands/ServerToClient/VerifyCommand.d.ts +17 -17
- package/src/commands/ServerToClient/XMLBasedCommandBuilder.d.ts +11 -11
- package/src/communications/IConnectionStateManager.d.ts +4 -4
- package/src/communications/InteractiveCommunicationsFailureHandler.d.ts +6 -6
- package/src/data/DataSourceIdKey.d.ts +2 -2
- package/src/data/DataView.d.ts +162 -162
- package/src/data/DataViewBase.d.ts +12 -12
- package/src/data/DataviewManager.d.ts +14 -14
- package/src/data/DataviewManagerBase.d.ts +11 -11
- package/src/data/DvCache.d.ts +15 -15
- package/src/data/Field.d.ts +103 -103
- package/src/data/FieldBase.d.ts +23 -23
- package/src/data/FieldsTable.d.ts +27 -27
- package/src/data/IRecordsTable.d.ts +7 -7
- package/src/data/Key.d.ts +15 -15
- package/src/data/Record.d.ts +157 -156
- package/src/data/RecordOutOfDataViewException.d.ts +10 -10
- package/src/data/RecordsTable.d.ts +38 -38
- package/src/data/TaskTransactionManager.d.ts +17 -17
- package/src/data/XMLBasedDcValuesBuilder.d.ts +11 -11
- package/src/enums.d.ts +21 -21
- package/src/env/EnvVariablesTable.d.ts +17 -17
- package/src/env/Environment.d.ts +118 -118
- package/src/env/ILanguageData.d.ts +3 -3
- package/src/env/LanguageData.d.ts +20 -20
- package/src/env/MirrorString.d.ts +15 -15
- package/src/event/ActionManager.d.ts +14 -14
- package/src/event/Event.d.ts +79 -79
- package/src/event/EventHandler.d.ts +66 -66
- package/src/event/EventHandlerPosition.d.ts +25 -25
- package/src/event/EventsManager.d.ts +205 -204
- package/src/event/IEventsManager.d.ts +77 -77
- package/src/event/RunTimeEvent.d.ts +126 -123
- package/src/event/RunTimeEventBase.d.ts +5 -5
- package/src/event/UserEventsTable.d.ts +11 -11
- package/src/exp/ExpTable.d.ts +11 -11
- package/src/exp/Expression.d.ts +37 -37
- package/src/exp/ExpressionDict.d.ts +12 -12
- package/src/exp/ExpressionEvaluator.d.ts +198 -198
- package/src/exp/ExpressionLocalJpn.d.ts +18 -18
- package/src/exp/GlobalParamsTable.d.ts +19 -19
- package/src/exp/YesNoExp.d.ts +9 -9
- package/src/gui/CreatedFormVector.d.ts +10 -10
- package/src/gui/FormsTable.d.ts +15 -15
- package/src/gui/MgControl.d.ts +60 -60
- package/src/gui/MgForm.d.ts +96 -93
- package/src/http/HttpManager.d.ts +25 -25
- package/src/http/client/HttpClientAsync.d.ts +16 -16
- package/src/http/client/HttpClientBase.d.ts +30 -30
- package/src/http/client/HttpClientEvents.d.ts +18 -18
- package/src/http/client/HttpClientSync.d.ts +17 -17
- package/src/http/client/HttpUtility.d.ts +10 -10
- package/src/http/client/ICommunicationsFailureHandler.d.ts +5 -5
- package/src/remote/AddUserLocateRemoteDataViewCommand.d.ts +8 -8
- package/src/remote/AddUserRangeRemoteDataViewCommand.d.ts +8 -8
- package/src/remote/AddUserSortRemoteDataViewCommand.d.ts +8 -8
- package/src/remote/RemoteCommandsProcessor.d.ts +51 -51
- package/src/remote/RemoteControlItemsRefreshCommand.d.ts +8 -8
- package/src/remote/RemoteDataViewCommandBase.d.ts +10 -10
- package/src/remote/RemoteDataViewCommandFactory.d.ts +6 -6
- package/src/remote/RemoteDataViewCommandUpdateNonModifiable.d.ts +8 -8
- package/src/remote/RemoteDataviewManager.d.ts +9 -9
- package/src/remote/RemoteInitDataViewCommand.d.ts +7 -7
- package/src/remote/ResetUserLocateRemoteDataviewCommand.d.ts +7 -7
- package/src/remote/ResetUserRangeRemoteDataviewCommand.d.ts +7 -7
- package/src/remote/ResetUserSortRemoteDataviewCommand.d.ts +7 -7
- package/src/remote/ServerError.d.ts +16 -16
- package/src/remote/SetTransactionStateRemoteDataViewCommand.d.ts +8 -8
- package/src/rt/Argument.d.ts +36 -36
- package/src/rt/ArgumentsList.d.ts +24 -24
- package/src/rt/Boundary.d.ts +27 -27
- package/src/rt/CompMainPrgTable.d.ts +10 -10
- package/src/rt/DataviewHeaderBase.d.ts +34 -34
- package/src/rt/DataviewHeaderFactory.d.ts +5 -5
- package/src/rt/DataviewHeaders.d.ts +12 -12
- package/src/rt/DataviewHeadersSaxHandler.d.ts +10 -10
- package/src/rt/ExecutionStack.d.ts +22 -22
- package/src/rt/ExecutionStackEntry.d.ts +7 -7
- package/src/rt/HandlersTable.d.ts +19 -19
- package/src/rt/IDataSourceViewDefinition.d.ts +6 -6
- package/src/rt/IDataviewHeader.d.ts +10 -10
- package/src/rt/IResultValue.d.ts +4 -4
- package/src/rt/LastFocusedManager.d.ts +23 -23
- package/src/rt/Operation.d.ts +97 -97
- package/src/rt/OperationTable.d.ts +15 -15
- package/src/rt/Recompute.d.ts +41 -41
- package/src/rt/RecomputeTable.d.ts +9 -9
- package/src/rt/RemoteDataviewHeader.d.ts +14 -14
- package/src/rt/ResultValue.d.ts +7 -7
- package/src/rt/TableCache.d.ts +29 -29
- package/src/rt/TableCacheManager.d.ts +10 -10
- package/src/rt/Transaction.d.ts +23 -23
- package/src/security/UserDetails.d.ts +16 -16
- package/src/tasks/IMGDataCollection.d.ts +26 -26
- package/src/tasks/MGData.d.ts +63 -63
- package/src/tasks/MGDataCollection.d.ts +42 -42
- package/src/tasks/RCTimer.d.ts +13 -13
- package/src/tasks/RemoteTaskService.d.ts +16 -16
- package/src/tasks/Task.d.ts +312 -312
- package/src/tasks/TaskBase.d.ts +123 -123
- package/src/tasks/TaskServiceBase.d.ts +16 -16
- package/src/tasks/TasksTable.d.ts +21 -21
- package/src/tasks/sort/Sort.d.ts +4 -4
- package/src/tasks/sort/SortCollection.d.ts +11 -11
- package/src/util/ConstUtils.d.ts +3 -3
- package/src/util/FlowMonitorQueue.d.ts +70 -70
- package/src/util/HeapSort.d.ts +6 -6
- package/src/util/IMirrorXML.d.ts +6 -6
- package/src/util/IServerConfig.d.ts +11 -11
- package/src/util/MgBlockingQueue.d.ts +5 -5
- package/src/util/MgPriorityBlockingQueue.d.ts +17 -17
- package/src/util/MgPriorityQueue.d.ts +13 -13
- package/src/util/ParamParseResult.d.ts +6 -6
- package/src/util/PrmMap.d.ts +28 -28
- package/src/util/ReturnResult.d.ts +18 -18
- package/src/util/ReturnResultBase.d.ts +11 -11
- package/src/util/Scrambler.d.ts +10 -10
- package/src/util/UniqueIDUtils.d.ts +4 -4
- package/src/util/cookie.service.d.ts +8 -8
- package/esm2020/src/AccessHelper.mjs +0 -9
- package/esm2020/src/ClientManager.mjs +0 -399
- package/esm2020/src/CommandsProcessorBase.mjs +0 -58
- package/esm2020/src/CommandsTable.mjs +0 -162
- package/esm2020/src/ConstInterface.mjs +0 -516
- package/esm2020/src/FlowMonitorInterface.mjs +0 -16
- package/esm2020/src/GUIManager.mjs +0 -62
- package/esm2020/src/GlobalCommandsManager.mjs +0 -34
- package/esm2020/src/GuiEventsProcessor.mjs +0 -154
- package/esm2020/src/ServerConfig.mjs +0 -117
- package/esm2020/src/bridge/MagicBridge.mjs +0 -41
- package/esm2020/src/commands/ClientOriginatedCommandTaskTag.mjs +0 -11
- package/esm2020/src/commands/ClientToServer/BrowserEscEventCommand.mjs +0 -23
- package/esm2020/src/commands/ClientToServer/ColumnSortEventCommand.mjs +0 -26
- package/esm2020/src/commands/ClientToServer/CommandFactory.mjs +0 -260
- package/esm2020/src/commands/ClientToServer/CommandSerializationHelper.mjs +0 -69
- package/esm2020/src/commands/ClientToServer/ComputeEventCommand.mjs +0 -23
- package/esm2020/src/commands/ClientToServer/DataViewOutputCommand.mjs +0 -13
- package/esm2020/src/commands/ClientToServer/EvaluateCommand.mjs +0 -36
- package/esm2020/src/commands/ClientToServer/ExecOperCommand.mjs +0 -67
- package/esm2020/src/commands/ClientToServer/FetchDataControlValuesEventCommand.mjs +0 -22
- package/esm2020/src/commands/ClientToServer/IndexChangeEventCommand.mjs +0 -21
- package/esm2020/src/commands/ClientToServer/IniputForceWriteCommand.mjs +0 -23
- package/esm2020/src/commands/ClientToServer/RecomputeCommand.mjs +0 -27
- package/esm2020/src/commands/ClientToServer/RefreshEventCommand.mjs +0 -27
- package/esm2020/src/commands/ClientToServer/RefreshScreenEventCommand.mjs +0 -24
- package/esm2020/src/commands/ClientToServer/RollbackEventCommand.mjs +0 -39
- package/esm2020/src/commands/ClientToServer/SelectProgramCommand.mjs +0 -15
- package/esm2020/src/commands/ClientToServer/SubformOpenEventCommand.mjs +0 -21
- package/esm2020/src/commands/ClientToServer/SubformRefreshEventCommand.mjs +0 -24
- package/esm2020/src/commands/ClientToServer/TransactionCommand.mjs +0 -28
- package/esm2020/src/commands/ClientToServer/WriteMessageToServerLogCommand.mjs +0 -18
- package/esm2020/src/commands/DataViewCommandBase.mjs +0 -10
- package/esm2020/src/commands/IClientTargetedCommand.mjs +0 -9
- package/esm2020/src/commands/ServerToClient/AbortCommand.mjs +0 -65
- package/esm2020/src/commands/ServerToClient/ClientRefreshCommand.mjs +0 -25
- package/esm2020/src/commands/ServerToClient/ClientTargetedCommandBase.mjs +0 -27
- package/esm2020/src/commands/ServerToClient/EnhancedVerifyCommand.mjs +0 -45
- package/esm2020/src/commands/ServerToClient/OpenURLCommand.mjs +0 -221
- package/esm2020/src/commands/ServerToClient/ResultCommand.mjs +0 -37
- package/esm2020/src/commands/ServerToClient/VerifyCommand.mjs +0 -83
- package/esm2020/src/communications/InteractiveCommunicationsFailureHandler.mjs +0 -17
- package/esm2020/src/data/DataView.mjs +0 -1610
- package/esm2020/src/data/DataviewManager.mjs +0 -28
- package/esm2020/src/data/DataviewManagerBase.mjs +0 -15
- package/esm2020/src/data/DvCache.mjs +0 -67
- package/esm2020/src/data/Field.mjs +0 -646
- package/esm2020/src/data/FieldBase.mjs +0 -18
- package/esm2020/src/data/FieldsTable.mjs +0 -103
- package/esm2020/src/data/Record.mjs +0 -846
- package/esm2020/src/data/RecordsTable.mjs +0 -267
- package/esm2020/src/env/EnvVariablesTable.mjs +0 -340
- package/esm2020/src/env/Environment.mjs +0 -489
- package/esm2020/src/env/LanguageData.mjs +0 -226
- package/esm2020/src/event/ActionManager.mjs +0 -91
- package/esm2020/src/event/Event.mjs +0 -1333
- package/esm2020/src/event/EventHandler.mjs +0 -766
- package/esm2020/src/event/EventHandlerPosition.mjs +0 -204
- package/esm2020/src/event/EventsManager.mjs +0 -2975
- package/esm2020/src/event/RunTimeEvent.mjs +0 -392
- package/esm2020/src/event/UserEventsTable.mjs +0 -47
- package/esm2020/src/exp/ExpTable.mjs +0 -59
- package/esm2020/src/exp/Expression.mjs +0 -200
- package/esm2020/src/exp/ExpressionDict.mjs +0 -727
- package/esm2020/src/exp/ExpressionEvaluator.mjs +0 -4208
- package/esm2020/src/exp/ExpressionLocalJpn.mjs +0 -314
- package/esm2020/src/exp/YesNoExp.mjs +0 -36
- package/esm2020/src/gui/CreatedFormVector.mjs +0 -23
- package/esm2020/src/gui/FormsTable.mjs +0 -66
- package/esm2020/src/gui/MgControl.mjs +0 -353
- package/esm2020/src/gui/MgForm.mjs +0 -1181
- package/esm2020/src/http/HttpManager.mjs +0 -97
- package/esm2020/src/http/client/HttpClientAsync.mjs +0 -67
- package/esm2020/src/http/client/HttpClientEvents.mjs +0 -39
- package/esm2020/src/http/client/HttpClientSync.mjs +0 -42
- package/esm2020/src/http/client/HttpUtility.mjs +0 -84
- package/esm2020/src/remote/RemoteCommandsProcessor.mjs +0 -880
- package/esm2020/src/remote/ServerError.mjs +0 -40
- package/esm2020/src/rt/Argument.mjs +0 -265
- package/esm2020/src/rt/ArgumentsList.mjs +0 -103
- package/esm2020/src/rt/Boundary.mjs +0 -152
- package/esm2020/src/rt/CompMainPrgTable.mjs +0 -65
- package/esm2020/src/rt/DataviewHeaderBase.mjs +0 -96
- package/esm2020/src/rt/DataviewHeaders.mjs +0 -53
- package/esm2020/src/rt/LastFocusedManager.mjs +0 -67
- package/esm2020/src/rt/Operation.mjs +0 -735
- package/esm2020/src/rt/OperationTable.mjs +0 -67
- package/esm2020/src/rt/Recompute.mjs +0 -355
- package/esm2020/src/rt/ResultValue.mjs +0 -12
- package/esm2020/src/rt/TableCache.mjs +0 -177
- package/esm2020/src/rt/TableCacheManager.mjs +0 -67
- package/esm2020/src/rt/Transaction.mjs +0 -53
- package/esm2020/src/security/UserDetails.mjs +0 -71
- package/esm2020/src/tasks/MGData.mjs +0 -552
- package/esm2020/src/tasks/MGDataCollection.mjs +0 -252
- package/esm2020/src/tasks/RCTimer.mjs +0 -63
- package/esm2020/src/tasks/Task.mjs +0 -2496
- package/esm2020/src/tasks/TaskBase.mjs +0 -87
- package/esm2020/src/tasks/TasksTable.mjs +0 -80
- package/esm2020/src/tasks/sort/Sort.mjs +0 -7
- package/esm2020/src/util/FlowMonitorQueue.mjs +0 -453
- package/esm2020/src/util/MgPriorityBlockingQueue.mjs +0 -74
- package/esm2020/src/util/MgPriorityQueue.mjs +0 -66
- package/esm2020/src/util/PrmMap.mjs +0 -151
- package/esm2020/src/util/ReturnResult.mjs +0 -46
- package/esm2020/src/util/ReturnResultBase.mjs +0 -18
- package/esm2020/src/util/Scrambler.mjs +0 -89
- package/esm2020/src/util/UniqueIDUtils.mjs +0 -12
- package/fesm2015/magic-xpa-engine.mjs +0 -30837
- package/fesm2015/magic-xpa-engine.mjs.map +0 -1
- package/fesm2020/magic-xpa-engine.mjs.map +0 -1
@@ -0,0 +1,227 @@
|
|
1
|
+
import { Hashtable, NString, isUndefined } from "@magic-xpa/mscorelib";
|
2
|
+
import { JSON_Utils, Logger, Misc, MsgInterface, StrUtil, XMLConstants } from "@magic-xpa/utils";
|
3
|
+
import { ConstInterface } from "../ConstInterface";
|
4
|
+
import { CommandsProcessorManager } from "../CommandsProcessorManager";
|
5
|
+
import { ClientManager } from "../ClientManager";
|
6
|
+
const MLS_EOF_CHARS_TO_READ = 10;
|
7
|
+
const START_TAG = "<ErrorCodes>";
|
8
|
+
const END_TAG = "</ErrorCodes>";
|
9
|
+
export class LanguageData {
|
10
|
+
_constMessages = null;
|
11
|
+
_constMessagesContent = null;
|
12
|
+
_constMessagesUrl = null;
|
13
|
+
_mlsContent = null;
|
14
|
+
_mlsFileUrl = null;
|
15
|
+
_mlsStrings = null;
|
16
|
+
static Instance = new LanguageData();
|
17
|
+
constructor() {
|
18
|
+
}
|
19
|
+
async fillData(parser) {
|
20
|
+
while (this.initInnerObjects(parser, parser.getNextTag())) {
|
21
|
+
}
|
22
|
+
await this.InitConstMessagesTable();
|
23
|
+
await this.fillMlsMessagesTable();
|
24
|
+
}
|
25
|
+
initInnerObjects(parser, foundTagName) {
|
26
|
+
if (foundTagName == null)
|
27
|
+
return false;
|
28
|
+
switch (foundTagName) {
|
29
|
+
case ConstInterface.MG_TAG_LANGUAGE:
|
30
|
+
parser.setCurrIndex(parser.getXMLdata().indexOf(XMLConstants.TAG_CLOSE, parser.getCurrIndex()) + 1);
|
31
|
+
break;
|
32
|
+
case ConstInterface.MG_TAG_CONSTMESSAGES: {
|
33
|
+
let endUrlValue;
|
34
|
+
parser.setCurrIndex(parser.getXMLdata().indexOf(XMLConstants.TAG_CLOSE, parser.getCurrIndex()) + 1);
|
35
|
+
endUrlValue = parser.getXMLdata().indexOf(XMLConstants.TAG_OPEN, parser.getCurrIndex());
|
36
|
+
this._constMessagesUrl = parser.getXMLsubstring(endUrlValue);
|
37
|
+
parser.setCurrIndex(endUrlValue);
|
38
|
+
break;
|
39
|
+
}
|
40
|
+
case ConstInterface.MG_TAG_CONSTMESSAGESCONTENT: {
|
41
|
+
let endUrlValue;
|
42
|
+
parser.setCurrIndex(parser.getXMLdata().indexOf(XMLConstants.TAG_CLOSE, parser.getCurrIndex()) + 1);
|
43
|
+
endUrlValue = parser.getXMLdata().indexOf(ConstInterface.MG_TAG_CONSTMESSAGESCONTENT, parser.getCurrIndex()) - 2;
|
44
|
+
this._constMessagesContent = parser.getXMLsubstring(endUrlValue);
|
45
|
+
parser.setCurrIndex(endUrlValue);
|
46
|
+
break;
|
47
|
+
}
|
48
|
+
case ConstInterface.MG_TAG_MLS_CONTENT: {
|
49
|
+
let endUrlValue;
|
50
|
+
parser.setCurrIndex(parser.getXMLdata().indexOf(XMLConstants.TAG_CLOSE, parser.getCurrIndex()) + 1);
|
51
|
+
endUrlValue = parser.getXMLdata().indexOf(ConstInterface.MG_TAG_MLS_CONTENT, parser.getCurrIndex()) - 2;
|
52
|
+
this._mlsContent = parser.getXMLsubstring(endUrlValue);
|
53
|
+
parser.setCurrIndex(endUrlValue);
|
54
|
+
if (!NString.IsNullOrEmpty(this._mlsContent)) {
|
55
|
+
if (this._mlsStrings != null) {
|
56
|
+
this._mlsStrings.Clear();
|
57
|
+
this._mlsStrings = null;
|
58
|
+
}
|
59
|
+
}
|
60
|
+
if (NString.IsNullOrEmpty(this._mlsContent) && this._mlsContent != null) {
|
61
|
+
this._mlsContent = null;
|
62
|
+
if (this._mlsStrings != null) {
|
63
|
+
this._mlsStrings.Clear();
|
64
|
+
this._mlsStrings = null;
|
65
|
+
}
|
66
|
+
}
|
67
|
+
break;
|
68
|
+
}
|
69
|
+
case ConstInterface.MG_TAG_MLS_FILE_URL: {
|
70
|
+
let endUrlValue;
|
71
|
+
parser.setCurrIndex(parser.getXMLdata().indexOf(XMLConstants.TAG_CLOSE, parser.getCurrIndex()) + 1);
|
72
|
+
endUrlValue = parser.getXMLdata().indexOf(XMLConstants.TAG_OPEN, parser.getCurrIndex());
|
73
|
+
this._mlsFileUrl = parser.getXMLsubstring(endUrlValue).trim();
|
74
|
+
if (!NString.IsNullOrEmpty(this._mlsFileUrl)) {
|
75
|
+
if (this._mlsStrings != null) {
|
76
|
+
this._mlsStrings.Clear();
|
77
|
+
this._mlsStrings = null;
|
78
|
+
}
|
79
|
+
}
|
80
|
+
else if (NString.IsNullOrEmpty(this._mlsFileUrl) && this._mlsFileUrl != null) {
|
81
|
+
this._mlsFileUrl = null;
|
82
|
+
if (this._mlsStrings != null) {
|
83
|
+
this._mlsStrings.Clear();
|
84
|
+
this._mlsStrings = null;
|
85
|
+
}
|
86
|
+
}
|
87
|
+
parser.setCurrIndex(endUrlValue);
|
88
|
+
break;
|
89
|
+
}
|
90
|
+
case ConstInterface.MG_TAG_CONSTMESSAGES_END:
|
91
|
+
case ConstInterface.MG_TAG_MLS_FILE_URL_END:
|
92
|
+
case ConstInterface.MG_TAG_CONSTMESSAGESCONTENT_END:
|
93
|
+
case ConstInterface.MG_TAG_MLS_CONTENT_END:
|
94
|
+
parser.setCurrIndex2EndOfTag();
|
95
|
+
break;
|
96
|
+
case ConstInterface.MG_TAG_LANGUAGE_END:
|
97
|
+
parser.setCurrIndex2EndOfTag();
|
98
|
+
return false;
|
99
|
+
default:
|
100
|
+
Logger.Instance.WriteExceptionToLogWithMsg("There is no such tag in LanguageData.initInnerObjects(): " + foundTagName);
|
101
|
+
return false;
|
102
|
+
}
|
103
|
+
return true;
|
104
|
+
}
|
105
|
+
getConstMessage(msgId) {
|
106
|
+
if (this._constMessages === null) {
|
107
|
+
this._constMessages = new Hashtable();
|
108
|
+
for (let i = 0; i <= MsgInterface.DefaultMessages.length - 1; i = i + 1) {
|
109
|
+
this._constMessages.set_Item(MsgInterface.DefaultMessages[i].MsgID, MsgInterface.DefaultMessages[i].MsgString);
|
110
|
+
}
|
111
|
+
}
|
112
|
+
return this._constMessages.get_Item(msgId);
|
113
|
+
}
|
114
|
+
async InitConstMessagesTable() {
|
115
|
+
try {
|
116
|
+
let msgsInCommentString = null;
|
117
|
+
if (this._constMessagesUrl != null || this._constMessagesContent != null) {
|
118
|
+
if (this._constMessagesUrl != null) {
|
119
|
+
try {
|
120
|
+
msgsInCommentString = await CommandsProcessorManager.GetContent(this._constMessagesUrl, true);
|
121
|
+
}
|
122
|
+
catch (err) {
|
123
|
+
Logger.Instance.WriteExceptionToLogWithMsg(NString.Format("Unknown message file: \"{0}\"", this._constMessagesUrl));
|
124
|
+
}
|
125
|
+
}
|
126
|
+
else {
|
127
|
+
msgsInCommentString = this._constMessagesContent;
|
128
|
+
}
|
129
|
+
if (msgsInCommentString != null) {
|
130
|
+
let startData = msgsInCommentString.indexOf(START_TAG);
|
131
|
+
let endData = msgsInCommentString.indexOf(END_TAG) + END_TAG.length;
|
132
|
+
let retrievedConstMessages = msgsInCommentString.substr(startData, (endData) - (startData));
|
133
|
+
this.fillConstMessagesTable(retrievedConstMessages);
|
134
|
+
}
|
135
|
+
}
|
136
|
+
else {
|
137
|
+
Logger.Instance.WriteDevToLog("'constMessagesUrl' and 'constMessagesContent' were not initialized.");
|
138
|
+
}
|
139
|
+
}
|
140
|
+
catch (ex) {
|
141
|
+
Logger.Instance.WriteExceptionToLog(ex);
|
142
|
+
}
|
143
|
+
}
|
144
|
+
fillConstMessagesTable(constMessages) {
|
145
|
+
try {
|
146
|
+
if (constMessages !== null) {
|
147
|
+
this._constMessages = new Hashtable();
|
148
|
+
JSON_Utils.JSONFromXML(constMessages, this.FillConstMessagesFromJSON.bind(this));
|
149
|
+
}
|
150
|
+
}
|
151
|
+
catch (ex) {
|
152
|
+
Logger.Instance.WriteExceptionToLog(ex);
|
153
|
+
}
|
154
|
+
}
|
155
|
+
FillConstMessagesFromJSON(error, result) {
|
156
|
+
if (error != null) {
|
157
|
+
throw error;
|
158
|
+
}
|
159
|
+
let errorMessages = result['ErrorCodes']['ErrorMessage'];
|
160
|
+
for (let i = 0; i < errorMessages.length; i++) {
|
161
|
+
let errorId = errorMessages[i]['$']['id'];
|
162
|
+
let errorMessage = errorMessages[i]['_'];
|
163
|
+
this._constMessages.set_Item(errorId, (isUndefined(errorMessage) ? "" : errorMessage.trim()));
|
164
|
+
}
|
165
|
+
}
|
166
|
+
translate(fromString) {
|
167
|
+
let toString = null;
|
168
|
+
if (this._mlsStrings == null)
|
169
|
+
return fromString;
|
170
|
+
try {
|
171
|
+
toString = this._mlsStrings.get_Item(fromString);
|
172
|
+
if (toString == null)
|
173
|
+
toString = fromString;
|
174
|
+
}
|
175
|
+
catch (e) {
|
176
|
+
console.log(e);
|
177
|
+
}
|
178
|
+
return toString;
|
179
|
+
}
|
180
|
+
async fillMlsMessagesTable() {
|
181
|
+
try {
|
182
|
+
if (this._mlsContent != null) {
|
183
|
+
if (this._mlsContent.length > 0) {
|
184
|
+
let linePairs = 0;
|
185
|
+
let srcLine = this._mlsContent + 3;
|
186
|
+
let transLine;
|
187
|
+
this._mlsStrings = new Hashtable();
|
188
|
+
let linesStr = this._mlsContent.substr(this._mlsContent.length - MLS_EOF_CHARS_TO_READ, 8);
|
189
|
+
linePairs = parseInt(linesStr.toString(), 16);
|
190
|
+
let tokens = StrUtil.tokenize(srcLine.toString(), "\n");
|
191
|
+
for (let pairNum = 0; pairNum < linePairs * 2; pairNum += 2) {
|
192
|
+
srcLine = tokens[pairNum].substr(0, tokens[pairNum].length - 1);
|
193
|
+
transLine = tokens[pairNum + 1].substr(0, tokens[pairNum + 1].length - 1);
|
194
|
+
if (this._mlsStrings.get_Item(srcLine.toString()) == null)
|
195
|
+
this._mlsStrings.set_Item(srcLine.toString(), transLine);
|
196
|
+
}
|
197
|
+
}
|
198
|
+
}
|
199
|
+
else if (this._mlsFileUrl != null) {
|
200
|
+
if (this._mlsFileUrl.startsWith("./"))
|
201
|
+
this._mlsFileUrl = NString.Replace(this._mlsFileUrl, './', ClientManager.GetAssetsURL() + '/cache/');
|
202
|
+
let contentStr = await CommandsProcessorManager.GetContent(this._mlsFileUrl, true);
|
203
|
+
let buffer = contentStr;
|
204
|
+
if (buffer != null && buffer.length > 0) {
|
205
|
+
let contentLen = buffer.length;
|
206
|
+
this._mlsStrings = new Hashtable();
|
207
|
+
let linesStr = buffer.substr(contentLen - MLS_EOF_CHARS_TO_READ, 8);
|
208
|
+
let linePairs = parseInt(linesStr, 16);
|
209
|
+
let srcLine;
|
210
|
+
let transLine;
|
211
|
+
let tokens = StrUtil.tokenize(buffer.toString(), "\n");
|
212
|
+
for (let pairNum = 0; pairNum < linePairs * 2; pairNum += 2) {
|
213
|
+
srcLine = tokens[pairNum].substr(0, tokens[pairNum].length - 1);
|
214
|
+
transLine = tokens[pairNum + 1].substr(0, tokens[pairNum + 1].length - 1);
|
215
|
+
if (this._mlsStrings.get_Item(srcLine) == null)
|
216
|
+
this._mlsStrings.set_Item(srcLine, transLine);
|
217
|
+
}
|
218
|
+
}
|
219
|
+
}
|
220
|
+
}
|
221
|
+
catch (e) {
|
222
|
+
Logger.Instance.WriteExceptionToLog(e);
|
223
|
+
Misc.WriteStackTrace(e);
|
224
|
+
}
|
225
|
+
}
|
226
|
+
}
|
227
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiTGFuZ3VhZ2VEYXRhLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvZW5naW5lL3NyYy9lbnYvTGFuZ3VhZ2VEYXRhLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBQyxTQUFTLEVBQUUsT0FBTyxFQUFFLFdBQVcsRUFBQyxNQUFNLHNCQUFzQixDQUFDO0FBQ3JFLE9BQU8sRUFBQyxVQUFVLEVBQUUsTUFBTSxFQUFFLElBQUksRUFBRSxZQUFZLEVBQUUsT0FBTyxFQUFFLFlBQVksRUFBWSxNQUFNLGtCQUFrQixDQUFDO0FBQzFHLE9BQU8sRUFBQyxjQUFjLEVBQUMsTUFBTSxtQkFBbUIsQ0FBQztBQUNqRCxPQUFPLEVBQUMsd0JBQXdCLEVBQUMsTUFBTSw2QkFBNkIsQ0FBQztBQUVyRSxPQUFPLEVBQUMsYUFBYSxFQUFDLE1BQU0sa0JBQWtCLENBQUM7QUFFL0MsTUFBTSxxQkFBcUIsR0FBVyxFQUFFLENBQUM7QUFDekMsTUFBTSxTQUFTLEdBQVcsY0FBYyxDQUFDO0FBQ3pDLE1BQU0sT0FBTyxHQUFXLGVBQWUsQ0FBQztBQUV4QyxNQUFNLE9BQU8sWUFBWTtJQUNmLGNBQWMsR0FBOEIsSUFBSSxDQUFDO0lBQ2pELHFCQUFxQixHQUFXLElBQUksQ0FBQztJQUNyQyxpQkFBaUIsR0FBVyxJQUFJLENBQU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AgICAgIGZvciAobGV0IHBhaXJOdW06IG51bWJlciA9IDA7IHBhaXJOdW0gPCBsaW5lUGFpcnMgKiAyOyBwYWlyTnVtICs9IDIpIHtcclxuICAgICAgICAgICAgc3JjTGluZSA9IHRva2Vuc1twYWlyTnVtXS5zdWJzdHIoMCwgdG9rZW5zW3BhaXJOdW1dLmxlbmd0aCAtIDEpO1xyXG4gICAgICAgICAgICB0cmFuc0xpbmUgPSB0b2tlbnNbcGFpck51bSArIDFdLnN1YnN0cigwLCB0b2tlbnNbcGFpck51bSArIDFdLmxlbmd0aCAtIDEpO1xyXG4gICAgICAgICAgICBpZiAodGhpcy5fbWxzU3RyaW5ncy5nZXRfSXRlbShzcmNMaW5lKSA9PSBudWxsKVxyXG4gICAgICAgICAgICAgIHRoaXMuX21sc1N0cmluZ3Muc2V0X0l0ZW0oc3JjTGluZSwgdHJhbnNMaW5lKTtcclxuICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICAgIH1cclxuICAgIH1cclxuICAgIGNhdGNoIChlKSB7XHJcbiAgICAgIExvZ2dlci5JbnN0YW5jZS5Xcml0ZUV4Y2VwdGlvblRvTG9nKGUpO1xyXG4gICAgICBNaXNjLldyaXRlU3RhY2tUcmFjZShlKTtcclxuICAgIH1cclxuICB9XHJcbn1cclxuIl19
|
@@ -1,65 +1,65 @@
|
|
1
|
-
import { ConstInterface } from "../ConstInterface";
|
2
|
-
import { ParamParseResult } from "../util/ParamParseResult";
|
3
|
-
import { XmlParser } from "@magic-xpa/utils";
|
4
|
-
import { Debug, NString } from "@magic-xpa/mscorelib";
|
5
|
-
export class MirrorString {
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
if (arguments.length === 0) {
|
10
|
-
this.constructor_0();
|
11
|
-
return;
|
12
|
-
}
|
13
|
-
this.constructor_1(s);
|
14
|
-
}
|
15
|
-
constructor_0() {
|
16
|
-
this._reserved = false;
|
17
|
-
}
|
18
|
-
constructor_1(s) {
|
19
|
-
this._value = s;
|
20
|
-
this._reserved = false;
|
21
|
-
}
|
22
|
-
mirrorToXML() {
|
23
|
-
return ConstInterface.MG_ATTR_ENV_VALUE + "=\"" + XmlParser.escape(this._value) + "\"";
|
24
|
-
}
|
25
|
-
init(name, xmlParser) {
|
26
|
-
let valueStart, valueEnd, reserveStart, paramEnd;
|
27
|
-
let xmlData = xmlParser.getXMLdata();
|
28
|
-
let valueAttr = ConstInterface.MG_ATTR_ENV_VALUE + "=\"";
|
29
|
-
paramEnd = xmlData.indexOf("/>", xmlParser.getCurrIndex());
|
30
|
-
valueStart = NString.IndexOf(xmlData, valueAttr, xmlParser.getCurrIndex(), paramEnd - xmlParser.getCurrIndex());
|
31
|
-
if (valueStart !== -1) {
|
32
|
-
valueStart += valueAttr.length;
|
33
|
-
reserveStart = NString.IndexOf(xmlData, ConstInterface.MG_ATTR_ENV_RESERVED + "=\"", xmlParser.getCurrIndex(), paramEnd - xmlParser.getCurrIndex());
|
34
|
-
valueEnd = reserveStart !== -1
|
35
|
-
? xmlData.indexOf(ConstInterface.MG_ATTR_ENV_RESERVED + "=\"", valueStart) - 2
|
36
|
-
: paramEnd - 1;
|
37
|
-
this._value = xmlData.substr(valueStart, valueEnd - valueStart).trim();
|
38
|
-
if (reserveStart !== -1) {
|
39
|
-
reserveStart += ConstInterface.MG_ATTR_ENV_RESERVED.length + 2;
|
40
|
-
this._reserved = (xmlData[reserveStart] === 'Y');
|
41
|
-
}
|
42
|
-
else
|
43
|
-
this._reserved = false;
|
44
|
-
xmlParser.setCurrIndex(valueEnd);
|
45
|
-
if (name.startsWith(ConstInterface.INI_SECTION_LOGICAL_NAMES_BRACKETS))
|
46
|
-
return ParamParseResult.OK;
|
47
|
-
else
|
48
|
-
return ParamParseResult.TOUPPER;
|
49
|
-
}
|
50
|
-
else if (NString.IndexOf(xmlData, ConstInterface.MG_ATTR_ENV_REMOVED, xmlParser.getCurrIndex(), paramEnd - xmlParser.getCurrIndex()) !== -1) {
|
51
|
-
return ParamParseResult.DELETE;
|
52
|
-
}
|
53
|
-
else {
|
54
|
-
Debug.Assert(false, "bad XML parsing");
|
55
|
-
return ParamParseResult.FAILED;
|
56
|
-
}
|
57
|
-
}
|
58
|
-
ToString() {
|
59
|
-
return this._value;
|
60
|
-
}
|
61
|
-
isReserved() {
|
62
|
-
return this._reserved;
|
63
|
-
}
|
64
|
-
}
|
65
|
-
//# sourceMappingURL=data:application/json;base64,
|
1
|
+
import { ConstInterface } from "../ConstInterface";
|
2
|
+
import { ParamParseResult } from "../util/ParamParseResult";
|
3
|
+
import { XmlParser } from "@magic-xpa/utils";
|
4
|
+
import { Debug, NString } from "@magic-xpa/mscorelib";
|
5
|
+
export class MirrorString {
|
6
|
+
_reserved = false;
|
7
|
+
_value = null;
|
8
|
+
constructor(s) {
|
9
|
+
if (arguments.length === 0) {
|
10
|
+
this.constructor_0();
|
11
|
+
return;
|
12
|
+
}
|
13
|
+
this.constructor_1(s);
|
14
|
+
}
|
15
|
+
constructor_0() {
|
16
|
+
this._reserved = false;
|
17
|
+
}
|
18
|
+
constructor_1(s) {
|
19
|
+
this._value = s;
|
20
|
+
this._reserved = false;
|
21
|
+
}
|
22
|
+
mirrorToXML() {
|
23
|
+
return ConstInterface.MG_ATTR_ENV_VALUE + "=\"" + XmlParser.escape(this._value) + "\"";
|
24
|
+
}
|
25
|
+
init(name, xmlParser) {
|
26
|
+
let valueStart, valueEnd, reserveStart, paramEnd;
|
27
|
+
let xmlData = xmlParser.getXMLdata();
|
28
|
+
let valueAttr = ConstInterface.MG_ATTR_ENV_VALUE + "=\"";
|
29
|
+
paramEnd = xmlData.indexOf("/>", xmlParser.getCurrIndex());
|
30
|
+
valueStart = NString.IndexOf(xmlData, valueAttr, xmlParser.getCurrIndex(), paramEnd - xmlParser.getCurrIndex());
|
31
|
+
if (valueStart !== -1) {
|
32
|
+
valueStart += valueAttr.length;
|
33
|
+
reserveStart = NString.IndexOf(xmlData, ConstInterface.MG_ATTR_ENV_RESERVED + "=\"", xmlParser.getCurrIndex(), paramEnd - xmlParser.getCurrIndex());
|
34
|
+
valueEnd = reserveStart !== -1
|
35
|
+
? xmlData.indexOf(ConstInterface.MG_ATTR_ENV_RESERVED + "=\"", valueStart) - 2
|
36
|
+
: paramEnd - 1;
|
37
|
+
this._value = xmlData.substr(valueStart, valueEnd - valueStart).trim();
|
38
|
+
if (reserveStart !== -1) {
|
39
|
+
reserveStart += ConstInterface.MG_ATTR_ENV_RESERVED.length + 2;
|
40
|
+
this._reserved = (xmlData[reserveStart] === 'Y');
|
41
|
+
}
|
42
|
+
else
|
43
|
+
this._reserved = false;
|
44
|
+
xmlParser.setCurrIndex(valueEnd);
|
45
|
+
if (name.startsWith(ConstInterface.INI_SECTION_LOGICAL_NAMES_BRACKETS))
|
46
|
+
return ParamParseResult.OK;
|
47
|
+
else
|
48
|
+
return ParamParseResult.TOUPPER;
|
49
|
+
}
|
50
|
+
else if (NString.IndexOf(xmlData, ConstInterface.MG_ATTR_ENV_REMOVED, xmlParser.getCurrIndex(), paramEnd - xmlParser.getCurrIndex()) !== -1) {
|
51
|
+
return ParamParseResult.DELETE;
|
52
|
+
}
|
53
|
+
else {
|
54
|
+
Debug.Assert(false, "bad XML parsing");
|
55
|
+
return ParamParseResult.FAILED;
|
56
|
+
}
|
57
|
+
}
|
58
|
+
ToString() {
|
59
|
+
return this._value;
|
60
|
+
}
|
61
|
+
isReserved() {
|
62
|
+
return this._reserved;
|
63
|
+
}
|
64
|
+
}
|
65
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiTWlycm9yU3RyaW5nLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvZW5naW5lL3NyYy9lbnYvTWlycm9yU3RyaW5nLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNBLE9BQU8sRUFBQyxjQUFjLEVBQUMsTUFBTSxtQkFBbUIsQ0FBQztB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ZXgoKSkgIT09IC0xKSB7XHJcblxyXG4gICAgICAvLyByZW1vdmUgdGhpcyB2YXJpYWJsZSBmcm9tIHRoZSB0YWJsZVxyXG4gICAgICByZXR1cm4gUGFyYW1QYXJzZVJlc3VsdC5ERUxFVEU7XHJcbiAgICB9XHJcbiAgICBlbHNlIHtcclxuICAgICAgRGVidWcuQXNzZXJ0KGZhbHNlLCBcImJhZCBYTUwgcGFyc2luZ1wiKTtcclxuICAgICAgcmV0dXJuIFBhcmFtUGFyc2VSZXN1bHQuRkFJTEVEO1xyXG4gICAgfVxyXG4gIH1cclxuXHJcbiAgLy8vIDxzdW1tYXJ5PlxyXG4gIC8vLyAgIHJldHVybiB0aGUgc3RyaW5nXHJcbiAgLy8vIDwvc3VtbWFyeT5cclxuICAvLy8gPHJldHVybnM+PC9yZXR1cm5zPlxyXG4gIFRvU3RyaW5nKCk6IHN0cmluZyB7XHJcbiAgICByZXR1cm4gdGhpcy5fdmFsdWU7XHJcbiAgfVxyXG5cclxuICAvLy8gPHN1bW1hcnk+XHJcbiAgLy8vICAgaXMgdGhlIHZhcmlhYmxlIHJlc2VydmVkP1xyXG4gIC8vLyA8L3N1bW1hcnk+XHJcbiAgLy8vIDxyZXR1cm5zPjwvcmV0dXJucz5cclxuICBpc1Jlc2VydmVkKCk6IGJvb2xlYW4ge1xyXG4gICAgcmV0dXJuIHRoaXMuX3Jlc2VydmVkO1xyXG4gIH1cclxufVxyXG4iXX0=
|
@@ -0,0 +1,91 @@
|
|
1
|
+
import { InternalInterface } from '@magic-xpa/utils';
|
2
|
+
export class ActionManager {
|
3
|
+
static actEnabled = [
|
4
|
+
InternalInterface.MG_ACT_CLOSE, InternalInterface.MG_ACT_EXIT,
|
5
|
+
InternalInterface.MG_ACT_RTO_MODIFY,
|
6
|
+
InternalInterface.MG_ACT_RTO_CREATE,
|
7
|
+
InternalInterface.MG_ACT_RTO_QUERY, InternalInterface.MG_ACT_OK,
|
8
|
+
InternalInterface.MG_ACT_CANCEL,
|
9
|
+
InternalInterface.MG_ACT_TBL_PRVFLD,
|
10
|
+
InternalInterface.MG_ACT_TBL_NXTFLD,
|
11
|
+
InternalInterface.MG_ACT_TBL_BEGLINE,
|
12
|
+
InternalInterface.MG_ACT_TBL_ENDLINE,
|
13
|
+
InternalInterface.MG_ACT_TBL_BEGPAGE,
|
14
|
+
InternalInterface.MG_ACT_TAB_NEXT,
|
15
|
+
InternalInterface.MG_ACT_TAB_PREV,
|
16
|
+
InternalInterface.MG_ACT_TBL_ENDPAGE,
|
17
|
+
InternalInterface.MG_ACT_USING_HELP,
|
18
|
+
InternalInterface.MG_ACT_ABOUT,
|
19
|
+
InternalInterface.MG_ACT_CTRL_HIT, InternalInterface.MG_ACT_HIT,
|
20
|
+
InternalInterface.MG_ACT_WEB_ON_DBLICK,
|
21
|
+
InternalInterface.MG_ACT_WEB_CLICK,
|
22
|
+
InternalInterface.MG_ACT_RT_REFRESH_RECORD,
|
23
|
+
InternalInterface.MG_ACT_RT_REFRESH_SCREEN,
|
24
|
+
InternalInterface.MG_ACT_RT_REFRESH_VIEW,
|
25
|
+
InternalInterface.MG_ACT_RT_QUIT,
|
26
|
+
InternalInterface.MG_ACT_SERVER_TERMINATION,
|
27
|
+
InternalInterface.MG_ACT_SUBFORM_REFRESH,
|
28
|
+
InternalInterface.MG_ACT_SUBFORM_CLOSE,
|
29
|
+
InternalInterface.MG_ACT_EXIT_SYSTEM,
|
30
|
+
InternalInterface.MG_ACT_SUBFORM_OPEN,
|
31
|
+
InternalInterface.MG_ACT_COL_SORT,
|
32
|
+
InternalInterface.MG_ACT_CTRL_MODIFY,
|
33
|
+
InternalInterface.MG_ACT_ROLLBACK,
|
34
|
+
InternalInterface.MG_ACT_EXT_EVENT,
|
35
|
+
InternalInterface.MG_ACT_COL_CLICK,
|
36
|
+
InternalInterface.MG_ACT_PRESS,
|
37
|
+
InternalInterface.MG_ACT_ENABLE_EVENTS,
|
38
|
+
InternalInterface.MG_ACT_COL_FILTER,
|
39
|
+
InternalInterface.MG_ACT_INDEX_CHANGE,
|
40
|
+
InternalInterface.MG_ACT_WEBCLIENT_ROUTE,
|
41
|
+
InternalInterface.MG_ACT_SET_EXTERNAL_VALUE,
|
42
|
+
InternalInterface.MG_ACT_FETCH_RECORDS_AHEAD_FROM_SERVER,
|
43
|
+
InternalInterface.MG_ACT_CONTEXT_REMOVE
|
44
|
+
];
|
45
|
+
static actNavigation = [
|
46
|
+
InternalInterface.MG_ACT_TBL_PRVLINE,
|
47
|
+
InternalInterface.MG_ACT_TBL_PRVPAGE,
|
48
|
+
InternalInterface.MG_ACT_TBL_BEGTBL,
|
49
|
+
InternalInterface.MG_ACT_TBL_NXTLINE,
|
50
|
+
InternalInterface.MG_ACT_TBL_NXTPAGE,
|
51
|
+
InternalInterface.MG_ACT_TBL_ENDTBL
|
52
|
+
];
|
53
|
+
_actCount = null;
|
54
|
+
_actState = null;
|
55
|
+
_numerator = 0;
|
56
|
+
constructor() {
|
57
|
+
this._numerator = 0;
|
58
|
+
this._actState = new Array(InternalInterface.MG_ACT_TOT_CNT);
|
59
|
+
for (let _ai = 0; _ai < this._actState.length; ++_ai)
|
60
|
+
this._actState[_ai] = false;
|
61
|
+
this._actCount = new Array(InternalInterface.MG_ACT_TOT_CNT);
|
62
|
+
for (let _ai = 0; _ai < this._actCount.length; ++_ai)
|
63
|
+
this._actCount[_ai] = 0;
|
64
|
+
}
|
65
|
+
enable(act, enable) {
|
66
|
+
this._actState[act] = enable;
|
67
|
+
if (enable) {
|
68
|
+
this._numerator++;
|
69
|
+
this._actCount[act] = this._numerator;
|
70
|
+
}
|
71
|
+
}
|
72
|
+
isEnabled(act) {
|
73
|
+
return this._actState[act];
|
74
|
+
}
|
75
|
+
getActCount(act) {
|
76
|
+
return this._actCount[act];
|
77
|
+
}
|
78
|
+
enableList(act, enable, onlyIfChanged) {
|
79
|
+
for (let i = 0; i < act.length; i = i + 1) {
|
80
|
+
let num = act[i];
|
81
|
+
let flag = !onlyIfChanged || this._actState[num] !== enable;
|
82
|
+
if (flag) {
|
83
|
+
this.enable(num, enable);
|
84
|
+
}
|
85
|
+
}
|
86
|
+
}
|
87
|
+
enableNavigationActions(enable) {
|
88
|
+
this.enableList(ActionManager.actNavigation, enable, false);
|
89
|
+
}
|
90
|
+
}
|
91
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQWN0aW9uTWFuYWdlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2VuZ2luZS9zcmMvZXZlbnQvQWN0aW9uTWFuYWdlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsaUJBQWlCLEVBQUUsTUFBTSxrQkFBa0IsQ0FBQztBQUdyRCxNQUFNLE9BQU8sYUFBYTtJQUN4QixNQUFNLENBQUMsVUFBVSxHQUFhO1FBQzVCLGlCQUFpQixDQUFDLFlBQVksRUFBRSxpQkFBaUIsQ0FBQyxXQUFXO1FBQzdELGlCQUFpQixDQUFDLGlCQUFpQjtRQUNuQyxpQkFBaUIsQ0FBQyxpQkFBaUI7UUFDbkMsaUJBQWlCLENBQUMsZ0JBQWdCLEVBQUUsaUJBQWlCLENBQUMsU0FBUztRQUMvRCxpQkFBaUIsQ0FBQyxhQUFhO1FBQy9CLGlCQUFpQixDQUFDLGlCQUFpQjtRQUNuQyxpQkFBaUIsQ0FBQyxpQkFBaUI7UUFDbkMsaUJBQWlCLENBQUMsa0JBQWtCO1FBQ3BDLGlCQUFpQixDQUFDLGtCQUFrQjtRQUNwQyxpQkFBaUIsQ0FBQyxrQkFBa0I7UUFDcEMsaUJBQWlCLENBQUMsZUFBZTtRQUNqQyxpQkFBaUIsQ0FBQyxlQUFlO1FBQ2pDLGlCQUFpQixDQUFDLGtCQUFrQjtRQUNwQyxpQkFBaUIsQ0FBQyxpQkFBaUI7UUFDbkMsaUJBQWlCLENB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