@observertc/observer-js 1.0.1-f31d7a4.0 → 1.1.0
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/README.md +2184 -1
- package/dist/index.d.mts +6842 -0
- package/dist/index.d.ts +6842 -0
- package/dist/index.js +7736 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +7608 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +44 -18
- package/.eslintrc.json +0 -143
- package/.prettierignore +0 -5
- package/.prettierrc +0 -7
- package/jest.config.js +0 -9
- package/lib/ObservedCall.d.ts +0 -62
- package/lib/ObservedCall.d.ts.map +0 -1
- package/lib/ObservedCall.js +0 -127
- package/lib/ObservedCertificate.d.ts +0 -19
- package/lib/ObservedCertificate.d.ts.map +0 -1
- package/lib/ObservedCertificate.js +0 -38
- package/lib/ObservedClient.d.ts +0 -104
- package/lib/ObservedClient.d.ts.map +0 -1
- package/lib/ObservedClient.js +0 -250
- package/lib/ObservedCodec.d.ts +0 -22
- package/lib/ObservedCodec.d.ts.map +0 -1
- package/lib/ObservedCodec.js +0 -45
- package/lib/ObservedDataChannel.d.ts +0 -28
- package/lib/ObservedDataChannel.d.ts.map +0 -1
- package/lib/ObservedDataChannel.js +0 -73
- package/lib/ObservedIceCandidate.d.ts +0 -29
- package/lib/ObservedIceCandidate.d.ts.map +0 -1
- package/lib/ObservedIceCandidate.js +0 -59
- package/lib/ObservedIceCandidatePair.d.ts +0 -44
- package/lib/ObservedIceCandidatePair.d.ts.map +0 -1
- package/lib/ObservedIceCandidatePair.js +0 -111
- package/lib/ObservedIceTransport.d.ts +0 -32
- package/lib/ObservedIceTransport.d.ts.map +0 -1
- package/lib/ObservedIceTransport.js +0 -65
- package/lib/ObservedInboundRtp.d.ts +0 -92
- package/lib/ObservedInboundRtp.d.ts.map +0 -1
- package/lib/ObservedInboundRtp.js +0 -193
- package/lib/ObservedInboundTrack.d.ts +0 -29
- package/lib/ObservedInboundTrack.d.ts.map +0 -1
- package/lib/ObservedInboundTrack.js +0 -57
- package/lib/ObservedMediaPlayout.d.ts +0 -22
- package/lib/ObservedMediaPlayout.d.ts.map +0 -1
- package/lib/ObservedMediaPlayout.js +0 -42
- package/lib/ObservedMediaSource.d.ts +0 -28
- package/lib/ObservedMediaSource.d.ts.map +0 -1
- package/lib/ObservedMediaSource.js +0 -55
- package/lib/ObservedOutboundRtp.d.ts +0 -62
- package/lib/ObservedOutboundRtp.d.ts.map +0 -1
- package/lib/ObservedOutboundRtp.js +0 -144
- package/lib/ObservedOutboundTrack.d.ts +0 -29
- package/lib/ObservedOutboundTrack.d.ts.map +0 -1
- package/lib/ObservedOutboundTrack.js +0 -57
- package/lib/ObservedPeerConnection.d.ts +0 -183
- package/lib/ObservedPeerConnection.d.ts.map +0 -1
- package/lib/ObservedPeerConnection.js +0 -688
- package/lib/ObservedPeerConnectionTransport.d.ts +0 -17
- package/lib/ObservedPeerConnectionTransport.d.ts.map +0 -1
- package/lib/ObservedPeerConnectionTransport.js +0 -34
- package/lib/ObservedRemoteInboundRtp.d.ts +0 -30
- package/lib/ObservedRemoteInboundRtp.d.ts.map +0 -1
- package/lib/ObservedRemoteInboundRtp.js +0 -60
- package/lib/ObservedRemoteOutboundRtp.d.ts +0 -30
- package/lib/ObservedRemoteOutboundRtp.d.ts.map +0 -1
- package/lib/ObservedRemoteOutboundRtp.js +0 -60
- package/lib/ObservedTURN.d.ts +0 -30
- package/lib/ObservedTURN.d.ts.map +0 -1
- package/lib/ObservedTURN.js +0 -54
- package/lib/ObservedTurnServer.d.ts +0 -25
- package/lib/ObservedTurnServer.d.ts.map +0 -1
- package/lib/ObservedTurnServer.js +0 -59
- package/lib/Observer.d.ts +0 -50
- package/lib/Observer.d.ts.map +0 -1
- package/lib/Observer.js +0 -101
- package/lib/common/Middleware.d.ts +0 -17
- package/lib/common/Middleware.d.ts.map +0 -1
- package/lib/common/Middleware.js +0 -60
- package/lib/common/SingleExecutor.d.ts +0 -3
- package/lib/common/SingleExecutor.d.ts.map +0 -1
- package/lib/common/SingleExecutor.js +0 -31
- package/lib/common/logger.d.ts +0 -17
- package/lib/common/logger.d.ts.map +0 -1
- package/lib/common/logger.js +0 -50
- package/lib/common/types.d.ts +0 -3
- package/lib/common/types.d.ts.map +0 -1
- package/lib/common/types.js +0 -3
- package/lib/common/utils.d.ts +0 -10
- package/lib/common/utils.d.ts.map +0 -1
- package/lib/common/utils.js +0 -55
- package/lib/detectors/Detector.d.ts +0 -5
- package/lib/detectors/Detector.d.ts.map +0 -1
- package/lib/detectors/Detector.js +0 -3
- package/lib/detectors/Detectors.d.ts +0 -11
- package/lib/detectors/Detectors.d.ts.map +0 -1
- package/lib/detectors/Detectors.js +0 -34
- package/lib/index.d.ts +0 -26
- package/lib/index.d.ts.map +0 -1
- package/lib/index.js +0 -41
- package/lib/monitors/TurnUsageMonitor.d.ts +0 -1
- package/lib/monitors/TurnUsageMonitor.d.ts.map +0 -1
- package/lib/monitors/TurnUsageMonitor.js +0 -146
- package/lib/schema/ClientEventTypes.d.ts +0 -33
- package/lib/schema/ClientEventTypes.d.ts.map +0 -1
- package/lib/schema/ClientEventTypes.js +0 -38
- package/lib/schema/ClientMetaTypes.d.ts +0 -34
- package/lib/schema/ClientMetaTypes.d.ts.map +0 -1
- package/lib/schema/ClientMetaTypes.js +0 -16
- package/lib/schema/ClientSample.d.ts +0 -1333
- package/lib/schema/ClientSample.d.ts.map +0 -1
- package/lib/schema/ClientSample.js +0 -4
- package/lib/scores/CalculatedScore.d.ts +0 -6
- package/lib/scores/CalculatedScore.d.ts.map +0 -1
- package/lib/scores/CalculatedScore.js +0 -2
- package/lib/scores/DefaultCallScoreCalculator.d.ts +0 -7
- package/lib/scores/DefaultCallScoreCalculator.d.ts.map +0 -1
- package/lib/scores/DefaultCallScoreCalculator.js +0 -21
- package/lib/scores/ScoreCalculator.d.ts +0 -4
- package/lib/scores/ScoreCalculator.d.ts.map +0 -1
- package/lib/scores/ScoreCalculator.js +0 -2
- package/lib/utils/CallUpdater.d.ts +0 -5
- package/lib/utils/CallUpdater.d.ts.map +0 -1
- package/lib/utils/CallUpdater.js +0 -2
- package/lib/utils/OnAllClientCallUpdater.d.ts +0 -16
- package/lib/utils/OnAllClientCallUpdater.d.ts.map +0 -1
- package/lib/utils/OnAllClientCallUpdater.js +0 -58
- package/lib/utils/RemoteTrackResolver.d.ts +0 -7
- package/lib/utils/RemoteTrackResolver.d.ts.map +0 -1
- package/lib/utils/RemoteTrackResolver.js +0 -2
- package/lib/utils/onAnyClientCallUpdater.d.ts +0 -14
- package/lib/utils/onAnyClientCallUpdater.d.ts.map +0 -1
- package/lib/utils/onAnyClientCallUpdater.js +0 -51
- package/src/ObservedCall.ts +0 -176
- package/src/ObservedCertificate.ts +0 -43
- package/src/ObservedClient.ts +0 -324
- package/src/ObservedCodec.ts +0 -49
- package/src/ObservedDataChannel.ts +0 -82
- package/src/ObservedIceCandidate.ts +0 -64
- package/src/ObservedIceCandidatePair.ts +0 -118
- package/src/ObservedIceTransport.ts +0 -70
- package/src/ObservedInboundRtp.ts +0 -205
- package/src/ObservedInboundTrack.ts +0 -70
- package/src/ObservedMediaPlayout.ts +0 -49
- package/src/ObservedMediaSource.ts +0 -60
- package/src/ObservedOutboundRtp.ts +0 -156
- package/src/ObservedOutboundTrack.ts +0 -69
- package/src/ObservedPeerConnection.ts +0 -995
- package/src/ObservedPeerConnectionTransport.ts +0 -38
- package/src/ObservedRemoteInboundRtp.ts +0 -64
- package/src/ObservedRemoteOutboundRtp.ts +0 -65
- package/src/ObservedTURN.ts +0 -80
- package/src/ObservedTurnServer.ts +0 -72
- package/src/Observer.ts +0 -152
- package/src/common/Middleware.ts +0 -84
- package/src/common/SingleExecutor.ts +0 -36
- package/src/common/logger.ts +0 -82
- package/src/common/types.ts +0 -4
- package/src/common/utils.ts +0 -59
- package/src/detectors/Detector.ts +0 -6
- package/src/detectors/Detectors.ts +0 -38
- package/src/index.ts +0 -27
- package/src/monitors/TurnUsageMonitor.ts +0 -187
- package/src/schema/ClientEventTypes.ts +0 -36
- package/src/schema/ClientMetaTypes.ts +0 -41
- package/src/schema/ClientSample.ts +0 -1682
- package/src/scores/CalculatedScore.ts +0 -6
- package/src/scores/DefaultCallScoreCalculator.ts +0 -23
- package/src/scores/ScoreCalculator.ts +0 -3
- package/src/utils/CallUpdater.ts +0 -5
- package/src/utils/OnAllClientCallUpdater.ts +0 -68
- package/src/utils/RemoteTrackResolver.ts +0 -12
- package/src/utils/onAnyClientCallUpdater.ts +0 -59
- package/tsconfig.json +0 -19
- package/tslint.json +0 -6
package/package.json
CHANGED
|
@@ -1,20 +1,40 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@observertc/observer-js",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "Server
|
|
5
|
-
"main": "
|
|
6
|
-
"
|
|
3
|
+
"version": "1.1.0",
|
|
4
|
+
"description": "Server-side Node.js library for processing ObserveRTC Samples",
|
|
5
|
+
"main": "./dist/index.js",
|
|
6
|
+
"module": "./dist/index.mjs",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"import": {
|
|
11
|
+
"types": "./dist/index.d.mts",
|
|
12
|
+
"default": "./dist/index.mjs"
|
|
13
|
+
},
|
|
14
|
+
"require": {
|
|
15
|
+
"types": "./dist/index.d.ts",
|
|
16
|
+
"default": "./dist/index.js"
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"files": [
|
|
21
|
+
"dist"
|
|
22
|
+
],
|
|
7
23
|
"engines": {
|
|
8
|
-
"node": ">=
|
|
24
|
+
"node": ">=22"
|
|
9
25
|
},
|
|
10
26
|
"scripts": {
|
|
11
27
|
"prepare": "npm run build",
|
|
12
|
-
"
|
|
13
|
-
"prepublishOnly": "npm run lint",
|
|
28
|
+
"prepublishOnly": "npm run lint && npm run typecheck",
|
|
14
29
|
"format": "prettier --write \"src/**/*.ts\"",
|
|
15
|
-
"lint": "
|
|
16
|
-
"build": "
|
|
17
|
-
"
|
|
30
|
+
"lint": "eslint -c .eslintrc.json \"src/**/*.ts\"",
|
|
31
|
+
"build": "tsup",
|
|
32
|
+
"typecheck": "tsc --noEmit",
|
|
33
|
+
"test": "jest --config jest.config.js",
|
|
34
|
+
"test:coverage": "jest --config jest.config.js --coverage",
|
|
35
|
+
"example": "ts-node --compiler-options '{\"module\":\"commonjs\"}' examples/sfu-observer.ts",
|
|
36
|
+
"example:detectors": "ts-node --compiler-options '{\"module\":\"commonjs\"}' examples/detectors.ts",
|
|
37
|
+
"bench": "ts-node --compiler-options '{\"module\":\"commonjs\"}' bench/detectors.bench.ts"
|
|
18
38
|
},
|
|
19
39
|
"keywords": [
|
|
20
40
|
"webrtc",
|
|
@@ -27,27 +47,33 @@
|
|
|
27
47
|
"dependencies": {
|
|
28
48
|
"@bufbuild/protobuf": "1.1.1",
|
|
29
49
|
"events": "^3.3.0",
|
|
30
|
-
"uuid": "^
|
|
50
|
+
"uuid": "^11.1.1"
|
|
31
51
|
},
|
|
32
52
|
"devDependencies": {
|
|
33
53
|
"@tsconfig/node20": "^1.0.2",
|
|
34
54
|
"@types/jest": "^27.5.2",
|
|
35
55
|
"@types/node": "^20.9.0",
|
|
36
|
-
"@types/uuid": "^8.3.4",
|
|
37
56
|
"@typescript-eslint/eslint-plugin": "^5.38.0",
|
|
38
57
|
"@typescript-eslint/parser": "^5.38.0",
|
|
39
|
-
"bufferutil": "^4.0.6",
|
|
40
58
|
"eslint": "^8.24.0",
|
|
41
59
|
"jest": "^27.5.0",
|
|
42
|
-
"
|
|
60
|
+
"mediasoup": "^3.20.3",
|
|
43
61
|
"prettier": "2.8.7",
|
|
44
62
|
"ts-jest": "^27.1.5",
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"
|
|
63
|
+
"ts-node": "^10.9.2",
|
|
64
|
+
"tsup": "^8.5.1",
|
|
65
|
+
"typescript": "^4.8.3"
|
|
48
66
|
},
|
|
49
67
|
"repository": {
|
|
50
68
|
"type": "git",
|
|
51
|
-
"url": "https://github.com/
|
|
69
|
+
"url": "git+https://github.com/ObserveRTC/observer-js.git"
|
|
70
|
+
},
|
|
71
|
+
"peerDependencies": {
|
|
72
|
+
"mediasoup": ">=3.11.0"
|
|
73
|
+
},
|
|
74
|
+
"peerDependenciesMeta": {
|
|
75
|
+
"mediasoup": {
|
|
76
|
+
"optional": true
|
|
77
|
+
}
|
|
52
78
|
}
|
|
53
79
|
}
|
package/.eslintrc.json
DELETED
|
@@ -1,143 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"parser": "@typescript-eslint/parser",
|
|
3
|
-
"parserOptions": {
|
|
4
|
-
"ecmaVersion": "latest",
|
|
5
|
-
"sourceType": "module",
|
|
6
|
-
"project": "./tsconfig.json"
|
|
7
|
-
},
|
|
8
|
-
"extends": ["plugin:@typescript-eslint/recommended"],
|
|
9
|
-
"env": { "node": true },
|
|
10
|
-
"rules": {
|
|
11
|
-
"array-bracket-spacing": [ 2, "always", {
|
|
12
|
-
"objectsInArrays": true,
|
|
13
|
-
"arraysInArrays": true
|
|
14
|
-
}],
|
|
15
|
-
"arrow-parens": [ 2, "always" ],
|
|
16
|
-
"arrow-spacing": 2,
|
|
17
|
-
"block-spacing": [ 2, "always" ],
|
|
18
|
-
"brace-style": [ 2, "1tbs", { "allowSingleLine": true } ],
|
|
19
|
-
"camelcase": 2,
|
|
20
|
-
"comma-spacing": [ 2, { "before": false, "after": true } ],
|
|
21
|
-
"comma-style": 2,
|
|
22
|
-
"computed-property-spacing": 2,
|
|
23
|
-
"constructor-super": 2,
|
|
24
|
-
"func-call-spacing": 2,
|
|
25
|
-
"generator-star-spacing": 2,
|
|
26
|
-
"guard-for-in": 2,
|
|
27
|
-
"indent": [ 2, "tab", { "SwitchCase": 1 } ],
|
|
28
|
-
"@typescript-eslint/indent": [ 2, "tab", { "SwitchCase": 1 } ],
|
|
29
|
-
"require-await": "off",
|
|
30
|
-
"@typescript-eslint/require-await": "error",
|
|
31
|
-
"key-spacing": [ 2, {
|
|
32
|
-
"singleLine": {
|
|
33
|
-
"beforeColon": false,
|
|
34
|
-
"afterColon": true
|
|
35
|
-
},
|
|
36
|
-
"multiLine": {
|
|
37
|
-
"beforeColon": false,
|
|
38
|
-
"afterColon": true
|
|
39
|
-
}
|
|
40
|
-
}],
|
|
41
|
-
"keyword-spacing": 2,
|
|
42
|
-
"linebreak-style": [ 2, "unix" ],
|
|
43
|
-
"lines-around-comment": [ 2, {
|
|
44
|
-
"allowBlockStart": true,
|
|
45
|
-
"allowObjectStart": true,
|
|
46
|
-
"beforeBlockComment": true,
|
|
47
|
-
"beforeLineComment": false
|
|
48
|
-
}],
|
|
49
|
-
"max-len": 0,
|
|
50
|
-
"newline-after-var": 2,
|
|
51
|
-
"newline-before-return": 2,
|
|
52
|
-
"newline-per-chained-call": 2,
|
|
53
|
-
"no-alert": 2,
|
|
54
|
-
"no-caller": 2,
|
|
55
|
-
"no-case-declarations": 2,
|
|
56
|
-
"no-catch-shadow": 2,
|
|
57
|
-
"no-class-assign": 2,
|
|
58
|
-
"no-confusing-arrow": 2,
|
|
59
|
-
"no-console": 2,
|
|
60
|
-
"no-const-assign": 2,
|
|
61
|
-
"no-debugger": 2,
|
|
62
|
-
"no-dupe-args": 2,
|
|
63
|
-
"no-dupe-keys": 2,
|
|
64
|
-
"no-duplicate-case": 2,
|
|
65
|
-
"no-div-regex": 2,
|
|
66
|
-
"no-empty": [ 2, { "allowEmptyCatch": true } ],
|
|
67
|
-
"no-empty-pattern": 2,
|
|
68
|
-
"no-else-return": 0,
|
|
69
|
-
"no-eval": 2,
|
|
70
|
-
"no-extend-native": 2,
|
|
71
|
-
"no-ex-assign": 2,
|
|
72
|
-
"no-extra-bind": 2,
|
|
73
|
-
"no-extra-boolean-cast": 2,
|
|
74
|
-
"no-extra-label": 2,
|
|
75
|
-
"no-extra-semi": 2,
|
|
76
|
-
"no-fallthrough": 2,
|
|
77
|
-
"no-func-assign": 2,
|
|
78
|
-
"no-global-assign": 2,
|
|
79
|
-
"no-implicit-coercion": 2,
|
|
80
|
-
"no-implicit-globals": 2,
|
|
81
|
-
"no-inner-declarations": 2,
|
|
82
|
-
"no-invalid-regexp": 2,
|
|
83
|
-
"no-invalid-this": 2,
|
|
84
|
-
"no-irregular-whitespace": 2,
|
|
85
|
-
"no-lonely-if": 2,
|
|
86
|
-
"no-mixed-operators": 2,
|
|
87
|
-
"no-mixed-spaces-and-tabs": 2,
|
|
88
|
-
"no-multi-spaces": 2,
|
|
89
|
-
"no-multi-str": 2,
|
|
90
|
-
"no-multiple-empty-lines": [ 1, { "max": 1, "maxEOF": 0, "maxBOF": 0 } ],
|
|
91
|
-
"no-native-reassign": 2,
|
|
92
|
-
"no-negated-in-lhs": 2,
|
|
93
|
-
"no-new": 2,
|
|
94
|
-
"no-new-func": 2,
|
|
95
|
-
"no-new-wrappers": 2,
|
|
96
|
-
"no-obj-calls": 2,
|
|
97
|
-
"no-proto": 2,
|
|
98
|
-
"no-regex-spaces": 2,
|
|
99
|
-
"no-restricted-imports": 2,
|
|
100
|
-
"no-return-assign": 2,
|
|
101
|
-
"no-self-assign": 2,
|
|
102
|
-
"no-self-compare": 2,
|
|
103
|
-
"no-sequences": 2,
|
|
104
|
-
"no-shadow": 2,
|
|
105
|
-
"no-shadow-restricted-names": 2,
|
|
106
|
-
"no-spaced-func": 2,
|
|
107
|
-
"no-sparse-arrays": 2,
|
|
108
|
-
"no-this-before-super": 2,
|
|
109
|
-
"no-throw-literal": 2,
|
|
110
|
-
"no-unexpected-multiline": 2,
|
|
111
|
-
"no-unmodified-loop-condition": 2,
|
|
112
|
-
"no-unreachable": 2,
|
|
113
|
-
"no-unused-vars": "off",
|
|
114
|
-
"@typescript-eslint/no-unused-vars": "error",
|
|
115
|
-
"no-useless-call": 2,
|
|
116
|
-
"no-useless-computed-key": 2,
|
|
117
|
-
"no-useless-concat": 2,
|
|
118
|
-
"no-useless-rename": 2,
|
|
119
|
-
"no-var": 2,
|
|
120
|
-
"no-whitespace-before-property": 2,
|
|
121
|
-
"object-curly-newline": 0,
|
|
122
|
-
"object-curly-spacing": [ 2, "always" ],
|
|
123
|
-
"object-property-newline": [ 2, { "allowMultiplePropertiesPerLine": true } ],
|
|
124
|
-
"prefer-const": 2,
|
|
125
|
-
"prefer-rest-params": 2,
|
|
126
|
-
"prefer-spread": 2,
|
|
127
|
-
"prefer-template": 2,
|
|
128
|
-
"quotes": [ 2, "single", { "avoidEscape": true } ],
|
|
129
|
-
"semi": [ 2, "always" ],
|
|
130
|
-
"semi-spacing": 2,
|
|
131
|
-
"space-before-blocks": 2,
|
|
132
|
-
"space-before-function-paren": [ 2,
|
|
133
|
-
{
|
|
134
|
-
"anonymous": "never",
|
|
135
|
-
"named": "never",
|
|
136
|
-
"asyncArrow": "always"
|
|
137
|
-
}],
|
|
138
|
-
"space-in-parens": [ 2, "never" ],
|
|
139
|
-
"spaced-comment": [ 2, "always" ],
|
|
140
|
-
"strict": 2,
|
|
141
|
-
"valid-typeof": 2
|
|
142
|
-
}
|
|
143
|
-
}
|
package/.prettierignore
DELETED
package/.prettierrc
DELETED
package/jest.config.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
roots: ['<rootDir>'],
|
|
3
|
-
transform: {
|
|
4
|
-
'^.+\\.tsx?$': 'ts-jest',
|
|
5
|
-
},
|
|
6
|
-
testPathIgnorePatterns: ["/node_modules/", "/tests/helpers/"],
|
|
7
|
-
testRegex: '(/tests/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$',
|
|
8
|
-
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
|
|
9
|
-
}
|
package/lib/ObservedCall.d.ts
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import { EventEmitter } from 'events';
|
|
3
|
-
import { ObservedClient, ObservedClientSettings } from './ObservedClient';
|
|
4
|
-
import { Observer } from './Observer';
|
|
5
|
-
import { ScoreCalculator } from './scores/ScoreCalculator';
|
|
6
|
-
import { CalculatedScore } from './scores/CalculatedScore';
|
|
7
|
-
import { Detectors } from './detectors/Detectors';
|
|
8
|
-
import { RemoteTrackResolver } from './utils/RemoteTrackResolver';
|
|
9
|
-
import { CallUpdater } from './utils/CallUpdater';
|
|
10
|
-
export type ObservedCallSettings<AppData extends Record<string, unknown> = Record<string, unknown>> = {
|
|
11
|
-
callId: string;
|
|
12
|
-
appData?: AppData;
|
|
13
|
-
remoteTrackResolvePolicy?: 'p2p' | 'mediasoup-sfu';
|
|
14
|
-
callUpdaterPolicy?: 'onAnyClientUpdate' | 'onAllClientsUpdate';
|
|
15
|
-
};
|
|
16
|
-
export type ObservedCallEvents = {
|
|
17
|
-
update: [];
|
|
18
|
-
newclient: [ObservedClient];
|
|
19
|
-
empty: [];
|
|
20
|
-
'not-empty': [];
|
|
21
|
-
close: [];
|
|
22
|
-
};
|
|
23
|
-
export declare interface ObservedCall {
|
|
24
|
-
on<U extends keyof ObservedCallEvents>(event: U, listener: (...args: ObservedCallEvents[U]) => void): this;
|
|
25
|
-
off<U extends keyof ObservedCallEvents>(event: U, listener: (...args: ObservedCallEvents[U]) => void): this;
|
|
26
|
-
once<U extends keyof ObservedCallEvents>(event: U, listener: (...args: ObservedCallEvents[U]) => void): this;
|
|
27
|
-
emit<U extends keyof ObservedCallEvents>(event: U, ...args: ObservedCallEvents[U]): boolean;
|
|
28
|
-
}
|
|
29
|
-
export declare class ObservedCall<AppData extends Record<string, unknown> = Record<string, unknown>> extends EventEmitter {
|
|
30
|
-
readonly observer: Observer;
|
|
31
|
-
readonly detectors: Detectors;
|
|
32
|
-
readonly callId: string;
|
|
33
|
-
readonly observedClients: Map<string, ObservedClient<Record<string, unknown>>>;
|
|
34
|
-
readonly calculatedScore: CalculatedScore;
|
|
35
|
-
remoteTrackResolver?: RemoteTrackResolver;
|
|
36
|
-
callUpdater?: CallUpdater;
|
|
37
|
-
totalAudioBytesSent: number;
|
|
38
|
-
totalAudioBytesReceived: number;
|
|
39
|
-
totalVideoBytesSent: number;
|
|
40
|
-
totalVideoBytesReceived: number;
|
|
41
|
-
totalDataChannelBytesSent: number;
|
|
42
|
-
totalDataChannelBytesReceived: number;
|
|
43
|
-
numberOfPeerConnections: number;
|
|
44
|
-
numberOfInboundRtpStreams: number;
|
|
45
|
-
numberOfOutboundRtpStreams: number;
|
|
46
|
-
numberOfDataChannels: number;
|
|
47
|
-
maxNumberOfClients: number;
|
|
48
|
-
appData?: AppData;
|
|
49
|
-
closed: boolean;
|
|
50
|
-
started?: number;
|
|
51
|
-
ended?: number;
|
|
52
|
-
scoreCalculator: ScoreCalculator;
|
|
53
|
-
constructor(settings: ObservedCallSettings<AppData>, observer: Observer);
|
|
54
|
-
get numberOfClients(): number;
|
|
55
|
-
get score(): number | undefined;
|
|
56
|
-
close(): void;
|
|
57
|
-
getObservedClient<ClientAppData extends Record<string, unknown> = Record<string, unknown>>(clientId: string): ObservedClient<ClientAppData> | undefined;
|
|
58
|
-
createObservedClient<ClientAppData extends Record<string, unknown> = Record<string, unknown>>(settings: ObservedClientSettings<ClientAppData>): ObservedClient<ClientAppData>;
|
|
59
|
-
update(): void;
|
|
60
|
-
private _onClientUpdate;
|
|
61
|
-
}
|
|
62
|
-
//# sourceMappingURL=ObservedCall.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ObservedCall.d.ts","sourceRoot":"","sources":["../src/ObservedCall.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,EAAE,cAAc,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAC1E,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAA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AAoB,CAAC,aAAa,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,QAAQ,EAAE,sBAAsB,CAAC,aAAa,CAAC,GAAG,cAAc,CAAC,aAAa,CAAC;IA8B7K,MAAM;IAoBb,OAAO,CAAC,eAAe;CAUvB"}
|
package/lib/ObservedCall.js
DELETED
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ObservedCall = void 0;
|
|
4
|
-
const events_1 = require("events");
|
|
5
|
-
const ObservedClient_1 = require("./ObservedClient");
|
|
6
|
-
const DefaultCallScoreCalculator_1 = require("./scores/DefaultCallScoreCalculator");
|
|
7
|
-
const Detectors_1 = require("./detectors/Detectors");
|
|
8
|
-
const OnAllClientCallUpdater_1 = require("./utils/OnAllClientCallUpdater");
|
|
9
|
-
const onAnyClientCallUpdater_1 = require("./utils/onAnyClientCallUpdater");
|
|
10
|
-
class ObservedCall extends events_1.EventEmitter {
|
|
11
|
-
observer;
|
|
12
|
-
detectors;
|
|
13
|
-
callId;
|
|
14
|
-
observedClients = new Map();
|
|
15
|
-
calculatedScore = {
|
|
16
|
-
weight: 1,
|
|
17
|
-
value: undefined,
|
|
18
|
-
};
|
|
19
|
-
remoteTrackResolver;
|
|
20
|
-
callUpdater;
|
|
21
|
-
totalAudioBytesSent = 0;
|
|
22
|
-
totalAudioBytesReceived = 0;
|
|
23
|
-
totalVideoBytesSent = 0;
|
|
24
|
-
totalVideoBytesReceived = 0;
|
|
25
|
-
totalDataChannelBytesSent = 0;
|
|
26
|
-
totalDataChannelBytesReceived = 0;
|
|
27
|
-
numberOfPeerConnections = 0;
|
|
28
|
-
numberOfInboundRtpStreams = 0;
|
|
29
|
-
numberOfOutboundRtpStreams = 0;
|
|
30
|
-
numberOfDataChannels = 0;
|
|
31
|
-
maxNumberOfClients = 0;
|
|
32
|
-
appData;
|
|
33
|
-
closed = false;
|
|
34
|
-
started;
|
|
35
|
-
ended;
|
|
36
|
-
scoreCalculator;
|
|
37
|
-
constructor(settings, observer) {
|
|
38
|
-
super();
|
|
39
|
-
this.observer = observer;
|
|
40
|
-
this.setMaxListeners(Infinity);
|
|
41
|
-
this.callId = settings.callId;
|
|
42
|
-
this.appData = settings.appData;
|
|
43
|
-
this.scoreCalculator = new DefaultCallScoreCalculator_1.DefaultCallScoreCalculator(this);
|
|
44
|
-
this.detectors = new Detectors_1.Detectors();
|
|
45
|
-
switch (settings.callUpdaterPolicy) {
|
|
46
|
-
case 'onAllClientsUpdate':
|
|
47
|
-
this.callUpdater = new OnAllClientCallUpdater_1.OnAllClientCallUpdater(this);
|
|
48
|
-
break;
|
|
49
|
-
case 'onAnyClientUpdate':
|
|
50
|
-
this.callUpdater = new onAnyClientCallUpdater_1.OnAnyClientCallUpdater(this);
|
|
51
|
-
break;
|
|
52
|
-
}
|
|
53
|
-
switch (settings.remoteTrackResolvePolicy) {
|
|
54
|
-
case 'mediasoup-sfu':
|
|
55
|
-
break;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
get numberOfClients() {
|
|
59
|
-
return this.observedClients.size;
|
|
60
|
-
}
|
|
61
|
-
get score() {
|
|
62
|
-
return this.calculatedScore.value;
|
|
63
|
-
}
|
|
64
|
-
close() {
|
|
65
|
-
if (this.closed)
|
|
66
|
-
return;
|
|
67
|
-
this.closed = true;
|
|
68
|
-
[...this.observedClients.values()].forEach((client) => client.close());
|
|
69
|
-
this.emit('close');
|
|
70
|
-
}
|
|
71
|
-
getObservedClient(clientId) {
|
|
72
|
-
if (this.closed || !this.observedClients.has(clientId))
|
|
73
|
-
return;
|
|
74
|
-
return this.observedClients.get(clientId);
|
|
75
|
-
}
|
|
76
|
-
createObservedClient(settings) {
|
|
77
|
-
if (this.closed)
|
|
78
|
-
throw new Error(`Call ${this.callId} is closed`);
|
|
79
|
-
if (this.observedClients.has(settings.clientId))
|
|
80
|
-
throw new Error(`Client with id ${settings.clientId} already exists`);
|
|
81
|
-
const result = new ObservedClient_1.ObservedClient(settings, this);
|
|
82
|
-
const wasEmpty = this.observedClients.size === 0;
|
|
83
|
-
const onUpdate = () => this._onClientUpdate(result);
|
|
84
|
-
result.once('close', () => {
|
|
85
|
-
result.off('update', onUpdate);
|
|
86
|
-
this.observedClients.delete(settings.clientId);
|
|
87
|
-
if (this.observedClients.size === 0) {
|
|
88
|
-
this.emit('empty');
|
|
89
|
-
}
|
|
90
|
-
});
|
|
91
|
-
result.on('update', onUpdate);
|
|
92
|
-
this.observedClients.set(settings.clientId, result);
|
|
93
|
-
this.maxNumberOfClients = Math.max(this.maxNumberOfClients, this.observedClients.size);
|
|
94
|
-
this.emit('newclient', result);
|
|
95
|
-
if (wasEmpty) {
|
|
96
|
-
this.emit('not-empty');
|
|
97
|
-
}
|
|
98
|
-
return result;
|
|
99
|
-
}
|
|
100
|
-
update() {
|
|
101
|
-
if (this.closed)
|
|
102
|
-
return;
|
|
103
|
-
this.numberOfInboundRtpStreams = 0;
|
|
104
|
-
this.numberOfOutboundRtpStreams = 0;
|
|
105
|
-
this.numberOfPeerConnections = 0;
|
|
106
|
-
this.numberOfDataChannels = 0;
|
|
107
|
-
for (const client of this.observedClients.values()) {
|
|
108
|
-
this.numberOfInboundRtpStreams += client.numberOfInboundRtpStreams;
|
|
109
|
-
this.numberOfOutboundRtpStreams += client.numberOfOutboundRtpStreams;
|
|
110
|
-
this.numberOfPeerConnections += client.numberOfPeerConnections;
|
|
111
|
-
this.numberOfDataChannels += client.numberOfDataChannels;
|
|
112
|
-
}
|
|
113
|
-
this.detectors.update();
|
|
114
|
-
this.scoreCalculator.update();
|
|
115
|
-
this.emit('update');
|
|
116
|
-
}
|
|
117
|
-
_onClientUpdate(client) {
|
|
118
|
-
this.callUpdater?.onClientUpdate(client);
|
|
119
|
-
this.totalAudioBytesReceived = client.deltaReceivedAudioBytes;
|
|
120
|
-
this.totalAudioBytesSent = client.deltaSentAudioBytes;
|
|
121
|
-
this.totalVideoBytesReceived = client.deltaReceivedVideoBytes;
|
|
122
|
-
this.totalVideoBytesSent = client.deltaSentVideoBytes;
|
|
123
|
-
this.totalDataChannelBytesReceived = client.deltaDataChannelBytesReceived;
|
|
124
|
-
this.totalDataChannelBytesSent = client.deltaDataChannelBytesSent;
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
exports.ObservedCall = ObservedCall;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { ObservedPeerConnection } from './ObservedPeerConnection';
|
|
2
|
-
import { CertificateStats } from './schema/ClientSample';
|
|
3
|
-
export declare class ObservedCertificate implements CertificateStats {
|
|
4
|
-
timestamp: number;
|
|
5
|
-
id: string;
|
|
6
|
-
private readonly _peerConnection;
|
|
7
|
-
appData?: Record<string, unknown>;
|
|
8
|
-
private _visited;
|
|
9
|
-
fingerprint?: string;
|
|
10
|
-
fingerprintAlgorithm?: string;
|
|
11
|
-
base64Certificate?: string;
|
|
12
|
-
issuerCertificateId?: string;
|
|
13
|
-
attachments?: Record<string, unknown>;
|
|
14
|
-
constructor(timestamp: number, id: string, _peerConnection: ObservedPeerConnection);
|
|
15
|
-
get visited(): boolean;
|
|
16
|
-
getPeerConnection(): ObservedPeerConnection;
|
|
17
|
-
update(stats: CertificateStats): void;
|
|
18
|
-
}
|
|
19
|
-
//# sourceMappingURL=ObservedCertificate.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ObservedCertificate.d.ts","sourceRoot":"","sources":["../src/ObservedCertificate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEzD,qBAAa,mBAAoB,YAAW,gBAAgB;IAYnD,SAAS,EAAE,MAAM;IACjB,EAAE,EAAE,MAAM;IACjB,OAAO,CAAC,QAAQ,CAAC,eAAe;IAb1B,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAEzC,OAAO,CAAC,QAAQ,CAAS;IAEzB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;gBAG9B,SAAS,EAAE,MAAM,EACjB,EAAE,EAAE,MAAM,EACA,eAAe,EAAE,sBAAsB;IAGzD,IAAW,OAAO,YAMjB;IAEM,iBAAiB;IAIjB,MAAM,CAAC,KAAK,EAAE,gBAAgB;CAUrC"}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ObservedCertificate = void 0;
|
|
4
|
-
class ObservedCertificate {
|
|
5
|
-
timestamp;
|
|
6
|
-
id;
|
|
7
|
-
_peerConnection;
|
|
8
|
-
appData;
|
|
9
|
-
_visited = false;
|
|
10
|
-
fingerprint;
|
|
11
|
-
fingerprintAlgorithm;
|
|
12
|
-
base64Certificate;
|
|
13
|
-
issuerCertificateId;
|
|
14
|
-
attachments;
|
|
15
|
-
constructor(timestamp, id, _peerConnection) {
|
|
16
|
-
this.timestamp = timestamp;
|
|
17
|
-
this.id = id;
|
|
18
|
-
this._peerConnection = _peerConnection;
|
|
19
|
-
}
|
|
20
|
-
get visited() {
|
|
21
|
-
const visited = this._visited;
|
|
22
|
-
this._visited = false;
|
|
23
|
-
return visited;
|
|
24
|
-
}
|
|
25
|
-
getPeerConnection() {
|
|
26
|
-
return this._peerConnection;
|
|
27
|
-
}
|
|
28
|
-
update(stats) {
|
|
29
|
-
this._visited = true;
|
|
30
|
-
this.timestamp = stats.timestamp;
|
|
31
|
-
this.fingerprint = stats.fingerprint;
|
|
32
|
-
this.fingerprintAlgorithm = stats.fingerprintAlgorithm;
|
|
33
|
-
this.base64Certificate = stats.base64Certificate;
|
|
34
|
-
this.issuerCertificateId = stats.issuerCertificateId;
|
|
35
|
-
this.attachments = stats.attachments;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
exports.ObservedCertificate = ObservedCertificate;
|
package/lib/ObservedClient.d.ts
DELETED
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import { EventEmitter } from 'events';
|
|
3
|
-
import { ObservedPeerConnection } from './ObservedPeerConnection';
|
|
4
|
-
import { ClientMetaData, ClientSample, ClientIssue, ExtensionStat } from './schema/ClientSample';
|
|
5
|
-
import * as MetaData from './schema/ClientMetaTypes';
|
|
6
|
-
import { ObservedCall } from './ObservedCall';
|
|
7
|
-
import { CalculatedScore } from './scores/CalculatedScore';
|
|
8
|
-
import { Detectors } from './detectors/Detectors';
|
|
9
|
-
export type ObservedClientSettings<AppData extends Record<string, unknown> = Record<string, unknown>> = {
|
|
10
|
-
clientId: string;
|
|
11
|
-
appData?: AppData;
|
|
12
|
-
};
|
|
13
|
-
export type ObservedClientEvents = {
|
|
14
|
-
update: [
|
|
15
|
-
{
|
|
16
|
-
sample: ClientSample;
|
|
17
|
-
elapsedTimeInMs: number;
|
|
18
|
-
}
|
|
19
|
-
];
|
|
20
|
-
close: [];
|
|
21
|
-
joined: [];
|
|
22
|
-
issue: [ClientIssue];
|
|
23
|
-
metaData: [ClientMetaData];
|
|
24
|
-
rejoined: [timestamp: number];
|
|
25
|
-
left: [];
|
|
26
|
-
usingturn: [boolean];
|
|
27
|
-
usermediaerror: [string];
|
|
28
|
-
newpeerconnection: [ObservedPeerConnection];
|
|
29
|
-
};
|
|
30
|
-
export declare interface ObservedClient {
|
|
31
|
-
on<U extends keyof ObservedClientEvents>(event: U, listener: (...args: ObservedClientEvents[U]) => void): this;
|
|
32
|
-
off<U extends keyof ObservedClientEvents>(event: U, listener: (...args: ObservedClientEvents[U]) => void): this;
|
|
33
|
-
once<U extends keyof ObservedClientEvents>(event: U, listener: (...args: ObservedClientEvents[U]) => void): this;
|
|
34
|
-
emit<U extends keyof ObservedClientEvents>(event: U, ...args: ObservedClientEvents[U]): boolean;
|
|
35
|
-
}
|
|
36
|
-
export declare class ObservedClient<AppData extends Record<string, unknown> = Record<string, unknown>> extends EventEmitter {
|
|
37
|
-
readonly call: ObservedCall;
|
|
38
|
-
readonly detectors: Detectors;
|
|
39
|
-
readonly clientId: string;
|
|
40
|
-
readonly observedPeerConnections: Map<string, ObservedPeerConnection>;
|
|
41
|
-
readonly calculatedScore: CalculatedScore;
|
|
42
|
-
appData?: AppData;
|
|
43
|
-
attachments?: Record<string, unknown>;
|
|
44
|
-
updated: number;
|
|
45
|
-
acceptedSamples: number;
|
|
46
|
-
closed: boolean;
|
|
47
|
-
joinedAt?: number;
|
|
48
|
-
leftAt?: number;
|
|
49
|
-
operationSystem?: MetaData.OperationSystem;
|
|
50
|
-
engine?: MetaData.Engine;
|
|
51
|
-
platform?: MetaData.Platform;
|
|
52
|
-
browser?: MetaData.Browser;
|
|
53
|
-
mediaConstraints: string[];
|
|
54
|
-
usingTURN: boolean;
|
|
55
|
-
availableOutgoingBitrate: number;
|
|
56
|
-
availableIncomingBitrate: number;
|
|
57
|
-
totalInboundPacketsLost: number;
|
|
58
|
-
totalInboundPacketsReceived: number;
|
|
59
|
-
totalOutboundPacketsSent: number;
|
|
60
|
-
totalDataChannelBytesSent: number;
|
|
61
|
-
totalDataChannelBytesReceived: number;
|
|
62
|
-
totalDataChannelMessagesSent: number;
|
|
63
|
-
totalDataChannelMessagesReceived: number;
|
|
64
|
-
totalSentBytes: number;
|
|
65
|
-
totalReceivedBytes: number;
|
|
66
|
-
totalReceivedAudioBytes: number;
|
|
67
|
-
totalReceivedVideoBytes: number;
|
|
68
|
-
totalSentAudioBytes: number;
|
|
69
|
-
totalSentVideoBytes: number;
|
|
70
|
-
deltaReceivedAudioBytes: number;
|
|
71
|
-
deltaReceivedVideoBytes: number;
|
|
72
|
-
deltaSentAudioBytes: number;
|
|
73
|
-
deltaSentVideoBytes: number;
|
|
74
|
-
deltaDataChannelBytesSent: number;
|
|
75
|
-
deltaDataChannelBytesReceived: number;
|
|
76
|
-
deltaDataChannelMessagesSent: number;
|
|
77
|
-
deltaDataChannelMessagesReceived: number;
|
|
78
|
-
deltaInboundPacketsLost: number;
|
|
79
|
-
deltaInboundPacketsReceived: number;
|
|
80
|
-
deltaOutboundPacketsSent: number;
|
|
81
|
-
avgRttInMs?: number;
|
|
82
|
-
sendingAudioBitrate: number;
|
|
83
|
-
sendingVideoBitrate: number;
|
|
84
|
-
receivingAudioBitrate: number;
|
|
85
|
-
receivingVideoBitrate: number;
|
|
86
|
-
numberOfInboundRtpStreams: number;
|
|
87
|
-
numberOfInbundTracks: number;
|
|
88
|
-
numberOfOutboundRtpStreams: number;
|
|
89
|
-
numberOfOutboundTracks: number;
|
|
90
|
-
numberOfDataChannels: number;
|
|
91
|
-
readonly mediaDevices: MetaData.MediaDeviceInfo[];
|
|
92
|
-
issues: ClientIssue[];
|
|
93
|
-
constructor(settings: ObservedClientSettings<AppData>, call: ObservedCall);
|
|
94
|
-
get numberOfPeerConnections(): number;
|
|
95
|
-
get score(): number | undefined;
|
|
96
|
-
close(): void;
|
|
97
|
-
accept(sample: ClientSample): void;
|
|
98
|
-
private _processClientEvent;
|
|
99
|
-
processMetadata(metadata: ClientMetaData): void;
|
|
100
|
-
addIssue(issue: ClientIssue): void;
|
|
101
|
-
addExtensionStats(stats: ExtensionStat): void;
|
|
102
|
-
private _updatePeerConnection;
|
|
103
|
-
}
|
|
104
|
-
//# sourceMappingURL=ObservedClient.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ObservedClient.d.ts","sourceRoot":"","sources":["../src/ObservedClient.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AACt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