@magic-xpa/engine 4.1100.0-dev4110.25 → 4.1100.0-dev4110.250

Sign up to get free protection for your applications and to get access to all the features.
Files changed (521) hide show
  1. package/{esm2020 → esm2022}/index.mjs +188 -188
  2. package/{esm2020 → esm2022}/magic-xpa-engine.mjs +1 -1
  3. package/esm2022/src/AccessHelper.mjs +15 -0
  4. package/esm2022/src/ClientManager.mjs +416 -0
  5. package/esm2022/src/CommandsProcessorBase.mjs +56 -0
  6. package/esm2022/src/CommandsProcessorManager.mjs +26 -0
  7. package/esm2022/src/CommandsTable.mjs +162 -0
  8. package/esm2022/src/ConstInterface.mjs +517 -0
  9. package/{esm2020 → esm2022}/src/CurrentClientVersion.mjs +2 -2
  10. package/esm2022/src/FlowMonitorInterface.mjs +16 -0
  11. package/esm2022/src/GUIManager.mjs +62 -0
  12. package/esm2022/src/GlobalCommandsManager.mjs +34 -0
  13. package/esm2022/src/GuiEventsProcessor.mjs +156 -0
  14. package/{esm2020 → esm2022}/src/ICommandsTable.mjs +1 -1
  15. package/esm2022/src/ServerConfig.mjs +122 -0
  16. package/{esm2020 → esm2022}/src/bridge/IGuiEvent.mjs +19 -19
  17. package/esm2022/src/bridge/MagicBridge.mjs +41 -0
  18. package/esm2022/src/commands/ClientOriginatedCommandTaskTag.mjs +12 -0
  19. package/{esm2020 → esm2022}/src/commands/ClientToServer/AddUserLocateDataViewCommand.mjs +8 -8
  20. package/{esm2020 → esm2022}/src/commands/ClientToServer/AddUserRangeDataviewCommand.mjs +9 -9
  21. package/{esm2020 → esm2022}/src/commands/ClientToServer/AddUserSortDataViewCommand.mjs +9 -9
  22. package/esm2022/src/commands/ClientToServer/BrowserEscEventCommand.mjs +26 -0
  23. package/{esm2020 → esm2022}/src/commands/ClientToServer/ClientOriginatedCommand.mjs +14 -14
  24. package/esm2022/src/commands/ClientToServer/ClientOriginatedCommandSerializer.mjs +60 -0
  25. package/esm2022/src/commands/ClientToServer/ColumnSortEventCommand.mjs +29 -0
  26. package/esm2022/src/commands/ClientToServer/CommandFactory.mjs +261 -0
  27. package/esm2022/src/commands/ClientToServer/CommandSerializationHelper.mjs +67 -0
  28. package/esm2022/src/commands/ClientToServer/ComputeEventCommand.mjs +26 -0
  29. package/{esm2020 → esm2022}/src/commands/ClientToServer/ContextTerminationEventCommand.mjs +24 -21
  30. package/{esm2020 → esm2022}/src/commands/ClientToServer/ContextTimeoutResetCommand.mjs +23 -20
  31. package/{esm2020 → esm2022}/src/commands/ClientToServer/ControlItemsRefreshCommand.mjs +8 -8
  32. package/esm2022/src/commands/ClientToServer/DataViewOutputCommand.mjs +13 -0
  33. package/{esm2020 → esm2022}/src/commands/ClientToServer/DataviewCommand.mjs +44 -44
  34. package/esm2022/src/commands/ClientToServer/EvaluateCommand.mjs +40 -0
  35. package/{esm2020 → esm2022}/src/commands/ClientToServer/EventCommand.mjs +43 -40
  36. package/esm2022/src/commands/ClientToServer/ExecOperCommand.mjs +70 -0
  37. package/esm2022/src/commands/ClientToServer/FetchDataControlValuesEventCommand.mjs +25 -0
  38. package/{esm2020 → esm2022}/src/commands/ClientToServer/GlobalParamsQueryCommand.mjs +10 -10
  39. package/{esm2020 → esm2022}/src/commands/ClientToServer/ICommandTaskTag.mjs +1 -1
  40. package/esm2022/src/commands/ClientToServer/IndexChangeEventCommand.mjs +24 -0
  41. package/esm2022/src/commands/ClientToServer/IniputForceWriteCommand.mjs +26 -0
  42. package/{esm2020 → esm2022}/src/commands/ClientToServer/NonReversibleExitEventCommand.mjs +26 -23
  43. package/{esm2020 → esm2022}/src/commands/ClientToServer/QueryCommand.mjs +20 -20
  44. package/esm2022/src/commands/ClientToServer/RecomputeCommand.mjs +30 -0
  45. package/esm2022/src/commands/ClientToServer/RefreshEventCommand.mjs +30 -0
  46. package/esm2022/src/commands/ClientToServer/RefreshScreenEventCommand.mjs +27 -0
  47. package/esm2022/src/commands/ClientToServer/RollbackEventCommand.mjs +43 -0
  48. package/esm2022/src/commands/ClientToServer/SelectProgramCommand.mjs +19 -0
  49. package/{esm2020 → esm2022}/src/commands/ClientToServer/SetTransactionStateDataviewCommand.mjs +9 -9
  50. package/esm2022/src/commands/ClientToServer/SubformOpenEventCommand.mjs +24 -0
  51. package/esm2022/src/commands/ClientToServer/SubformRefreshEventCommand.mjs +27 -0
  52. package/esm2022/src/commands/ClientToServer/TransactionCommand.mjs +34 -0
  53. package/{esm2020 → esm2022}/src/commands/ClientToServer/UnloadCommand.mjs +18 -15
  54. package/esm2022/src/commands/ClientToServer/WriteMessageToServerLogCommand.mjs +18 -0
  55. package/esm2022/src/commands/DataViewCommandBase.mjs +8 -0
  56. package/{esm2020 → esm2022}/src/commands/IClientCommand.mjs +1 -1
  57. package/esm2022/src/commands/IClientTargetedCommand.mjs +13 -0
  58. package/{esm2020 → esm2022}/src/commands/IClientToServerCommandInfo.mjs +2 -2
  59. package/esm2022/src/commands/ServerToClient/AbortCommand.mjs +65 -0
  60. package/{esm2020 → esm2022}/src/commands/ServerToClient/AddLocateCommand.mjs +21 -21
  61. package/esm2022/src/commands/ServerToClient/AddRangeCommand.mjs +62 -0
  62. package/esm2022/src/commands/ServerToClient/AddSortCommand.mjs +33 -0
  63. package/esm2022/src/commands/ServerToClient/ClientRefreshCommand.mjs +25 -0
  64. package/esm2022/src/commands/ServerToClient/ClientTargetedCommandBase.mjs +24 -0
  65. package/esm2022/src/commands/ServerToClient/EnhancedVerifyCommand.mjs +45 -0
  66. package/esm2022/src/commands/ServerToClient/OpenURLCommand.mjs +221 -0
  67. package/{esm2020 → esm2022}/src/commands/ServerToClient/ResetLocateCommand.mjs +14 -14
  68. package/{esm2020 → esm2022}/src/commands/ServerToClient/ResetRangeCommand.mjs +14 -14
  69. package/{esm2020 → esm2022}/src/commands/ServerToClient/ResetSortCommand.mjs +14 -14
  70. package/esm2022/src/commands/ServerToClient/ResultCommand.mjs +37 -0
  71. package/esm2022/src/commands/ServerToClient/VerifyCommand.mjs +83 -0
  72. package/esm2022/src/commands/ServerToClient/XMLBasedCommandBuilder.mjs +132 -0
  73. package/{esm2020 → esm2022}/src/communications/IConnectionStateManager.mjs +1 -1
  74. package/esm2022/src/communications/InteractiveCommunicationsFailureHandler.mjs +15 -0
  75. package/{esm2020 → esm2022}/src/data/DataSourceIdKey.mjs +2 -2
  76. package/esm2022/src/data/DataView.mjs +1613 -0
  77. package/{esm2020 → esm2022}/src/data/DataViewBase.mjs +3 -3
  78. package/esm2022/src/data/DataviewManager.mjs +28 -0
  79. package/esm2022/src/data/DataviewManagerBase.mjs +15 -0
  80. package/esm2022/src/data/DvCache.mjs +67 -0
  81. package/esm2022/src/data/Field.mjs +646 -0
  82. package/esm2022/src/data/FieldBase.mjs +15 -0
  83. package/esm2022/src/data/FieldsTable.mjs +103 -0
  84. package/{esm2020 → esm2022}/src/data/IRecordsTable.mjs +1 -1
  85. package/esm2022/src/data/Key.mjs +88 -0
  86. package/esm2022/src/data/Record.mjs +880 -0
  87. package/{esm2020 → esm2022}/src/data/RecordOutOfDataViewException.mjs +15 -15
  88. package/esm2022/src/data/RecordsTable.mjs +267 -0
  89. package/esm2022/src/data/TaskTransactionManager.mjs +107 -0
  90. package/esm2022/src/data/XMLBasedDcValuesBuilder.mjs +74 -0
  91. package/{esm2020 → esm2022}/src/enums.mjs +23 -23
  92. package/esm2022/src/env/EnvVariablesTable.mjs +340 -0
  93. package/esm2022/src/env/Environment.mjs +487 -0
  94. package/{esm2020 → esm2022}/src/env/ILanguageData.mjs +1 -1
  95. package/esm2022/src/env/LanguageData.mjs +227 -0
  96. package/esm2022/src/env/MirrorString.mjs +65 -0
  97. package/esm2022/src/event/ActionManager.mjs +91 -0
  98. package/esm2022/src/event/Event.mjs +1333 -0
  99. package/esm2022/src/event/EventHandler.mjs +766 -0
  100. package/esm2022/src/event/EventHandlerPosition.mjs +204 -0
  101. package/esm2022/src/event/EventsManager.mjs +2988 -0
  102. package/{esm2020 → esm2022}/src/event/IEventsManager.mjs +6 -6
  103. package/esm2022/src/event/RunTimeEvent.mjs +399 -0
  104. package/{esm2020 → esm2022}/src/event/RunTimeEventBase.mjs +3 -3
  105. package/esm2022/src/event/UserEventsTable.mjs +47 -0
  106. package/esm2022/src/exp/ExpTable.mjs +57 -0
  107. package/esm2022/src/exp/Expression.mjs +200 -0
  108. package/esm2022/src/exp/ExpressionDict.mjs +727 -0
  109. package/esm2022/src/exp/ExpressionEvaluator.mjs +4206 -0
  110. package/esm2022/src/exp/ExpressionLocalJpn.mjs +314 -0
  111. package/esm2022/src/exp/GlobalParamsTable.mjs +85 -0
  112. package/esm2022/src/exp/YesNoExp.mjs +36 -0
  113. package/esm2022/src/gui/CreatedFormVector.mjs +23 -0
  114. package/esm2022/src/gui/FormsTable.mjs +66 -0
  115. package/esm2022/src/gui/MgControl.mjs +363 -0
  116. package/esm2022/src/gui/MgForm.mjs +1224 -0
  117. package/esm2022/src/http/HttpManager.mjs +97 -0
  118. package/esm2022/src/http/client/HttpClientAsync.mjs +68 -0
  119. package/esm2022/src/http/client/HttpClientBase.mjs +132 -0
  120. package/esm2022/src/http/client/HttpClientEvents.mjs +39 -0
  121. package/esm2022/src/http/client/HttpClientSync.mjs +42 -0
  122. package/esm2022/src/http/client/HttpUtility.mjs +84 -0
  123. package/{esm2020 → esm2022}/src/http/client/ICommunicationsFailureHandler.mjs +1 -1
  124. package/esm2022/src/remote/AddUserLocateRemoteDataViewCommand.mjs +18 -0
  125. package/esm2022/src/remote/AddUserRangeRemoteDataViewCommand.mjs +18 -0
  126. package/esm2022/src/remote/AddUserSortRemoteDataViewCommand.mjs +18 -0
  127. package/esm2022/src/remote/RemoteCommandsProcessor.mjs +883 -0
  128. package/esm2022/src/remote/RemoteControlItemsRefreshCommand.mjs +25 -0
  129. package/esm2022/src/remote/RemoteDataViewCommandBase.mjs +24 -0
  130. package/esm2022/src/remote/RemoteDataViewCommandFactory.mjs +61 -0
  131. package/{esm2020 → esm2022}/src/remote/RemoteDataViewCommandUpdateNonModifiable.mjs +15 -15
  132. package/{esm2020 → esm2022}/src/remote/RemoteDataviewManager.mjs +17 -17
  133. package/{esm2020 → esm2022}/src/remote/RemoteInitDataViewCommand.mjs +10 -10
  134. package/esm2022/src/remote/ResetUserLocateRemoteDataviewCommand.mjs +17 -0
  135. package/{esm2020 → esm2022}/src/remote/ResetUserRangeRemoteDataviewCommand.mjs +12 -12
  136. package/esm2022/src/remote/ResetUserSortRemoteDataviewCommand.mjs +16 -0
  137. package/esm2022/src/remote/ServerError.mjs +40 -0
  138. package/esm2022/src/remote/SetTransactionStateRemoteDataViewCommand.mjs +20 -0
  139. package/esm2022/src/rt/Argument.mjs +265 -0
  140. package/esm2022/src/rt/ArgumentsList.mjs +103 -0
  141. package/esm2022/src/rt/Boundary.mjs +152 -0
  142. package/esm2022/src/rt/CompMainPrgTable.mjs +63 -0
  143. package/{esm2020 → esm2022}/src/rt/DataviewHeaderBase.mjs +98 -96
  144. package/{esm2020 → esm2022}/src/rt/DataviewHeaderFactory.mjs +6 -6
  145. package/esm2022/src/rt/DataviewHeaders.mjs +53 -0
  146. package/esm2022/src/rt/DataviewHeadersSaxHandler.mjs +38 -0
  147. package/esm2022/src/rt/ExecutionStack.mjs +94 -0
  148. package/{esm2020 → esm2022}/src/rt/ExecutionStackEntry.mjs +17 -17
  149. package/esm2022/src/rt/HandlersTable.mjs +96 -0
  150. package/{esm2020 → esm2022}/src/rt/IDataSourceViewDefinition.mjs +1 -1
  151. package/{esm2020 → esm2022}/src/rt/IDataviewHeader.mjs +1 -1
  152. package/{esm2020 → esm2022}/src/rt/IResultValue.mjs +1 -1
  153. package/esm2022/src/rt/LastFocusedManager.mjs +65 -0
  154. package/esm2022/src/rt/Operation.mjs +735 -0
  155. package/esm2022/src/rt/OperationTable.mjs +67 -0
  156. package/esm2022/src/rt/Recompute.mjs +355 -0
  157. package/esm2022/src/rt/RecomputeTable.mjs +63 -0
  158. package/esm2022/src/rt/RemoteDataviewHeader.mjs +108 -0
  159. package/esm2022/src/rt/ResultValue.mjs +10 -0
  160. package/esm2022/src/rt/TableCache.mjs +177 -0
  161. package/esm2022/src/rt/TableCacheManager.mjs +67 -0
  162. package/esm2022/src/rt/Transaction.mjs +53 -0
  163. package/esm2022/src/security/UserDetails.mjs +71 -0
  164. package/{esm2020 → esm2022}/src/tasks/IMGDataCollection.mjs +1 -1
  165. package/esm2022/src/tasks/MGData.mjs +552 -0
  166. package/esm2022/src/tasks/MGDataCollection.mjs +252 -0
  167. package/esm2022/src/tasks/RCTimer.mjs +63 -0
  168. package/esm2022/src/tasks/RemoteTaskService.mjs +45 -0
  169. package/esm2022/src/tasks/Task.mjs +2499 -0
  170. package/esm2022/src/tasks/TaskBase.mjs +83 -0
  171. package/esm2022/src/tasks/TaskServiceBase.mjs +25 -0
  172. package/esm2022/src/tasks/TasksTable.mjs +80 -0
  173. package/esm2022/src/tasks/sort/Sort.mjs +5 -0
  174. package/esm2022/src/tasks/sort/SortCollection.mjs +67 -0
  175. package/esm2022/src/util/ConstUtils.mjs +14 -0
  176. package/esm2022/src/util/FlowMonitorQueue.mjs +451 -0
  177. package/esm2022/src/util/HeapSort.mjs +70 -0
  178. package/{esm2020 → esm2022}/src/util/IMirrorXML.mjs +1 -1
  179. package/{esm2020 → esm2022}/src/util/IServerConfig.mjs +1 -1
  180. package/{esm2020 → esm2022}/src/util/MgBlockingQueue.mjs +1 -1
  181. package/esm2022/src/util/MgPriorityBlockingQueue.mjs +74 -0
  182. package/esm2022/src/util/MgPriorityQueue.mjs +66 -0
  183. package/{esm2020 → esm2022}/src/util/ParamParseResult.mjs +7 -7
  184. package/esm2022/src/util/PrmMap.mjs +152 -0
  185. package/esm2022/src/util/ReturnResult.mjs +46 -0
  186. package/esm2022/src/util/ReturnResultBase.mjs +18 -0
  187. package/esm2022/src/util/Scrambler.mjs +89 -0
  188. package/esm2022/src/util/UniqueIDUtils.mjs +13 -0
  189. package/esm2022/src/util/cookie.service.mjs +92 -0
  190. package/{fesm2020 → fesm2022}/magic-xpa-engine.mjs +29883 -29693
  191. package/fesm2022/magic-xpa-engine.mjs.map +1 -0
  192. package/index.d.ts +187 -187
  193. package/package.json +8 -14
  194. package/src/AccessHelper.d.ts +20 -20
  195. package/src/ClientManager.d.ts +35 -32
  196. package/src/CommandsProcessorBase.d.ts +23 -23
  197. package/src/CommandsProcessorManager.d.ts +6 -6
  198. package/src/CommandsTable.d.ts +22 -22
  199. package/src/ConstInterface.d.ts +516 -515
  200. package/src/CurrentClientVersion.d.ts +1 -1
  201. package/src/FlowMonitorInterface.d.ts +15 -15
  202. package/src/GUIManager.d.ts +17 -17
  203. package/src/GlobalCommandsManager.d.ts +17 -17
  204. package/src/GuiEventsProcessor.d.ts +24 -24
  205. package/src/ICommandsTable.d.ts +9 -9
  206. package/src/ServerConfig.d.ts +35 -34
  207. package/src/bridge/IGuiEvent.d.ts +19 -19
  208. package/src/bridge/MagicBridge.d.ts +16 -16
  209. package/src/commands/ClientOriginatedCommandTaskTag.d.ts +8 -8
  210. package/src/commands/ClientToServer/AddUserLocateDataViewCommand.d.ts +4 -4
  211. package/src/commands/ClientToServer/AddUserRangeDataviewCommand.d.ts +6 -6
  212. package/src/commands/ClientToServer/AddUserSortDataViewCommand.d.ts +6 -6
  213. package/src/commands/ClientToServer/BrowserEscEventCommand.d.ts +9 -8
  214. package/src/commands/ClientToServer/ClientOriginatedCommand.d.ts +8 -8
  215. package/src/commands/ClientToServer/ClientOriginatedCommandSerializer.d.ts +6 -6
  216. package/src/commands/ClientToServer/ColumnSortEventCommand.d.ts +11 -10
  217. package/src/commands/ClientToServer/CommandFactory.d.ts +64 -64
  218. package/src/commands/ClientToServer/CommandSerializationHelper.d.ts +20 -20
  219. package/src/commands/ClientToServer/ComputeEventCommand.d.ts +9 -8
  220. package/src/commands/ClientToServer/ContextTerminationEventCommand.d.ts +8 -7
  221. package/src/commands/ClientToServer/ContextTimeoutResetCommand.d.ts +8 -7
  222. package/src/commands/ClientToServer/ControlItemsRefreshCommand.d.ts +6 -6
  223. package/src/commands/ClientToServer/DataViewOutputCommand.d.ts +9 -9
  224. package/src/commands/ClientToServer/DataviewCommand.d.ts +32 -32
  225. package/src/commands/ClientToServer/EvaluateCommand.d.ts +16 -15
  226. package/src/commands/ClientToServer/EventCommand.d.ts +16 -15
  227. package/src/commands/ClientToServer/ExecOperCommand.d.ts +24 -23
  228. package/src/commands/ClientToServer/FetchDataControlValuesEventCommand.d.ts +9 -8
  229. package/src/commands/ClientToServer/GlobalParamsQueryCommand.d.ts +5 -5
  230. package/src/commands/ClientToServer/ICommandTaskTag.d.ts +3 -3
  231. package/src/commands/ClientToServer/IndexChangeEventCommand.d.ts +9 -8
  232. package/src/commands/ClientToServer/IniputForceWriteCommand.d.ts +11 -10
  233. package/src/commands/ClientToServer/NonReversibleExitEventCommand.d.ts +9 -8
  234. package/src/commands/ClientToServer/QueryCommand.d.ts +8 -8
  235. package/src/commands/ClientToServer/RecomputeCommand.d.ts +12 -11
  236. package/src/commands/ClientToServer/RefreshEventCommand.d.ts +13 -12
  237. package/src/commands/ClientToServer/RefreshScreenEventCommand.d.ts +11 -10
  238. package/src/commands/ClientToServer/RollbackEventCommand.d.ts +15 -14
  239. package/src/commands/ClientToServer/SelectProgramCommand.d.ts +7 -6
  240. package/src/commands/ClientToServer/SetTransactionStateDataviewCommand.d.ts +5 -5
  241. package/src/commands/ClientToServer/SubformOpenEventCommand.d.ts +9 -8
  242. package/src/commands/ClientToServer/SubformRefreshEventCommand.d.ts +10 -9
  243. package/src/commands/ClientToServer/TransactionCommand.d.ts +14 -12
  244. package/src/commands/ClientToServer/UnloadCommand.d.ts +8 -7
  245. package/src/commands/ClientToServer/WriteMessageToServerLogCommand.d.ts +6 -6
  246. package/src/commands/DataViewCommandBase.d.ts +6 -6
  247. package/src/commands/IClientCommand.d.ts +2 -2
  248. package/src/commands/IClientTargetedCommand.d.ts +12 -12
  249. package/src/commands/IClientToServerCommandInfo.d.ts +4 -3
  250. package/src/commands/ServerToClient/AbortCommand.d.ts +11 -11
  251. package/src/commands/ServerToClient/AddLocateCommand.d.ts +6 -6
  252. package/src/commands/ServerToClient/AddRangeCommand.d.ts +10 -10
  253. package/src/commands/ServerToClient/AddSortCommand.d.ts +9 -9
  254. package/src/commands/ServerToClient/ClientRefreshCommand.d.ts +7 -7
  255. package/src/commands/ServerToClient/ClientTargetedCommandBase.d.ts +12 -12
  256. package/src/commands/ServerToClient/EnhancedVerifyCommand.d.ts +13 -13
  257. package/src/commands/ServerToClient/OpenURLCommand.d.ts +21 -21
  258. package/src/commands/ServerToClient/ResetLocateCommand.d.ts +6 -6
  259. package/src/commands/ServerToClient/ResetRangeCommand.d.ts +6 -6
  260. package/src/commands/ServerToClient/ResetSortCommand.d.ts +6 -6
  261. package/src/commands/ServerToClient/ResultCommand.d.ts +10 -10
  262. package/src/commands/ServerToClient/VerifyCommand.d.ts +17 -17
  263. package/src/commands/ServerToClient/XMLBasedCommandBuilder.d.ts +11 -11
  264. package/src/communications/IConnectionStateManager.d.ts +4 -4
  265. package/src/communications/InteractiveCommunicationsFailureHandler.d.ts +6 -6
  266. package/src/data/DataSourceIdKey.d.ts +2 -2
  267. package/src/data/DataView.d.ts +162 -162
  268. package/src/data/DataViewBase.d.ts +12 -12
  269. package/src/data/DataviewManager.d.ts +14 -14
  270. package/src/data/DataviewManagerBase.d.ts +11 -11
  271. package/src/data/DvCache.d.ts +15 -15
  272. package/src/data/Field.d.ts +103 -103
  273. package/src/data/FieldBase.d.ts +23 -23
  274. package/src/data/FieldsTable.d.ts +27 -27
  275. package/src/data/IRecordsTable.d.ts +7 -7
  276. package/src/data/Key.d.ts +15 -15
  277. package/src/data/Record.d.ts +157 -156
  278. package/src/data/RecordOutOfDataViewException.d.ts +10 -10
  279. package/src/data/RecordsTable.d.ts +38 -38
  280. package/src/data/TaskTransactionManager.d.ts +17 -17
  281. package/src/data/XMLBasedDcValuesBuilder.d.ts +11 -11
  282. package/src/enums.d.ts +21 -21
  283. package/src/env/EnvVariablesTable.d.ts +17 -17
  284. package/src/env/Environment.d.ts +118 -118
  285. package/src/env/ILanguageData.d.ts +3 -3
  286. package/src/env/LanguageData.d.ts +20 -20
  287. package/src/env/MirrorString.d.ts +15 -15
  288. package/src/event/ActionManager.d.ts +14 -14
  289. package/src/event/Event.d.ts +79 -79
  290. package/src/event/EventHandler.d.ts +66 -66
  291. package/src/event/EventHandlerPosition.d.ts +25 -25
  292. package/src/event/EventsManager.d.ts +205 -204
  293. package/src/event/IEventsManager.d.ts +77 -77
  294. package/src/event/RunTimeEvent.d.ts +126 -123
  295. package/src/event/RunTimeEventBase.d.ts +5 -5
  296. package/src/event/UserEventsTable.d.ts +11 -11
  297. package/src/exp/ExpTable.d.ts +11 -11
  298. package/src/exp/Expression.d.ts +37 -37
  299. package/src/exp/ExpressionDict.d.ts +12 -12
  300. package/src/exp/ExpressionEvaluator.d.ts +198 -198
  301. package/src/exp/ExpressionLocalJpn.d.ts +18 -18
  302. package/src/exp/GlobalParamsTable.d.ts +19 -19
  303. package/src/exp/YesNoExp.d.ts +9 -9
  304. package/src/gui/CreatedFormVector.d.ts +10 -10
  305. package/src/gui/FormsTable.d.ts +15 -15
  306. package/src/gui/MgControl.d.ts +60 -60
  307. package/src/gui/MgForm.d.ts +96 -93
  308. package/src/http/HttpManager.d.ts +25 -25
  309. package/src/http/client/HttpClientAsync.d.ts +16 -16
  310. package/src/http/client/HttpClientBase.d.ts +30 -30
  311. package/src/http/client/HttpClientEvents.d.ts +18 -18
  312. package/src/http/client/HttpClientSync.d.ts +17 -17
  313. package/src/http/client/HttpUtility.d.ts +10 -10
  314. package/src/http/client/ICommunicationsFailureHandler.d.ts +5 -5
  315. package/src/remote/AddUserLocateRemoteDataViewCommand.d.ts +8 -8
  316. package/src/remote/AddUserRangeRemoteDataViewCommand.d.ts +8 -8
  317. package/src/remote/AddUserSortRemoteDataViewCommand.d.ts +8 -8
  318. package/src/remote/RemoteCommandsProcessor.d.ts +51 -51
  319. package/src/remote/RemoteControlItemsRefreshCommand.d.ts +8 -8
  320. package/src/remote/RemoteDataViewCommandBase.d.ts +10 -10
  321. package/src/remote/RemoteDataViewCommandFactory.d.ts +6 -6
  322. package/src/remote/RemoteDataViewCommandUpdateNonModifiable.d.ts +8 -8
  323. package/src/remote/RemoteDataviewManager.d.ts +9 -9
  324. package/src/remote/RemoteInitDataViewCommand.d.ts +7 -7
  325. package/src/remote/ResetUserLocateRemoteDataviewCommand.d.ts +7 -7
  326. package/src/remote/ResetUserRangeRemoteDataviewCommand.d.ts +7 -7
  327. package/src/remote/ResetUserSortRemoteDataviewCommand.d.ts +7 -7
  328. package/src/remote/ServerError.d.ts +16 -16
  329. package/src/remote/SetTransactionStateRemoteDataViewCommand.d.ts +8 -8
  330. package/src/rt/Argument.d.ts +36 -36
  331. package/src/rt/ArgumentsList.d.ts +24 -24
  332. package/src/rt/Boundary.d.ts +27 -27
  333. package/src/rt/CompMainPrgTable.d.ts +10 -10
  334. package/src/rt/DataviewHeaderBase.d.ts +34 -34
  335. package/src/rt/DataviewHeaderFactory.d.ts +5 -5
  336. package/src/rt/DataviewHeaders.d.ts +12 -12
  337. package/src/rt/DataviewHeadersSaxHandler.d.ts +10 -10
  338. package/src/rt/ExecutionStack.d.ts +22 -22
  339. package/src/rt/ExecutionStackEntry.d.ts +7 -7
  340. package/src/rt/HandlersTable.d.ts +19 -19
  341. package/src/rt/IDataSourceViewDefinition.d.ts +6 -6
  342. package/src/rt/IDataviewHeader.d.ts +10 -10
  343. package/src/rt/IResultValue.d.ts +4 -4
  344. package/src/rt/LastFocusedManager.d.ts +23 -23
  345. package/src/rt/Operation.d.ts +97 -97
  346. package/src/rt/OperationTable.d.ts +15 -15
  347. package/src/rt/Recompute.d.ts +41 -41
  348. package/src/rt/RecomputeTable.d.ts +9 -9
  349. package/src/rt/RemoteDataviewHeader.d.ts +14 -14
  350. package/src/rt/ResultValue.d.ts +7 -7
  351. package/src/rt/TableCache.d.ts +29 -29
  352. package/src/rt/TableCacheManager.d.ts +10 -10
  353. package/src/rt/Transaction.d.ts +23 -23
  354. package/src/security/UserDetails.d.ts +16 -16
  355. package/src/tasks/IMGDataCollection.d.ts +26 -26
  356. package/src/tasks/MGData.d.ts +63 -63
  357. package/src/tasks/MGDataCollection.d.ts +42 -42
  358. package/src/tasks/RCTimer.d.ts +13 -13
  359. package/src/tasks/RemoteTaskService.d.ts +16 -16
  360. package/src/tasks/Task.d.ts +312 -312
  361. package/src/tasks/TaskBase.d.ts +123 -123
  362. package/src/tasks/TaskServiceBase.d.ts +16 -16
  363. package/src/tasks/TasksTable.d.ts +21 -21
  364. package/src/tasks/sort/Sort.d.ts +4 -4
  365. package/src/tasks/sort/SortCollection.d.ts +11 -11
  366. package/src/util/ConstUtils.d.ts +3 -3
  367. package/src/util/FlowMonitorQueue.d.ts +70 -70
  368. package/src/util/HeapSort.d.ts +6 -6
  369. package/src/util/IMirrorXML.d.ts +6 -6
  370. package/src/util/IServerConfig.d.ts +11 -11
  371. package/src/util/MgBlockingQueue.d.ts +5 -5
  372. package/src/util/MgPriorityBlockingQueue.d.ts +17 -17
  373. package/src/util/MgPriorityQueue.d.ts +13 -13
  374. package/src/util/ParamParseResult.d.ts +6 -6
  375. package/src/util/PrmMap.d.ts +28 -28
  376. package/src/util/ReturnResult.d.ts +18 -18
  377. package/src/util/ReturnResultBase.d.ts +11 -11
  378. package/src/util/Scrambler.d.ts +10 -10
  379. package/src/util/UniqueIDUtils.d.ts +4 -4
  380. package/src/util/cookie.service.d.ts +8 -8
  381. package/esm2020/src/AccessHelper.mjs +0 -9
  382. package/esm2020/src/ClientManager.mjs +0 -399
  383. package/esm2020/src/CommandsProcessorBase.mjs +0 -58
  384. package/esm2020/src/CommandsProcessorManager.mjs +0 -26
  385. package/esm2020/src/CommandsTable.mjs +0 -162
  386. package/esm2020/src/ConstInterface.mjs +0 -516
  387. package/esm2020/src/FlowMonitorInterface.mjs +0 -16
  388. package/esm2020/src/GUIManager.mjs +0 -62
  389. package/esm2020/src/GlobalCommandsManager.mjs +0 -34
  390. package/esm2020/src/GuiEventsProcessor.mjs +0 -154
  391. package/esm2020/src/ServerConfig.mjs +0 -117
  392. package/esm2020/src/bridge/MagicBridge.mjs +0 -41
  393. package/esm2020/src/commands/ClientOriginatedCommandTaskTag.mjs +0 -11
  394. package/esm2020/src/commands/ClientToServer/BrowserEscEventCommand.mjs +0 -23
  395. package/esm2020/src/commands/ClientToServer/ClientOriginatedCommandSerializer.mjs +0 -60
  396. package/esm2020/src/commands/ClientToServer/ColumnSortEventCommand.mjs +0 -26
  397. package/esm2020/src/commands/ClientToServer/CommandFactory.mjs +0 -260
  398. package/esm2020/src/commands/ClientToServer/CommandSerializationHelper.mjs +0 -69
  399. package/esm2020/src/commands/ClientToServer/ComputeEventCommand.mjs +0 -23
  400. package/esm2020/src/commands/ClientToServer/DataViewOutputCommand.mjs +0 -13
  401. package/esm2020/src/commands/ClientToServer/EvaluateCommand.mjs +0 -36
  402. package/esm2020/src/commands/ClientToServer/ExecOperCommand.mjs +0 -67
  403. package/esm2020/src/commands/ClientToServer/FetchDataControlValuesEventCommand.mjs +0 -22
  404. package/esm2020/src/commands/ClientToServer/IndexChangeEventCommand.mjs +0 -21
  405. package/esm2020/src/commands/ClientToServer/IniputForceWriteCommand.mjs +0 -23
  406. package/esm2020/src/commands/ClientToServer/RecomputeCommand.mjs +0 -27
  407. package/esm2020/src/commands/ClientToServer/RefreshEventCommand.mjs +0 -27
  408. package/esm2020/src/commands/ClientToServer/RefreshScreenEventCommand.mjs +0 -24
  409. package/esm2020/src/commands/ClientToServer/RollbackEventCommand.mjs +0 -39
  410. package/esm2020/src/commands/ClientToServer/SelectProgramCommand.mjs +0 -15
  411. package/esm2020/src/commands/ClientToServer/SubformOpenEventCommand.mjs +0 -21
  412. package/esm2020/src/commands/ClientToServer/SubformRefreshEventCommand.mjs +0 -24
  413. package/esm2020/src/commands/ClientToServer/TransactionCommand.mjs +0 -28
  414. package/esm2020/src/commands/ClientToServer/WriteMessageToServerLogCommand.mjs +0 -18
  415. package/esm2020/src/commands/DataViewCommandBase.mjs +0 -10
  416. package/esm2020/src/commands/IClientTargetedCommand.mjs +0 -9
  417. package/esm2020/src/commands/ServerToClient/AbortCommand.mjs +0 -65
  418. package/esm2020/src/commands/ServerToClient/AddRangeCommand.mjs +0 -62
  419. package/esm2020/src/commands/ServerToClient/AddSortCommand.mjs +0 -33
  420. package/esm2020/src/commands/ServerToClient/ClientRefreshCommand.mjs +0 -25
  421. package/esm2020/src/commands/ServerToClient/ClientTargetedCommandBase.mjs +0 -27
  422. package/esm2020/src/commands/ServerToClient/EnhancedVerifyCommand.mjs +0 -45
  423. package/esm2020/src/commands/ServerToClient/OpenURLCommand.mjs +0 -221
  424. package/esm2020/src/commands/ServerToClient/ResultCommand.mjs +0 -37
  425. package/esm2020/src/commands/ServerToClient/VerifyCommand.mjs +0 -83
  426. package/esm2020/src/commands/ServerToClient/XMLBasedCommandBuilder.mjs +0 -132
  427. package/esm2020/src/communications/InteractiveCommunicationsFailureHandler.mjs +0 -17
  428. package/esm2020/src/data/DataView.mjs +0 -1610
  429. package/esm2020/src/data/DataviewManager.mjs +0 -28
  430. package/esm2020/src/data/DataviewManagerBase.mjs +0 -15
  431. package/esm2020/src/data/DvCache.mjs +0 -67
  432. package/esm2020/src/data/Field.mjs +0 -646
  433. package/esm2020/src/data/FieldBase.mjs +0 -18
  434. package/esm2020/src/data/FieldsTable.mjs +0 -103
  435. package/esm2020/src/data/Key.mjs +0 -88
  436. package/esm2020/src/data/Record.mjs +0 -846
  437. package/esm2020/src/data/RecordsTable.mjs +0 -267
  438. package/esm2020/src/data/TaskTransactionManager.mjs +0 -103
  439. package/esm2020/src/data/XMLBasedDcValuesBuilder.mjs +0 -74
  440. package/esm2020/src/env/EnvVariablesTable.mjs +0 -340
  441. package/esm2020/src/env/Environment.mjs +0 -489
  442. package/esm2020/src/env/LanguageData.mjs +0 -226
  443. package/esm2020/src/env/MirrorString.mjs +0 -65
  444. package/esm2020/src/event/ActionManager.mjs +0 -91
  445. package/esm2020/src/event/Event.mjs +0 -1333
  446. package/esm2020/src/event/EventHandler.mjs +0 -766
  447. package/esm2020/src/event/EventHandlerPosition.mjs +0 -204
  448. package/esm2020/src/event/EventsManager.mjs +0 -2975
  449. package/esm2020/src/event/RunTimeEvent.mjs +0 -392
  450. package/esm2020/src/event/UserEventsTable.mjs +0 -47
  451. package/esm2020/src/exp/ExpTable.mjs +0 -59
  452. package/esm2020/src/exp/Expression.mjs +0 -200
  453. package/esm2020/src/exp/ExpressionDict.mjs +0 -727
  454. package/esm2020/src/exp/ExpressionEvaluator.mjs +0 -4212
  455. package/esm2020/src/exp/ExpressionLocalJpn.mjs +0 -314
  456. package/esm2020/src/exp/GlobalParamsTable.mjs +0 -85
  457. package/esm2020/src/exp/YesNoExp.mjs +0 -36
  458. package/esm2020/src/gui/CreatedFormVector.mjs +0 -23
  459. package/esm2020/src/gui/FormsTable.mjs +0 -66
  460. package/esm2020/src/gui/MgControl.mjs +0 -353
  461. package/esm2020/src/gui/MgForm.mjs +0 -1181
  462. package/esm2020/src/http/HttpManager.mjs +0 -97
  463. package/esm2020/src/http/client/HttpClientAsync.mjs +0 -67
  464. package/esm2020/src/http/client/HttpClientBase.mjs +0 -132
  465. package/esm2020/src/http/client/HttpClientEvents.mjs +0 -39
  466. package/esm2020/src/http/client/HttpClientSync.mjs +0 -42
  467. package/esm2020/src/http/client/HttpUtility.mjs +0 -84
  468. package/esm2020/src/remote/AddUserLocateRemoteDataViewCommand.mjs +0 -18
  469. package/esm2020/src/remote/AddUserRangeRemoteDataViewCommand.mjs +0 -18
  470. package/esm2020/src/remote/AddUserSortRemoteDataViewCommand.mjs +0 -18
  471. package/esm2020/src/remote/RemoteCommandsProcessor.mjs +0 -880
  472. package/esm2020/src/remote/RemoteControlItemsRefreshCommand.mjs +0 -25
  473. package/esm2020/src/remote/RemoteDataViewCommandBase.mjs +0 -24
  474. package/esm2020/src/remote/RemoteDataViewCommandFactory.mjs +0 -61
  475. package/esm2020/src/remote/ResetUserLocateRemoteDataviewCommand.mjs +0 -17
  476. package/esm2020/src/remote/ResetUserSortRemoteDataviewCommand.mjs +0 -16
  477. package/esm2020/src/remote/ServerError.mjs +0 -40
  478. package/esm2020/src/remote/SetTransactionStateRemoteDataViewCommand.mjs +0 -20
  479. package/esm2020/src/rt/Argument.mjs +0 -265
  480. package/esm2020/src/rt/ArgumentsList.mjs +0 -103
  481. package/esm2020/src/rt/Boundary.mjs +0 -152
  482. package/esm2020/src/rt/CompMainPrgTable.mjs +0 -65
  483. package/esm2020/src/rt/DataviewHeaders.mjs +0 -53
  484. package/esm2020/src/rt/DataviewHeadersSaxHandler.mjs +0 -38
  485. package/esm2020/src/rt/ExecutionStack.mjs +0 -94
  486. package/esm2020/src/rt/HandlersTable.mjs +0 -96
  487. package/esm2020/src/rt/LastFocusedManager.mjs +0 -67
  488. package/esm2020/src/rt/Operation.mjs +0 -735
  489. package/esm2020/src/rt/OperationTable.mjs +0 -67
  490. package/esm2020/src/rt/Recompute.mjs +0 -355
  491. package/esm2020/src/rt/RecomputeTable.mjs +0 -63
  492. package/esm2020/src/rt/RemoteDataviewHeader.mjs +0 -108
  493. package/esm2020/src/rt/ResultValue.mjs +0 -12
  494. package/esm2020/src/rt/TableCache.mjs +0 -177
  495. package/esm2020/src/rt/TableCacheManager.mjs +0 -67
  496. package/esm2020/src/rt/Transaction.mjs +0 -53
  497. package/esm2020/src/security/UserDetails.mjs +0 -71
  498. package/esm2020/src/tasks/MGData.mjs +0 -552
  499. package/esm2020/src/tasks/MGDataCollection.mjs +0 -252
  500. package/esm2020/src/tasks/RCTimer.mjs +0 -63
  501. package/esm2020/src/tasks/RemoteTaskService.mjs +0 -45
  502. package/esm2020/src/tasks/Task.mjs +0 -2495
  503. package/esm2020/src/tasks/TaskBase.mjs +0 -87
  504. package/esm2020/src/tasks/TaskServiceBase.mjs +0 -25
  505. package/esm2020/src/tasks/TasksTable.mjs +0 -80
  506. package/esm2020/src/tasks/sort/Sort.mjs +0 -7
  507. package/esm2020/src/tasks/sort/SortCollection.mjs +0 -67
  508. package/esm2020/src/util/ConstUtils.mjs +0 -14
  509. package/esm2020/src/util/FlowMonitorQueue.mjs +0 -453
  510. package/esm2020/src/util/HeapSort.mjs +0 -70
  511. package/esm2020/src/util/MgPriorityBlockingQueue.mjs +0 -74
  512. package/esm2020/src/util/MgPriorityQueue.mjs +0 -66
  513. package/esm2020/src/util/PrmMap.mjs +0 -151
  514. package/esm2020/src/util/ReturnResult.mjs +0 -46
  515. package/esm2020/src/util/ReturnResultBase.mjs +0 -18
  516. package/esm2020/src/util/Scrambler.mjs +0 -89
  517. package/esm2020/src/util/UniqueIDUtils.mjs +0 -12
  518. package/esm2020/src/util/cookie.service.mjs +0 -92
  519. package/fesm2015/magic-xpa-engine.mjs +0 -30835
  520. package/fesm2015/magic-xpa-engine.mjs.map +0 -1
  521. package/fesm2020/magic-xpa-engine.mjs.map +0 -1
@@ -1,552 +0,0 @@
1
- import { HandlersTable } from "../rt/HandlersTable";
2
- import { TasksTable } from "./TasksTable";
3
- import { CompMainPrgTable } from "../rt/CompMainPrgTable";
4
- import { Task } from "./Task";
5
- import { Logger, XMLConstants, XmlParser } from "@magic-xpa/utils";
6
- import { RecomputeTable } from "../rt/RecomputeTable";
7
- import { Debug, NNumber } from "@magic-xpa/mscorelib";
8
- import { RuntimeContextBase } from "@magic-xpa/gui";
9
- import { GUIManager } from "../GUIManager";
10
- import { HttpManager } from "../http/HttpManager";
11
- import { FlowMonitorQueue } from "../util/FlowMonitorQueue";
12
- import { RunTimeEvent } from "../event/RunTimeEvent";
13
- import { ConstInterface } from "../ConstInterface";
14
- import { LanguageData } from "../env/LanguageData";
15
- import { EnvParamsTable } from "../env/EnvVariablesTable";
16
- import { GlobalParams } from "../exp/GlobalParamsTable";
17
- import { Environment } from "../env/Environment";
18
- import { GlobalCommandsManager } from "../GlobalCommandsManager";
19
- import { ServerConfig } from "../ServerConfig";
20
- import { AccessHelper } from "../AccessHelper";
21
- import { UserDetails } from "../security/UserDetails";
22
- import { RemoteCommandsProcessor } from "../remote/RemoteCommandsProcessor";
23
- export class MGData {
24
- get ForceModal() {
25
- return this.forceModal;
26
- }
27
- constructor(toClient, toServer, id, parent, isModal, forceModal) {
28
- this._expHandlers = null;
29
- this._id = 0;
30
- this._parent = null;
31
- this._mprgTab = null;
32
- this._tasksTab = null;
33
- this._timerHandlers = null;
34
- this._timersStarted = false;
35
- this.forceModal = false;
36
- this.CmdsToClient = null;
37
- this.CmdsToServer = null;
38
- this.IsModal = false;
39
- this.IsAborting = false;
40
- this.CmdsToServer = toClient;
41
- this.CmdsToClient = toServer;
42
- if (arguments.length === 5)
43
- this.constructor_0(id, parent, isModal);
44
- else
45
- this.constructor_1(id, parent, isModal, forceModal);
46
- }
47
- constructor_0(id, parent, isModal) {
48
- this._timerHandlers = new HandlersTable();
49
- this._expHandlers = new HandlersTable();
50
- this._mprgTab = new TasksTable();
51
- this._tasksTab = new TasksTable();
52
- this._id = id;
53
- this._parent = parent;
54
- if (AccessHelper.eventsManager.getCompMainPrgTab() === null) {
55
- let compMainPrgTab = new CompMainPrgTable();
56
- AccessHelper.eventsManager.setCompMainPrgTab(compMainPrgTab);
57
- }
58
- this.IsModal = isModal;
59
- }
60
- constructor_1(id, parent, isModal, forceModal) {
61
- this.constructor_0(id, parent, isModal);
62
- this.forceModal = forceModal;
63
- }
64
- GetId() {
65
- return this._id;
66
- }
67
- AlreadyMovedToFirstControl() {
68
- let alreadyMoved = false;
69
- let tasksCount = this.getTasksCount();
70
- for (let i = 0; i < tasksCount; i = i + 1) {
71
- let mgForm = this.getTask(i).getForm();
72
- if (mgForm !== null && mgForm.MovedToFirstControl) {
73
- alreadyMoved = true;
74
- break;
75
- }
76
- }
77
- return alreadyMoved;
78
- }
79
- StartTimers() {
80
- if (this._timerHandlers !== null && !this._timersStarted) {
81
- this._timerHandlers.startTimers(this);
82
- this._timersStarted = true;
83
- }
84
- }
85
- async fillData(openingTaskDetails, parser) {
86
- let canContinue;
87
- do {
88
- let nextTag = parser.getNextTag();
89
- canContinue = await this.initInnerObjects(parser, nextTag, openingTaskDetails);
90
- } while (canContinue);
91
- Logger.Instance.WriteDevToLog("MGData.FillData(): THE END of the parsing " + parser.getCurrIndex() + " characters");
92
- }
93
- async initInnerObjects(parser, foundTagName, openingTaskDetails) {
94
- if (foundTagName == null)
95
- return false;
96
- switch (foundTagName) {
97
- case XMLConstants.MG_TAG_XML:
98
- parser.setCurrIndex(parser.getXMLdata().indexOf(XMLConstants.TAG_CLOSE, parser.getCurrIndex()) + 1);
99
- break;
100
- case ConstInterface.MG_TAG_DATAVIEW:
101
- if (!await this.insertDataView(parser)) {
102
- let endContext = parser.getXMLdata().indexOf('/' + ConstInterface.MG_TAG_DATAVIEW, parser.getCurrIndex());
103
- parser.setCurrIndex(endContext);
104
- parser.setCurrIndex2EndOfTag();
105
- }
106
- break;
107
- case ConstInterface.MG_TAG_COMPLETE_DV:
108
- {
109
- let task = null;
110
- let endContext = parser.getXMLdata().indexOf(XMLConstants.TAG_CLOSE, parser.getCurrIndex());
111
- let index = parser.getXMLdata().indexOf(ConstInterface.MG_TAG_COMPLETE_DV, parser.getCurrIndex()) + ConstInterface.MG_TAG_COMPLETE_DV.length;
112
- let tokensVector = XmlParser.getTokens(parser.getXMLdata().substr(index, endContext - index), '"');
113
- let attribute = (tokensVector.get_Item(0));
114
- let valueStr;
115
- if (attribute === XMLConstants.MG_ATTR_TASKID) {
116
- valueStr = (tokensVector.get_Item(1));
117
- let taskId = valueStr;
118
- if (this.getTask(taskId) === null)
119
- task = AccessHelper.mgDataTable.GetTaskByID(taskId);
120
- else
121
- task = this.getTask(taskId);
122
- }
123
- let start = endContext + 1;
124
- endContext = parser.getXMLdata().indexOf(XMLConstants.END_TAG + ConstInterface.MG_TAG_COMPLETE_DV, parser.getCurrIndex());
125
- let dataViewContent = parser.getXMLdata().substr(start, endContext - start);
126
- task.dataViewContent = dataViewContent;
127
- parser.setCurrIndex(endContext);
128
- parser.setCurrIndex2EndOfTag();
129
- }
130
- break;
131
- case ConstInterface.MG_TAG_CONTEXT: {
132
- let endContext = parser.getXMLdata().indexOf(XMLConstants.TAG_TERM, parser.getCurrIndex());
133
- if (endContext !== -1 && endContext < parser.getXMLdata().length) {
134
- let tag = parser.getXMLsubstring(endContext);
135
- parser.add2CurrIndex(tag.indexOf(ConstInterface.MG_TAG_CONTEXT) + ConstInterface.MG_TAG_CONTEXT.length);
136
- parser.setCurrIndex(endContext + XMLConstants.TAG_TERM.length);
137
- }
138
- break;
139
- }
140
- case XMLConstants.MG_TAG_RECOMPUTE:
141
- let recompTab = new RecomputeTable();
142
- recompTab.fillData(parser);
143
- break;
144
- case ConstInterface.MG_TAG_COMMAND:
145
- Logger.Instance.WriteDevToLog("goes to command");
146
- this.CmdsToClient.fillData(parser);
147
- break;
148
- case ConstInterface.MG_TAG_LANGUAGE:
149
- Logger.Instance.WriteDevToLog("goes to language data");
150
- await LanguageData.Instance.fillData(parser);
151
- break;
152
- case ConstInterface.MG_TAG_KBDMAP_URL:
153
- Logger.Instance.WriteDevToLog("goes to keyBoard");
154
- await Environment.Instance.fillFromUrl(foundTagName, parser);
155
- break;
156
- case ConstInterface.MG_TAG_KBDMAP:
157
- break;
158
- case ConstInterface.MG_TAG_COMPMAINPRG:
159
- Logger.Instance.WriteDevToLog("goes to compmainprg");
160
- AccessHelper.eventsManager.getCompMainPrgTab().fillData(parser);
161
- break;
162
- case ConstInterface.MG_TAG_EVENTS_QUEUE:
163
- Logger.Instance.WriteDevToLog("goes to eventsqueue");
164
- this.fillEventsQueue(parser);
165
- break;
166
- case ConstInterface.MG_TAG_TASKURL:
167
- await Task.ProcessTaskURL();
168
- break;
169
- case XMLConstants.MG_TAG_TASK:
170
- Logger.Instance.WriteDevToLog("goes to task");
171
- let taskCountBefore = this._mprgTab.getSize();
172
- await this._mprgTab.fillData(this, openingTaskDetails, parser);
173
- if (this._id !== 0) {
174
- let taskCountAfter = this._mprgTab.getSize();
175
- let mgd0 = AccessHelper.mgDataTable.getMGData(0);
176
- for (let taskIndex = taskCountBefore; taskIndex < taskCountAfter; taskIndex++) {
177
- let newTask = this._mprgTab.getTask(taskIndex);
178
- if (newTask.isMainProg() && mgd0._mprgTab.getTask(newTask.getTaskTag()) == null) {
179
- mgd0._mprgTab.addTask(newTask);
180
- mgd0.addTask(newTask);
181
- }
182
- }
183
- }
184
- break;
185
- case ConstInterface.MG_TAG_ENV:
186
- Logger.Instance.WriteDevToLog("goes to environment");
187
- Environment.Instance.fillData(parser);
188
- break;
189
- case ConstInterface.MG_TAG_FLWMTR_CONFIG:
190
- FlowMonitorQueue.Instance.fillData(parser);
191
- break;
192
- case XMLConstants.MG_TAG_XML_END:
193
- parser.setCurrIndex2EndOfTag();
194
- return false;
195
- case ConstInterface.MG_TAG_USER_DETAILS:
196
- UserDetails.Instance.fillData(parser);
197
- break;
198
- case ConstInterface.MG_TAG_DBH_REAL_IDXS:
199
- parser.SkipXMLElement();
200
- break;
201
- case ConstInterface.MG_TAG_GLOBALPARAMSCHANGES:
202
- Logger.Instance.WriteDevToLog("applying global params changes from the server (Set/GetParams)");
203
- GlobalParams.Instance.fillData(parser);
204
- break;
205
- case ConstInterface.MG_TAG_GLOBALPARAMS:
206
- Logger.Instance.WriteDevToLog("processing base64 encoded image of all global params from the server");
207
- this.fillGlobalParams(parser);
208
- break;
209
- case ConstInterface.MG_TAG_ENV_PARAM_URL:
210
- Logger.Instance.WriteDevToLog("goes to env params name ");
211
- await Environment.Instance.fillFromUrl(foundTagName, parser);
212
- break;
213
- case ConstInterface.MG_TAG_ENV_PARAM:
214
- Logger.Instance.WriteDevToLog("goes to env params name ");
215
- EnvParamsTable.Instance.fillData(parser);
216
- break;
217
- case ConstInterface.MG_TAG_CONTEXT_ID:
218
- {
219
- let ctxId;
220
- let ctxEndIdx;
221
- parser.setCurrIndex(parser.getXMLdata().indexOf(XMLConstants.TAG_CLOSE, parser.getCurrIndex()) + 1);
222
- ctxEndIdx = parser.getXMLdata().indexOf(XMLConstants.TAG_OPEN, parser.getCurrIndex());
223
- ctxId = parser.getXMLsubstring(ctxEndIdx).trim();
224
- parser.setCurrIndex(ctxEndIdx);
225
- parser.setCurrIndex2EndOfTag();
226
- RuntimeContextBase.Instance.ContextID = ctxId;
227
- }
228
- break;
229
- case ConstInterface.MG_TAG_SESSION_ID:
230
- let sessionIdEndIdx;
231
- parser.setCurrIndex(parser.getXMLdata().indexOf(XMLConstants.TAG_CLOSE, parser.getCurrIndex()) + 1);
232
- sessionIdEndIdx = parser.getXMLdata().indexOf(XMLConstants.TAG_OPEN, parser.getCurrIndex());
233
- RemoteCommandsProcessor.GetInstance().SessionId = parser.getXMLsubstring(sessionIdEndIdx).trim();
234
- parser.setCurrIndex(sessionIdEndIdx);
235
- parser.setCurrIndex2EndOfTag();
236
- break;
237
- case ConstInterface.MG_TAG_HTTP_COMMUNICATION_TIMEOUT:
238
- {
239
- let httpCommunicationTimeout;
240
- let httpCommunicationTimeoutIdx;
241
- parser.setCurrIndex(parser.getXMLdata().indexOf(XMLConstants.TAG_CLOSE, parser.getCurrIndex()) + 1);
242
- httpCommunicationTimeoutIdx = parser.getXMLdata().indexOf(XMLConstants.TAG_OPEN, parser.getCurrIndex());
243
- httpCommunicationTimeout = NNumber.Parse(parser.getXMLsubstring(httpCommunicationTimeoutIdx));
244
- parser.setCurrIndex(httpCommunicationTimeoutIdx);
245
- parser.setCurrIndex2EndOfTag();
246
- HttpManager.GetInstance().HttpCommunicationTimeoutMS = httpCommunicationTimeout * 1000;
247
- }
248
- break;
249
- case ConstInterface.MG_TAG_DATABASE_URL:
250
- case ConstInterface.MG_TAG_DATABASES_HEADER:
251
- case ConstInterface.MG_TAG_TASKDEFINITION_IDS_URL:
252
- case ConstInterface.MG_TAG_DBH_DATA_IDS_URL:
253
- case ConstInterface.MG_TAG_DBHS_END:
254
- case ConstInterface.MG_TAG_OFFLINE_SNIPPETS_URL:
255
- parser.SkipXMLElement();
256
- break;
257
- case ConstInterface.MG_TAG_DBHS:
258
- case ConstInterface.MG_TAG_STARTUP_PROGRAM:
259
- parser.ReadContentOfCurrentElement();
260
- break;
261
- case XMLConstants.MG_TAG_MENUS_OPEN:
262
- break;
263
- default:
264
- Logger.Instance.WriteExceptionToLogWithMsg("There is no such tag name in MGData, add case to MGData.initInnerObjects and case to while of MGData.FillData " + foundTagName);
265
- return false;
266
- }
267
- return true;
268
- }
269
- async insertDataView(parser) {
270
- let task = null;
271
- let endContext = parser.getXMLdata().indexOf(XMLConstants.TAG_CLOSE, parser.getCurrIndex());
272
- let index = parser.getXMLdata().indexOf(ConstInterface.MG_TAG_DATAVIEW, parser.getCurrIndex()) + ConstInterface.MG_TAG_DATAVIEW.length;
273
- let tokensVector = XmlParser.getTokens(parser.getXMLdata().substr(index, endContext - index), '"');
274
- let invalidate = false;
275
- for (let i = 0; i < tokensVector.length; i = i + 2) {
276
- let attribute = tokensVector.get_Item(i);
277
- if (attribute === XMLConstants.MG_ATTR_TASKID) {
278
- let valueStr = tokensVector.get_Item(i + 1);
279
- let taskId = valueStr;
280
- task = (this.getTask(taskId) || AccessHelper.mgDataTable.GetTaskByID(taskId));
281
- }
282
- if (attribute === ConstInterface.MG_ATTR_INVALIDATE) {
283
- let valueStr = tokensVector.get_Item(i + 1);
284
- invalidate = XmlParser.getBoolean(valueStr);
285
- break;
286
- }
287
- }
288
- let result;
289
- if (task !== null) {
290
- await task.insertRecordTable(invalidate, parser);
291
- result = true;
292
- }
293
- else {
294
- result = false;
295
- }
296
- return result;
297
- }
298
- addTask(newTask) {
299
- this._tasksTab.addTask(newTask);
300
- }
301
- removeTask(task) {
302
- this._tasksTab.removeTask(task);
303
- this._mprgTab.removeTask(task);
304
- }
305
- getTasksCount() {
306
- let result;
307
- if (this._tasksTab !== null) {
308
- result = this._tasksTab.getSize();
309
- }
310
- else {
311
- result = 0;
312
- }
313
- return result;
314
- }
315
- getTask(taskIdOrIdx) {
316
- if (arguments.length === 1 && (taskIdOrIdx === null || typeof taskIdOrIdx === "undefined" || taskIdOrIdx.constructor === String)) {
317
- return this.getTask_0(taskIdOrIdx);
318
- }
319
- return this.getTask_1(taskIdOrIdx);
320
- }
321
- getTask_0(taskId) {
322
- let result;
323
- if (this._tasksTab !== null && typeof this._tasksTab !== "undefined") {
324
- result = this._tasksTab.getTask(taskId);
325
- }
326
- else {
327
- result = null;
328
- }
329
- return result;
330
- }
331
- getTask_1(idx) {
332
- return this._tasksTab.getTask(idx);
333
- }
334
- async buildXML(message, serializeTasks) {
335
- if (this.CmdsToServer !== null) {
336
- this.CmdsToServer.buildXML(message);
337
- }
338
- if (serializeTasks && this._tasksTab !== null) {
339
- await this._tasksTab.buildXML(message);
340
- }
341
- }
342
- getFirstTask() {
343
- let task = null;
344
- let MDIFrameTask = null;
345
- for (let i = 0; i < this._tasksTab.getSize(); i = i + 1) {
346
- task = this._tasksTab.getTask(i);
347
- if (!task.isMainProg()) {
348
- break;
349
- }
350
- task = null;
351
- }
352
- if (task === null && this._id === 0) {
353
- task = MDIFrameTask;
354
- }
355
- return task;
356
- }
357
- getMainProg(ctlIdx) {
358
- for (let i = 0; i < this._mprgTab.getSize(); i = i + 1) {
359
- let task = this._mprgTab.getTask(i);
360
- if (task.getCtlIdx() === ctlIdx && task.isMainProg()) {
361
- return task;
362
- }
363
- }
364
- return null;
365
- }
366
- getNextMainProg(ctlIdx) {
367
- let compMainPrgTab = AccessHelper.eventsManager.getCompMainPrgTab();
368
- let currSearchIndex = compMainPrgTab.getIndexOf(ctlIdx);
369
- let nextCtlIdx = compMainPrgTab.getCtlIdx(currSearchIndex + 1);
370
- let result;
371
- if (nextCtlIdx === -1) {
372
- result = null;
373
- }
374
- else {
375
- result = this.getMainProg(nextCtlIdx);
376
- }
377
- return result;
378
- }
379
- clientTransactionCacheExists() {
380
- let task;
381
- for (let i = 0; i < this._tasksTab.getSize(); i = i + 1) {
382
- task = this._tasksTab.getTask(i);
383
- if (!task.isMainProg() && task.DataView.modifiedRecordsNumber() > 0) {
384
- return true;
385
- }
386
- }
387
- return false;
388
- }
389
- serverTransactionCacheExists() {
390
- let task;
391
- for (let i = 0; i < this._tasksTab.getSize(); i = i + 1) {
392
- task = this._tasksTab.getTask(i);
393
- if (!task.isMainProg() && !task.DataView.ServerTransactionCacheEmpty) {
394
- return true;
395
- }
396
- }
397
- return false;
398
- }
399
- getTaskByTaskDefinitionID(taskDefinitionID) {
400
- let task;
401
- for (let i = 0; i < this._tasksTab.getSize(); i = i + 1) {
402
- task = this._tasksTab.getTask(i);
403
- if (task.TaskDefinitionId.Equals(taskDefinitionID)) {
404
- return task;
405
- }
406
- }
407
- return null;
408
- }
409
- getTimerHandlers() {
410
- return this._timerHandlers;
411
- }
412
- addTimerHandler(handler) {
413
- this._timerHandlers.add(handler);
414
- }
415
- removeTimerHandler(task) {
416
- for (let i = 0; i < this._timerHandlers.getSize();) {
417
- let timerTask = this._timerHandlers.getHandler(i).getTask();
418
- if (timerTask.isDescendentOf(task) && timerTask.getMGData() === this)
419
- this._timerHandlers.remove(i);
420
- else
421
- i++;
422
- }
423
- }
424
- removeExpressionHandler(task) {
425
- for (let i = 0; i < this._expHandlers.getSize();) {
426
- let timerTask = this._expHandlers.getHandler(i).getTask();
427
- if (timerTask.isDescendentOf(task) && timerTask.getMGData() === this)
428
- this._expHandlers.remove(i);
429
- else
430
- i++;
431
- }
432
- }
433
- getExpHandlers() {
434
- return this._expHandlers;
435
- }
436
- addExpHandler(handler, idx) {
437
- this._expHandlers.insertAfter(handler, idx);
438
- }
439
- changeTimers(oldTimers, newTimers) {
440
- let i = 0;
441
- let j = 0;
442
- let guiManager = GUIManager.Instance;
443
- oldTimers.sort();
444
- newTimers.sort();
445
- while (i < oldTimers.length && j < newTimers.length) {
446
- if (oldTimers.get_Item(i) > newTimers.get_Item(j)) {
447
- guiManager.startTimer(this, newTimers.get_Item(j), false);
448
- j = j + 1;
449
- }
450
- else {
451
- if (oldTimers.get_Item(i) < newTimers.get_Item(j)) {
452
- guiManager.stopTimer(this, oldTimers.get_Item(i), false);
453
- i = i + 1;
454
- }
455
- else {
456
- i = i + 1;
457
- j = j + 1;
458
- }
459
- }
460
- }
461
- while (i < oldTimers.length) {
462
- guiManager.stopTimer(this, oldTimers.get_Item(i), false);
463
- i = i + 1;
464
- }
465
- while (j < newTimers.length) {
466
- guiManager.startTimer(this, newTimers.get_Item(j), false);
467
- j = j + 1;
468
- }
469
- }
470
- fillEventsQueue(parser) {
471
- while (this.initEvents(parser, parser.getNextTag())) {
472
- }
473
- }
474
- initEvents(parser, foundTagName) {
475
- let result;
476
- if (foundTagName === null) {
477
- result = false;
478
- }
479
- else {
480
- if (foundTagName === ConstInterface.MG_TAG_EVENT) {
481
- let evt = new RunTimeEvent(null);
482
- evt.fillData(parser, null);
483
- evt.convertParamsToArgs();
484
- evt.setTask(null);
485
- evt.setFromServer();
486
- AccessHelper.eventsManager.addToTail(evt);
487
- }
488
- else {
489
- if (foundTagName === ConstInterface.MG_TAG_EVENTS_QUEUE) {
490
- parser.setCurrIndex(parser.getXMLdata().indexOf(">", parser.getCurrIndex()) + 1);
491
- }
492
- else {
493
- if (foundTagName === "/" + ConstInterface.MG_TAG_EVENTS_QUEUE) {
494
- parser.setCurrIndex2EndOfTag();
495
- result = false;
496
- return result;
497
- }
498
- Logger.Instance.WriteExceptionToLogWithMsg("There is no such tag in EventsQueue: " + foundTagName);
499
- result = false;
500
- return result;
501
- }
502
- }
503
- result = true;
504
- }
505
- return result;
506
- }
507
- isMainWindow() {
508
- return this._parent === null;
509
- }
510
- getParentMGdata() {
511
- return this._parent;
512
- }
513
- abort() {
514
- this.IsAborting = true;
515
- }
516
- copyUnframedCmds() {
517
- let unframedCmds = GlobalCommandsManager.Instance.getUnframedCmds();
518
- for (let i = 0; i < unframedCmds.length; i = i + 1) {
519
- this.CmdsToClient.Add(unframedCmds.get_Item(i));
520
- }
521
- unframedCmds.SetSize(0);
522
- }
523
- getValidAncestor() {
524
- return this._parent;
525
- }
526
- getMaxCtlIdx() {
527
- let rc = 0;
528
- for (let i = 0; i < this._tasksTab.getSize(); i = i + 1) {
529
- let task = this._tasksTab.getTask(i);
530
- if (task !== null) {
531
- rc = Math.max(rc, task.getCtlIdx());
532
- }
533
- }
534
- return rc;
535
- }
536
- fillGlobalParams(parser) {
537
- let XMLdata = parser.getXMLdata();
538
- let endContext = parser.getXMLdata().indexOf(XMLConstants.TAG_TERM, parser.getCurrIndex());
539
- if (endContext !== -1 && endContext < XMLdata.length) {
540
- let tag = parser.getXMLsubstring(endContext);
541
- parser.add2CurrIndex(tag.indexOf(ConstInterface.MG_TAG_GLOBALPARAMS) + ConstInterface.MG_TAG_GLOBALPARAMS.length);
542
- let tokens = XmlParser.getTokens(RuntimeContextBase.Instance.Parser.getXMLsubstring(endContext), XMLConstants.XML_ATTR_DELIM);
543
- Debug.Assert(tokens.get_Item(0) === XMLConstants.MG_ATTR_VALUE);
544
- ServerConfig.Instance.setGlobalParams(tokens.get_Item(1));
545
- endContext = XMLdata.indexOf(XMLConstants.TAG_OPEN, endContext);
546
- if (endContext === -1)
547
- endContext = XMLdata.length;
548
- parser.setCurrIndex(endContext);
549
- }
550
- }
551
- }
552
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiTUdEYXRhLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvZW5naW5lL3NyYy90YXNrcy9NR0RhdGEudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFDLGFBQWEsRUFBQyxNQUFNLHFCQUFxQixDQUFDO0FBQ2xELE9BQU8sRUFBQyxVQUFVLEVBQUMsTUFBTSxjQUFjLENBQUM7QUFFeEMsT0FBTyxFQUFDLGdCQUFnQixFQUFDLE1BQU0sd0JBQXdCLENBQUM7QUFFeEQsT0FBTyxFQUFDLElBQUksRUFBQyxNQUFNLFFBQVEsQ0FBQztBQUU1QixPQUFPLEVBQUMsTUFBTSxFQUFFLFlBQVksRUFBRSxTQUFTLEVBQUMsTUFBTSxrQkFBa0I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4gICAgICAgIC8vIG5vdGhpbmdcclxuICAgICAgICBicmVhaztcclxuICAgICAgY2FzZSBDb25zdEludGVyZmFjZS5NR19UQUdfREFUQVZJRVc6XHJcbiAgICAgICAgaWYgKCEgYXdhaXQgdGhpcy5pbnNlcnREYXRhVmlldyhwYXJzZXIpKSB7XHJcbiAgICAgICAgICAvLyB0aGUgdGFzayBvZiBpbnNlcnQgZGF0YSB2aWV3IG5vdCBmb3VuZCAtPiBzZXQgcGFyc2VycyBjb3VudGVyIHRvIHRoZVxyXG4gICAgICAgICAgLy8gZW5kIG9mIHRoZSBkYXRhIHZpZXdcclxuICAgICAgICAgIC8vIHRoZSBkYXRhIHZpZXcsIGdvdCBmcm9tIHNlcnZlciBhbmQgdGhlcmUgaXMgbm8gdGFzayB0byB0aGUgZGF0YSB2aWV3ICwgeWV0LlxyXG4gICAgICAgICAgbGV0IGVuZENvbnRleHQ6IG51bWJlciA9IHBhcnNlci5nZXRYTUxkYXRhKCkuaW5kZXhPZignLycgKyBDb25zdEludGVyZmFjZS5NR19UQUdfREFUQVZJRVcsXHJcbiAgICAgICAgICAgIHBhcnNlci5nZXRDdXJySW5kZXgoKSk7XHJcbiAgICAgICAgICBwYXJzZXIuc2V0Q3VyckluZGV4KGVuZENvbnRleHQpO1xyXG4gICAgICAgICAgcGFyc2VyLnNldEN1cnJJbmRleDJFbmRPZlRhZygpO1xyXG4gICAgICAgIH1cclxuICAgICAgICBicmVhaztcclxuICAgICAgY2FzZSBDb25zdEludGVyZmFjZS5NR19UQUdfQ09NUExFVEVfRFY6IHtcclxuICAgICAgICBsZXQgdGFzazogVGFzayA9IG51bGw7XHJcbiAgICAgICAgbGV0IGVuZENvbnRleHQ6IG51bWJlciA9IHBhcnNlci5nZXRYTUxkYXRhKCkuaW5kZXhPZihYTUxDb25zdGFudHMuVEFHX0NMT1NFLCBwYXJzZXIuZ2V0Q3VyckluZGV4KCkpO1xyXG4gICAgICAgIGxldCBpbmRleDogbnVtYmVyID0gcGFyc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fVEVSTS5sZW5ndGgpO1xyXG4gICAgICAgIH1cclxuICAgICAgICBicmVhaztcclxuICAgICAgfVxyXG4gICAgICBjYXNlIFhNTENvbnN0YW50cy5NR19UQUdfUkVDT01QVVRFOlxyXG4gICAgICAgIGxldCByZWNvbXBUYWIgPSBuZXcgUmVjb21wdXRlVGFibGUoKTtcclxuICAgICAgICByZWNvbXBUYWIuZmlsbERhdGEocGFyc2VyKTtcclxuICAgICAgICBicmVhaztcclxuICAgICAgY2FzZSBDb25zdEludGVyZmFjZS5NR19UQUdfQ09NTUFORDpcclxuICAgICAgICBMb2dnZXIuSW5zdGFuY2UuV3JpdGVEZXZUb0xvZyhcImdvZXMgdG8gY29tbWFuZFwiKTtcclxuICAgICAgICB0aGlzLkNtZHNUb0NsaWVudC5maWxsRGF0YShwYXJzZXIpO1xyXG4gICAgICAgIGJyZWFrO1xyXG4gICAgICBjYXNlIENvbnN0SW50ZXJmYWNlLk1HX1RBR19MQU5HVUFHRTpcclxuICAgICAgICBMb2dnZXIuSW5zdGFuY2UuV3JpdGVEZXZUb0xvZyhcImdvZXMgdG8gbGFuZ3VhZ2UgZGF0YVwiKTtcclxuICAgICAgICBhd2FpdCBMYW5ndWFnZURhdGEuSW5zdGFuY2UuZmlsbERhdGEocGFyc2VyKTtcclxuICAgICAgICBicmVhaztcclxuICAgICAgY2FzZSBDb25zdEludGVyZmFjZS5NR19UQUdfS0JETUFQX1VSTDpcclxuICAgICAgICBMb2dnZXIuSW5zdGFuY2UuV3JpdGVEZXZUb0xvZyhcImdvZXMgdG8ga2V5Qm9hcmRcIik7XHJcbiAgICAgICAgYXdhaXQgRW52aXJvbm1lbnQuSW5zdGFuY2UuZmlsbEZyb21VcmwoZm91bmRUYWdOYW1lLCBwYXJzZXIpO1xyXG4gICAgICAgIGJyZWFrO1xyXG4gICAgICBjYXNlIENvbnN0SW50ZXJmYWNlLk1HX1RBR19LQkRNQVA6XHJcbiAgICAgICAgYnJlYWs7XHJcbiAgICAgIGNhc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