awv3
Version:
AWV client CAD framework
1,394 lines (1,393 loc) • 977 kB
JSON
{
"type": "Program",
"start": 0,
"end": 8674,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 199,
"column": 0
}
},
"sourceType": "module",
"body": [
{
"type": "ImportDeclaration",
"start": 0,
"end": 55,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 55
}
},
"specifiers": [
{
"type": "ImportSpecifier",
"start": 9,
"end": 15,
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 15
}
},
"imported": {
"type": "Identifier",
"start": 9,
"end": 15,
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 15
}
},
"name": "Plugin"
},
"local": {
"type": "Identifier",
"start": 9,
"end": 15,
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 15
}
},
"name": "Plugin"
}
},
{
"type": "ImportSpecifier",
"start": 17,
"end": 24,
"loc": {
"start": {
"line": 1,
"column": 17
},
"end": {
"line": 1,
"column": 24
}
},
"imported": {
"type": "Identifier",
"start": 17,
"end": 24,
"loc": {
"start": {
"line": 1,
"column": 17
},
"end": {
"line": 1,
"column": 24
}
},
"name": "Element"
},
"local": {
"type": "Identifier",
"start": 17,
"end": 24,
"loc": {
"start": {
"line": 1,
"column": 17
},
"end": {
"line": 1,
"column": 24
}
},
"name": "Element"
}
},
{
"type": "ImportSpecifier",
"start": 26,
"end": 35,
"loc": {
"start": {
"line": 1,
"column": 26
},
"end": {
"line": 1,
"column": 35
}
},
"imported": {
"type": "Identifier",
"start": 26,
"end": 35,
"loc": {
"start": {
"line": 1,
"column": 26
},
"end": {
"line": 1,
"column": 35
}
},
"name": "Selection"
},
"local": {
"type": "Identifier",
"start": 26,
"end": 35,
"loc": {
"start": {
"line": 1,
"column": 26
},
"end": {
"line": 1,
"column": 35
}
},
"name": "Selection"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 43,
"end": 54,
"loc": {
"start": {
"line": 1,
"column": 43
},
"end": {
"line": 1,
"column": 54
}
},
"value": "../plugin",
"rawValue": "../plugin",
"raw": "'../plugin'"
},
"trailingComments": [
{
"type": "Block",
"value": "* Integration manages plugins. It is the M(odel) in M(odel)VM(Viewmodel). This class can be reflected by any\r\n MVM framework such as React, Angular, Vue and others. Both Integration and Plugins keep critical data from leaking\r\n by relying on internals under this.* and modeldata under this.data.",
"start": 59,
"end": 364,
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 5,
"column": 73
}
},
"range": [
59,
364
]
}
]
},
{
"type": "ExportDefaultDeclaration",
"start": 366,
"end": 8672,
"loc": {
"start": {
"line": 6,
"column": 0
},
"end": {
"line": 198,
"column": 1
}
},
"declaration": {
"type": "ClassDeclaration",
"start": 381,
"end": 8672,
"loc": {
"start": {
"line": 6,
"column": 15
},
"end": {
"line": 198,
"column": 1
}
},
"id": {
"type": "Identifier",
"start": 387,
"end": 398,
"loc": {
"start": {
"line": 6,
"column": 21
},
"end": {
"line": 6,
"column": 32
}
},
"name": "Integration",
"leadingComments": null
},
"superClass": null,
"body": {
"type": "ClassBody",
"start": 399,
"end": 8672,
"loc": {
"start": {
"line": 6,
"column": 33
},
"end": {
"line": 198,
"column": 1
}
},
"body": [
{
"type": "MethodDefinition",
"start": 1082,
"end": 2185,
"loc": {
"start": {
"line": 17,
"column": 4
},
"end": {
"line": 45,
"column": 5
}
},
"computed": false,
"key": {
"type": "Identifier",
"start": 1082,
"end": 1093,
"loc": {
"start": {
"line": 17,
"column": 4
},
"end": {
"line": 17,
"column": 15
}
},
"name": "constructor",
"leadingComments": null
},
"static": false,
"kind": "constructor",
"value": {
"type": "FunctionExpression",
"start": 1093,
"end": 2185,
"loc": {
"start": {
"line": 17,
"column": 15
},
"end": {
"line": 45,
"column": 5
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "AssignmentPattern",
"start": 1094,
"end": 1106,
"loc": {
"start": {
"line": 17,
"column": 16
},
"end": {
"line": 17,
"column": 28
}
},
"operator": "=",
"left": {
"type": "Identifier",
"start": 1094,
"end": 1101,
"loc": {
"start": {
"line": 17,
"column": 16
},
"end": {
"line": 17,
"column": 23
}
},
"name": "options"
},
"right": {
"type": "ObjectExpression",
"start": 1104,
"end": 1106,
"loc": {
"start": {
"line": 17,
"column": 26
},
"end": {
"line": 17,
"column": 28
}
},
"properties": []
}
}
],
"body": {
"type": "BlockStatement",
"start": 1108,
"end": 2185,
"loc": {
"start": {
"line": 17,
"column": 30
},
"end": {
"line": 45,
"column": 5
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 1121,
"end": 1139,
"loc": {
"start": {
"line": 19,
"column": 8
},
"end": {
"line": 19,
"column": 26
}
},
"expression": {
"type": "AssignmentExpression",
"start": 1121,
"end": 1138,
"loc": {
"start": {
"line": 19,
"column": 8
},
"end": {
"line": 19,
"column": 25
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 1121,
"end": 1133,
"loc": {
"start": {
"line": 19,
"column": 8
},
"end": {
"line": 19,
"column": 20
}
},
"object": {
"type": "ThisExpression",
"start": 1121,
"end": 1125,
"loc": {
"start": {
"line": 19,
"column": 8
},
"end": {
"line": 19,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"start": 1126,
"end": 1133,
"loc": {
"start": {
"line": 19,
"column": 13
},
"end": {
"line": 19,
"column": 20
}
},
"name": "plugins"
},
"computed": false
},
"right": {
"type": "ObjectExpression",
"start": 1136,
"end": 1138,
"loc": {
"start": {
"line": 19,
"column": 23
},
"end": {
"line": 19,
"column": 25
}
},
"properties": []
}
}
},
{
"type": "IfStatement",
"start": 1151,
"end": 1260,
"loc": {
"start": {
"line": 21,
"column": 8
},
"end": {
"line": 22,
"column": 89
}
},
"test": {
"type": "UnaryExpression",
"start": 1155,
"end": 1168,
"loc": {
"start": {
"line": 21,
"column": 12
},
"end": {
"line": 21,
"column": 25
}
},
"operator": "!",
"prefix": true,
"argument": {
"type": "MemberExpression",
"start": 1156,
"end": 1168,
"loc": {
"start": {
"line": 21,
"column": 13
},
"end": {
"line": 21,
"column": 25
}
},
"object": {
"type": "Identifier",
"start": 1156,
"end": 1163,
"loc": {
"start": {
"line": 21,
"column": 13
},
"end": {
"line": 21,
"column": 20
}
},
"name": "options"
},
"property": {
"type": "Identifier",
"start": 1164,
"end": 1168,
"loc": {
"start": {
"line": 21,
"column": 21
},
"end": {
"line": 21,
"column": 25
}
},
"name": "view"
},
"computed": false
}
},
"consequent": {
"type": "ThrowStatement",
"start": 1183,
"end": 1260,
"loc": {
"start": {
"line": 22,
"column": 12
},
"end": {
"line": 22,
"column": 89
}
},
"argument": {
"type": "Literal",
"start": 1189,
"end": 1258,
"loc": {
"start": {
"line": 22,
"column": 18
},
"end": {
"line": 22,
"column": 87
}
},
"value": "Integration needs a view passed in: new Integration({ view: ... })!",
"rawValue": "Integration needs a view passed in: new Integration({ view: ... })!",
"raw": "\"Integration needs a view passed in: new Integration({ view: ... })!\"",
"parenthesizedExpression": true
}
},
"alternate": null
},
{
"type": "ExpressionStatement",
"start": 1272,
"end": 1297,
"loc": {
"start": {
"line": 24,
"column": 8
},
"end": {
"line": 24,
"column": 33
}
},
"expression": {
"type": "AssignmentExpression",
"start": 1272,
"end": 1296,
"loc": {
"start": {
"line": 24,
"column": 8
},
"end": {
"line": 24,
"column": 32
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 1272,
"end": 1281,
"loc": {
"start": {
"line": 24,
"column": 8
},
"end": {
"line": 24,
"column": 17
}
},
"object": {
"type": "ThisExpression",
"start": 1272,
"end": 1276,
"loc": {
"start": {
"line": 24,
"column": 8
},
"end": {
"line": 24,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"start": 1277,
"end": 1281,
"loc": {
"start": {
"line": 24,
"column": 13
},
"end": {
"line": 24,
"column": 17
}
},
"name": "view"
},
"computed": false
},
"right": {
"type": "MemberExpression",
"start": 1284,
"end": 1296,
"loc": {
"start": {
"line": 24,
"column": 20
},
"end": {
"line": 24,
"column": 32
}
},
"object": {
"type": "Identifier",
"start": 1284,
"end": 1291,
"loc": {
"start": {
"line": 24,
"column": 20
},
"end": {
"line": 24,
"column": 27
}
},
"name": "options"
},
"property": {
"type": "Identifier",
"start": 1292,
"end": 1296,
"loc": {
"start": {
"line": 24,
"column": 28
},
"end": {
"line": 24,
"column": 32
}
},
"name": "view"
},
"computed": false
}
}
},
{
"type": "ExpressionStatement",
"start": 1307,
"end": 1338,
"loc": {
"start": {
"line": 25,
"column": 8
},
"end": {
"line": 25,
"column": 39
}
},
"expression": {
"type": "AssignmentExpression",
"start": 1307,
"end": 1337,
"loc": {
"start": {
"line": 25,
"column": 8
},
"end": {
"line": 25,
"column": 38
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 1307,
"end": 1318,
"loc": {
"start": {
"line": 25,
"column": 8
},
"end": {
"line": 25,
"column": 19
}
},
"object": {
"type": "ThisExpression",
"start": 1307,
"end": 1311,
"loc": {
"start": {
"line": 25,
"column": 8
},
"end": {
"line": 25,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"start": 1312,
"end": 1318,
"loc": {
"start": {
"line": 25,
"column": 13
},
"end": {
"line": 25,
"column": 19
}
},
"name": "canvas"
},
"computed": false
},
"right": {
"type": "MemberExpression",
"start": 1321,
"end": 1337,
"loc": {
"start": {
"line": 25,
"column": 22
},
"end": {
"line": 25,
"column": 38
}
},
"object": {
"type": "MemberExpression",
"start": 1321,
"end": 1330,
"loc": {
"start": {
"line": 25,
"column": 22
},
"end": {
"line": 25,
"column": 31
}
},
"object": {
"type": "ThisExpression",
"start": 1321,
"end": 1325,
"loc": {
"start": {
"line": 25,
"column": 22
},
"end": {
"line": 25,
"column": 26
}
}
},
"property": {
"type": "Identifier",
"start": 1326,
"end": 1330,
"loc": {
"start": {
"line": 25,
"column": 27
},
"end": {
"line": 25,
"column": 31
}
},
"name": "view"
},
"computed": false
},
"property": {
"type": "Identifier",
"start": 1331,
"end": 1337,
"loc": {
"start": {
"line": 25,
"column": 32
},
"end": {
"line": 25,
"column": 38
}
},
"name": "canvas"
},
"computed": false
}
}
},
{
"type": "ExpressionStatement",
"start": 1348,
"end": 1394,
"loc": {
"start": {
"line": 26,
"column": 8
},
"end": {
"line": 26,
"column": 54
}
},
"expression": {
"type": "AssignmentExpression",
"start": 1348,
"end": 1393,
"loc": {
"start": {
"line": 26,
"column": 8
},
"end": {
"line": 26,
"column": 53
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 1348,
"end": 1362,
"loc": {
"start": {
"line": 26,
"column": 8
},
"end": {
"line": 26,
"column": 22
}
},
"object": {
"type": "ThisExpression",
"start": 1348,
"end": 1352,
"loc": {
"start": {
"line": 26,
"column": 8
},
"end": {
"line": 26,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"start": 1353,
"end": 1362,
"loc": {
"start": {
"line": 26,
"column": 13
},
"end": {
"line": 26,
"column": 22
}
},
"name": "selection"
},
"computed": false
},
"right": {
"type": "NewExpression",
"start": 1365,
"end": 1393,
"loc": {
"start": {
"line": 26,
"column": 25
},
"end": {
"line": 26,
"column": 53
}
},
"callee": {
"type": "Identifier",
"start": 1369,
"end": 1378,
"loc": {
"start": {
"line": 26,
"column": 29
},
"end": {
"line": 26,
"column": 38
}
},
"name": "Selection"
},
"arguments": [
{
"type": "ThisExpression",
"start": 1379,
"end": 1383,
"loc": {
"start": {
"line": 26,
"column": 39
},
"end": {
"line": 26,
"column": 43
}
}
},
{
"type": "Identifier",
"start": 1385,
"end": 1392,
"loc": {
"start": {
"line": 26,
"column": 45
},
"end": {
"line": 26,
"column": 52
}
},
"name": "options"
}
]
}
}
},
{
"type": "IfStatement",
"start": 1406,
"end": 1841,
"loc": {
"start": {
"line": 28,
"column": 8
},
"end": {
"line": 34,
"column": 9
}
},
"test": {
"type": "MemberExpression",
"start": 1410,
"end": 1424,
"loc": {
"start": {
"line": 28,
"column": 12
},
"end": {
"line": 28,
"column": 26
}
},
"object": {
"type": "Identifier",
"start": 1410,
"end": 1417,
"loc": {
"start": {
"line": 28,
"column": 12
},
"end": {
"line": 28,
"column": 19
}
},
"name": "options"
},
"property": {
"type": "Identifier",
"start": 1418,
"end": 1424,
"loc": {
"start": {
"line": 28,
"column": 20
},
"end": {
"line": 28,
"column": 26
}
},
"name": "socket"
},
"computed": false
},
"consequent": {
"type": "BlockStatement",
"start": 1426,
"end": 1841,
"loc": {
"start": {
"line": 28,
"column": 28
},
"end": {
"line": 34,
"column": 9
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 1441,
"end": 1470,
"loc": {
"start": {
"line": 29,
"column": 12
},
"end": {
"line": 29,
"column": 41
}
},
"expression": {
"type": "AssignmentExpression",
"start": 1441,
"end": 1469,
"loc": {
"start": {
"line": 29,
"column": 12
},
"end": {
"line": 29,
"column": 40
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 1441,
"end": 1452,
"loc": {
"start": {
"line": 29,
"column": 12
},
"end": {
"line": 29,
"column": 23
}
},
"object": {
"type": "ThisExpression",
"start": 1441,
"end": 1445,
"loc": {
"start": {
"line": 29,
"column": 12
},
"end": {
"line": 29,
"column": 16
}
}
},
"property": {
"type": "Identifier",
"start": 1446,
"end": 1452,
"loc": {
"start": {
"line": 29,
"column": 17
},
"end": {
"line": 29,
"column": 23
}
},
"name": "socket"
},
"computed": false
},
"right": {
"type": "MemberExpression",
"start": 1455,
"end": 1469,
"loc": {
"start": {
"line": 29,
"column": 26
},
"end": {
"line": 29,
"column": 40
}
},
"object": {
"type": "Identifier",
"start": 1455,
"end": 1462,
"loc": {
"start": {
"line": 29,
"column": 26
},
"end": {
"line": 29,
"column": 33
}
},
"name": "options"
},
"property": {
"type": "Identifier",
"start": 1463,
"end": 1469,
"loc": {
"start": {
"line": 29,
"column": 34
},
"end": {
"line": 29,
"column": 40
}
},
"name": "socket"
},
"computed": false
}
}
},
{
"type": "ExpressionStatement",
"start": 1484,
"end": 1648,
"loc": {
"start": {
"line": 30,
"column": 12
},
"end": {
"line": 31,
"column": 121
}
},
"expression": {
"type": "CallExpression",
"start": 1484,
"end": 1647,
"loc": {
"start": {
"line": 30,
"column": 12
},
"end": {
"line": 31,
"column": 120
}
},
"callee": {
"type": "MemberExpression",
"start": 1484,
"end": 1498,
"loc": {
"start": {
"line": 30,
"column": 12
},
"end": {
"line": 30,
"column": 26
}
},
"object": {
"type": "MemberExpression",
"start": 1484,
"end": 1495,
"loc": {
"start": {
"line": 30,
"column": 12
},
"end": {
"line": 30,
"column": 23
}
},
"object": {
"type": "ThisExpression",
"start": 1484,
"end": 1488,
"loc": {
"start": {
"line": 30,
"column": 12
},
"end": {
"line": 30,
"column": 16
}
}
},
"property": {
"type": "Identifier",
"start": 1489,
"end": 1495,
"loc": {
"start": {
"line": 30,
"column": 17
},
"end": {
"line": 30,
"column": 23
}
},
"name": "socket"
},
"computed": false
},
"property": {
"type": "Identifier",
"start": 1496,
"end": 1498,
"loc": {
"start": {
"line": 30,
"column": 24
},
"end": {
"line": 30,
"column": 26
}
},
"name": "on"
},
"computed": false
},
"arguments": [
{
"type": "Literal",
"start": 1499,
"end": 1510,
"loc": {
"start": {
"line": 30,
"column": 27
},
"end": {
"line": 30,
"column": 38
}
},
"value": "connected",
"rawValue": "connected",
"raw": "'connected'"
},
{
"type": "ArrowFunctionExpression",
"start": 1512,
"end": 1646,
"loc": {
"start": {
"line": 30,
"column": 40
},
"end": {
"line": 31,
"column": 119
}
},
"id": null,
"generator": false,
"expression": true,
"async": false,
"params": [
{
"type": "Identifier",
"start": 1512,
"end": 1522,
"loc": {
"start": {
"line": 30,
"column": 40
},
"end": {
"line": 30,
"column": 50
}
},
"name": "connection"
}
],
"body": {