UNPKG

awv3

Version:
1,587 lines (1,586 loc) 158 kB
{ "type": "File", "start": 0, "end": 914, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 28, "column": 0 } }, "program": { "type": "Program", "start": 0, "end": 914, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 28, "column": 0 } }, "sourceType": "module", "body": [ { "type": "ImportDeclaration", "start": 0, "end": 53, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 53 } }, "specifiers": [ { "type": "ImportNamespaceSpecifier", "start": 7, "end": 26, "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 26 } }, "local": { "type": "Identifier", "start": 12, "end": 26, "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 26 }, "identifierName": "ConstraintType" }, "name": "ConstraintType" } } ], "source": { "type": "StringLiteral", "start": 32, "end": 52, "loc": { "start": { "line": 1, "column": 32 }, "end": { "line": 1, "column": 52 } }, "extra": { "rawValue": "../constraint/type", "raw": "'../constraint/type'" }, "value": "../constraint/type" } }, { "type": "ImportDeclaration", "start": 54, "end": 82, "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 2, "column": 28 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 61, "end": 66, "loc": { "start": { "line": 2, "column": 7 }, "end": { "line": 2, "column": 12 } }, "local": { "type": "Identifier", "start": 61, "end": 66, "loc": { "start": { "line": 2, "column": 7 }, "end": { "line": 2, "column": 12 }, "identifierName": "Point" }, "name": "Point" } } ], "source": { "type": "StringLiteral", "start": 72, "end": 81, "loc": { "start": { "line": 2, "column": 18 }, "end": { "line": 2, "column": 27 } }, "extra": { "rawValue": "./point", "raw": "'./point'" }, "value": "./point" } }, { "type": "ImportDeclaration", "start": 83, "end": 109, "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 3, "column": 26 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 90, "end": 94, "loc": { "start": { "line": 3, "column": 7 }, "end": { "line": 3, "column": 11 } }, "local": { "type": "Identifier", "start": 90, "end": 94, "loc": { "start": { "line": 3, "column": 7 }, "end": { "line": 3, "column": 11 }, "identifierName": "Line" }, "name": "Line" } } ], "source": { "type": "StringLiteral", "start": 100, "end": 108, "loc": { "start": { "line": 3, "column": 17 }, "end": { "line": 3, "column": 25 } }, "extra": { "rawValue": "./line", "raw": "'./line'" }, "value": "./line" } }, { "type": "ImportDeclaration", "start": 110, "end": 134, "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 4, "column": 24 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 117, "end": 120, "loc": { "start": { "line": 4, "column": 7 }, "end": { "line": 4, "column": 10 } }, "local": { "type": "Identifier", "start": 117, "end": 120, "loc": { "start": { "line": 4, "column": 7 }, "end": { "line": 4, "column": 10 }, "identifierName": "Arc" }, "name": "Arc" } } ], "source": { "type": "StringLiteral", "start": 126, "end": 133, "loc": { "start": { "line": 4, "column": 16 }, "end": { "line": 4, "column": 23 } }, "extra": { "rawValue": "./arc", "raw": "'./arc'" }, "value": "./arc" } }, { "type": "ImportDeclaration", "start": 135, "end": 165, "loc": { "start": { "line": 5, "column": 0 }, "end": { "line": 5, "column": 30 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 142, "end": 148, "loc": { "start": { "line": 5, "column": 7 }, "end": { "line": 5, "column": 13 } }, "local": { "type": "Identifier", "start": 142, "end": 148, "loc": { "start": { "line": 5, "column": 7 }, "end": { "line": 5, "column": 13 }, "identifierName": "Circle" }, "name": "Circle" } } ], "source": { "type": "StringLiteral", "start": 154, "end": 164, "loc": { "start": { "line": 5, "column": 19 }, "end": { "line": 5, "column": 29 } }, "extra": { "rawValue": "./circle", "raw": "'./circle'" }, "value": "./circle" } }, { "type": "ImportDeclaration", "start": 166, "end": 196, "loc": { "start": { "line": 6, "column": 0 }, "end": { "line": 6, "column": 30 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 173, "end": 179, "loc": { "start": { "line": 6, "column": 7 }, "end": { "line": 6, "column": 13 } }, "local": { "type": "Identifier", "start": 173, "end": 179, "loc": { "start": { "line": 6, "column": 7 }, "end": { "line": 6, "column": 13 }, "identifierName": "Sketch" }, "name": "Sketch" } } ], "source": { "type": "StringLiteral", "start": 185, "end": 195, "loc": { "start": { "line": 6, "column": 19 }, "end": { "line": 6, "column": 29 } }, "extra": { "rawValue": "./sketch", "raw": "'./sketch'" }, "value": "./sketch" } }, { "type": "ImportDeclaration", "start": 197, "end": 235, "loc": { "start": { "line": 7, "column": 0 }, "end": { "line": 7, "column": 38 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 204, "end": 214, "loc": { "start": { "line": 7, "column": 7 }, "end": { "line": 7, "column": 17 } }, "local": { "type": "Identifier", "start": 204, "end": 214, "loc": { "start": { "line": 7, "column": 7 }, "end": { "line": 7, "column": 17 }, "identifierName": "Constraint" }, "name": "Constraint" } } ], "source": { "type": "StringLiteral", "start": 220, "end": 234, "loc": { "start": { "line": 7, "column": 23 }, "end": { "line": 7, "column": 37 } }, "extra": { "rawValue": "./constraint", "raw": "'./constraint'" }, "value": "./constraint" } }, { "type": "ExportDefaultDeclaration", "start": 237, "end": 780, "loc": { "start": { "line": 9, "column": 0 }, "end": { "line": 24, "column": 1 } }, "declaration": { "type": "FunctionDeclaration", "start": 252, "end": 780, "loc": { "start": { "line": 9, "column": 15 }, "end": { "line": 24, "column": 1 } }, "id": { "type": "Identifier", "start": 261, "end": 269, "loc": { "start": { "line": 9, "column": 24 }, "end": { "line": 9, "column": 32 }, "identifierName": "Graphics" }, "name": "Graphics" }, "generator": false, "expression": false, "async": false, "params": [ { "type": "Identifier", "start": 270, "end": 274, "loc": { "start": { "line": 9, "column": 33 }, "end": { "line": 9, "column": 37 }, "identifierName": "name" }, "name": "name" }, { "type": "RestElement", "start": 276, "end": 283, "loc": { "start": { "line": 9, "column": 39 }, "end": { "line": 9, "column": 46 } }, "argument": { "type": "Identifier", "start": 279, "end": 283, "loc": { "start": { "line": 9, "column": 42 }, "end": { "line": 9, "column": 46 }, "identifierName": "args" }, "name": "args" } } ], "body": { "type": "BlockStatement", "start": 285, "end": 780, "loc": { "start": { "line": 9, "column": 48 }, "end": { "line": 24, "column": 1 } }, "body": [ { "type": "SwitchStatement", "start": 291, "end": 630, "loc": { "start": { "line": 10, "column": 4 }, "end": { "line": 21, "column": 5 } }, "discriminant": { "type": "Identifier", "start": 299, "end": 303, "loc": { "start": { "line": 10, "column": 12 }, "end": { "line": 10, "column": 16 }, "identifierName": "name" }, "name": "name" }, "cases": [ { "type": "SwitchCase", "start": 315, "end": 370, "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 12, "column": 38 } }, "consequent": [ { "type": "ReturnStatement", "start": 344, "end": 370, "loc": { "start": { "line": 12, "column": 12 }, "end": { "line": 12, "column": 38 } }, "argument": { "type": "NewExpression", "start": 351, "end": 369, "loc": { "start": { "line": 12, "column": 19 }, "end": { "line": 12, "column": 37 } }, "callee": { "type": "Identifier", "start": 355, "end": 360, "loc": { "start": { "line": 12, "column": 23 }, "end": { "line": 12, "column": 28 }, "identifierName": "Point" }, "name": "Point" }, "arguments": [ { "type": "SpreadElement", "start": 361, "end": 368, "loc": { "start": { "line": 12, "column": 29 }, "end": { "line": 12, "column": 36 } }, "argument": { "type": "Identifier", "start": 364, "end": 368, "loc": { "start": { "line": 12, "column": 32 }, "end": { "line": 12, "column": 36 }, "identifierName": "args" }, "name": "args" } } ] } } ], "test": { "type": "StringLiteral", "start": 320, "end": 330, "loc": { "start": { "line": 11, "column": 13 }, "end": { "line": 11, "column": 23 } }, "extra": { "rawValue": "CC_Point", "raw": "'CC_Point'" }, "value": "CC_Point" } }, { "type": "SwitchCase", "start": 379, "end": 432, "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 14, "column": 37 } }, "consequent": [ { "type": "ReturnStatement", "start": 407, "end": 432, "loc": { "start": { "line": 14, "column": 12 }, "end": { "line": 14, "column": 37 } }, "argument": { "type": "NewExpression", "start": 414, "end": 431, "loc": { "start": { "line": 14, "column": 19 }, "end": { "line": 14, "column": 36 } }, "callee": { "type": "Identifier", "start": 418, "end": 422, "loc": { "start": { "line": 14, "column": 23 }, "end": { "line": 14, "column": 27 }, "identifierName": "Line" }, "name": "Line" }, "arguments": [ { "type": "SpreadElement", "start": 423, "end": 430, "loc": { "start": { "line": 14, "column": 28 }, "end": { "line": 14, "column": 35 } }, "argument": { "type": "Identifier", "start": 426, "end": 430, "loc": { "start": { "line": 14, "column": 31 }, "end": { "line": 14, "column": 35 }, "identifierName": "args" }, "name": "args" } } ] } } ], "test": { "type": "StringLiteral", "start": 384, "end": 393, "loc": { "start": { "line": 13, "column": 13 }, "end": { "line": 13, "column": 22 } }, "extra": { "rawValue": "CC_Line", "raw": "'CC_Line'" }, "value": "CC_Line" } }, { "type": "SwitchCase", "start": 441, "end": 492, "loc": { "start": { "line": 15, "column": 8 }, "end": { "line": 16, "column": 36 } }, "consequent": [ { "type": "ReturnStatement", "start": 468, "end": 492, "loc": { "start": { "line": 16, "column": 12 }, "end": { "line": 16, "column": 36 } }, "argument": { "type": "NewExpression", "start": 475, "end": 491, "loc": { "start": { "line": 16, "column": 19 }, "end": { "line": 16, "column": 35 } }, "callee": { "type": "Identifier", "start": 479, "end": 482, "loc": { "start": { "line": 16, "column": 23 }, "end": { "line": 16, "column": 26 }, "identifierName": "Arc" }, "name": "Arc" }, "arguments": [ { "type": "SpreadElement", "start": 483, "end": 490, "loc": { "start": { "line": 16, "column": 27 }, "end": { "line": 16, "column": 34 } }, "argument": { "type": "Identifier", "start": 486, "end": 490, "loc": { "start": { "line": 16, "column": 30 }, "end": { "line": 16, "column": 34 }, "identifierName": "args" }, "name": "args" } } ] } } ], "test": { "type": "StringLiteral", "start": 446, "end": 454, "loc": { "start": { "line": 15, "column": 13 }, "end": { "line": 15, "column": 21 } }, "extra": { "rawValue": "CC_Arc", "raw": "'CC_Arc'" }, "value": "CC_Arc" } }, { "type": "SwitchCase", "start": 501, "end": 558, "loc": { "start": { "line": 17, "column": 8 }, "end": { "line": 18, "column": 39 } }, "consequent": [ { "type": "ReturnStatement", "start": 531, "end": 558, "loc": { "start": { "line": 18, "column": 12 }, "end": { "line": 18, "column": 39 } }, "argument": { "type": "NewExpression", "start": 538, "end": 557, "loc": { "start": { "line": 18, "column": 19 }, "end": { "line": 18, "column": 38 } }, "callee": { "type": "Identifier", "start": 542, "end": 548, "loc": { "start": { "line": 18, "column": 23 }, "end": { "line": 18, "column": 29 }, "identifierName": "Circle" }, "name": "Circle" }, "arguments": [ { "type": "SpreadElement", "start": 549, "end": 556, "loc": { "start": { "line": 18, "column": 30 }, "end": { "line": 18, "column": 37 } }, "argument": { "type": "Identifier", "start": 552, "end": 556, "loc": { "start": { "line": 18, "column": 33 }, "end": { "line": 18, "column": 37 }, "identifierName": "args" }, "name": "args" } } ] } } ], "test": { "type": "StringLiteral", "start": 506, "end": 517, "loc": { "start": { "line": 17, "column": 13 }, "end": { "line": 17, "column": 24 } }, "extra": { "rawValue": "CC_Circle", "raw": "'CC_Circle'" }, "value": "CC_Circle" } }, { "type": "SwitchCase", "start": 567, "end": 624, "loc": { "start": { "line": 19, "column": 8 }, "end": { "line": 20, "column": 39 } }, "consequent": [ { "type": "ReturnStatement", "start": 597, "end": 624, "loc": { "start": { "line": 20, "column": 12 }, "end": { "line": 20, "column": 39 } }, "argument": { "type": "NewExpression", "start": 604, "end": 623, "loc": { "start": { "line": 20, "column": 19 }, "end": { "line": 20, "column": 38 } }, "callee": { "type": "Identifier", "start": 608, "end": 614, "loc": { "start": { "line": 20, "column": 23 }, "end": { "line": 20, "column": 29 }, "identifierName": "Sketch" }, "name": "Sketch" }, "arguments": [ { "type": "SpreadElement", "start": 615, "end": 622, "loc": { "start": { "line": 20, "column": 30 }, "end": { "line": 20, "column": 37 } }, "argument": { "type": "Identifier", "start": 618, "end": 622, "loc": { "start": { "line": 20, "column": 33 }, "end": { "line": 20, "column": 37 }, "identifierName": "args" }, "name": "args" } } ] } } ], "test": { "type": "StringLiteral", "start": 572, "end": 583, "loc": { "start": { "line": 19, "column": 13 }, "end": { "line": 19, "column": 24 } }, "extra": { "rawValue": "CC_Sketch", "raw": "'CC_Sketch'" }, "value": "CC_Sketch" } } ] }, { "type": "IfStatement", "start": 635, "end": 778, "loc": { "start": { "line": 22, "column": 4 }, "end": { "line": 23, "column": 110 } }, "test": { "type": "CallExpression", "start": 639, "end": 666, "loc": { "start": { "line": 22, "column": 8 }, "end": { "line": 22, "column": 35 } }, "callee": { "type": "MemberExpression", "start": 639, "end": 652, "loc": { "start": { "line": 22, "column": 8 }, "end": { "line": 22, "column": 21 } }, "object": { "type": "Identifier", "start": 639, "end": 643, "loc": { "start": { "line": 22, "column": 8 }, "end": { "line": 22, "column": 12 }, "identifierName": "name" }, "name": "name" }, "property": { "type": "Identifier", "start": 644, "end": 652, "loc": { "start": { "line": 22, "column": 13 }, "end": { "line": 22, "column": 21 }, "identifierName": "endsWith" }, "name": "endsWith" }, "computed": false }, "arguments": [ { "type": "StringLiteral", "start": 653, "end": 665, "loc": { "start": { "line": 22, "column": 22 }, "end": { "line": 22, "column": 34 } }, "extra": { "rawValue": "Constraint", "raw": "'Constraint'" }, "value": "Constraint" } ] }, "consequent": { "type": "IfStatement", "start": 676, "end": 778, "loc": { "start": { "line": 23, "column": 8 }, "end": { "line": 23, "column": 110 } }, "test": { "type": "UnaryExpression", "start": 680, "end": 752, "loc": { "start": { "line": 23, "column": 12 }, "end": { "line": 23, "column": 84 } }, "operator": "!", "prefix": true, "argument": { "type": "MemberExpression", "start": 681, "end": 752, "loc": { "start": { "line": 23, "column": 13 }, "end": { "line": 23, "column": 84 } }, "object": { "type": "CallExpression", "start": 681, "end": 739, "loc": { "start": { "line": 23, "column": 13 }, "end": { "line": 23, "column": 71 } }, "callee": { "type": "MemberExpression", "start": 681, "end": 715, "loc": { "start": { "line": 23, "column": 13 }, "end": { "line": 23, "column": 47 } }, "object": { "type": "CallExpression", "start": 681, "end": 710, "loc": { "start": { "line": 23, "column": 13 }, "end": { "line": 23, "column": 42 } }, "callee": { "type": "MemberExpression", "start": 681, "end": 694, "loc": { "start": { "line": 23, "column": 13 }, "end": { "line": 23, "column": 26 } }, "object": { "type": "Identifier", "start": 681, "end": 687, "loc": { "start": { "line": 23, "column": 13 }, "end": { "line": 23, "column": 19 }, "identifierName": "Object" }, "name": "Object" }, "property": { "type": "Identifier", "start": 688, "end": 694, "loc": { "start": { "line": 23, "column": 20 }, "end": { "line": 23, "column": 26 }, "identifierName": "values" }, "name": "values" }, "computed": false }, "arguments": [ { "type": "Identifier", "start": 695, "end": 709, "loc": { "start": { "line": 23, "column": 27 }, "end": { "line": 23, "column": 41 }, "identifierName": "ConstraintType" }, "name": "ConstraintType" } ] }, "property": { "type": "Identifier", "start": 711, "end": 715, "loc": { "start": { "line": 23, "column": 43 }, "end": { "line": 23, "column": 47 }, "identifierName": "find" }, "name": "find" }, "computed": false }, "arguments": [ { "type": "ArrowFunctionExpression", "start": 716, "end": 738, "loc": { "start": { "line": 23, "column": 48 }, "end": { "line": 23, "column": 70 } }, "id": null, "generator": false, "expression": true, "async": false, "params": [ { "type": "Identifier", "start": 716, "end": 718, "loc": { "start": { "line": 23, "column": 48 }, "end": { "line": 23, "column": 50 }, "identifierName": "ct" }, "name": "ct" } ], "body": { "type": "BinaryExpression", "start": 722, "end": 738, "loc": { "start": { "line": 23, "column": 54 }, "end": { "line": 23, "column": 70 } }, "left": { "type": "MemberExpression", "start": 722, "end": 729, "loc": { "start": { "line": 23,