awv3
Version:
AWV client CAD framework
1,350 lines (1,349 loc) • 348 kB
JSON
{
"type": "Program",
"start": 0,
"end": 2782,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 80,
"column": 0
}
},
"sourceType": "module",
"body": [
{
"type": "ImportDeclaration",
"start": 0,
"end": 34,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 34
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 7,
"end": 9,
"loc": {
"start": {
"line": 1,
"column": 7
},
"end": {
"line": 1,
"column": 9
}
},
"local": {
"type": "Identifier",
"start": 7,
"end": 9,
"loc": {
"start": {
"line": 1,
"column": 7
},
"end": {
"line": 1,
"column": 9
}
},
"name": "io"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 15,
"end": 33,
"loc": {
"start": {
"line": 1,
"column": 15
},
"end": {
"line": 1,
"column": 33
}
},
"value": "socket.io-client",
"rawValue": "socket.io-client",
"raw": "'socket.io-client'"
}
},
{
"type": "ImportDeclaration",
"start": 36,
"end": 77,
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 2,
"column": 41
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 43,
"end": 47,
"loc": {
"start": {
"line": 2,
"column": 7
},
"end": {
"line": 2,
"column": 11
}
},
"local": {
"type": "Identifier",
"start": 43,
"end": 47,
"loc": {
"start": {
"line": 2,
"column": 7
},
"end": {
"line": 2,
"column": 11
}
},
"name": "Base"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 53,
"end": 76,
"loc": {
"start": {
"line": 2,
"column": 17
},
"end": {
"line": 2,
"column": 40
}
},
"value": "../communication/base",
"rawValue": "../communication/base",
"raw": "'../communication/base'"
}
},
{
"type": "ImportDeclaration",
"start": 79,
"end": 115,
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 3,
"column": 36
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 86,
"end": 92,
"loc": {
"start": {
"line": 3,
"column": 7
},
"end": {
"line": 3,
"column": 13
}
},
"local": {
"type": "Identifier",
"start": 86,
"end": 92,
"loc": {
"start": {
"line": 3,
"column": 7
},
"end": {
"line": 3,
"column": 13
}
},
"name": "Parser"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 98,
"end": 114,
"loc": {
"start": {
"line": 3,
"column": 19
},
"end": {
"line": 3,
"column": 35
}
},
"value": "../core/parser",
"rawValue": "../core/parser",
"raw": "'../core/parser'"
}
},
{
"type": "ImportDeclaration",
"start": 117,
"end": 178,
"loc": {
"start": {
"line": 4,
"column": 0
},
"end": {
"line": 4,
"column": 61
}
},
"specifiers": [
{
"type": "ImportSpecifier",
"start": 126,
"end": 139,
"loc": {
"start": {
"line": 4,
"column": 9
},
"end": {
"line": 4,
"column": 22
}
},
"imported": {
"type": "Identifier",
"start": 126,
"end": 139,
"loc": {
"start": {
"line": 4,
"column": 9
},
"end": {
"line": 4,
"column": 22
}
},
"name": "createContext"
},
"local": {
"type": "Identifier",
"start": 126,
"end": 139,
"loc": {
"start": {
"line": 4,
"column": 9
},
"end": {
"line": 4,
"column": 22
}
},
"name": "createContext"
}
},
{
"type": "ImportSpecifier",
"start": 141,
"end": 153,
"loc": {
"start": {
"line": 4,
"column": 24
},
"end": {
"line": 4,
"column": 36
}
},
"imported": {
"type": "Identifier",
"start": 141,
"end": 153,
"loc": {
"start": {
"line": 4,
"column": 24
},
"end": {
"line": 4,
"column": 36
}
},
"name": "handleResult"
},
"local": {
"type": "Identifier",
"start": 141,
"end": 153,
"loc": {
"start": {
"line": 4,
"column": 24
},
"end": {
"line": 4,
"column": 36
}
},
"name": "handleResult"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 161,
"end": 177,
"loc": {
"start": {
"line": 4,
"column": 44
},
"end": {
"line": 4,
"column": 60
}
},
"value": "../core/parser",
"rawValue": "../core/parser",
"raw": "'../core/parser'"
}
},
{
"type": "ExportDefaultDeclaration",
"start": 182,
"end": 2780,
"loc": {
"start": {
"line": 6,
"column": 0
},
"end": {
"line": 79,
"column": 1
}
},
"declaration": {
"type": "ClassDeclaration",
"start": 197,
"end": 2780,
"loc": {
"start": {
"line": 6,
"column": 15
},
"end": {
"line": 79,
"column": 1
}
},
"id": {
"type": "Identifier",
"start": 203,
"end": 211,
"loc": {
"start": {
"line": 6,
"column": 21
},
"end": {
"line": 6,
"column": 29
}
},
"name": "SocketIO"
},
"superClass": {
"type": "Identifier",
"start": 220,
"end": 224,
"loc": {
"start": {
"line": 6,
"column": 38
},
"end": {
"line": 6,
"column": 42
}
},
"name": "Base"
},
"body": {
"type": "ClassBody",
"start": 225,
"end": 2780,
"loc": {
"start": {
"line": 6,
"column": 43
},
"end": {
"line": 79,
"column": 1
}
},
"body": [
{
"type": "MethodDefinition",
"start": 232,
"end": 286,
"loc": {
"start": {
"line": 7,
"column": 4
},
"end": {
"line": 9,
"column": 5
}
},
"computed": false,
"key": {
"type": "Identifier",
"start": 232,
"end": 243,
"loc": {
"start": {
"line": 7,
"column": 4
},
"end": {
"line": 7,
"column": 15
}
},
"name": "constructor"
},
"static": false,
"kind": "constructor",
"value": {
"type": "FunctionExpression",
"start": 243,
"end": 286,
"loc": {
"start": {
"line": 7,
"column": 15
},
"end": {
"line": 9,
"column": 5
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "Identifier",
"start": 244,
"end": 251,
"loc": {
"start": {
"line": 7,
"column": 16
},
"end": {
"line": 7,
"column": 23
}
},
"name": "options"
}
],
"body": {
"type": "BlockStatement",
"start": 253,
"end": 286,
"loc": {
"start": {
"line": 7,
"column": 25
},
"end": {
"line": 9,
"column": 5
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 264,
"end": 279,
"loc": {
"start": {
"line": 8,
"column": 8
},
"end": {
"line": 8,
"column": 23
}
},
"expression": {
"type": "CallExpression",
"start": 264,
"end": 278,
"loc": {
"start": {
"line": 8,
"column": 8
},
"end": {
"line": 8,
"column": 22
}
},
"callee": {
"type": "Super",
"start": 264,
"end": 269,
"loc": {
"start": {
"line": 8,
"column": 8
},
"end": {
"line": 8,
"column": 13
}
}
},
"arguments": [
{
"type": "Identifier",
"start": 270,
"end": 277,
"loc": {
"start": {
"line": 8,
"column": 14
},
"end": {
"line": 8,
"column": 21
}
},
"name": "options"
}
]
}
}
]
}
}
},
{
"type": "MethodDefinition",
"start": 294,
"end": 1934,
"loc": {
"start": {
"line": 11,
"column": 4
},
"end": {
"line": 54,
"column": 5
}
},
"computed": false,
"key": {
"type": "Identifier",
"start": 294,
"end": 301,
"loc": {
"start": {
"line": 11,
"column": 4
},
"end": {
"line": 11,
"column": 11
}
},
"name": "connect"
},
"static": false,
"kind": "method",
"value": {
"type": "FunctionExpression",
"start": 301,
"end": 1934,
"loc": {
"start": {
"line": 11,
"column": 11
},
"end": {
"line": 54,
"column": 5
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "AssignmentPattern",
"start": 302,
"end": 316,
"loc": {
"start": {
"line": 11,
"column": 12
},
"end": {
"line": 11,
"column": 26
}
},
"operator": "=",
"left": {
"type": "Identifier",
"start": 302,
"end": 305,
"loc": {
"start": {
"line": 11,
"column": 12
},
"end": {
"line": 11,
"column": 15
}
},
"name": "url"
},
"right": {
"type": "MemberExpression",
"start": 308,
"end": 316,
"loc": {
"start": {
"line": 11,
"column": 18
},
"end": {
"line": 11,
"column": 26
}
},
"object": {
"type": "ThisExpression",
"start": 308,
"end": 312,
"loc": {
"start": {
"line": 11,
"column": 18
},
"end": {
"line": 11,
"column": 22
}
}
},
"property": {
"type": "Identifier",
"start": 313,
"end": 316,
"loc": {
"start": {
"line": 11,
"column": 23
},
"end": {
"line": 11,
"column": 26
}
},
"name": "url"
},
"computed": false
}
},
{
"type": "Identifier",
"start": 318,
"end": 325,
"loc": {
"start": {
"line": 11,
"column": 28
},
"end": {
"line": 11,
"column": 35
}
},
"name": "options"
}
],
"body": {
"type": "BlockStatement",
"start": 327,
"end": 1934,
"loc": {
"start": {
"line": 11,
"column": 37
},
"end": {
"line": 54,
"column": 5
}
},
"body": [
{
"type": "ReturnStatement",
"start": 338,
"end": 1927,
"loc": {
"start": {
"line": 12,
"column": 8
},
"end": {
"line": 53,
"column": 11
}
},
"argument": {
"type": "NewExpression",
"start": 345,
"end": 1926,
"loc": {
"start": {
"line": 12,
"column": 15
},
"end": {
"line": 53,
"column": 10
}
},
"callee": {
"type": "Identifier",
"start": 349,
"end": 356,
"loc": {
"start": {
"line": 12,
"column": 19
},
"end": {
"line": 12,
"column": 26
}
},
"name": "Promise"
},
"arguments": [
{
"type": "ArrowFunctionExpression",
"start": 357,
"end": 1925,
"loc": {
"start": {
"line": 12,
"column": 27
},
"end": {
"line": 53,
"column": 9
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "Identifier",
"start": 358,
"end": 365,
"loc": {
"start": {
"line": 12,
"column": 28
},
"end": {
"line": 12,
"column": 35
}
},
"name": "resolve"
},
{
"type": "Identifier",
"start": 367,
"end": 373,
"loc": {
"start": {
"line": 12,
"column": 37
},
"end": {
"line": 12,
"column": 43
}
},
"name": "reject"
}
],
"body": {
"type": "BlockStatement",
"start": 378,
"end": 1925,
"loc": {
"start": {
"line": 12,
"column": 48
},
"end": {
"line": 53,
"column": 9
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 393,
"end": 408,
"loc": {
"start": {
"line": 13,
"column": 12
},
"end": {
"line": 13,
"column": 27
}
},
"expression": {
"type": "AssignmentExpression",
"start": 393,
"end": 407,
"loc": {
"start": {
"line": 13,
"column": 12
},
"end": {
"line": 13,
"column": 26
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 393,
"end": 401,
"loc": {
"start": {
"line": 13,
"column": 12
},
"end": {
"line": 13,
"column": 20
}
},
"object": {
"type": "ThisExpression",
"start": 393,
"end": 397,
"loc": {
"start": {
"line": 13,
"column": 12
},
"end": {
"line": 13,
"column": 16
}
}
},
"property": {
"type": "Identifier",
"start": 398,
"end": 401,
"loc": {
"start": {
"line": 13,
"column": 17
},
"end": {
"line": 13,
"column": 20
}
},
"name": "url"
},
"computed": false
},
"right": {
"type": "Identifier",
"start": 404,
"end": 407,
"loc": {
"start": {
"line": 13,
"column": 23
},
"end": {
"line": 13,
"column": 26
}
},
"name": "url"
}
}
},
{
"type": "ExpressionStatement",
"start": 422,
"end": 444,
"loc": {
"start": {
"line": 14,
"column": 12
},
"end": {
"line": 14,
"column": 34
}
},
"expression": {
"type": "AssignmentExpression",
"start": 422,
"end": 443,
"loc": {
"start": {
"line": 14,
"column": 12
},
"end": {
"line": 14,
"column": 33
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 422,
"end": 433,
"loc": {
"start": {
"line": 14,
"column": 12
},
"end": {
"line": 14,
"column": 23
}
},
"object": {
"type": "ThisExpression",
"start": 422,
"end": 426,
"loc": {
"start": {
"line": 14,
"column": 12
},
"end": {
"line": 14,
"column": 16
}
}
},
"property": {
"type": "Identifier",
"start": 427,
"end": 433,
"loc": {
"start": {
"line": 14,
"column": 17
},
"end": {
"line": 14,
"column": 23
}
},
"name": "socket"
},
"computed": false
},
"right": {
"type": "CallExpression",
"start": 436,
"end": 443,
"loc": {
"start": {
"line": 14,
"column": 26
},
"end": {
"line": 14,
"column": 33
}
},
"callee": {
"type": "Identifier",
"start": 436,
"end": 438,
"loc": {
"start": {
"line": 14,
"column": 26
},
"end": {
"line": 14,
"column": 28
}
},
"name": "io"
},
"arguments": [
{
"type": "Identifier",
"start": 439,
"end": 442,
"loc": {
"start": {
"line": 14,
"column": 29
},
"end": {
"line": 14,
"column": 32
}
},
"name": "url"
}
]
}
}
},
{
"type": "ExpressionStatement",
"start": 458,
"end": 834,
"loc": {
"start": {
"line": 15,
"column": 12
},
"end": {
"line": 23,
"column": 15
}
},
"expression": {
"type": "CallExpression",
"start": 458,
"end": 833,
"loc": {
"start": {
"line": 15,
"column": 12
},
"end": {
"line": 23,
"column": 14
}
},
"callee": {
"type": "MemberExpression",
"start": 458,
"end": 474,
"loc": {
"start": {
"line": 15,
"column": 12
},
"end": {
"line": 15,
"column": 28
}
},
"object": {
"type": "MemberExpression",
"start": 458,
"end": 469,
"loc": {
"start": {
"line": 15,
"column": 12
},
"end": {
"line": 15,
"column": 23
}
},
"object": {
"type": "ThisExpression",
"start": 458,
"end": 462,
"loc": {
"start": {
"line": 15,
"column": 12
},
"end": {
"line": 15,
"column": 16
}
}
},
"property": {
"type": "Identifier",
"start": 463,
"end": 469,
"loc": {
"start": {
"line": 15,
"column": 17
},
"end": {
"line": 15,
"column": 23
}
},
"name": "socket"
},
"computed": false
},
"property": {
"type": "Identifier",
"start": 470,
"end": 474,
"loc": {
"start": {
"line": 15,
"column": 24
},
"end": {
"line": 15,
"column": 28
}
},
"name": "once"
},
"computed": false
},
"arguments": [
{
"type": "Literal",
"start": 475,
"end": 484,
"loc": {
"start": {
"line": 15,
"column": 29
},
"end": {
"line": 15,
"column": 38
}
},
"value": "connect",
"rawValue": "connect",
"raw": "\"connect\""
},
{
"type": "ArrowFunctionExpression",
"start": 486,
"end": 832,
"loc": {
"start": {
"line": 15,
"column": 40
},
"end": {
"line": 23,
"column": 13
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [],
"body": {
"type": "BlockStatement",
"start": 492,
"end": 832,
"loc": {
"start": {
"line": 15,
"column": 46
},
"end": {
"line": 23,
"column": 13
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 511,
"end": 749,
"loc": {
"start": {
"line": 16,
"column": 16
},
"end": {
"line": 21,
"column": 19
}
},
"expression": {
"type": "CallExpression",
"start": 511,
"end": 748,
"loc": {
"start": {
"line": 16,
"column": 16
},
"end": {
"line": 21,
"column": 18
}
},
"callee": {
"type": "MemberExpression",
"start": 511,
"end": 527,
"loc": {
"start": {
"line": 16,
"column": 16
},
"end": {
"line": 16,
"column": 32
}
},
"object": {
"type": "MemberExpression",
"start": 511,
"end": 522,
"loc": {
"start": {
"line": 16,
"column": 16
},
"end": {
"line": 16,
"column": 27
}
},
"object": {
"type": "ThisExpression",
"start": 511,
"end": 515,
"loc": {
"start": {
"line": 16,
"column": 16
},
"end": {
"line": 16,
"column": 20
}
}
},
"property": {
"type": "Identifier",
"start": 516,
"end": 522,
"loc": {
"start": {
"line": 16,
"column": 21
},
"end": {
"line": 16,
"column": 27
}
},
"name": "socket"
},
"computed": false
},
"property": {
"type": "Identifier",
"start": 523,
"end": 527,
"loc": {
"start": {
"line": 16,
"column": 28
},
"end": {
"line": 16,
"column": 32
}
},
"name": "once"
},
"computed": false
},
"arguments": [
{
"type": "Literal",
"start": 528,
"end": 540,
"loc": {
"start": {
"line": 16,
"column": 33
},
"end": {
"line": 16,
"column": 45