UNPKG

awv3

Version:
1,455 lines (1,454 loc) 242 kB
{ "type": "Program", "start": 0, "end": 2419, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 69, "column": 0 } }, "sourceType": "module", "body": [ { "type": "ImportDeclaration", "start": 0, "end": 23, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 23 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 7, "end": 8, "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 8 } }, "local": { "type": "Identifier", "start": 7, "end": 8, "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 8 } }, "name": "$" } } ], "importKind": "value", "source": { "type": "Literal", "start": 14, "end": 22, "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 22 } }, "value": "jquery", "rawValue": "jquery", "raw": "'jquery'" }, "trailingComments": [ { "type": "CommentLine", "value": " Thank you very much, Microsoft ...", "start": 25, "end": 62, "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 3, "column": 37 } }, "range": [ 25, 62 ] } ] }, { "type": "ExpressionStatement", "start": 63, "end": 81, "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 4, "column": 18 } }, "expression": { "type": "AssignmentExpression", "start": 63, "end": 80, "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 4, "column": 17 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 63, "end": 76, "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 4, "column": 13 } }, "object": { "type": "Identifier", "start": 63, "end": 69, "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 4, "column": 6 } }, "name": "window", "leadingComments": null }, "property": { "type": "Identifier", "start": 70, "end": 76, "loc": { "start": { "line": 4, "column": 7 }, "end": { "line": 4, "column": 13 } }, "name": "jQuery" }, "computed": false, "leadingComments": null }, "right": { "type": "Identifier", "start": 79, "end": 80, "loc": { "start": { "line": 4, "column": 16 }, "end": { "line": 4, "column": 17 } }, "name": "$" }, "leadingComments": null }, "leadingComments": [ { "type": "CommentLine", "value": " Thank you very much, Microsoft ...", "start": 25, "end": 62, "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 3, "column": 37 } }, "range": [ 25, 62 ] } ] }, { "type": "ExpressionStatement", "start": 82, "end": 111, "loc": { "start": { "line": 4, "column": 19 }, "end": { "line": 4, "column": 48 } }, "expression": { "type": "CallExpression", "start": 82, "end": 110, "loc": { "start": { "line": 4, "column": 19 }, "end": { "line": 4, "column": 47 } }, "callee": { "type": "Identifier", "start": 82, "end": 89, "loc": { "start": { "line": 4, "column": 19 }, "end": { "line": 4, "column": 26 } }, "name": "require" }, "arguments": [ { "type": "Literal", "start": 90, "end": 109, "loc": { "start": { "line": 4, "column": 27 }, "end": { "line": 4, "column": 46 } }, "value": "ms-signalr-client", "rawValue": "ms-signalr-client", "raw": "'ms-signalr-client'" } ] } }, { "type": "ExportDefaultDeclaration", "start": 113, "end": 2418, "loc": { "start": { "line": 6, "column": 0 }, "end": { "line": 68, "column": 1 } }, "declaration": { "type": "FunctionDeclaration", "start": 128, "end": 2418, "loc": { "start": { "line": 6, "column": 15 }, "end": { "line": 68, "column": 1 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [ { "type": "Identifier", "start": 137, "end": 142, "loc": { "start": { "line": 6, "column": 24 }, "end": { "line": 6, "column": 29 } }, "name": "scope" } ], "body": { "type": "BlockStatement", "start": 144, "end": 2418, "loc": { "start": { "line": 6, "column": 31 }, "end": { "line": 68, "column": 1 } }, "body": [ { "type": "VariableDeclaration", "start": 150, "end": 174, "loc": { "start": { "line": 7, "column": 4 }, "end": { "line": 7, "column": 28 } }, "declarations": [ { "type": "VariableDeclarator", "start": 154, "end": 173, "loc": { "start": { "line": 7, "column": 8 }, "end": { "line": 7, "column": 27 } }, "id": { "type": "Identifier", "start": 154, "end": 161, "loc": { "start": { "line": 7, "column": 8 }, "end": { "line": 7, "column": 15 } }, "name": "signalR" }, "init": { "type": "MemberExpression", "start": 164, "end": 173, "loc": { "start": { "line": 7, "column": 18 }, "end": { "line": 7, "column": 27 } }, "object": { "type": "Identifier", "start": 164, "end": 165, "loc": { "start": { "line": 7, "column": 18 }, "end": { "line": 7, "column": 19 } }, "name": "$" }, "property": { "type": "Identifier", "start": 166, "end": 173, "loc": { "start": { "line": 7, "column": 20 }, "end": { "line": 7, "column": 27 } }, "name": "signalR" }, "computed": false } } ], "kind": "var" }, { "type": "FunctionDeclaration", "start": 179, "end": 325, "loc": { "start": { "line": 8, "column": 4 }, "end": { "line": 12, "column": 5 } }, "id": { "type": "Identifier", "start": 188, "end": 205, "loc": { "start": { "line": 8, "column": 13 }, "end": { "line": 8, "column": 30 } }, "name": "makeProxyCallback" }, "generator": false, "expression": false, "async": false, "params": [ { "type": "Identifier", "start": 206, "end": 209, "loc": { "start": { "line": 8, "column": 31 }, "end": { "line": 8, "column": 34 } }, "name": "hub" }, { "type": "Identifier", "start": 211, "end": 219, "loc": { "start": { "line": 8, "column": 36 }, "end": { "line": 8, "column": 44 } }, "name": "callback" } ], "body": { "type": "BlockStatement", "start": 221, "end": 325, "loc": { "start": { "line": 8, "column": 46 }, "end": { "line": 12, "column": 5 } }, "body": [ { "type": "ReturnStatement", "start": 231, "end": 319, "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 11, "column": 10 } }, "argument": { "type": "FunctionExpression", "start": 238, "end": 318, "loc": { "start": { "line": 9, "column": 15 }, "end": { "line": 11, "column": 9 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [], "body": { "type": "BlockStatement", "start": 250, "end": 318, "loc": { "start": { "line": 9, "column": 27 }, "end": { "line": 11, "column": 9 } }, "body": [ { "type": "ExpressionStatement", "start": 264, "end": 308, "loc": { "start": { "line": 10, "column": 12 }, "end": { "line": 10, "column": 56 } }, "expression": { "type": "CallExpression", "start": 264, "end": 307, "loc": { "start": { "line": 10, "column": 12 }, "end": { "line": 10, "column": 55 } }, "callee": { "type": "MemberExpression", "start": 264, "end": 278, "loc": { "start": { "line": 10, "column": 12 }, "end": { "line": 10, "column": 26 } }, "object": { "type": "Identifier", "start": 264, "end": 272, "loc": { "start": { "line": 10, "column": 12 }, "end": { "line": 10, "column": 20 } }, "name": "callback" }, "property": { "type": "Identifier", "start": 273, "end": 278, "loc": { "start": { "line": 10, "column": 21 }, "end": { "line": 10, "column": 26 } }, "name": "apply" }, "computed": false }, "arguments": [ { "type": "Identifier", "start": 279, "end": 282, "loc": { "start": { "line": 10, "column": 27 }, "end": { "line": 10, "column": 30 } }, "name": "hub" }, { "type": "CallExpression", "start": 284, "end": 306, "loc": { "start": { "line": 10, "column": 32 }, "end": { "line": 10, "column": 54 } }, "callee": { "type": "MemberExpression", "start": 284, "end": 295, "loc": { "start": { "line": 10, "column": 32 }, "end": { "line": 10, "column": 43 } }, "object": { "type": "Identifier", "start": 284, "end": 285, "loc": { "start": { "line": 10, "column": 32 }, "end": { "line": 10, "column": 33 } }, "name": "$" }, "property": { "type": "Identifier", "start": 286, "end": 295, "loc": { "start": { "line": 10, "column": 34 }, "end": { "line": 10, "column": 43 } }, "name": "makeArray" }, "computed": false }, "arguments": [ { "type": "Identifier", "start": 296, "end": 305, "loc": { "start": { "line": 10, "column": 44 }, "end": { "line": 10, "column": 53 } }, "name": "arguments" } ] } ] } } ] } } } ] } }, { "type": "FunctionDeclaration", "start": 331, "end": 1259, "loc": { "start": { "line": 14, "column": 4 }, "end": { "line": 39, "column": 5 } }, "id": { "type": "Identifier", "start": 340, "end": 358, "loc": { "start": { "line": 14, "column": 13 }, "end": { "line": 14, "column": 31 } }, "name": "registerHubProxies" }, "generator": false, "expression": false, "async": false, "params": [ { "type": "Identifier", "start": 359, "end": 367, "loc": { "start": { "line": 14, "column": 32 }, "end": { "line": 14, "column": 40 } }, "name": "instance" }, { "type": "Identifier", "start": 369, "end": 384, "loc": { "start": { "line": 14, "column": 42 }, "end": { "line": 14, "column": 57 } }, "name": "shouldSubscribe" } ], "body": { "type": "BlockStatement", "start": 386, "end": 1259, "loc": { "start": { "line": 14, "column": 59 }, "end": { "line": 39, "column": 5 } }, "body": [ { "type": "VariableDeclaration", "start": 396, "end": 453, "loc": { "start": { "line": 15, "column": 8 }, "end": { "line": 15, "column": 65 } }, "declarations": [ { "type": "VariableDeclarator", "start": 400, "end": 403, "loc": { "start": { "line": 15, "column": 12 }, "end": { "line": 15, "column": 15 } }, "id": { "type": "Identifier", "start": 400, "end": 403, "loc": { "start": { "line": 15, "column": 12 }, "end": { "line": 15, "column": 15 } }, "name": "key" }, "init": null }, { "type": "VariableDeclarator", "start": 405, "end": 408, "loc": { "start": { "line": 15, "column": 17 }, "end": { "line": 15, "column": 20 } }, "id": { "type": "Identifier", "start": 405, "end": 408, "loc": { "start": { "line": 15, "column": 17 }, "end": { "line": 15, "column": 20 } }, "name": "hub" }, "init": null }, { "type": "VariableDeclarator", "start": 410, "end": 419, "loc": { "start": { "line": 15, "column": 22 }, "end": { "line": 15, "column": 31 } }, "id": { "type": "Identifier", "start": 410, "end": 419, "loc": { "start": { "line": 15, "column": 22 }, "end": { "line": 15, "column": 31 } }, "name": "memberKey" }, "init": null }, { "type": "VariableDeclarator", "start": 421, "end": 432, "loc": { "start": { "line": 15, "column": 33 }, "end": { "line": 15, "column": 44 } }, "id": { "type": "Identifier", "start": 421, "end": 432, "loc": { "start": { "line": 15, "column": 33 }, "end": { "line": 15, "column": 44 } }, "name": "memberValue" }, "init": null }, { "type": "VariableDeclarator", "start": 434, "end": 452, "loc": { "start": { "line": 15, "column": 46 }, "end": { "line": 15, "column": 64 } }, "id": { "type": "Identifier", "start": 434, "end": 452, "loc": { "start": { "line": 15, "column": 46 }, "end": { "line": 15, "column": 64 } }, "name": "subscriptionMethod" }, "init": null } ], "kind": "var" }, { "type": "ForInStatement", "start": 462, "end": 1253, "loc": { "start": { "line": 16, "column": 8 }, "end": { "line": 38, "column": 9 } }, "left": { "type": "Identifier", "start": 467, "end": 470, "loc": { "start": { "line": 16, "column": 13 }, "end": { "line": 16, "column": 16 } }, "name": "key" }, "right": { "type": "Identifier", "start": 474, "end": 482, "loc": { "start": { "line": 16, "column": 20 }, "end": { "line": 16, "column": 28 } }, "name": "instance" }, "body": { "type": "BlockStatement", "start": 484, "end": 1253, "loc": { "start": { "line": 16, "column": 30 }, "end": { "line": 38, "column": 9 } }, "body": [ { "type": "IfStatement", "start": 498, "end": 1243, "loc": { "start": { "line": 17, "column": 12 }, "end": { "line": 37, "column": 13 } }, "test": { "type": "CallExpression", "start": 502, "end": 530, "loc": { "start": { "line": 17, "column": 16 }, "end": { "line": 17, "column": 44 } }, "callee": { "type": "MemberExpression", "start": 502, "end": 525, "loc": { "start": { "line": 17, "column": 16 }, "end": { "line": 17, "column": 39 } }, "object": { "type": "Identifier", "start": 502, "end": 510, "loc": { "start": { "line": 17, "column": 16 }, "end": { "line": 17, "column": 24 } }, "name": "instance" }, "property": { "type": "Identifier", "start": 511, "end": 525, "loc": { "start": { "line": 17, "column": 25 }, "end": { "line": 17, "column": 39 } }, "name": "hasOwnProperty" }, "computed": false }, "arguments": [ { "type": "Identifier", "start": 526, "end": 529, "loc": { "start": { "line": 17, "column": 40 }, "end": { "line": 17, "column": 43 } }, "name": "key" } ] }, "consequent": { "type": "BlockStatement", "start": 532, "end": 1243, "loc": { "start": { "line": 17, "column": 46 }, "end": { "line": 37, "column": 13 } }, "body": [ { "type": "ExpressionStatement", "start": 550, "end": 570, "loc": { "start": { "line": 18, "column": 16 }, "end": { "line": 18, "column": 36 } }, "expression": { "type": "AssignmentExpression", "start": 550, "end": 569, "loc": { "start": { "line": 18, "column": 16 }, "end": { "line": 18, "column": 35 } }, "operator": "=", "left": { "type": "Identifier", "start": 550, "end": 553, "loc": { "start": { "line": 18, "column": 16 }, "end": { "line": 18, "column": 19 } }, "name": "hub" }, "right": { "type": "MemberExpression", "start": 556, "end": 569, "loc": { "start": { "line": 18, "column": 22 }, "end": { "line": 18, "column": 35 } }, "object": { "type": "Identifier", "start": 556, "end": 564, "loc": { "start": { "line": 18, "column": 22 }, "end": { "line": 18, "column": 30 } }, "name": "instance" }, "property": { "type": "Identifier", "start": 565, "end": 568, "loc": { "start": { "line": 18, "column": 31 }, "end": { "line": 18, "column": 34 } }, "name": "key" }, "computed": true } } }, { "type": "IfStatement", "start": 588, "end": 637, "loc": { "start": { "line": 20, "column": 16 }, "end": { "line": 21, "column": 29 } }, "test": { "type": "UnaryExpression", "start": 592, "end": 606, "loc": { "start": { "line": 20, "column": 20 }, "end": { "line": 20, "column": 34 } }, "operator": "!", "prefix": true, "argument": { "type": "MemberExpression", "start": 594, "end": 605, "loc": { "start": { "line": 20, "column": 22 }, "end": { "line": 20, "column": 33 } }, "object": { "type": "Identifier", "start": 594, "end": 597, "loc": { "start": { "line": 20, "column": 22 }, "end": { "line": 20, "column": 25 } }, "name": "hub" }, "property": { "type": "Identifier", "start": 598, "end": 605, "loc": { "start": { "line": 20, "column": 26 }, "end": { "line": 20, "column": 33 } }, "name": "hubName" }, "computed": false, "parenthesizedExpression": true } }, "consequent": { "type": "ContinueStatement", "start": 628, "end": 637, "loc": { "start": { "line": 21, "column": 20 }, "end": { "line": 21, "column": 29 } }, "label": null }, "alternate": null }, { "type": "IfStatement", "start": 655, "end": 819, "loc": { "start": { "line": 23, "column": 16 }, "end": { "line": 27, "column": 17 } }, "test": { "type": "Identifier", "start": 659, "end": 674, "loc": { "start": { "line": 23, "column": 20 }, "end": { "line": 23, "column": 35 } }, "name": "shouldSubscribe" }, "consequent": { "type": "BlockStatement", "start": 676, "end": 744, "loc": { "start": { "line": 23, "column": 37 }, "end": { "line": 25, "column": 17 } }, "body": [ { "type": "ExpressionStatement", "start": 698, "end": 726, "loc": { "start": { "line": 24, "column": 20 }, "end": { "line": 24, "column": 48 } }, "expression": { "type": "AssignmentExpression", "start": 698, "end": 725,