awv3
Version:
AWV client CAD framework
1,464 lines (1,463 loc) • 506 kB
JSON
{
"type": "Program",
"start": 0,
"end": 4782,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 145,
"column": 0
}
},
"sourceType": "module",
"body": [
{
"type": "ImportDeclaration",
"start": 0,
"end": 39,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 39
}
},
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"start": 7,
"end": 17,
"loc": {
"start": {
"line": 1,
"column": 7
},
"end": {
"line": 1,
"column": 17
}
},
"local": {
"type": "Identifier",
"start": 12,
"end": 17,
"loc": {
"start": {
"line": 1,
"column": 12
},
"end": {
"line": 1,
"column": 17
}
},
"name": "Error"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 23,
"end": 38,
"loc": {
"start": {
"line": 1,
"column": 23
},
"end": {
"line": 1,
"column": 38
}
},
"value": "../core/error",
"rawValue": "../core/error",
"raw": "'../core/error'"
}
},
{
"type": "ImportDeclaration",
"start": 40,
"end": 76,
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 2,
"column": 36
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 47,
"end": 53,
"loc": {
"start": {
"line": 2,
"column": 7
},
"end": {
"line": 2,
"column": 13
}
},
"local": {
"type": "Identifier",
"start": 47,
"end": 53,
"loc": {
"start": {
"line": 2,
"column": 7
},
"end": {
"line": 2,
"column": 13
}
},
"name": "Events"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 59,
"end": 75,
"loc": {
"start": {
"line": 2,
"column": 19
},
"end": {
"line": 2,
"column": 35
}
},
"value": "../core/events",
"rawValue": "../core/events",
"raw": "'../core/events'"
}
},
{
"type": "ImportDeclaration",
"start": 77,
"end": 126,
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 3,
"column": 49
}
},
"specifiers": [],
"source": {
"type": "Literal",
"start": 84,
"end": 125,
"loc": {
"start": {
"line": 3,
"column": 7
},
"end": {
"line": 3,
"column": 48
}
},
"value": "event-listener-with-options/js/polyfill",
"rawValue": "event-listener-with-options/js/polyfill",
"raw": "'event-listener-with-options/js/polyfill'"
}
},
{
"type": "FunctionDeclaration",
"start": 128,
"end": 525,
"loc": {
"start": {
"line": 5,
"column": 0
},
"end": {
"line": 17,
"column": 1
}
},
"id": {
"type": "Identifier",
"start": 137,
"end": 149,
"loc": {
"start": {
"line": 5,
"column": 9
},
"end": {
"line": 5,
"column": 21
}
},
"name": "createStates"
},
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "Identifier",
"start": 150,
"end": 153,
"loc": {
"start": {
"line": 5,
"column": 22
},
"end": {
"line": 5,
"column": 25
}
},
"name": "dom"
},
{
"type": "Identifier",
"start": 155,
"end": 161,
"loc": {
"start": {
"line": 5,
"column": 27
},
"end": {
"line": 5,
"column": 33
}
},
"name": "events"
},
{
"type": "Identifier",
"start": 163,
"end": 171,
"loc": {
"start": {
"line": 5,
"column": 35
},
"end": {
"line": 5,
"column": 43
}
},
"name": "listener"
},
{
"type": "AssignmentPattern",
"start": 173,
"end": 192,
"loc": {
"start": {
"line": 5,
"column": 45
},
"end": {
"line": 5,
"column": 64
}
},
"operator": "=",
"left": {
"type": "Identifier",
"start": 173,
"end": 180,
"loc": {
"start": {
"line": 5,
"column": 45
},
"end": {
"line": 5,
"column": 52
}
},
"name": "options"
},
"right": {
"type": "Identifier",
"start": 183,
"end": 192,
"loc": {
"start": {
"line": 5,
"column": 55
},
"end": {
"line": 5,
"column": 64
}
},
"name": "undefined"
}
}
],
"body": {
"type": "BlockStatement",
"start": 194,
"end": 525,
"loc": {
"start": {
"line": 5,
"column": 66
},
"end": {
"line": 17,
"column": 1
}
},
"body": [
{
"type": "ReturnStatement",
"start": 200,
"end": 523,
"loc": {
"start": {
"line": 6,
"column": 4
},
"end": {
"line": 16,
"column": 12
}
},
"argument": {
"type": "CallExpression",
"start": 207,
"end": 522,
"loc": {
"start": {
"line": 6,
"column": 11
},
"end": {
"line": 16,
"column": 11
}
},
"callee": {
"type": "MemberExpression",
"start": 207,
"end": 220,
"loc": {
"start": {
"line": 6,
"column": 11
},
"end": {
"line": 6,
"column": 24
}
},
"object": {
"type": "Identifier",
"start": 207,
"end": 213,
"loc": {
"start": {
"line": 6,
"column": 11
},
"end": {
"line": 6,
"column": 17
}
},
"name": "events"
},
"property": {
"type": "Identifier",
"start": 214,
"end": 220,
"loc": {
"start": {
"line": 6,
"column": 18
},
"end": {
"line": 6,
"column": 24
}
},
"name": "reduce"
},
"computed": false
},
"arguments": [
{
"type": "ArrowFunctionExpression",
"start": 221,
"end": 516,
"loc": {
"start": {
"line": 6,
"column": 25
},
"end": {
"line": 16,
"column": 5
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "Identifier",
"start": 222,
"end": 226,
"loc": {
"start": {
"line": 6,
"column": 26
},
"end": {
"line": 6,
"column": 30
}
},
"name": "prev"
},
{
"type": "Identifier",
"start": 228,
"end": 232,
"loc": {
"start": {
"line": 6,
"column": 32
},
"end": {
"line": 6,
"column": 36
}
},
"name": "name"
}
],
"body": {
"type": "BlockStatement",
"start": 237,
"end": 516,
"loc": {
"start": {
"line": 6,
"column": 41
},
"end": {
"line": 16,
"column": 5
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 247,
"end": 293,
"loc": {
"start": {
"line": 7,
"column": 8
},
"end": {
"line": 7,
"column": 54
}
},
"expression": {
"type": "CallExpression",
"start": 247,
"end": 292,
"loc": {
"start": {
"line": 7,
"column": 8
},
"end": {
"line": 7,
"column": 53
}
},
"callee": {
"type": "MemberExpression",
"start": 247,
"end": 267,
"loc": {
"start": {
"line": 7,
"column": 8
},
"end": {
"line": 7,
"column": 28
}
},
"object": {
"type": "Identifier",
"start": 247,
"end": 250,
"loc": {
"start": {
"line": 7,
"column": 8
},
"end": {
"line": 7,
"column": 11
}
},
"name": "dom"
},
"property": {
"type": "Identifier",
"start": 251,
"end": 267,
"loc": {
"start": {
"line": 7,
"column": 12
},
"end": {
"line": 7,
"column": 28
}
},
"name": "addEventListener"
},
"computed": false
},
"arguments": [
{
"type": "Identifier",
"start": 268,
"end": 272,
"loc": {
"start": {
"line": 7,
"column": 29
},
"end": {
"line": 7,
"column": 33
}
},
"name": "name"
},
{
"type": "Identifier",
"start": 274,
"end": 282,
"loc": {
"start": {
"line": 7,
"column": 35
},
"end": {
"line": 7,
"column": 43
}
},
"name": "listener"
},
{
"type": "Identifier",
"start": 284,
"end": 291,
"loc": {
"start": {
"line": 7,
"column": 45
},
"end": {
"line": 7,
"column": 52
}
},
"name": "options"
}
]
}
},
{
"type": "ReturnStatement",
"start": 302,
"end": 510,
"loc": {
"start": {
"line": 8,
"column": 8
},
"end": {
"line": 15,
"column": 10
}
},
"argument": {
"type": "ObjectExpression",
"start": 309,
"end": 509,
"loc": {
"start": {
"line": 8,
"column": 15
},
"end": {
"line": 15,
"column": 9
}
},
"properties": [
{
"type": "SpreadProperty",
"start": 323,
"end": 330,
"loc": {
"start": {
"line": 9,
"column": 12
},
"end": {
"line": 9,
"column": 19
}
},
"argument": {
"type": "Identifier",
"start": 326,
"end": 330,
"loc": {
"start": {
"line": 9,
"column": 15
},
"end": {
"line": 9,
"column": 19
}
},
"name": "prev"
}
},
{
"type": "Property",
"start": 344,
"end": 499,
"loc": {
"start": {
"line": 10,
"column": 12
},
"end": {
"line": 14,
"column": 13
}
},
"method": false,
"shorthand": false,
"computed": true,
"key": {
"type": "Identifier",
"start": 345,
"end": 349,
"loc": {
"start": {
"line": 10,
"column": 13
},
"end": {
"line": 10,
"column": 17
}
},
"name": "name"
},
"value": {
"type": "ObjectExpression",
"start": 352,
"end": 499,
"loc": {
"start": {
"line": 10,
"column": 20
},
"end": {
"line": 14,
"column": 13
}
},
"properties": [
{
"type": "Property",
"start": 370,
"end": 380,
"loc": {
"start": {
"line": 11,
"column": 16
},
"end": {
"line": 11,
"column": 26
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 370,
"end": 374,
"loc": {
"start": {
"line": 11,
"column": 16
},
"end": {
"line": 11,
"column": 20
}
},
"name": "type"
},
"value": {
"type": "Identifier",
"start": 376,
"end": 380,
"loc": {
"start": {
"line": 11,
"column": 22
},
"end": {
"line": 11,
"column": 26
}
},
"name": "name"
},
"kind": "init"
},
{
"type": "Property",
"start": 398,
"end": 414,
"loc": {
"start": {
"line": 12,
"column": 16
},
"end": {
"line": 12,
"column": 32
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 398,
"end": 407,
"loc": {
"start": {
"line": 12,
"column": 16
},
"end": {
"line": 12,
"column": 25
}
},
"name": "fulfilled"
},
"value": {
"type": "Literal",
"start": 409,
"end": 414,
"loc": {
"start": {
"line": 12,
"column": 27
},
"end": {
"line": 12,
"column": 32
}
},
"value": false,
"rawValue": false,
"raw": "false"
},
"kind": "init"
},
{
"type": "Property",
"start": 432,
"end": 485,
"loc": {
"start": {
"line": 13,
"column": 16
},
"end": {
"line": 13,
"column": 69
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 432,
"end": 438,
"loc": {
"start": {
"line": 13,
"column": 16
},
"end": {
"line": 13,
"column": 22
}
},
"name": "detach"
},
"value": {
"type": "ArrowFunctionExpression",
"start": 440,
"end": 485,
"loc": {
"start": {
"line": 13,
"column": 24
},
"end": {
"line": 13,
"column": 69
}
},
"id": null,
"generator": false,
"expression": true,
"async": false,
"params": [],
"body": {
"type": "CallExpression",
"start": 446,
"end": 485,
"loc": {
"start": {
"line": 13,
"column": 30
},
"end": {
"line": 13,
"column": 69
}
},
"callee": {
"type": "MemberExpression",
"start": 446,
"end": 469,
"loc": {
"start": {
"line": 13,
"column": 30
},
"end": {
"line": 13,
"column": 53
}
},
"object": {
"type": "Identifier",
"start": 446,
"end": 449,
"loc": {
"start": {
"line": 13,
"column": 30
},
"end": {
"line": 13,
"column": 33
}
},
"name": "dom"
},
"property": {
"type": "Identifier",
"start": 450,
"end": 469,
"loc": {
"start": {
"line": 13,
"column": 34
},
"end": {
"line": 13,
"column": 53
}
},
"name": "removeEventListener"
},
"computed": false
},
"arguments": [
{
"type": "Identifier",
"start": 470,
"end": 474,
"loc": {
"start": {
"line": 13,
"column": 54
},
"end": {
"line": 13,
"column": 58
}
},
"name": "name"
},
{
"type": "Identifier",
"start": 476,
"end": 484,
"loc": {
"start": {
"line": 13,
"column": 60
},
"end": {
"line": 13,
"column": 68
}
},
"name": "listener"
}
]
}
},
"kind": "init"
}
]
},
"kind": "init"
}
]
}
}
]
}
},
{
"type": "ObjectExpression",
"start": 518,
"end": 521,
"loc": {
"start": {
"line": 16,
"column": 7
},
"end": {
"line": 16,
"column": 10
}
},
"properties": []
}
]
}
}
]
}
},
{
"type": "ExportDefaultDeclaration",
"start": 527,
"end": 4781,
"loc": {
"start": {
"line": 19,
"column": 0
},
"end": {
"line": 144,
"column": 1
}
},
"declaration": {
"type": "ClassDeclaration",
"start": 542,
"end": 4781,
"loc": {
"start": {
"line": 19,
"column": 15
},
"end": {
"line": 144,
"column": 1
}
},
"id": {
"type": "Identifier",
"start": 548,
"end": 551,
"loc": {
"start": {
"line": 19,
"column": 21
},
"end": {
"line": 19,
"column": 24
}
},
"name": "Dom"
},
"superClass": null,
"body": {
"type": "ClassBody",
"start": 552,
"end": 4781,
"loc": {
"start": {
"line": 19,
"column": 25
},
"end": {
"line": 144,
"column": 1
}
},
"body": [
{
"type": "MethodDefinition",
"start": 558,
"end": 1720,
"loc": {
"start": {
"line": 20,
"column": 4
},
"end": {
"line": 56,
"column": 5
}
},
"computed": false,
"key": {
"type": "Identifier",
"start": 558,
"end": 569,
"loc": {
"start": {
"line": 20,
"column": 4
},
"end": {
"line": 20,
"column": 15
}
},
"name": "constructor"
},
"static": false,
"kind": "constructor",
"value": {
"type": "FunctionExpression",
"start": 569,
"end": 1720,
"loc": {
"start": {
"line": 20,
"column": 15
},
"end": {
"line": 56,
"column": 5
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "AssignmentPattern",
"start": 570,
"end": 604,
"loc": {
"start": {
"line": 20,
"column": 16
},
"end": {
"line": 20,
"column": 50
}
},
"operator": "=",
"left": {
"type": "Identifier",
"start": 570,
"end": 574,
"loc": {
"start": {
"line": 20,
"column": 16
},
"end": {
"line": 20,
"column": 20
}
},
"name": "view"
},
"right": {
"type": "CallExpression",
"start": 577,
"end": 604,
"loc": {
"start": {
"line": 20,
"column": 23
},
"end": {
"line": 20,
"column": 50
}
},
"callee": {
"type": "MemberExpression",
"start": 577,
"end": 586,
"loc": {
"start": {
"line": 20,
"column": 23
},
"end": {
"line": 20,
"column": 32
}
},
"object": {
"type": "Identifier",
"start": 577,
"end": 582,
"loc": {
"start": {
"line": 20,
"column": 23
},
"end": {
"line": 20,
"column": 28
}
},
"name": "Error"
},
"property": {
"type": "Identifier",
"start": 583,
"end": 586,
"loc": {
"start": {
"line": 20,
"column": 29
},
"end": {
"line": 20,
"column": 32
}
},
"name": "log"
},
"computed": false
},
"arguments": [
{
"type": "Literal",
"start": 587,
"end": 603,
"loc": {
"start": {
"line": 20,
"column": 33
},
"end": {
"line": 20,
"column": 49
}
},
"value": "View undefined",
"rawValue": "View undefined",
"raw": "\"View undefined\""
}
]
}
},
{
"type": "AssignmentPattern",
"start": 606,
"end": 619,
"loc": {
"start": {
"line": 20,
"column": 52
},
"end": {
"line": 20,
"column": 65
}
},
"operator": "=",
"left": {
"type": "Identifier",
"start": 606,
"end": 614,
"loc": {
"start": {
"line": 20,
"column": 52
},
"end": {
"line": 20,
"column": 60
}
},
"name": "handlers"
},
"right": {
"type": "ObjectExpression",
"start": 617,
"end": 619,
"loc": {
"start": {
"line": 20,
"column": 63
},
"end": {
"line": 20,
"column": 65
}
},
"properties": []
}
}
],
"body": {
"type": "BlockStatement",
"start": 621,
"end": 1720,
"loc": {
"start": {
"line": 20,
"column": 67
},
"end": {
"line": 56,
"column": 5
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 631,
"end": 648,
"loc": {
"start": {
"line": 21,
"column": 8
},
"end": {
"line": 21,
"column": 25
}
},
"expression": {
"type": "AssignmentExpression",
"start": 631,
"end": 647,
"loc": {
"start": {
"line": 21,
"column": 8
},
"end": {
"line": 21,
"column": 24
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 631,
"end": 640,
"loc": {
"start": {
"line": 21,
"column": 8
},
"end": {
"line": 21,
"column": 17
}
},
"object": {
"type": "ThisExpression",
"start": 631,
"end": 635,
"loc": {
"start": {
"line": 21,
"column": 8
},
"end": {
"line": 21,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"start": 636,
"end": 640,
"loc": {
"start": {
"line": 21,
"column": 13
},
"end": {
"line": 21,
"column": 17
}
},
"name": "view"
},
"computed": false
},
"right": {
"type": "Identifier",
"start": 643,
"end": 647,
"loc": {
"start": {
"line": 21,
"column": 20
},
"end": {
"line": 21,
"column": 24
}
},
"name": "view"
}
}
},
{
"type": "ExpressionStatement",
"start": 657,
"end": 683,
"loc": {
"start": {
"line": 22,
"column": 8
},
"end": {
"line": 22,
"column": 34
}
},
"expression": {
"type": "AssignmentExpression",
"start": 657,
"end": 682,
"loc": {
"start": {
"line": 22,
"column": 8
},
"end": {
"line": 22,
"column": 33
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 657,
"end": 668,
"loc": {
"start": {
"line": 22,
"column": 8
},
"end": {
"line": 22,
"column": 19
}
},
"object": {
"type": "ThisExpression",
"start": 657,
"end": 661,
"loc": {
"start": {
"line": 22,
"column": 8
},
"end": {
"line": 22,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"start": 662,
"end": 668,
"loc": {
"start": {
"line": 22,
"column": 13
},
"end": {
"line": 22,
"column": 19
}
},
"name": "canvas"
},
"computed": false
},
"right": {
"type": "MemberExpression",
"start": 671,
"end": 682,