@webex/plugin-meetings 2.59.1 → 2.59.3-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.js +6 -6
- package/LICENSE +1 -1
- package/README.md +1204 -1204
- package/UPGRADING.md +287 -287
- package/babel.config.js +3 -3
- package/browsers.js +108 -108
- package/dist/common/browser-detection.d.ts +9 -9
- package/dist/common/browser-detection.js.map +1 -1
- package/dist/common/collection.d.ts +48 -48
- package/dist/common/collection.js +43 -43
- package/dist/common/collection.js.map +1 -1
- package/dist/common/config.d.ts +2 -2
- package/dist/common/config.js.map +1 -1
- package/dist/common/errors/captcha-error.d.ts +15 -15
- package/dist/common/errors/captcha-error.js +7 -7
- package/dist/common/errors/captcha-error.js.map +1 -1
- package/dist/common/errors/intent-to-join.d.ts +16 -16
- package/dist/common/errors/intent-to-join.js +7 -7
- package/dist/common/errors/intent-to-join.js.map +1 -1
- package/dist/common/errors/join-meeting.d.ts +17 -17
- package/dist/common/errors/join-meeting.js +8 -8
- package/dist/common/errors/join-meeting.js.map +1 -1
- package/dist/common/errors/media.d.ts +15 -15
- package/dist/common/errors/media.js +7 -7
- package/dist/common/errors/media.js.map +1 -1
- package/dist/common/errors/parameter.d.ts +15 -15
- package/dist/common/errors/parameter.js +7 -7
- package/dist/common/errors/parameter.js.map +1 -1
- package/dist/common/errors/password-error.d.ts +15 -15
- package/dist/common/errors/password-error.js +7 -7
- package/dist/common/errors/password-error.js.map +1 -1
- package/dist/common/errors/permission.d.ts +14 -14
- package/dist/common/errors/permission.js +6 -6
- package/dist/common/errors/permission.js.map +1 -1
- package/dist/common/errors/reconnection-in-progress.d.ts +9 -9
- package/dist/common/errors/reconnection-in-progress.js +6 -6
- package/dist/common/errors/reconnection-in-progress.js.map +1 -1
- package/dist/common/errors/reconnection.d.ts +15 -15
- package/dist/common/errors/reconnection.js +7 -7
- package/dist/common/errors/reconnection.js.map +1 -1
- package/dist/common/errors/stats.d.ts +15 -15
- package/dist/common/errors/stats.js +7 -7
- package/dist/common/errors/stats.js.map +1 -1
- package/dist/common/errors/webex-errors.d.ts +81 -81
- package/dist/common/errors/webex-errors.js +42 -42
- package/dist/common/errors/webex-errors.js.map +1 -1
- package/dist/common/errors/webex-meetings-error.d.ts +20 -20
- package/dist/common/errors/webex-meetings-error.js +12 -12
- package/dist/common/errors/webex-meetings-error.js.map +1 -1
- package/dist/common/events/events-scope.d.ts +17 -17
- package/dist/common/events/events-scope.js +10 -10
- package/dist/common/events/events-scope.js.map +1 -1
- package/dist/common/events/events.d.ts +12 -12
- package/dist/common/events/events.js +4 -4
- package/dist/common/events/events.js.map +1 -1
- package/dist/common/events/trigger-proxy.d.ts +2 -2
- package/dist/common/events/trigger-proxy.js.map +1 -1
- package/dist/common/events/util.d.ts +2 -2
- package/dist/common/events/util.js.map +1 -1
- package/dist/common/logs/logger-config.d.ts +2 -2
- package/dist/common/logs/logger-config.js.map +1 -1
- package/dist/common/logs/logger-proxy.d.ts +2 -2
- package/dist/common/logs/logger-proxy.js.map +1 -1
- package/dist/common/logs/request.d.ts +34 -34
- package/dist/common/logs/request.js +18 -18
- package/dist/common/logs/request.js.map +1 -1
- package/dist/common/queue.d.ts +32 -32
- package/dist/common/queue.js +18 -18
- package/dist/common/queue.js.map +1 -1
- package/dist/config.d.ts +73 -73
- package/dist/config.js.map +1 -1
- package/dist/constants.d.ts +924 -924
- package/dist/constants.js +9 -9
- package/dist/constants.js.map +1 -1
- package/dist/controls-options-manager/constants.d.ts +4 -4
- package/dist/controls-options-manager/constants.js.map +1 -1
- package/dist/controls-options-manager/enums.d.ts +5 -5
- package/dist/controls-options-manager/enums.js.map +1 -1
- package/dist/controls-options-manager/index.d.ts +120 -120
- package/dist/controls-options-manager/index.js +81 -81
- package/dist/controls-options-manager/index.js.map +1 -1
- package/dist/controls-options-manager/util.d.ts +7 -7
- package/dist/controls-options-manager/util.js.map +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.js.map +1 -1
- package/dist/locus-info/controlsUtils.d.ts +2 -2
- package/dist/locus-info/controlsUtils.js +21 -21
- package/dist/locus-info/controlsUtils.js.map +1 -1
- package/dist/locus-info/embeddedAppsUtils.d.ts +2 -2
- package/dist/locus-info/embeddedAppsUtils.js +14 -14
- package/dist/locus-info/embeddedAppsUtils.js.map +1 -1
- package/dist/locus-info/fullState.d.ts +2 -2
- package/dist/locus-info/fullState.js.map +1 -1
- package/dist/locus-info/hostUtils.d.ts +2 -2
- package/dist/locus-info/hostUtils.js +19 -19
- package/dist/locus-info/hostUtils.js.map +1 -1
- package/dist/locus-info/index.d.ts +269 -269
- package/dist/locus-info/index.js +180 -180
- package/dist/locus-info/index.js.map +1 -1
- package/dist/locus-info/infoUtils.d.ts +2 -2
- package/dist/locus-info/infoUtils.js.map +1 -1
- package/dist/locus-info/mediaSharesUtils.d.ts +2 -2
- package/dist/locus-info/mediaSharesUtils.js +50 -50
- package/dist/locus-info/mediaSharesUtils.js.map +1 -1
- package/dist/locus-info/parser.d.ts +212 -212
- package/dist/locus-info/parser.js +136 -136
- package/dist/locus-info/parser.js.map +1 -1
- package/dist/locus-info/selfUtils.d.ts +2 -2
- package/dist/locus-info/selfUtils.js +52 -52
- package/dist/locus-info/selfUtils.js.map +1 -1
- package/dist/media/index.d.ts +32 -32
- package/dist/media/index.js +145 -145
- package/dist/media/index.js.map +1 -1
- package/dist/media/properties.d.ts +108 -108
- package/dist/media/properties.js +49 -49
- package/dist/media/properties.js.map +1 -1
- package/dist/media/util.d.ts +2 -2
- package/dist/media/util.js.map +1 -1
- package/dist/mediaQualityMetrics/config.d.ts +233 -233
- package/dist/mediaQualityMetrics/config.js.map +1 -1
- package/dist/meeting/effectsState.d.ts +42 -42
- package/dist/meeting/effectsState.js +24 -24
- package/dist/meeting/effectsState.js.map +1 -1
- package/dist/meeting/in-meeting-actions.d.ts +79 -79
- package/dist/meeting/in-meeting-actions.js +11 -11
- package/dist/meeting/in-meeting-actions.js.map +1 -1
- package/dist/meeting/index.d.ts +1621 -1621
- package/dist/meeting/index.js +1502 -1505
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/muteState.d.ts +116 -116
- package/dist/meeting/muteState.js +85 -85
- package/dist/meeting/muteState.js.map +1 -1
- package/dist/meeting/request.d.ts +255 -255
- package/dist/meeting/request.js +141 -141
- package/dist/meeting/request.js.map +1 -1
- package/dist/meeting/state.d.ts +9 -9
- package/dist/meeting/state.js +30 -30
- package/dist/meeting/state.js.map +1 -1
- package/dist/meeting/util.d.ts +2 -2
- package/dist/meeting/util.js.map +1 -1
- package/dist/meeting-info/collection.d.ts +20 -20
- package/dist/meeting-info/collection.js +11 -11
- package/dist/meeting-info/collection.js.map +1 -1
- package/dist/meeting-info/index.d.ts +57 -57
- package/dist/meeting-info/index.js +50 -50
- package/dist/meeting-info/index.js.map +1 -1
- package/dist/meeting-info/meeting-info-v2.d.ts +93 -93
- package/dist/meeting-info/meeting-info-v2.js +52 -52
- package/dist/meeting-info/meeting-info-v2.js.map +1 -1
- package/dist/meeting-info/request.d.ts +22 -22
- package/dist/meeting-info/request.js +14 -14
- package/dist/meeting-info/request.js.map +1 -1
- package/dist/meeting-info/util.d.ts +2 -2
- package/dist/meeting-info/util.js +9 -9
- package/dist/meeting-info/util.js.map +1 -1
- package/dist/meeting-info/utilv2.d.ts +2 -2
- package/dist/meeting-info/utilv2.js +20 -20
- package/dist/meeting-info/utilv2.js.map +1 -1
- package/dist/meetings/collection.d.ts +23 -23
- package/dist/meetings/collection.js +14 -14
- package/dist/meetings/collection.js.map +1 -1
- package/dist/meetings/index.d.ts +296 -296
- package/dist/meetings/index.js +259 -259
- package/dist/meetings/index.js.map +1 -1
- package/dist/meetings/request.d.ts +27 -27
- package/dist/meetings/request.js +15 -15
- package/dist/meetings/request.js.map +1 -1
- package/dist/meetings/util.d.ts +18 -18
- package/dist/meetings/util.js +29 -29
- package/dist/meetings/util.js.map +1 -1
- package/dist/member/index.d.ts +147 -147
- package/dist/member/index.js +214 -214
- package/dist/member/index.js.map +1 -1
- package/dist/member/member.types.d.ts +11 -11
- package/dist/member/member.types.js.map +1 -1
- package/dist/member/util.d.ts +2 -2
- package/dist/member/util.js +60 -60
- package/dist/member/util.js.map +1 -1
- package/dist/members/collection.d.ts +24 -24
- package/dist/members/collection.js +11 -11
- package/dist/members/collection.js.map +1 -1
- package/dist/members/index.d.ts +298 -298
- package/dist/members/index.js +275 -275
- package/dist/members/index.js.map +1 -1
- package/dist/members/request.d.ts +50 -50
- package/dist/members/request.js +27 -27
- package/dist/members/request.js.map +1 -1
- package/dist/members/util.d.ts +2 -2
- package/dist/members/util.js +21 -21
- package/dist/members/util.js.map +1 -1
- package/dist/metrics/config.d.ts +169 -169
- package/dist/metrics/config.js.map +1 -1
- package/dist/metrics/constants.d.ts +57 -57
- package/dist/metrics/constants.js.map +1 -1
- package/dist/metrics/index.d.ts +152 -152
- package/dist/metrics/index.js +90 -90
- package/dist/metrics/index.js.map +1 -1
- package/dist/networkQualityMonitor/index.d.ts +70 -70
- package/dist/networkQualityMonitor/index.js +65 -65
- package/dist/networkQualityMonitor/index.js.map +1 -1
- package/dist/peer-connection-manager/index.d.ts +6 -6
- package/dist/peer-connection-manager/index.js +87 -87
- package/dist/peer-connection-manager/index.js.map +1 -1
- package/dist/peer-connection-manager/util.d.ts +6 -6
- package/dist/peer-connection-manager/util.js +9 -9
- package/dist/peer-connection-manager/util.js.map +1 -1
- package/dist/personal-meeting-room/index.d.ts +47 -47
- package/dist/personal-meeting-room/index.js +67 -67
- package/dist/personal-meeting-room/index.js.map +1 -1
- package/dist/personal-meeting-room/request.d.ts +14 -14
- package/dist/personal-meeting-room/request.js +7 -7
- package/dist/personal-meeting-room/request.js.map +1 -1
- package/dist/personal-meeting-room/util.d.ts +2 -2
- package/dist/personal-meeting-room/util.js.map +1 -1
- package/dist/reachability/index.d.ts +139 -139
- package/dist/reachability/index.js +110 -110
- package/dist/reachability/index.js.map +1 -1
- package/dist/reachability/request.d.ts +35 -35
- package/dist/reachability/request.js +15 -15
- package/dist/reachability/request.js.map +1 -1
- package/dist/reactions/reactions.d.ts +4 -4
- package/dist/reactions/reactions.js.map +1 -1
- package/dist/reactions/reactions.type.d.ts +32 -32
- package/dist/reactions/reactions.type.js.map +1 -1
- package/dist/reconnection-manager/index.d.ts +112 -112
- package/dist/reconnection-manager/index.js +112 -112
- package/dist/reconnection-manager/index.js.map +1 -1
- package/dist/recording-controller/enums.d.ts +7 -7
- package/dist/recording-controller/enums.js.map +1 -1
- package/dist/recording-controller/index.d.ts +193 -193
- package/dist/recording-controller/index.js +127 -127
- package/dist/recording-controller/index.js.map +1 -1
- package/dist/recording-controller/util.d.ts +13 -13
- package/dist/recording-controller/util.js.map +1 -1
- package/dist/roap/collection.d.ts +10 -10
- package/dist/roap/collection.js.map +1 -1
- package/dist/roap/handler.d.ts +47 -47
- package/dist/roap/handler.js +27 -27
- package/dist/roap/handler.js.map +1 -1
- package/dist/roap/index.d.ts +116 -116
- package/dist/roap/index.js +111 -111
- package/dist/roap/index.js.map +1 -1
- package/dist/roap/request.d.ts +35 -35
- package/dist/roap/request.js +17 -17
- package/dist/roap/request.js.map +1 -1
- package/dist/roap/state.d.ts +9 -9
- package/dist/roap/state.js +14 -14
- package/dist/roap/state.js.map +1 -1
- package/dist/roap/turnDiscovery.d.ts +67 -67
- package/dist/roap/turnDiscovery.js +46 -46
- package/dist/roap/turnDiscovery.js.map +1 -1
- package/dist/roap/util.d.ts +2 -2
- package/dist/roap/util.js.map +1 -1
- package/dist/statsAnalyzer/global.d.ts +126 -126
- package/dist/statsAnalyzer/global.js.map +1 -1
- package/dist/statsAnalyzer/index.d.ts +190 -190
- package/dist/statsAnalyzer/index.js +128 -128
- package/dist/statsAnalyzer/index.js.map +1 -1
- package/dist/statsAnalyzer/mqaUtil.d.ts +22 -22
- package/dist/statsAnalyzer/mqaUtil.js.map +1 -1
- package/dist/transcription/index.d.ts +64 -64
- package/dist/transcription/index.js +42 -42
- package/dist/transcription/index.js.map +1 -1
- package/internal-README.md +172 -172
- package/jest.config.js +3 -3
- package/package.json +22 -21
- package/process +1 -1
- package/src/common/browser-detection.ts +39 -39
- package/src/common/collection.ts +94 -94
- package/src/common/config.ts +9 -9
- package/src/common/errors/captcha-error.ts +25 -25
- package/src/common/errors/intent-to-join.ts +27 -27
- package/src/common/errors/join-meeting.ts +32 -32
- package/src/common/errors/media.ts +25 -25
- package/src/common/errors/parameter.ts +33 -33
- package/src/common/errors/password-error.ts +25 -25
- package/src/common/errors/permission.ts +24 -24
- package/src/common/errors/reconnection-in-progress.ts +8 -8
- package/src/common/errors/reconnection.ts +25 -25
- package/src/common/errors/stats.ts +25 -25
- package/src/common/errors/webex-errors.ts +140 -140
- package/src/common/errors/webex-meetings-error.ts +35 -35
- package/src/common/events/events-scope.ts +30 -30
- package/src/common/events/events.ts +25 -25
- package/src/common/events/trigger-proxy.ts +25 -25
- package/src/common/events/util.ts +39 -39
- package/src/common/logs/logger-config.ts +8 -8
- package/src/common/logs/logger-proxy.ts +44 -44
- package/src/common/logs/request.ts +65 -65
- package/src/common/queue.ts +50 -50
- package/src/config.ts +96 -96
- package/src/constants.ts +1121 -1121
- package/src/controls-options-manager/constants.ts +5 -5
- package/src/controls-options-manager/enums.ts +6 -6
- package/src/controls-options-manager/index.ts +183 -183
- package/src/controls-options-manager/util.ts +20 -20
- package/src/index.js +15 -15
- package/src/locus-info/controlsUtils.ts +112 -112
- package/src/locus-info/embeddedAppsUtils.ts +57 -57
- package/src/locus-info/fullState.ts +69 -69
- package/src/locus-info/hostUtils.ts +60 -60
- package/src/locus-info/index.ts +1303 -1303
- package/src/locus-info/infoUtils.ts +101 -101
- package/src/locus-info/mediaSharesUtils.ts +173 -173
- package/src/locus-info/parser.ts +680 -680
- package/src/locus-info/selfUtils.ts +428 -428
- package/src/media/index.ts +675 -675
- package/src/media/properties.ts +313 -313
- package/src/media/util.ts +37 -37
- package/src/mediaQualityMetrics/config.ts +382 -382
- package/src/meeting/effectsState.ts +209 -209
- package/src/meeting/in-meeting-actions.ts +153 -153
- package/src/meeting/index.ts +6537 -6543
- package/src/meeting/muteState.ts +365 -365
- package/src/meeting/request.ts +810 -810
- package/src/meeting/state.ts +194 -194
- package/src/meeting/util.ts +530 -530
- package/src/meeting-info/collection.ts +41 -41
- package/src/meeting-info/index.ts +137 -137
- package/src/meeting-info/meeting-info-v2.ts +273 -273
- package/src/meeting-info/request.ts +46 -46
- package/src/meeting-info/util.ts +314 -314
- package/src/meeting-info/utilv2.ts +324 -324
- package/src/meetings/collection.ts +43 -43
- package/src/meetings/index.ts +1128 -1128
- package/src/meetings/request.ts +81 -81
- package/src/meetings/util.ts +181 -181
- package/src/member/index.ts +446 -446
- package/src/member/member.types.ts +13 -13
- package/src/member/util.ts +286 -286
- package/src/members/collection.ts +40 -40
- package/src/members/index.ts +900 -900
- package/src/members/request.ts +175 -175
- package/src/members/util.ts +260 -260
- package/src/metrics/config.ts +485 -485
- package/src/metrics/constants.ts +61 -61
- package/src/metrics/index.ts +543 -543
- package/src/networkQualityMonitor/index.ts +211 -211
- package/src/peer-connection-manager/index.ts +847 -847
- package/src/peer-connection-manager/util.ts +119 -119
- package/src/personal-meeting-room/index.ts +157 -157
- package/src/personal-meeting-room/request.ts +48 -48
- package/src/personal-meeting-room/util.ts +49 -49
- package/src/reachability/index.ts +478 -478
- package/src/reachability/request.ts +81 -81
- package/src/reactions/reactions.ts +104 -104
- package/src/reactions/reactions.type.ts +36 -36
- package/src/reconnection-manager/index.ts +622 -622
- package/src/recording-controller/enums.ts +8 -8
- package/src/recording-controller/index.ts +315 -315
- package/src/recording-controller/util.ts +58 -58
- package/src/roap/collection.ts +62 -62
- package/src/roap/handler.ts +294 -294
- package/src/roap/index.ts +413 -413
- package/src/roap/request.ts +229 -229
- package/src/roap/state.ts +156 -156
- package/src/roap/turnDiscovery.ts +283 -283
- package/src/roap/util.ts +100 -100
- package/src/statsAnalyzer/global.ts +128 -128
- package/src/statsAnalyzer/index.ts +1266 -1266
- package/src/statsAnalyzer/mqaUtil.ts +290 -290
- package/src/transcription/index.ts +154 -154
- package/test/integration/spec/journey.js +941 -941
- package/test/integration/spec/space-meeting.js +457 -457
- package/test/integration/spec/transcription.js +55 -55
- package/test/unit/spec/common/browser-detection.js +119 -119
- package/test/unit/spec/common/queue.js +69 -69
- package/test/unit/spec/controls-options-manager/index.js +123 -123
- package/test/unit/spec/controls-options-manager/util.js +65 -65
- package/test/unit/spec/fixture/locus.js +406 -406
- package/test/unit/spec/locus-info/controlsUtils.js +82 -82
- package/test/unit/spec/locus-info/embeddedAppsUtils.js +104 -104
- package/test/unit/spec/locus-info/index.js +1272 -1272
- package/test/unit/spec/locus-info/infoUtils.js +138 -138
- package/test/unit/spec/locus-info/lib/BasicSeqCmp.json +975 -975
- package/test/unit/spec/locus-info/lib/SeqCmp.json +522 -522
- package/test/unit/spec/locus-info/lib/selfConstant.js +286 -286
- package/test/unit/spec/locus-info/parser.js +298 -298
- package/test/unit/spec/locus-info/selfUtils.js +185 -185
- package/test/unit/spec/media/properties.ts +305 -305
- package/test/unit/spec/meeting/effectsState.js +281 -281
- package/test/unit/spec/meeting/in-meeting-actions.ts +90 -90
- package/test/unit/spec/meeting/index.js +5227 -5227
- package/test/unit/spec/meeting/muteState.js +430 -430
- package/test/unit/spec/meeting/request.js +317 -317
- package/test/unit/spec/meeting/utils.js +319 -319
- package/test/unit/spec/meeting-info/meetinginfov2.js +376 -376
- package/test/unit/spec/meeting-info/request.js +64 -64
- package/test/unit/spec/meeting-info/util.js +37 -37
- package/test/unit/spec/meeting-info/utilv2.js +330 -330
- package/test/unit/spec/meetings/collection.js +52 -52
- package/test/unit/spec/meetings/index.js +1375 -1375
- package/test/unit/spec/meetings/utils.js +66 -66
- package/test/unit/spec/member/index.js +47 -47
- package/test/unit/spec/member/util.js +80 -80
- package/test/unit/spec/members/index.js +364 -364
- package/test/unit/spec/members/request.js +200 -200
- package/test/unit/spec/members/utils.js +42 -42
- package/test/unit/spec/metrics/index.js +111 -111
- package/test/unit/spec/networkQualityMonitor/index.js +99 -99
- package/test/unit/spec/peerconnection-manager/index.js +218 -218
- package/test/unit/spec/peerconnection-manager/utils.js +49 -49
- package/test/unit/spec/peerconnection-manager/utils.test-fixtures.ts +388 -388
- package/test/unit/spec/personal-meeting-room/personal-meeting-room.js +29 -29
- package/test/unit/spec/reachability/index.ts +50 -50
- package/test/unit/spec/reconnection-manager/index.js +206 -206
- package/test/unit/spec/recording-controller/index.js +230 -230
- package/test/unit/spec/recording-controller/util.js +101 -101
- package/test/unit/spec/roap/index.ts +128 -128
- package/test/unit/spec/roap/turnDiscovery.ts +372 -372
- package/test/unit/spec/roap/util.js +30 -30
- package/test/unit/spec/stats-analyzer/index.js +287 -287
- package/test/utils/cmr.js +104 -104
- package/test/utils/testUtils.js +287 -287
- package/test/utils/webex-config.js +77 -77
- package/test/utils/webex-test-users.js +82 -82
- package/tsconfig.json +5 -5
|
@@ -14,18 +14,18 @@ var _difference2 = _interopRequireDefault(require("lodash/difference"));
|
|
|
14
14
|
var _queue = _interopRequireDefault(require("../common/queue"));
|
|
15
15
|
var _loggerProxy = _interopRequireDefault(require("../common/logs/logger-proxy"));
|
|
16
16
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10;
|
|
17
|
-
/**
|
|
18
|
-
* Locus Delta Parser
|
|
19
|
-
* @private
|
|
20
|
-
* https://sqbu-github.cisco.com/WebExSquared/cloud-apps/wiki/Locus-Delta-Events
|
|
17
|
+
/**
|
|
18
|
+
* Locus Delta Parser
|
|
19
|
+
* @private
|
|
20
|
+
* https://sqbu-github.cisco.com/WebExSquared/cloud-apps/wiki/Locus-Delta-Events
|
|
21
21
|
*/
|
|
22
22
|
var Parser = /*#__PURE__*/function () {
|
|
23
23
|
// processing status
|
|
24
24
|
|
|
25
25
|
// loci comparison states
|
|
26
26
|
|
|
27
|
-
/**
|
|
28
|
-
* @constructs Parser
|
|
27
|
+
/**
|
|
28
|
+
* @constructs Parser
|
|
29
29
|
*/
|
|
30
30
|
function Parser() {
|
|
31
31
|
(0, _classCallCheck2.default)(this, Parser);
|
|
@@ -38,21 +38,21 @@ var Parser = /*#__PURE__*/function () {
|
|
|
38
38
|
this.workingCopy = null;
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
/**
|
|
42
|
-
* Checks if two sequences overlap in time,
|
|
43
|
-
* the sequence with the higher minimum value is greater.
|
|
44
|
-
* Chooses sequence with most recent data.
|
|
45
|
-
* @param {Types~Locus} current
|
|
46
|
-
* @param {Types~Locus} incoming
|
|
47
|
-
* @returns {string} loci comparison state
|
|
41
|
+
/**
|
|
42
|
+
* Checks if two sequences overlap in time,
|
|
43
|
+
* the sequence with the higher minimum value is greater.
|
|
44
|
+
* Chooses sequence with most recent data.
|
|
45
|
+
* @param {Types~Locus} current
|
|
46
|
+
* @param {Types~Locus} incoming
|
|
47
|
+
* @returns {string} loci comparison state
|
|
48
48
|
*/
|
|
49
49
|
(0, _createClass2.default)(Parser, [{
|
|
50
50
|
key: "isValidLocus",
|
|
51
51
|
value:
|
|
52
|
-
/**
|
|
53
|
-
* Checks if newLoci or workingCopy is invalid.
|
|
54
|
-
* @param {Types~Locus} newLoci
|
|
55
|
-
* @returns {boolean}
|
|
52
|
+
/**
|
|
53
|
+
* Checks if newLoci or workingCopy is invalid.
|
|
54
|
+
* @param {Types~Locus} newLoci
|
|
55
|
+
* @returns {boolean}
|
|
56
56
|
*/
|
|
57
57
|
function isValidLocus(newLoci) {
|
|
58
58
|
var _this = this;
|
|
@@ -75,18 +75,18 @@ var Parser = /*#__PURE__*/function () {
|
|
|
75
75
|
return isValid;
|
|
76
76
|
}
|
|
77
77
|
|
|
78
|
-
/**
|
|
79
|
-
* Determines if a paricular locus's sequence is empty
|
|
80
|
-
* @param {Types~Locus} locus
|
|
81
|
-
* @returns {bool}
|
|
78
|
+
/**
|
|
79
|
+
* Determines if a paricular locus's sequence is empty
|
|
80
|
+
* @param {Types~Locus} locus
|
|
81
|
+
* @returns {bool}
|
|
82
82
|
*/
|
|
83
83
|
}, {
|
|
84
84
|
key: "nextEvent",
|
|
85
85
|
value:
|
|
86
|
-
/**
|
|
87
|
-
* Processes next event in queue,
|
|
88
|
-
* if queue is empty sets status to idle.
|
|
89
|
-
* @returns {undefined}
|
|
86
|
+
/**
|
|
87
|
+
* Processes next event in queue,
|
|
88
|
+
* if queue is empty sets status to idle.
|
|
89
|
+
* @returns {undefined}
|
|
90
90
|
*/
|
|
91
91
|
function nextEvent() {
|
|
92
92
|
// @ts-ignore
|
|
@@ -104,22 +104,22 @@ var Parser = /*#__PURE__*/function () {
|
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
106
|
|
|
107
|
-
/**
|
|
108
|
-
* Function handler for delta actions,
|
|
109
|
-
* is set by instance callee.
|
|
110
|
-
* @param {string} action Locus delta action
|
|
111
|
-
* @param {Types~Locus} locus Locus delta
|
|
112
|
-
* @returns {undefined}
|
|
107
|
+
/**
|
|
108
|
+
* Function handler for delta actions,
|
|
109
|
+
* is set by instance callee.
|
|
110
|
+
* @param {string} action Locus delta action
|
|
111
|
+
* @param {Types~Locus} locus Locus delta
|
|
112
|
+
* @returns {undefined}
|
|
113
113
|
*/
|
|
114
114
|
// eslint-disable-next-line no-unused-vars
|
|
115
115
|
}, {
|
|
116
116
|
key: "onDeltaAction",
|
|
117
117
|
value: function onDeltaAction(action, locus) {}
|
|
118
118
|
|
|
119
|
-
/**
|
|
120
|
-
* Event handler for locus delta events
|
|
121
|
-
* @param {Types~Locus} loci Locus Delta
|
|
122
|
-
* @returns {undefined}
|
|
119
|
+
/**
|
|
120
|
+
* Event handler for locus delta events
|
|
121
|
+
* @param {Types~Locus} loci Locus Delta
|
|
122
|
+
* @returns {undefined}
|
|
123
123
|
*/
|
|
124
124
|
}, {
|
|
125
125
|
key: "onDeltaEvent",
|
|
@@ -137,18 +137,18 @@ var Parser = /*#__PURE__*/function () {
|
|
|
137
137
|
}
|
|
138
138
|
}
|
|
139
139
|
|
|
140
|
-
/**
|
|
141
|
-
* Appends new data onto a string of existing data.
|
|
142
|
-
* @param {string} newData
|
|
143
|
-
* @param {string} oldData
|
|
144
|
-
* @returns {string}
|
|
140
|
+
/**
|
|
141
|
+
* Appends new data onto a string of existing data.
|
|
142
|
+
* @param {string} newData
|
|
143
|
+
* @param {string} oldData
|
|
144
|
+
* @returns {string}
|
|
145
145
|
*/
|
|
146
146
|
}, {
|
|
147
147
|
key: "pause",
|
|
148
148
|
value:
|
|
149
|
-
/**
|
|
150
|
-
* Pause locus processing
|
|
151
|
-
* @returns {undefined}
|
|
149
|
+
/**
|
|
150
|
+
* Pause locus processing
|
|
151
|
+
* @returns {undefined}
|
|
152
152
|
*/
|
|
153
153
|
function pause() {
|
|
154
154
|
// @ts-ignore
|
|
@@ -156,11 +156,11 @@ var Parser = /*#__PURE__*/function () {
|
|
|
156
156
|
_loggerProxy.default.logger.info('Locus-info:parser#pause --> Locus parser paused.');
|
|
157
157
|
}
|
|
158
158
|
|
|
159
|
-
/**
|
|
160
|
-
* Processes next locus delta in the queue,
|
|
161
|
-
* continues until the queue is empty
|
|
162
|
-
* or cleared.
|
|
163
|
-
* @returns {undefined}
|
|
159
|
+
/**
|
|
160
|
+
* Processes next locus delta in the queue,
|
|
161
|
+
* continues until the queue is empty
|
|
162
|
+
* or cleared.
|
|
163
|
+
* @returns {undefined}
|
|
164
164
|
*/
|
|
165
165
|
}, {
|
|
166
166
|
key: "processDeltaEvent",
|
|
@@ -197,9 +197,9 @@ var Parser = /*#__PURE__*/function () {
|
|
|
197
197
|
this.nextEvent();
|
|
198
198
|
}
|
|
199
199
|
|
|
200
|
-
/**
|
|
201
|
-
* Resume from a paused state
|
|
202
|
-
* @returns {undefined}
|
|
200
|
+
/**
|
|
201
|
+
* Resume from a paused state
|
|
202
|
+
* @returns {undefined}
|
|
203
203
|
*/
|
|
204
204
|
}, {
|
|
205
205
|
key: "resume",
|
|
@@ -210,11 +210,11 @@ var Parser = /*#__PURE__*/function () {
|
|
|
210
210
|
this.nextEvent();
|
|
211
211
|
}
|
|
212
212
|
|
|
213
|
-
/**
|
|
214
|
-
* Gets related debug info for given error code
|
|
215
|
-
* @param {string} debugCode Debug code
|
|
216
|
-
* @param {string} comparison Locus comparison string
|
|
217
|
-
* @returns {object} Debug message
|
|
213
|
+
/**
|
|
214
|
+
* Gets related debug info for given error code
|
|
215
|
+
* @param {string} debugCode Debug code
|
|
216
|
+
* @param {string} comparison Locus comparison string
|
|
217
|
+
* @returns {object} Debug message
|
|
218
218
|
*/
|
|
219
219
|
}], [{
|
|
220
220
|
key: "checkSequenceOverlap",
|
|
@@ -236,12 +236,12 @@ var Parser = /*#__PURE__*/function () {
|
|
|
236
236
|
return comparison;
|
|
237
237
|
}
|
|
238
238
|
|
|
239
|
-
/**
|
|
240
|
-
* Checks if two sequences have unequal ranges.
|
|
241
|
-
* Chooses sequence with most larger range.
|
|
242
|
-
* @param {Types~Locus} current
|
|
243
|
-
* @param {Types~Locus} incoming
|
|
244
|
-
* @returns {object} loci comparison
|
|
239
|
+
/**
|
|
240
|
+
* Checks if two sequences have unequal ranges.
|
|
241
|
+
* Chooses sequence with most larger range.
|
|
242
|
+
* @param {Types~Locus} current
|
|
243
|
+
* @param {Types~Locus} incoming
|
|
244
|
+
* @returns {object} loci comparison
|
|
245
245
|
*/
|
|
246
246
|
}, {
|
|
247
247
|
key: "checkUnequalRanges",
|
|
@@ -272,14 +272,14 @@ var Parser = /*#__PURE__*/function () {
|
|
|
272
272
|
return comparison;
|
|
273
273
|
}
|
|
274
274
|
|
|
275
|
-
/**
|
|
276
|
-
* Checks if either sequences has unique entries.
|
|
277
|
-
* Entries are considered unique if they do not overlap
|
|
278
|
-
* with other Loci sequences or range values.
|
|
279
|
-
* Chooses sequence with the unique entries.
|
|
280
|
-
* @param {Types~Locus} current
|
|
281
|
-
* @param {Types~Locus} incoming
|
|
282
|
-
* @returns {string} loci comparison state
|
|
275
|
+
/**
|
|
276
|
+
* Checks if either sequences has unique entries.
|
|
277
|
+
* Entries are considered unique if they do not overlap
|
|
278
|
+
* with other Loci sequences or range values.
|
|
279
|
+
* Chooses sequence with the unique entries.
|
|
280
|
+
* @param {Types~Locus} current
|
|
281
|
+
* @param {Types~Locus} incoming
|
|
282
|
+
* @returns {string} loci comparison state
|
|
283
283
|
*/
|
|
284
284
|
}, {
|
|
285
285
|
key: "checkForUniqueEntries",
|
|
@@ -301,13 +301,13 @@ var Parser = /*#__PURE__*/function () {
|
|
|
301
301
|
return comparison;
|
|
302
302
|
}
|
|
303
303
|
|
|
304
|
-
/**
|
|
305
|
-
* Checks both Locus Delta objects to see if they are
|
|
306
|
-
* out of sync with one another. If so sends a DESYNC
|
|
307
|
-
* request to the server.
|
|
308
|
-
* @param {Types~Locus} current
|
|
309
|
-
* @param {Types~Locus} incoming
|
|
310
|
-
* @returns {string} loci comparison state
|
|
304
|
+
/**
|
|
305
|
+
* Checks both Locus Delta objects to see if they are
|
|
306
|
+
* out of sync with one another. If so sends a DESYNC
|
|
307
|
+
* request to the server.
|
|
308
|
+
* @param {Types~Locus} current
|
|
309
|
+
* @param {Types~Locus} incoming
|
|
310
|
+
* @returns {string} loci comparison state
|
|
311
311
|
*/
|
|
312
312
|
}, {
|
|
313
313
|
key: "checkIfOutOfSync",
|
|
@@ -343,13 +343,13 @@ var Parser = /*#__PURE__*/function () {
|
|
|
343
343
|
return comparison;
|
|
344
344
|
}
|
|
345
345
|
|
|
346
|
-
/**
|
|
347
|
-
* Compares two loci to determine which one contains the most recent state
|
|
348
|
-
* @instance
|
|
349
|
-
* @memberof Locus
|
|
350
|
-
* @param {Types~Locus} current
|
|
351
|
-
* @param {Types~Locus} incoming
|
|
352
|
-
* @returns {string} loci comparison state
|
|
346
|
+
/**
|
|
347
|
+
* Compares two loci to determine which one contains the most recent state
|
|
348
|
+
* @instance
|
|
349
|
+
* @memberof Locus
|
|
350
|
+
* @param {Types~Locus} current
|
|
351
|
+
* @param {Types~Locus} incoming
|
|
352
|
+
* @returns {string} loci comparison state
|
|
353
353
|
*/
|
|
354
354
|
}, {
|
|
355
355
|
key: "compare",
|
|
@@ -368,15 +368,15 @@ var Parser = /*#__PURE__*/function () {
|
|
|
368
368
|
return pack(action, result);
|
|
369
369
|
}
|
|
370
370
|
|
|
371
|
-
/**
|
|
372
|
-
* Compares two loci sequences (with delta params) and indicates what action
|
|
373
|
-
* to take.
|
|
374
|
-
* @instance
|
|
375
|
-
* @memberof Locus
|
|
376
|
-
* @param {Types~Locus} current
|
|
377
|
-
* @param {Types~Locus} incoming
|
|
378
|
-
* @private
|
|
379
|
-
* @returns {string} loci comparison state
|
|
371
|
+
/**
|
|
372
|
+
* Compares two loci sequences (with delta params) and indicates what action
|
|
373
|
+
* to take.
|
|
374
|
+
* @instance
|
|
375
|
+
* @memberof Locus
|
|
376
|
+
* @param {Types~Locus} current
|
|
377
|
+
* @param {Types~Locus} incoming
|
|
378
|
+
* @private
|
|
379
|
+
* @returns {string} loci comparison state
|
|
380
380
|
*/
|
|
381
381
|
}, {
|
|
382
382
|
key: "compareDelta",
|
|
@@ -406,11 +406,11 @@ var Parser = /*#__PURE__*/function () {
|
|
|
406
406
|
return pack(comparison, result);
|
|
407
407
|
}
|
|
408
408
|
|
|
409
|
-
/**
|
|
410
|
-
* Compares Locus sequences
|
|
411
|
-
* @param {Types~Locus} current Current working copy
|
|
412
|
-
* @param {Types~Locus} incoming New Locus delta
|
|
413
|
-
* @returns {string}
|
|
409
|
+
/**
|
|
410
|
+
* Compares Locus sequences
|
|
411
|
+
* @param {Types~Locus} current Current working copy
|
|
412
|
+
* @param {Types~Locus} incoming New Locus delta
|
|
413
|
+
* @returns {string}
|
|
414
414
|
*/
|
|
415
415
|
}, {
|
|
416
416
|
key: "compareSequence",
|
|
@@ -444,10 +444,10 @@ var Parser = /*#__PURE__*/function () {
|
|
|
444
444
|
return Parser.loci.ERROR;
|
|
445
445
|
}
|
|
446
446
|
|
|
447
|
-
/**
|
|
448
|
-
* Transates the result of a sequence comparison into an intended behavior
|
|
449
|
-
* @param {string} result
|
|
450
|
-
* @returns {string} Locus comparison action
|
|
447
|
+
/**
|
|
448
|
+
* Transates the result of a sequence comparison into an intended behavior
|
|
449
|
+
* @param {string} result
|
|
450
|
+
* @returns {string} Locus comparison action
|
|
451
451
|
*/
|
|
452
452
|
}, {
|
|
453
453
|
key: "compareToAction",
|
|
@@ -478,10 +478,10 @@ var Parser = /*#__PURE__*/function () {
|
|
|
478
478
|
return action;
|
|
479
479
|
}
|
|
480
480
|
|
|
481
|
-
/**
|
|
482
|
-
* Extracts a loci comparison from a string of data.
|
|
483
|
-
* @param {string} lociComparisonResult Comparison result with extra data
|
|
484
|
-
* @returns {string} Comparison of EQ, LT, GT, or DESYNC.
|
|
481
|
+
/**
|
|
482
|
+
* Extracts a loci comparison from a string of data.
|
|
483
|
+
* @param {string} lociComparisonResult Comparison result with extra data
|
|
484
|
+
* @returns {string} Comparison of EQ, LT, GT, or DESYNC.
|
|
485
485
|
*/
|
|
486
486
|
}, {
|
|
487
487
|
key: "extractComparisonState",
|
|
@@ -489,21 +489,21 @@ var Parser = /*#__PURE__*/function () {
|
|
|
489
489
|
return lociComparisonResult.split(':')[0];
|
|
490
490
|
}
|
|
491
491
|
|
|
492
|
-
/**
|
|
493
|
-
* @typedef {object} LociMetadata
|
|
494
|
-
* @property {number} start - Starting sequence number
|
|
495
|
-
* @property {number} end - Ending sequence number
|
|
496
|
-
* @property {number} first - First sequence number
|
|
497
|
-
* @property {number} last - Last sequence number
|
|
498
|
-
* @property {number} min - Minimum sequence number
|
|
499
|
-
* @property {number} max - Maximum sequence number
|
|
500
|
-
* @property {number} entries - Loci sequence entries
|
|
492
|
+
/**
|
|
493
|
+
* @typedef {object} LociMetadata
|
|
494
|
+
* @property {number} start - Starting sequence number
|
|
495
|
+
* @property {number} end - Ending sequence number
|
|
496
|
+
* @property {number} first - First sequence number
|
|
497
|
+
* @property {number} last - Last sequence number
|
|
498
|
+
* @property {number} min - Minimum sequence number
|
|
499
|
+
* @property {number} max - Maximum sequence number
|
|
500
|
+
* @property {number} entries - Loci sequence entries
|
|
501
501
|
*/
|
|
502
502
|
|
|
503
|
-
/**
|
|
504
|
-
* Metadata for Locus delta
|
|
505
|
-
* @param {Array.<number>} sequence Locus delta sequence
|
|
506
|
-
* @returns {LociMetadata} Locus Delta Metadata
|
|
503
|
+
/**
|
|
504
|
+
* Metadata for Locus delta
|
|
505
|
+
* @param {Array.<number>} sequence Locus delta sequence
|
|
506
|
+
* @returns {LociMetadata} Locus Delta Metadata
|
|
507
507
|
*/
|
|
508
508
|
}, {
|
|
509
509
|
key: "getMetaData",
|
|
@@ -531,12 +531,12 @@ var Parser = /*#__PURE__*/function () {
|
|
|
531
531
|
};
|
|
532
532
|
}
|
|
533
533
|
|
|
534
|
-
/**
|
|
535
|
-
* Compares two Locus delta objects and notes unique
|
|
536
|
-
* values contained within baseLoci.
|
|
537
|
-
* @param {LociMetadata} baseLoci
|
|
538
|
-
* @param {LociMetadata} otherLoci
|
|
539
|
-
* @returns {Array.<number>} List of unique sequences
|
|
534
|
+
/**
|
|
535
|
+
* Compares two Locus delta objects and notes unique
|
|
536
|
+
* values contained within baseLoci.
|
|
537
|
+
* @param {LociMetadata} baseLoci
|
|
538
|
+
* @param {LociMetadata} otherLoci
|
|
539
|
+
* @returns {Array.<number>} List of unique sequences
|
|
540
540
|
*/
|
|
541
541
|
}, {
|
|
542
542
|
key: "getUniqueSequences",
|
|
@@ -547,12 +547,12 @@ var Parser = /*#__PURE__*/function () {
|
|
|
547
547
|
return Parser.getNumbersOutOfRange(diff, start, end);
|
|
548
548
|
}
|
|
549
549
|
|
|
550
|
-
/**
|
|
551
|
-
* Returns an array of numbers outside of a given range.
|
|
552
|
-
* @param {Array.<number>} list Array to filter
|
|
553
|
-
* @param {number} rangeStart Start of range
|
|
554
|
-
* @param {number} rangeEnd End of range
|
|
555
|
-
* @returns {Array.<number>} Array of numbers sorted ASC
|
|
550
|
+
/**
|
|
551
|
+
* Returns an array of numbers outside of a given range.
|
|
552
|
+
* @param {Array.<number>} list Array to filter
|
|
553
|
+
* @param {number} rangeStart Start of range
|
|
554
|
+
* @param {number} rangeEnd End of range
|
|
555
|
+
* @returns {Array.<number>} Array of numbers sorted ASC
|
|
556
556
|
*/
|
|
557
557
|
}, {
|
|
558
558
|
key: "getNumbersOutOfRange",
|
|
@@ -577,11 +577,11 @@ var Parser = /*#__PURE__*/function () {
|
|
|
577
577
|
return hasEmptyEntries && hasEmptyRange;
|
|
578
578
|
}
|
|
579
579
|
|
|
580
|
-
/**
|
|
581
|
-
* Determines if an object has basic
|
|
582
|
-
* structure of a locus object.
|
|
583
|
-
* @param {Types~Locus} loci
|
|
584
|
-
* @returns {boolean}
|
|
580
|
+
/**
|
|
581
|
+
* Determines if an object has basic
|
|
582
|
+
* structure of a locus object.
|
|
583
|
+
* @param {Types~Locus} loci
|
|
584
|
+
* @returns {boolean}
|
|
585
585
|
*/
|
|
586
586
|
}, {
|
|
587
587
|
key: "isLoci",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_queue","_interopRequireDefault","require","_loggerProxy","_templateObject","_templateObject2","_templateObject3","_templateObject4","_templateObject5","_templateObject6","_templateObject7","_templateObject8","_templateObject9","_templateObject10","Parser","_classCallCheck2","default","_defineProperty2","queue","SimpleQueue","status","IDLE","onDeltaAction","workingCopy","_createClass2","key","value","isValidLocus","newLoci","_this","isValid","isLoci","setStatus","LoggerProxy","logger","info","nextEvent","PAUSED","size","processDeltaEvent","action","locus","onDeltaEvent","loci","enqueue","WORKING","pause","_Parser$loci","DESYNC","USE_INCOMING","extract","extractComparisonState","dequeue","result","compare","lociComparison","debug","concat","call","resume","checkSequenceOverlap","current","incoming","comparison","min","max","GT","LT","checkUnequalRanges","currentIsNotUnique","unique","length","incomingIsNotUnique","currentTotalRange","end","incomingTotalRange","EQ","checkForUniqueEntries","currentIsUnique","incomingIsUnique","checkIfOutOfSync","currentUniqueMin","incomingUniqueMin","currentHasNoRange","start","incomingHasNoRange","neitherSeqHasRange","hasUniqOverlap","list","some","seq","currentUniqOverlap","incomingUniqOverlap","debugInfo","isSequenceEmpty","pack","packComparisonResult","baseSequence","compareDelta","compareSequence","sequence","compareToAction","_Parser$loci2","local","getMetaData","delta","getUniqueSequences","rules","_i","_rules","rule","ERROR","_Parser$loci3","USE_CURRENT","lociComparisonResult","split","entries","first","last","slice","rangeStart","rangeEnd","baseLoci","otherLoci","diff","_difference2","getNumbersOutOfRange","output","filter","num","sort","a","b","_sequence$entries","hasEmptyEntries","hasEmptyRange","hasProp","prop","Object","prototype","hasOwnProperty","newData","oldData","getDebugMessage","debugCode","mStr","strings","join","replace","resolutionMap","debugMap","SO001","title","description","_taggedTemplateLiteral2","logic","SO002","UR001","UR002","UR003","UE001","UE002","OOS001","OOS002","OOS003","debugObj","resolution","exports"],"sources":["parser.ts"],"sourcesContent":["import {difference} from 'lodash';\n\nimport SimpleQueue from '../common/queue';\nimport LoggerProxy from '../common/logs/logger-proxy';\n\n/**\n * Locus Delta Parser\n * @private\n * https://sqbu-github.cisco.com/WebExSquared/cloud-apps/wiki/Locus-Delta-Events\n */\nexport default class Parser {\n // processing status\n static status = {\n IDLE: 'IDLE',\n PAUSED: 'PAUSED',\n WORKING: 'WORKING',\n };\n\n // loci comparison states\n static loci = {\n EQ: 'EQUAL',\n GT: 'GREATER_THAN',\n LT: 'LESS_THAN',\n DESYNC: 'DESYNC',\n USE_INCOMING: 'USE_INCOMING',\n USE_CURRENT: 'USE_CURRENT',\n ERROR: 'ERROR',\n };\n\n queue: any;\n workingCopy: any;\n\n /**\n * @constructs Parser\n */\n constructor() {\n this.queue = new SimpleQueue();\n // @ts-ignore - This is declared as static class member and again being initialized here from same\n this.status = Parser.status.IDLE;\n this.onDeltaAction = null;\n this.workingCopy = null;\n }\n\n /**\n * Checks if two sequences overlap in time,\n * the sequence with the higher minimum value is greater.\n * Chooses sequence with most recent data.\n * @param {Types~Locus} current\n * @param {Types~Locus} incoming\n * @returns {string} loci comparison state\n */\n static checkSequenceOverlap(current, incoming) {\n let comparison = null;\n\n // if earliest working copy sequence is more recent than last incoming sequence\n if (current.min > incoming.max) {\n // choose left side (current)\n comparison = `${Parser.loci.GT}:SO001`;\n }\n // if last working copy sequence is before the earliest incoming sequence\n else if (current.max < incoming.min) {\n // choose right side (incoming)\n comparison = `${Parser.loci.LT}:SO002`;\n }\n\n // if no match above, defaults to null\n return comparison;\n }\n\n /**\n * Checks if two sequences have unequal ranges.\n * Chooses sequence with most larger range.\n * @param {Types~Locus} current\n * @param {Types~Locus} incoming\n * @returns {object} loci comparison\n */\n static checkUnequalRanges(current, incoming) {\n let comparison = null;\n const currentIsNotUnique = current.unique.length === 0;\n const incomingIsNotUnique = incoming.unique.length === 0;\n const currentTotalRange = current.end - current.min;\n const incomingTotalRange = incoming.end - incoming.min;\n\n // no unique values for both loci\n if (currentIsNotUnique && incomingIsNotUnique) {\n // current working copy loci has a larger range\n if (currentTotalRange > incomingTotalRange) {\n // choose left side (current)\n comparison = `${Parser.loci.GT}:UR001`;\n }\n // incoming delta loci has a larger range\n else if (currentTotalRange < incomingTotalRange) {\n // choose right side (incoming)\n comparison = `${Parser.loci.LT}:UR002`;\n } else {\n // with no unique entries and with ranges either absent or\n // of the same size, the sequences are considered equal.\n comparison = `${Parser.loci.EQ}:UR003`;\n }\n }\n\n return comparison;\n }\n\n /**\n * Checks if either sequences has unique entries.\n * Entries are considered unique if they do not overlap\n * with other Loci sequences or range values.\n * Chooses sequence with the unique entries.\n * @param {Types~Locus} current\n * @param {Types~Locus} incoming\n * @returns {string} loci comparison state\n */\n static checkForUniqueEntries(current, incoming) {\n let comparison = null;\n const currentIsUnique = current.unique.length > 0;\n const incomingIsUnique = incoming.unique.length > 0;\n\n // current has unique entries and incoming does not\n if (currentIsUnique && !incomingIsUnique) {\n // choose left side (current)\n comparison = `${Parser.loci.GT}:UE001`;\n }\n // current has no unique entries but incoming does\n else if (!currentIsUnique && incomingIsUnique) {\n // choose right side (incoming)\n comparison = `${Parser.loci.LT}:UE002`;\n }\n\n return comparison;\n }\n\n /**\n * Checks both Locus Delta objects to see if they are\n * out of sync with one another. If so sends a DESYNC\n * request to the server.\n * @param {Types~Locus} current\n * @param {Types~Locus} incoming\n * @returns {string} loci comparison state\n */\n static checkIfOutOfSync(current, incoming) {\n let comparison = null;\n const currentUniqueMin = current.unique[0];\n const incomingUniqueMin = incoming.unique[0];\n\n const currentHasNoRange = !current.start && !current.end;\n const incomingHasNoRange = !incoming.start && !incoming.end;\n const neitherSeqHasRange = currentHasNoRange && incomingHasNoRange;\n\n const hasUniqOverlap = (list, min, max) => list.some((seq) => min < seq && seq < max);\n // current unique entries overlap the total range of incoming\n const currentUniqOverlap = hasUniqOverlap(current.unique, incoming.min, incoming.max);\n // vice-versa, incoming unique entries overlap the total range of current\n const incomingUniqOverlap = hasUniqOverlap(incoming.unique, current.min, current.max);\n\n if (neitherSeqHasRange || currentUniqOverlap || incomingUniqOverlap) {\n // outputs string indicating which condition occurred. ex: 0,1,0\n const debugInfo = `${+neitherSeqHasRange},${+currentUniqOverlap},${+incomingUniqOverlap}`;\n\n // send DESYNC to server\n comparison = `${Parser.loci.DESYNC}:OOS001:${debugInfo}`;\n } else if (currentUniqueMin > incomingUniqueMin) {\n // choose left side (current)\n comparison = `${Parser.loci.GT}:OOS002`;\n } else {\n // choose right side (incoming)\n comparison = `${Parser.loci.LT}:OOS003`;\n }\n\n return comparison;\n }\n\n /**\n * Compares two loci to determine which one contains the most recent state\n * @instance\n * @memberof Locus\n * @param {Types~Locus} current\n * @param {Types~Locus} incoming\n * @returns {string} loci comparison state\n */\n static compare(current, incoming) {\n const {isSequenceEmpty} = Parser;\n const {extractComparisonState: extract} = Parser;\n const {packComparisonResult: pack} = Parser;\n\n if (isSequenceEmpty(current) || isSequenceEmpty(incoming)) {\n return pack(Parser.loci.USE_INCOMING, 'C001');\n }\n\n if (incoming.baseSequence) {\n return pack(Parser.compareDelta(current, incoming), 'C002');\n }\n\n const result = Parser.compareSequence(current.sequence, incoming.sequence);\n const action = Parser.compareToAction(extract(result));\n\n return pack(action, result);\n }\n\n /**\n * Compares two loci sequences (with delta params) and indicates what action\n * to take.\n * @instance\n * @memberof Locus\n * @param {Types~Locus} current\n * @param {Types~Locus} incoming\n * @private\n * @returns {string} loci comparison state\n */\n private static compareDelta(current, incoming) {\n const {LT, GT, EQ, DESYNC, USE_INCOMING} = Parser.loci;\n\n const {extractComparisonState: extract} = Parser;\n const {packComparisonResult: pack} = Parser;\n\n const result = Parser.compareSequence(current.sequence, incoming.sequence);\n let comparison = extract(result);\n\n if (comparison !== LT) {\n return pack(Parser.compareToAction(comparison), result);\n }\n\n comparison = Parser.compareSequence(current.sequence, incoming.baseSequence);\n\n switch (extract(comparison)) {\n case GT:\n case EQ:\n comparison = USE_INCOMING;\n break;\n\n default:\n comparison = DESYNC;\n }\n\n return pack(comparison, result);\n }\n\n /**\n * Compares Locus sequences\n * @param {Types~Locus} current Current working copy\n * @param {Types~Locus} incoming New Locus delta\n * @returns {string}\n */\n static compareSequence(current, incoming) {\n // Locus sequence comparison rules in order of priority.\n // https://sqbu-github.cisco.com/WebExSquared/cloud-apps/wiki/Locus-Sequence-Comparison-Algorithm\n\n const local: any = Parser.getMetaData(current);\n const delta: any = Parser.getMetaData(incoming);\n\n // update loci metadata\n local.unique = Parser.getUniqueSequences(local, delta);\n delta.unique = Parser.getUniqueSequences(delta, local);\n\n // Locus sequence comparison rules\n // order matters\n const rules = [\n Parser.checkSequenceOverlap,\n Parser.checkUnequalRanges,\n Parser.checkForUniqueEntries,\n Parser.checkIfOutOfSync,\n ];\n\n for (const rule of rules) {\n // Rule only returns a value if the rule applies,\n // otherwise returns null.\n const result = rule(local, delta);\n\n if (result) {\n return result;\n }\n }\n\n // error, none of rules above applied\n // should never get here as last rule\n // should be catch all.\n return Parser.loci.ERROR;\n }\n\n /**\n * Transates the result of a sequence comparison into an intended behavior\n * @param {string} result\n * @returns {string} Locus comparison action\n */\n static compareToAction(result: string) {\n const {DESYNC, EQ, ERROR, GT, LT, USE_CURRENT, USE_INCOMING} = Parser.loci;\n\n let action = ERROR;\n\n switch (result) {\n case EQ:\n case GT:\n action = USE_CURRENT;\n break;\n case LT:\n action = USE_INCOMING;\n break;\n case DESYNC:\n action = DESYNC;\n break;\n default:\n LoggerProxy.logger.info(\n `Locus-info:parser#compareToAction --> Error: ${result} is not a recognized sequence comparison result.`\n );\n }\n\n return action;\n }\n\n /**\n * Extracts a loci comparison from a string of data.\n * @param {string} lociComparisonResult Comparison result with extra data\n * @returns {string} Comparison of EQ, LT, GT, or DESYNC.\n */\n static extractComparisonState(lociComparisonResult: string) {\n return lociComparisonResult.split(':')[0];\n }\n\n /**\n * @typedef {object} LociMetadata\n * @property {number} start - Starting sequence number\n * @property {number} end - Ending sequence number\n * @property {number} first - First sequence number\n * @property {number} last - Last sequence number\n * @property {number} min - Minimum sequence number\n * @property {number} max - Maximum sequence number\n * @property {number} entries - Loci sequence entries\n */\n\n /**\n * Metadata for Locus delta\n * @param {Array.<number>} sequence Locus delta sequence\n * @returns {LociMetadata} Locus Delta Metadata\n */\n static getMetaData(sequence: any) {\n const {entries} = sequence;\n const first = entries[0];\n const last = entries.slice(-1)[0];\n\n // rangeStart or rangeEnd is 0 if a range doesn't exist\n const start = sequence.rangeStart;\n const end = sequence.rangeEnd;\n\n // sequence data\n return {\n start,\n end,\n first,\n last,\n // Rule is: rangeStart <= rangeEnd <= min(entries)\n min: start || first,\n // Grab last entry if exist else default to rangeEnd\n max: last || end,\n // keep reference to actual sequence entries\n entries,\n };\n }\n\n /**\n * Compares two Locus delta objects and notes unique\n * values contained within baseLoci.\n * @param {LociMetadata} baseLoci\n * @param {LociMetadata} otherLoci\n * @returns {Array.<number>} List of unique sequences\n */\n static getUniqueSequences(baseLoci: any, otherLoci: any) {\n const diff: any = difference(baseLoci.entries, otherLoci.entries);\n\n const {start, end} = otherLoci;\n\n return Parser.getNumbersOutOfRange(diff, start, end);\n }\n\n /**\n * Returns an array of numbers outside of a given range.\n * @param {Array.<number>} list Array to filter\n * @param {number} rangeStart Start of range\n * @param {number} rangeEnd End of range\n * @returns {Array.<number>} Array of numbers sorted ASC\n */\n static getNumbersOutOfRange(list: Array<number>, rangeStart: number, rangeEnd: number) {\n // Collect all numbers if number is outside of specified range\n const output = list.filter((num) => num < rangeStart || num > rangeEnd);\n\n // sort ascending\n return output.sort((a, b) => a - b);\n }\n\n /**\n * Checks if newLoci or workingCopy is invalid.\n * @param {Types~Locus} newLoci\n * @returns {boolean}\n */\n isValidLocus(newLoci) {\n let isValid = false;\n const {IDLE} = Parser.status;\n const {isLoci} = Parser;\n // @ts-ignore\n const setStatus = (status) => {\n // @ts-ignore\n this.status = status;\n };\n\n // one or both objects are not locus delta events\n if (!isLoci(this.workingCopy) || !isLoci(newLoci)) {\n setStatus(IDLE);\n LoggerProxy.logger.info(\n 'Locus-info:parser#processDeltaEvent --> Ignoring non-locus object. workingCopy:',\n this.workingCopy,\n 'newLoci:',\n newLoci\n );\n } else {\n isValid = true;\n }\n\n return isValid;\n }\n\n /**\n * Determines if a paricular locus's sequence is empty\n * @param {Types~Locus} locus\n * @returns {bool}\n */\n static isSequenceEmpty(locus) {\n const {sequence} = locus;\n const hasEmptyEntries = !sequence.entries?.length;\n const hasEmptyRange = sequence.rangeStart === 0 && sequence.rangeEnd === 0;\n\n return hasEmptyEntries && hasEmptyRange;\n }\n\n /**\n * Determines if an object has basic\n * structure of a locus object.\n * @param {Types~Locus} loci\n * @returns {boolean}\n */\n static isLoci(loci) {\n if (!loci || !loci.sequence) {\n return false;\n }\n const hasProp = (prop) => Object.prototype.hasOwnProperty.call(loci.sequence, prop);\n\n if (hasProp('rangeStart') && hasProp('rangeEnd')) {\n return true;\n }\n\n return false;\n }\n\n /**\n * Processes next event in queue,\n * if queue is empty sets status to idle.\n * @returns {undefined}\n */\n nextEvent() {\n // @ts-ignore\n if (this.status === Parser.status.PAUSED) {\n LoggerProxy.logger.info('Locus-info:parser#nextEvent --> Locus parser paused.');\n\n return;\n }\n\n // continue processing until queue is empty\n if (this.queue.size() > 0) {\n this.processDeltaEvent();\n } else {\n // @ts-ignore\n this.status = Parser.status.IDLE;\n }\n }\n\n /**\n * Function handler for delta actions,\n * is set by instance callee.\n * @param {string} action Locus delta action\n * @param {Types~Locus} locus Locus delta\n * @returns {undefined}\n */\n // eslint-disable-next-line no-unused-vars\n onDeltaAction(action: string, locus) {}\n\n /**\n * Event handler for locus delta events\n * @param {Types~Locus} loci Locus Delta\n * @returns {undefined}\n */\n onDeltaEvent(loci) {\n // enqueue the new loci\n this.queue.enqueue(loci);\n // start processing events in the queue if idle\n // and a function handler is defined\n // @ts-ignore\n if (this.status === Parser.status.IDLE && this.onDeltaAction) {\n // Update status, ensure we only process one event at a time.\n // @ts-ignore\n this.status = Parser.status.WORKING;\n\n this.processDeltaEvent();\n }\n }\n\n /**\n * Appends new data onto a string of existing data.\n * @param {string} newData\n * @param {string} oldData\n * @returns {string}\n */\n static packComparisonResult(newData: string, oldData: string) {\n return `${newData}:${oldData}`;\n }\n\n /**\n * Pause locus processing\n * @returns {undefined}\n */\n pause() {\n // @ts-ignore\n this.status = Parser.status.PAUSED;\n LoggerProxy.logger.info('Locus-info:parser#pause --> Locus parser paused.');\n }\n\n /**\n * Processes next locus delta in the queue,\n * continues until the queue is empty\n * or cleared.\n * @returns {undefined}\n */\n processDeltaEvent() {\n const {DESYNC, USE_INCOMING} = Parser.loci;\n const {extractComparisonState: extract} = Parser;\n const newLoci = this.queue.dequeue();\n\n if (!this.isValidLocus(newLoci)) {\n return;\n }\n\n const result = Parser.compare(this.workingCopy, newLoci);\n const lociComparison = extract(result);\n\n // limited debugging, use chrome extension\n // for full debugging.\n LoggerProxy.logger.debug(`Locus-info:parser#processDeltaEvent --> Locus Debug: ${result}`);\n\n if (lociComparison === DESYNC) {\n // wait for desync response\n this.pause();\n } else if (lociComparison === USE_INCOMING) {\n // update working copy for future comparisons.\n // Note: The working copy of parser gets updated in .onFullLocus()\n // and here when USE_INCOMING locus.\n this.workingCopy = newLoci;\n }\n\n if (this.onDeltaAction) {\n LoggerProxy.logger.info(\n `Locus-info:parser#processDeltaEvent --> Locus Delta Action: ${lociComparison}`\n );\n\n // eslint-disable-next-line no-useless-call\n this.onDeltaAction.call(this, lociComparison, newLoci);\n }\n\n this.nextEvent();\n }\n\n /**\n * Resume from a paused state\n * @returns {undefined}\n */\n resume() {\n LoggerProxy.logger.info('Locus-info:parser#resume --> Locus parser resumed.');\n // @ts-ignore\n this.status = Parser.status.WORKING;\n this.nextEvent();\n }\n\n /**\n * Gets related debug info for given error code\n * @param {string} debugCode Debug code\n * @param {string} comparison Locus comparison string\n * @returns {object} Debug message\n */\n static getDebugMessage(debugCode: string, comparison: string) {\n // removes extra spaces from multiline string\n const mStr = (strings) => strings.join('').replace(/\\s{2,}/g, ' ');\n\n const resolutionMap = {\n EQ: `${Parser.loci.LT}: is equal (current == incoming).`,\n LT: `${Parser.loci.LT}: choose right side (incoming).`,\n GT: `${Parser.loci.GT}: choose left side (current).`,\n };\n\n const debugMap = {\n SO001: {\n title: 'checkSequenceOverlap-001',\n description: mStr`Occurs if earliest working copy sequence is more \\\n recent than last incoming sequence.`,\n logic: 'current.min > incoming.max',\n },\n\n SO002: {\n title: 'checkSequenceOverlap-002',\n description: mStr`Occurs if last working copy sequence is before the \\\n earliest incoming sequence.`,\n logic: 'current.max < incoming.min',\n },\n\n UR001: {\n title: 'checkUnequalRanges-001',\n description: mStr`Occurs if there are no unique values for both loci, \\\n and the current working copy loci has a larger range.`,\n logic: 'currentTotalRange > incomingTotalRange',\n },\n\n UR002: {\n title: 'checkUnequalRanges-002',\n description: mStr`Occurs if there are no unique values for both loci, \\\n and the incoming delta loci has a larger range.`,\n logic: 'currentTotalRange < incomingTotalRange',\n },\n\n UR003: {\n title: 'checkUnequalRanges-003',\n description: mStr`Occurs if there are no unique values for both loci, \\\n and with ranges either absent or of the same size, the sequences \\\n are considered equal.`,\n logic: 'currentTotalRange == incomingTotalRange',\n },\n\n UE001: {\n title: 'checkForUniqueEntries-001',\n description: mStr`Occurs if current loci has unique entries and \\\n incoming does not. Entries are considered unique if they \\\n do not overlap with other Loci sequences or range values.`,\n logic: 'currentIsUnique && !incomingIsUnique',\n },\n\n UE002: {\n title: 'checkForUniqueEntries-002',\n description: mStr`Occurs if current has no unique entries but \\\n incoming does. Entries are considered unique if they \\\n do not overlap with other Loci sequences or range values.`,\n logic: '!currentIsUnique && incomingIsUnique',\n },\n\n OOS001: {\n title: 'checkIfOutOfSync-001',\n description: mStr`Occurs if neither sequence has a range, or \\\n if the current loci unique entries overlap the total range of the \\\n incoming sequence, or if the incoming unique entries overlap \\\n the total range of current sequence.`,\n logic: 'neitherSeqHasRange || currentUniqOverlap || incomingUniqOverlap',\n },\n\n OOS002: {\n title: 'checkIfOutOfSync-002',\n description: mStr`Occurs if the minimum value from sequences that are \\\n unique to the current loci is greater than the minimum value from \\\n sequences that are unique to the incoming loci.`,\n logic: 'currentUniqueMin > incomingUniqueMin',\n },\n\n OOS003: {\n title: 'checkIfOutOfSync-003',\n description: mStr`Occurs if none of the comparison rules applied. \\\n It is a catch all.`,\n logic: 'else (catch all)',\n },\n };\n\n const debugObj = debugMap[debugCode];\n\n debugObj.title = `Debug: ${debugObj.title}`;\n debugObj.resolution = resolutionMap[comparison];\n\n return debugObj;\n }\n}\n"],"mappings":";;;;;;;;;;;;;AAEA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAF,sBAAA,CAAAC,OAAA;AAAsD,IAAAE,eAAA,EAAAC,gBAAA,EAAAC,gBAAA,EAAAC,gBAAA,EAAAC,gBAAA,EAAAC,gBAAA,EAAAC,gBAAA,EAAAC,gBAAA,EAAAC,gBAAA,EAAAC,iBAAA;AAEtD;AACA;AACA;AACA;AACA;AAJA,IAKqBC,MAAM;EACzB;;EAOA;;EAcA;AACF;AACA;EACE,SAAAA,OAAA,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AAK,CAAE;MAC3Ca,QAAQ,CAACC,UAAU,GAAGjB,aAAa,CAACtF,UAAU,CAAC;MAE/C,OAAOsG,QAAQ;IACjB;EAAC;EAAA,OAAAvJ,MAAA;AAAA;AAAAyJ,OAAA,CAAAvJ,OAAA,GAAAF,MAAA;AAAA,IAAAG,gBAAA,CAAAD,OAAA,EA5pBkBF,MAAM,YAET;EACdO,IAAI,EAAE,MAAM;EACZgB,MAAM,EAAE,QAAQ;EAChBQ,OAAO,EAAE;AACX,CAAC;AAAA,IAAA5B,gBAAA,CAAAD,OAAA,EANkBF,MAAM,UASX;EACZ8D,EAAE,EAAE,OAAO;EACXV,EAAE,EAAE,cAAc;EAClBC,EAAE,EAAE,WAAW;EACfnB,MAAM,EAAE,QAAQ;EAChBC,YAAY,EAAE,cAAc;EAC5BgE,WAAW,EAAE,aAAa;EAC1BF,KAAK,EAAE;AACT,CAAC"}
|
|
1
|
+
{"version":3,"names":["_queue","_interopRequireDefault","require","_loggerProxy","_templateObject","_templateObject2","_templateObject3","_templateObject4","_templateObject5","_templateObject6","_templateObject7","_templateObject8","_templateObject9","_templateObject10","Parser","_classCallCheck2","default","_defineProperty2","queue","SimpleQueue","status","IDLE","onDeltaAction","workingCopy","_createClass2","key","value","isValidLocus","newLoci","_this","isValid","isLoci","setStatus","LoggerProxy","logger","info","nextEvent","PAUSED","size","processDeltaEvent","action","locus","onDeltaEvent","loci","enqueue","WORKING","pause","_Parser$loci","DESYNC","USE_INCOMING","extract","extractComparisonState","dequeue","result","compare","lociComparison","debug","concat","call","resume","checkSequenceOverlap","current","incoming","comparison","min","max","GT","LT","checkUnequalRanges","currentIsNotUnique","unique","length","incomingIsNotUnique","currentTotalRange","end","incomingTotalRange","EQ","checkForUniqueEntries","currentIsUnique","incomingIsUnique","checkIfOutOfSync","currentUniqueMin","incomingUniqueMin","currentHasNoRange","start","incomingHasNoRange","neitherSeqHasRange","hasUniqOverlap","list","some","seq","currentUniqOverlap","incomingUniqOverlap","debugInfo","isSequenceEmpty","pack","packComparisonResult","baseSequence","compareDelta","compareSequence","sequence","compareToAction","_Parser$loci2","local","getMetaData","delta","getUniqueSequences","rules","_i","_rules","rule","ERROR","_Parser$loci3","USE_CURRENT","lociComparisonResult","split","entries","first","last","slice","rangeStart","rangeEnd","baseLoci","otherLoci","diff","_difference2","getNumbersOutOfRange","output","filter","num","sort","a","b","_sequence$entries","hasEmptyEntries","hasEmptyRange","hasProp","prop","Object","prototype","hasOwnProperty","newData","oldData","getDebugMessage","debugCode","mStr","strings","join","replace","resolutionMap","debugMap","SO001","title","description","_taggedTemplateLiteral2","logic","SO002","UR001","UR002","UR003","UE001","UE002","OOS001","OOS002","OOS003","debugObj","resolution","exports"],"sources":["parser.ts"],"sourcesContent":["import {difference} from 'lodash';\r\n\r\nimport SimpleQueue from '../common/queue';\r\nimport LoggerProxy from '../common/logs/logger-proxy';\r\n\r\n/**\r\n * Locus Delta Parser\r\n * @private\r\n * https://sqbu-github.cisco.com/WebExSquared/cloud-apps/wiki/Locus-Delta-Events\r\n */\r\nexport default class Parser {\r\n // processing status\r\n static status = {\r\n IDLE: 'IDLE',\r\n PAUSED: 'PAUSED',\r\n WORKING: 'WORKING',\r\n };\r\n\r\n // loci comparison states\r\n static loci = {\r\n EQ: 'EQUAL',\r\n GT: 'GREATER_THAN',\r\n LT: 'LESS_THAN',\r\n DESYNC: 'DESYNC',\r\n USE_INCOMING: 'USE_INCOMING',\r\n USE_CURRENT: 'USE_CURRENT',\r\n ERROR: 'ERROR',\r\n };\r\n\r\n queue: any;\r\n workingCopy: any;\r\n\r\n /**\r\n * @constructs Parser\r\n */\r\n constructor() {\r\n this.queue = new SimpleQueue();\r\n // @ts-ignore - This is declared as static class member and again being initialized here from same\r\n this.status = Parser.status.IDLE;\r\n this.onDeltaAction = null;\r\n this.workingCopy = null;\r\n }\r\n\r\n /**\r\n * Checks if two sequences overlap in time,\r\n * the sequence with the higher minimum value is greater.\r\n * Chooses sequence with most recent data.\r\n * @param {Types~Locus} current\r\n * @param {Types~Locus} incoming\r\n * @returns {string} loci comparison state\r\n */\r\n static checkSequenceOverlap(current, incoming) {\r\n let comparison = null;\r\n\r\n // if earliest working copy sequence is more recent than last incoming sequence\r\n if (current.min > incoming.max) {\r\n // choose left side (current)\r\n comparison = `${Parser.loci.GT}:SO001`;\r\n }\r\n // if last working copy sequence is before the earliest incoming sequence\r\n else if (current.max < incoming.min) {\r\n // choose right side (incoming)\r\n comparison = `${Parser.loci.LT}:SO002`;\r\n }\r\n\r\n // if no match above, defaults to null\r\n return comparison;\r\n }\r\n\r\n /**\r\n * Checks if two sequences have unequal ranges.\r\n * Chooses sequence with most larger range.\r\n * @param {Types~Locus} current\r\n * @param {Types~Locus} incoming\r\n * @returns {object} loci comparison\r\n */\r\n static checkUnequalRanges(current, incoming) {\r\n let comparison = null;\r\n const currentIsNotUnique = current.unique.length === 0;\r\n const incomingIsNotUnique = incoming.unique.length === 0;\r\n const currentTotalRange = current.end - current.min;\r\n const incomingTotalRange = incoming.end - incoming.min;\r\n\r\n // no unique values for both loci\r\n if (currentIsNotUnique && incomingIsNotUnique) {\r\n // current working copy loci has a larger range\r\n if (currentTotalRange > incomingTotalRange) {\r\n // choose left side (current)\r\n comparison = `${Parser.loci.GT}:UR001`;\r\n }\r\n // incoming delta loci has a larger range\r\n else if (currentTotalRange < incomingTotalRange) {\r\n // choose right side (incoming)\r\n comparison = `${Parser.loci.LT}:UR002`;\r\n } else {\r\n // with no unique entries and with ranges either absent or\r\n // of the same size, the sequences are considered equal.\r\n comparison = `${Parser.loci.EQ}:UR003`;\r\n }\r\n }\r\n\r\n return comparison;\r\n }\r\n\r\n /**\r\n * Checks if either sequences has unique entries.\r\n * Entries are considered unique if they do not overlap\r\n * with other Loci sequences or range values.\r\n * Chooses sequence with the unique entries.\r\n * @param {Types~Locus} current\r\n * @param {Types~Locus} incoming\r\n * @returns {string} loci comparison state\r\n */\r\n static checkForUniqueEntries(current, incoming) {\r\n let comparison = null;\r\n const currentIsUnique = current.unique.length > 0;\r\n const incomingIsUnique = incoming.unique.length > 0;\r\n\r\n // current has unique entries and incoming does not\r\n if (currentIsUnique && !incomingIsUnique) {\r\n // choose left side (current)\r\n comparison = `${Parser.loci.GT}:UE001`;\r\n }\r\n // current has no unique entries but incoming does\r\n else if (!currentIsUnique && incomingIsUnique) {\r\n // choose right side (incoming)\r\n comparison = `${Parser.loci.LT}:UE002`;\r\n }\r\n\r\n return comparison;\r\n }\r\n\r\n /**\r\n * Checks both Locus Delta objects to see if they are\r\n * out of sync with one another. If so sends a DESYNC\r\n * request to the server.\r\n * @param {Types~Locus} current\r\n * @param {Types~Locus} incoming\r\n * @returns {string} loci comparison state\r\n */\r\n static checkIfOutOfSync(current, incoming) {\r\n let comparison = null;\r\n const currentUniqueMin = current.unique[0];\r\n const incomingUniqueMin = incoming.unique[0];\r\n\r\n const currentHasNoRange = !current.start && !current.end;\r\n const incomingHasNoRange = !incoming.start && !incoming.end;\r\n const neitherSeqHasRange = currentHasNoRange && incomingHasNoRange;\r\n\r\n const hasUniqOverlap = (list, min, max) => list.some((seq) => min < seq && seq < max);\r\n // current unique entries overlap the total range of incoming\r\n const currentUniqOverlap = hasUniqOverlap(current.unique, incoming.min, incoming.max);\r\n // vice-versa, incoming unique entries overlap the total range of current\r\n const incomingUniqOverlap = hasUniqOverlap(incoming.unique, current.min, current.max);\r\n\r\n if (neitherSeqHasRange || currentUniqOverlap || incomingUniqOverlap) {\r\n // outputs string indicating which condition occurred. ex: 0,1,0\r\n const debugInfo = `${+neitherSeqHasRange},${+currentUniqOverlap},${+incomingUniqOverlap}`;\r\n\r\n // send DESYNC to server\r\n comparison = `${Parser.loci.DESYNC}:OOS001:${debugInfo}`;\r\n } else if (currentUniqueMin > incomingUniqueMin) {\r\n // choose left side (current)\r\n comparison = `${Parser.loci.GT}:OOS002`;\r\n } else {\r\n // choose right side (incoming)\r\n comparison = `${Parser.loci.LT}:OOS003`;\r\n }\r\n\r\n return comparison;\r\n }\r\n\r\n /**\r\n * Compares two loci to determine which one contains the most recent state\r\n * @instance\r\n * @memberof Locus\r\n * @param {Types~Locus} current\r\n * @param {Types~Locus} incoming\r\n * @returns {string} loci comparison state\r\n */\r\n static compare(current, incoming) {\r\n const {isSequenceEmpty} = Parser;\r\n const {extractComparisonState: extract} = Parser;\r\n const {packComparisonResult: pack} = Parser;\r\n\r\n if (isSequenceEmpty(current) || isSequenceEmpty(incoming)) {\r\n return pack(Parser.loci.USE_INCOMING, 'C001');\r\n }\r\n\r\n if (incoming.baseSequence) {\r\n return pack(Parser.compareDelta(current, incoming), 'C002');\r\n }\r\n\r\n const result = Parser.compareSequence(current.sequence, incoming.sequence);\r\n const action = Parser.compareToAction(extract(result));\r\n\r\n return pack(action, result);\r\n }\r\n\r\n /**\r\n * Compares two loci sequences (with delta params) and indicates what action\r\n * to take.\r\n * @instance\r\n * @memberof Locus\r\n * @param {Types~Locus} current\r\n * @param {Types~Locus} incoming\r\n * @private\r\n * @returns {string} loci comparison state\r\n */\r\n private static compareDelta(current, incoming) {\r\n const {LT, GT, EQ, DESYNC, USE_INCOMING} = Parser.loci;\r\n\r\n const {extractComparisonState: extract} = Parser;\r\n const {packComparisonResult: pack} = Parser;\r\n\r\n const result = Parser.compareSequence(current.sequence, incoming.sequence);\r\n let comparison = extract(result);\r\n\r\n if (comparison !== LT) {\r\n return pack(Parser.compareToAction(comparison), result);\r\n }\r\n\r\n comparison = Parser.compareSequence(current.sequence, incoming.baseSequence);\r\n\r\n switch (extract(comparison)) {\r\n case GT:\r\n case EQ:\r\n comparison = USE_INCOMING;\r\n break;\r\n\r\n default:\r\n comparison = DESYNC;\r\n }\r\n\r\n return pack(comparison, result);\r\n }\r\n\r\n /**\r\n * Compares Locus sequences\r\n * @param {Types~Locus} current Current working copy\r\n * @param {Types~Locus} incoming New Locus delta\r\n * @returns {string}\r\n */\r\n static compareSequence(current, incoming) {\r\n // Locus sequence comparison rules in order of priority.\r\n // https://sqbu-github.cisco.com/WebExSquared/cloud-apps/wiki/Locus-Sequence-Comparison-Algorithm\r\n\r\n const local: any = Parser.getMetaData(current);\r\n const delta: any = Parser.getMetaData(incoming);\r\n\r\n // update loci metadata\r\n local.unique = Parser.getUniqueSequences(local, delta);\r\n delta.unique = Parser.getUniqueSequences(delta, local);\r\n\r\n // Locus sequence comparison rules\r\n // order matters\r\n const rules = [\r\n Parser.checkSequenceOverlap,\r\n Parser.checkUnequalRanges,\r\n Parser.checkForUniqueEntries,\r\n Parser.checkIfOutOfSync,\r\n ];\r\n\r\n for (const rule of rules) {\r\n // Rule only returns a value if the rule applies,\r\n // otherwise returns null.\r\n const result = rule(local, delta);\r\n\r\n if (result) {\r\n return result;\r\n }\r\n }\r\n\r\n // error, none of rules above applied\r\n // should never get here as last rule\r\n // should be catch all.\r\n return Parser.loci.ERROR;\r\n }\r\n\r\n /**\r\n * Transates the result of a sequence comparison into an intended behavior\r\n * @param {string} result\r\n * @returns {string} Locus comparison action\r\n */\r\n static compareToAction(result: string) {\r\n const {DESYNC, EQ, ERROR, GT, LT, USE_CURRENT, USE_INCOMING} = Parser.loci;\r\n\r\n let action = ERROR;\r\n\r\n switch (result) {\r\n case EQ:\r\n case GT:\r\n action = USE_CURRENT;\r\n break;\r\n case LT:\r\n action = USE_INCOMING;\r\n break;\r\n case DESYNC:\r\n action = DESYNC;\r\n break;\r\n default:\r\n LoggerProxy.logger.info(\r\n `Locus-info:parser#compareToAction --> Error: ${result} is not a recognized sequence comparison result.`\r\n );\r\n }\r\n\r\n return action;\r\n }\r\n\r\n /**\r\n * Extracts a loci comparison from a string of data.\r\n * @param {string} lociComparisonResult Comparison result with extra data\r\n * @returns {string} Comparison of EQ, LT, GT, or DESYNC.\r\n */\r\n static extractComparisonState(lociComparisonResult: string) {\r\n return lociComparisonResult.split(':')[0];\r\n }\r\n\r\n /**\r\n * @typedef {object} LociMetadata\r\n * @property {number} start - Starting sequence number\r\n * @property {number} end - Ending sequence number\r\n * @property {number} first - First sequence number\r\n * @property {number} last - Last sequence number\r\n * @property {number} min - Minimum sequence number\r\n * @property {number} max - Maximum sequence number\r\n * @property {number} entries - Loci sequence entries\r\n */\r\n\r\n /**\r\n * Metadata for Locus delta\r\n * @param {Array.<number>} sequence Locus delta sequence\r\n * @returns {LociMetadata} Locus Delta Metadata\r\n */\r\n static getMetaData(sequence: any) {\r\n const {entries} = sequence;\r\n const first = entries[0];\r\n const last = entries.slice(-1)[0];\r\n\r\n // rangeStart or rangeEnd is 0 if a range doesn't exist\r\n const start = sequence.rangeStart;\r\n const end = sequence.rangeEnd;\r\n\r\n // sequence data\r\n return {\r\n start,\r\n end,\r\n first,\r\n last,\r\n // Rule is: rangeStart <= rangeEnd <= min(entries)\r\n min: start || first,\r\n // Grab last entry if exist else default to rangeEnd\r\n max: last || end,\r\n // keep reference to actual sequence entries\r\n entries,\r\n };\r\n }\r\n\r\n /**\r\n * Compares two Locus delta objects and notes unique\r\n * values contained within baseLoci.\r\n * @param {LociMetadata} baseLoci\r\n * @param {LociMetadata} otherLoci\r\n * @returns {Array.<number>} List of unique sequences\r\n */\r\n static getUniqueSequences(baseLoci: any, otherLoci: any) {\r\n const diff: any = difference(baseLoci.entries, otherLoci.entries);\r\n\r\n const {start, end} = otherLoci;\r\n\r\n return Parser.getNumbersOutOfRange(diff, start, end);\r\n }\r\n\r\n /**\r\n * Returns an array of numbers outside of a given range.\r\n * @param {Array.<number>} list Array to filter\r\n * @param {number} rangeStart Start of range\r\n * @param {number} rangeEnd End of range\r\n * @returns {Array.<number>} Array of numbers sorted ASC\r\n */\r\n static getNumbersOutOfRange(list: Array<number>, rangeStart: number, rangeEnd: number) {\r\n // Collect all numbers if number is outside of specified range\r\n const output = list.filter((num) => num < rangeStart || num > rangeEnd);\r\n\r\n // sort ascending\r\n return output.sort((a, b) => a - b);\r\n }\r\n\r\n /**\r\n * Checks if newLoci or workingCopy is invalid.\r\n * @param {Types~Locus} newLoci\r\n * @returns {boolean}\r\n */\r\n isValidLocus(newLoci) {\r\n let isValid = false;\r\n const {IDLE} = Parser.status;\r\n const {isLoci} = Parser;\r\n // @ts-ignore\r\n const setStatus = (status) => {\r\n // @ts-ignore\r\n this.status = status;\r\n };\r\n\r\n // one or both objects are not locus delta events\r\n if (!isLoci(this.workingCopy) || !isLoci(newLoci)) {\r\n setStatus(IDLE);\r\n LoggerProxy.logger.info(\r\n 'Locus-info:parser#processDeltaEvent --> Ignoring non-locus object. workingCopy:',\r\n this.workingCopy,\r\n 'newLoci:',\r\n newLoci\r\n );\r\n } else {\r\n isValid = true;\r\n }\r\n\r\n return isValid;\r\n }\r\n\r\n /**\r\n * Determines if a paricular locus's sequence is empty\r\n * @param {Types~Locus} locus\r\n * @returns {bool}\r\n */\r\n static isSequenceEmpty(locus) {\r\n const {sequence} = locus;\r\n const hasEmptyEntries = !sequence.entries?.length;\r\n const hasEmptyRange = sequence.rangeStart === 0 && sequence.rangeEnd === 0;\r\n\r\n return hasEmptyEntries && hasEmptyRange;\r\n }\r\n\r\n /**\r\n * Determines if an object has basic\r\n * structure of a locus object.\r\n * @param {Types~Locus} loci\r\n * @returns {boolean}\r\n */\r\n static isLoci(loci) {\r\n if (!loci || !loci.sequence) {\r\n return false;\r\n }\r\n const hasProp = (prop) => Object.prototype.hasOwnProperty.call(loci.sequence, prop);\r\n\r\n if (hasProp('rangeStart') && hasProp('rangeEnd')) {\r\n return true;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n /**\r\n * Processes next event in queue,\r\n * if queue is empty sets status to idle.\r\n * @returns {undefined}\r\n */\r\n nextEvent() {\r\n // @ts-ignore\r\n if (this.status === Parser.status.PAUSED) {\r\n LoggerProxy.logger.info('Locus-info:parser#nextEvent --> Locus parser paused.');\r\n\r\n return;\r\n }\r\n\r\n // continue processing until queue is empty\r\n if (this.queue.size() > 0) {\r\n this.processDeltaEvent();\r\n } else {\r\n // @ts-ignore\r\n this.status = Parser.status.IDLE;\r\n }\r\n }\r\n\r\n /**\r\n * Function handler for delta actions,\r\n * is set by instance callee.\r\n * @param {string} action Locus delta action\r\n * @param {Types~Locus} locus Locus delta\r\n * @returns {undefined}\r\n */\r\n // eslint-disable-next-line no-unused-vars\r\n onDeltaAction(action: string, locus) {}\r\n\r\n /**\r\n * Event handler for locus delta events\r\n * @param {Types~Locus} loci Locus Delta\r\n * @returns {undefined}\r\n */\r\n onDeltaEvent(loci) {\r\n // enqueue the new loci\r\n this.queue.enqueue(loci);\r\n // start processing events in the queue if idle\r\n // and a function handler is defined\r\n // @ts-ignore\r\n if (this.status === Parser.status.IDLE && this.onDeltaAction) {\r\n // Update status, ensure we only process one event at a time.\r\n // @ts-ignore\r\n this.status = Parser.status.WORKING;\r\n\r\n this.processDeltaEvent();\r\n }\r\n }\r\n\r\n /**\r\n * Appends new data onto a string of existing data.\r\n * @param {string} newData\r\n * @param {string} oldData\r\n * @returns {string}\r\n */\r\n static packComparisonResult(newData: string, oldData: string) {\r\n return `${newData}:${oldData}`;\r\n }\r\n\r\n /**\r\n * Pause locus processing\r\n * @returns {undefined}\r\n */\r\n pause() {\r\n // @ts-ignore\r\n this.status = Parser.status.PAUSED;\r\n LoggerProxy.logger.info('Locus-info:parser#pause --> Locus parser paused.');\r\n }\r\n\r\n /**\r\n * Processes next locus delta in the queue,\r\n * continues until the queue is empty\r\n * or cleared.\r\n * @returns {undefined}\r\n */\r\n processDeltaEvent() {\r\n const {DESYNC, USE_INCOMING} = Parser.loci;\r\n const {extractComparisonState: extract} = Parser;\r\n const newLoci = this.queue.dequeue();\r\n\r\n if (!this.isValidLocus(newLoci)) {\r\n return;\r\n }\r\n\r\n const result = Parser.compare(this.workingCopy, newLoci);\r\n const lociComparison = extract(result);\r\n\r\n // limited debugging, use chrome extension\r\n // for full debugging.\r\n LoggerProxy.logger.debug(`Locus-info:parser#processDeltaEvent --> Locus Debug: ${result}`);\r\n\r\n if (lociComparison === DESYNC) {\r\n // wait for desync response\r\n this.pause();\r\n } else if (lociComparison === USE_INCOMING) {\r\n // update working copy for future comparisons.\r\n // Note: The working copy of parser gets updated in .onFullLocus()\r\n // and here when USE_INCOMING locus.\r\n this.workingCopy = newLoci;\r\n }\r\n\r\n if (this.onDeltaAction) {\r\n LoggerProxy.logger.info(\r\n `Locus-info:parser#processDeltaEvent --> Locus Delta Action: ${lociComparison}`\r\n );\r\n\r\n // eslint-disable-next-line no-useless-call\r\n this.onDeltaAction.call(this, lociComparison, newLoci);\r\n }\r\n\r\n this.nextEvent();\r\n }\r\n\r\n /**\r\n * Resume from a paused state\r\n * @returns {undefined}\r\n */\r\n resume() {\r\n LoggerProxy.logger.info('Locus-info:parser#resume --> Locus parser resumed.');\r\n // @ts-ignore\r\n this.status = Parser.status.WORKING;\r\n this.nextEvent();\r\n }\r\n\r\n /**\r\n * Gets related debug info for given error code\r\n * @param {string} debugCode Debug code\r\n * @param {string} comparison Locus comparison string\r\n * @returns {object} Debug message\r\n */\r\n static getDebugMessage(debugCode: string, comparison: string) {\r\n // removes extra spaces from multiline string\r\n const mStr = (strings) => strings.join('').replace(/\\s{2,}/g, ' ');\r\n\r\n const resolutionMap = {\r\n EQ: `${Parser.loci.LT}: is equal (current == incoming).`,\r\n LT: `${Parser.loci.LT}: choose right side (incoming).`,\r\n GT: `${Parser.loci.GT}: choose left side (current).`,\r\n };\r\n\r\n const debugMap = {\r\n SO001: {\r\n title: 'checkSequenceOverlap-001',\r\n description: mStr`Occurs if earliest working copy sequence is more \\\r\n recent than last incoming sequence.`,\r\n logic: 'current.min > incoming.max',\r\n },\r\n\r\n SO002: {\r\n title: 'checkSequenceOverlap-002',\r\n description: mStr`Occurs if last working copy sequence is before the \\\r\n earliest incoming sequence.`,\r\n logic: 'current.max < incoming.min',\r\n },\r\n\r\n UR001: {\r\n title: 'checkUnequalRanges-001',\r\n description: mStr`Occurs if there are no unique values for both loci, \\\r\n and the current working copy loci has a larger range.`,\r\n logic: 'currentTotalRange > incomingTotalRange',\r\n },\r\n\r\n UR002: {\r\n title: 'checkUnequalRanges-002',\r\n description: mStr`Occurs if there are no unique values for both loci, \\\r\n and the incoming delta loci has a larger range.`,\r\n logic: 'currentTotalRange < incomingTotalRange',\r\n },\r\n\r\n UR003: {\r\n title: 'checkUnequalRanges-003',\r\n description: mStr`Occurs if there are no unique values for both loci, \\\r\n and with ranges either absent or of the same size, the sequences \\\r\n are considered equal.`,\r\n logic: 'currentTotalRange == incomingTotalRange',\r\n },\r\n\r\n UE001: {\r\n title: 'checkForUniqueEntries-001',\r\n description: mStr`Occurs if current loci has unique entries and \\\r\n incoming does not. Entries are considered unique if they \\\r\n do not overlap with other Loci sequences or range values.`,\r\n logic: 'currentIsUnique && !incomingIsUnique',\r\n },\r\n\r\n UE002: {\r\n title: 'checkForUniqueEntries-002',\r\n description: mStr`Occurs if current has no unique entries but \\\r\n incoming does. Entries are considered unique if they \\\r\n do not overlap with other Loci sequences or range values.`,\r\n logic: '!currentIsUnique && incomingIsUnique',\r\n },\r\n\r\n OOS001: {\r\n title: 'checkIfOutOfSync-001',\r\n description: mStr`Occurs if neither sequence has a range, or \\\r\n if the current loci unique entries overlap the total range of the \\\r\n incoming sequence, or if the incoming unique entries overlap \\\r\n the total range of current sequence.`,\r\n logic: 'neitherSeqHasRange || currentUniqOverlap || incomingUniqOverlap',\r\n },\r\n\r\n OOS002: {\r\n title: 'checkIfOutOfSync-002',\r\n description: mStr`Occurs if the minimum value from sequences that are \\\r\n unique to the current loci is greater than the minimum value from \\\r\n sequences that are unique to the incoming loci.`,\r\n logic: 'currentUniqueMin > incomingUniqueMin',\r\n },\r\n\r\n OOS003: {\r\n title: 'checkIfOutOfSync-003',\r\n description: mStr`Occurs if none of the comparison rules applied. \\\r\n It is a catch all.`,\r\n logic: 'else (catch all)',\r\n },\r\n };\r\n\r\n const debugObj = debugMap[debugCode];\r\n\r\n debugObj.title = `Debug: ${debugObj.title}`;\r\n debugObj.resolution = resolutionMap[comparison];\r\n\r\n return debugObj;\r\n }\r\n}\r\n"],"mappings":";;;;;;;;;;;;;AAEA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC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