UNPKG

rizzo-next

Version:

The next generation of Lonely Planet's style guide and pattern library.

1,485 lines 140 kB
{ "type": "Program", "start": 0, "end": 716, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 35, "column": 0 } }, "sourceType": "module", "body": [ { "type": "ImportDeclaration", "start": 0, "end": 38, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 38 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 7, "end": 17, "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 17 } }, "local": { "type": "Identifier", "start": 7, "end": 17, "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 17 } }, "name": "Brightcove" } } ], "importKind": "value", "source": { "type": "Literal", "start": 23, "end": 37, "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 37 } }, "value": "./brightcove", "rawValue": "./brightcove", "raw": "\"./brightcove\"" } }, { "type": "ExpressionStatement", "start": 40, "end": 71, "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 3, "column": 31 } }, "expression": { "type": "CallExpression", "start": 40, "end": 70, "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 3, "column": 30 } }, "callee": { "type": "Identifier", "start": 40, "end": 47, "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 3, "column": 7 } }, "name": "require" }, "arguments": [ { "type": "Literal", "start": 48, "end": 69, "loc": { "start": { "line": 3, "column": 8 }, "end": { "line": 3, "column": 29 } }, "value": "./video_player.scss", "rawValue": "./video_player.scss", "raw": "\"./video_player.scss\"" } ] } }, { "type": "VariableDeclaration", "start": 73, "end": 97, "loc": { "start": { "line": 5, "column": 0 }, "end": { "line": 5, "column": 24 } }, "declarations": [ { "type": "VariableDeclarator", "start": 77, "end": 96, "loc": { "start": { "line": 5, "column": 4 }, "end": { "line": 5, "column": 23 } }, "id": { "type": "Identifier", "start": 77, "end": 84, "loc": { "start": { "line": 5, "column": 4 }, "end": { "line": 5, "column": 11 } }, "name": "players" }, "init": { "type": "NewExpression", "start": 87, "end": 96, "loc": { "start": { "line": 5, "column": 14 }, "end": { "line": 5, "column": 23 } }, "callee": { "type": "Identifier", "start": 91, "end": 94, "loc": { "start": { "line": 5, "column": 18 }, "end": { "line": 5, "column": 21 } }, "name": "Map" }, "arguments": [] } } ], "kind": "let" }, { "type": "ExpressionStatement", "start": 98, "end": 136, "loc": { "start": { "line": 6, "column": 0 }, "end": { "line": 6, "column": 38 } }, "expression": { "type": "CallExpression", "start": 98, "end": 135, "loc": { "start": { "line": 6, "column": 0 }, "end": { "line": 6, "column": 37 } }, "callee": { "type": "MemberExpression", "start": 98, "end": 109, "loc": { "start": { "line": 6, "column": 0 }, "end": { "line": 6, "column": 11 } }, "object": { "type": "Identifier", "start": 98, "end": 105, "loc": { "start": { "line": 6, "column": 0 }, "end": { "line": 6, "column": 7 } }, "name": "players" }, "property": { "type": "Identifier", "start": 106, "end": 109, "loc": { "start": { "line": 6, "column": 8 }, "end": { "line": 6, "column": 11 } }, "name": "set" }, "computed": false }, "arguments": [ { "type": "Literal", "start": 110, "end": 122, "loc": { "start": { "line": 6, "column": 12 }, "end": { "line": 6, "column": 24 } }, "value": "brightcove", "rawValue": "brightcove", "raw": "\"brightcove\"" }, { "type": "Identifier", "start": 124, "end": 134, "loc": { "start": { "line": 6, "column": 26 }, "end": { "line": 6, "column": 36 } }, "name": "Brightcove" } ] } }, { "type": "Identifier", "start": 138, "end": 692, "loc": { "start": { "line": 8, "column": 0 }, "end": { "line": 32, "column": 1 } }, "id": { "type": "Identifier", "start": 144, "end": 149, "loc": { "start": { "line": 8, "column": 6 }, "end": { "line": 8, "column": 11 } }, "name": "Video" }, "superClass": null, "body": { "type": "ClassBody", "start": 150, "end": 692, "loc": { "start": { "line": 8, "column": 12 }, "end": { "line": 32, "column": 1 } }, "body": [ { "type": "MethodDefinition", "start": 154, "end": 690, "loc": { "start": { "line": 9, "column": 2 }, "end": { "line": 31, "column": 3 } }, "computed": false, "key": { "type": "Identifier", "start": 161, "end": 170, "loc": { "start": { "line": 9, "column": 9 }, "end": { "line": 9, "column": 18 } }, "name": "addPlayer" }, "static": true, "kind": "method", "value": { "type": "FunctionExpression", "start": 170, "end": 690, "loc": { "start": { "line": 9, "column": 18 }, "end": { "line": 31, "column": 3 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [ { "type": "Identifier", "start": 171, "end": 178, "loc": { "start": { "line": 9, "column": 19 }, "end": { "line": 9, "column": 26 } }, "name": "element" }, { "type": "Identifier", "start": 180, "end": 184, "loc": { "start": { "line": 9, "column": 28 }, "end": { "line": 9, "column": 32 } }, "name": "done" }, { "type": "AssignmentPattern", "start": 186, "end": 203, "loc": { "start": { "line": 9, "column": 34 }, "end": { "line": 9, "column": 51 } }, "left": { "type": "Identifier", "start": 186, "end": 190, "loc": { "start": { "line": 9, "column": 34 }, "end": { "line": 9, "column": 38 } }, "name": "type" }, "right": { "type": "Literal", "start": 191, "end": 203, "loc": { "start": { "line": 9, "column": 39 }, "end": { "line": 9, "column": 51 } }, "value": "brightcove", "rawValue": "brightcove", "raw": "\"brightcove\"" } } ], "body": { "type": "BlockStatement", "start": 205, "end": 690, "loc": { "start": { "line": 9, "column": 53 }, "end": { "line": 31, "column": 3 } }, "body": [ { "type": "IfStatement", "start": 211, "end": 307, "loc": { "start": { "line": 10, "column": 4 }, "end": { "line": 14, "column": 5 } }, "test": { "type": "BinaryExpression", "start": 215, "end": 239, "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 32 } }, "left": { "type": "UnaryExpression", "start": 215, "end": 226, "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 19 } }, "operator": "typeof", "prefix": true, "argument": { "type": "Identifier", "start": 222, "end": 226, "loc": { "start": { "line": 10, "column": 15 }, "end": { "line": 10, "column": 19 } }, "name": "done" } }, "operator": "===", "right": { "type": "Literal", "start": 231, "end": 239, "loc": { "start": { "line": 10, "column": 24 }, "end": { "line": 10, "column": 32 } }, "value": "string", "rawValue": "string", "raw": "\"string\"" } }, "consequent": { "type": "BlockStatement", "start": 241, "end": 307, "loc": { "start": { "line": 10, "column": 34 }, "end": { "line": 14, "column": 5 } }, "body": [ { "type": "VariableDeclaration", "start": 249, "end": 264, "loc": { "start": { "line": 11, "column": 6 }, "end": { "line": 11, "column": 21 } }, "declarations": [ { "type": "VariableDeclarator", "start": 253, "end": 263, "loc": { "start": { "line": 11, "column": 10 }, "end": { "line": 11, "column": 20 } }, "id": { "type": "Identifier", "start": 253, "end": 256, "loc": { "start": { "line": 11, "column": 10 }, "end": { "line": 11, "column": 13 } }, "name": "tmp" }, "init": { "type": "Identifier", "start": 259, "end": 263, "loc": { "start": { "line": 11, "column": 16 }, "end": { "line": 11, "column": 20 } }, "name": "done" } } ], "kind": "let" }, { "type": "ExpressionStatement", "start": 271, "end": 283, "loc": { "start": { "line": 12, "column": 6 }, "end": { "line": 12, "column": 18 } }, "expression": { "type": "AssignmentExpression", "start": 271, "end": 282, "loc": { "start": { "line": 12, "column": 6 }, "end": { "line": 12, "column": 17 } }, "operator": "=", "left": { "type": "Identifier", "start": 271, "end": 275, "loc": { "start": { "line": 12, "column": 6 }, "end": { "line": 12, "column": 10 } }, "name": "done" }, "right": { "type": "Identifier", "start": 278, "end": 282, "loc": { "start": { "line": 12, "column": 13 }, "end": { "line": 12, "column": 17 } }, "name": "type" } } }, { "type": "ExpressionStatement", "start": 290, "end": 301, "loc": { "start": { "line": 13, "column": 6 }, "end": { "line": 13, "column": 17 } }, "expression": { "type": "AssignmentExpression", "start": 290, "end": 300, "loc": { "start": { "line": 13, "column": 6 }, "end": { "line": 13, "column": 16 } }, "operator": "=", "left": { "type": "Identifier", "start": 290, "end": 294, "loc": { "start": { "line": 13, "column": 6 }, "end": { "line": 13, "column": 10 } }, "name": "type" }, "right": { "type": "Identifier", "start": 297, "end": 300, "loc": { "start": { "line": 13, "column": 13 }, "end": { "line": 13, "column": 16 } }, "name": "tmp" } } } ] }, "alternate": null }, { "type": "ExpressionStatement", "start": 312, "end": 353, "loc": { "start": { "line": 15, "column": 4 }, "end": { "line": 15, "column": 45 } }, "expression": { "type": "AssignmentExpression", "start": 312, "end": 352, "loc": { "start": { "line": 15, "column": 4 }, "end": { "line": 15, "column": 44 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 312, "end": 324, "loc": { "start": { "line": 15, "column": 4 }, "end": { "line": 15, "column": 16 } }, "object": { "type": "ThisExpression", "start": 312, "end": 316, "loc": { "start": { "line": 15, "column": 4 }, "end": { "line": 15, "column": 8 } } }, "property": { "type": "Identifier", "start": 317, "end": 324, "loc": { "start": { "line": 15, "column": 9 }, "end": { "line": 15, "column": 16 } }, "name": "players" }, "computed": false }, "right": { "type": "LogicalExpression", "start": 327, "end": 352, "loc": { "start": { "line": 15, "column": 19 }, "end": { "line": 15, "column": 44 } }, "left": { "type": "MemberExpression", "start": 327, "end": 339, "loc": { "start": { "line": 15, "column": 19 }, "end": { "line": 15, "column": 31 } }, "object": { "type": "ThisExpression", "start": 327, "end": 331, "loc": { "start": { "line": 15, "column": 19 }, "end": { "line": 15, "column": 23 } } }, "property": { "type": "Identifier", "start": 332, "end": 339, "loc": { "start": { "line": 15, "column": 24 }, "end": { "line": 15, "column": 31 } }, "name": "players" }, "computed": false }, "operator": "||", "right": { "type": "NewExpression", "start": 343, "end": 352, "loc": { "start": { "line": 15, "column": 35 }, "end": { "line": 15, "column": 44 } }, "callee": { "type": "Identifier", "start": 347, "end": 350, "loc": { "start": { "line": 15, "column": 39 }, "end": { "line": 15, "column": 42 } }, "name": "Map" }, "arguments": [] } } } }, { "type": "VariableDeclaration", "start": 359, "end": 496, "loc": { "start": { "line": 17, "column": 4 }, "end": { "line": 20, "column": 11 } }, "declarations": [ { "type": "VariableDeclarator", "start": 363, "end": 400, "loc": { "start": { "line": 17, "column": 8 }, "end": { "line": 17, "column": 45 } }, "id": { "type": "Identifier", "start": 363, "end": 380, "loc": { "start": { "line": 17, "column": 8 }, "end": { "line": 17, "column": 25 } }, "name": "PlayerConstructor" }, "init": { "type": "CallExpression", "start": 383, "end": 400, "loc": { "start": { "line": 17, "column": 28 }, "end": { "line": 17, "column": 45 } }, "callee": { "type": "MemberExpression", "start": 383, "end": 394, "loc": { "start": { "line": 17, "column": 28 }, "end": { "line": 17, "column": 39 } }, "object": { "type": "Identifier", "start": 383, "end": 390, "loc": { "start": { "line": 17, "column": 28 }, "end": { "line": 17, "column": 35 } }, "name": "players" }, "property": { "type": "Identifier", "start": 391, "end": 394, "loc": { "start": { "line": 17, "column": 36 }, "end": { "line": 17, "column": 39 } }, "name": "get" }, "computed": false }, "arguments": [ { "type": "Identifier", "start": 395, "end": 399, "loc": { "start": { "line": 17, "column": 40 }, "end": { "line": 17, "column": 44 } }, "name": "type" } ] } }, { "type": "VariableDeclarator", "start": 410, "end": 495, "loc": { "start": { "line": 18, "column": 8 }, "end": { "line": 20, "column": 10 } }, "id": { "type": "Identifier", "start": 410, "end": 416, "loc": { "start": { "line": 18, "column": 8 }, "end": { "line": 18, "column": 14 } }, "name": "player" }, "init": { "type": "NewExpression", "start": 419, "end": 495, "loc": { "start": { "line": 18, "column": 17 }, "end": { "line": 20, "column": 10 } }, "callee": { "type": "Identifier", "start": 423, "end": 440, "loc": { "start": { "line": 18, "column": 21 }, "end": { "line": 18, "column": 38 } }, "name": "PlayerConstructor" }, "arguments": [ { "type": "ObjectExpression", "start": 441, "end": 494, "loc": { "start": { "line": 18, "column": 39 }, "end": { "line": 20, "column": 9 } }, "properties": [ { "type": "Property", "start": 453, "end": 484, "loc": { "start": { "line": 19, "column": 10 }, "end": { "line": 19, "column": 41 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 453, "end": 461, "loc": { "start": { "line": 19, "column": 10 }, "end": { "line": 19, "column": 18 } }, "name": "playerId" }, "value": { "type": "BinaryExpression", "start": 463, "end": 484, "loc": { "start": { "line": 19, "column": 20 }, "end": { "line": 19, "column": 41 } }, "left": { "type": "MemberExpression", "start": 463, "end": 480, "loc": { "start": { "line": 19, "column": 20 }, "end": { "line": 19, "column": 37 } }, "object": { "type": "MemberExpression", "start": 463, "end": 475, "loc": { "start": { "line": 19, "column": 20 }, "end": { "line": 19, "column": 32 } }, "object": { "type": "ThisExpression", "start": 463, "end": 467, "loc": { "start": { "line": 19, "column": 20 }, "end": { "line": 19, "column": 24 } } }, "property": { "type": "Identifier", "start": 468, "end": 475, "loc": { "start": { "line": 19, "column": 25 }, "end": { "line": 19, "column": 32 } }, "name": "players" }, "computed": false }, "property": { "type": "Identifier", "start": 476, "end": 480, "loc": { "start": { "line": 19, "column": 33 }, "end": { "line": 19, "column": 37 } }, "name": "size" }, "computed": false }, "operator": "+", "right": { "type": "Literal", "start": 483, "end": 484, "loc": { "start": { "line": 19, "column": 40 }, "end": { "line": 19, "column": 41 } }, "value": 1, "rawValue": 1, "raw": "1" } }, "kind": "init" } ] } ] } } ], "kind": "let" }, { "type": "ExpressionStatement", "start": 502, "end": 536, "loc": { "start": { "line": 22, "column": 4 }, "end": { "line": 22, "column": 38 } }, "expression": { "type": "CallExpression", "start": 502, "end": 535, "loc": { "start": { "line": 22, "column": 4 }, "end": { "line": 22, "column": 37 } }, "callee": { "type": "MemberExpression", "start": 502, "end": 518, "loc": { "start": { "line": 22, "column": 4 }, "end": { "line": 22, "column": 20 } }, "object": { "type": "MemberExpression", "start": 502, "end": 514, "loc": { "start": { "line": 22, "column": 4 }, "end": { "line": 22, "column": 16 } }, "object": { "type": "ThisExpression", "start": 502, "end": 506, "loc": { "start": { "line": 22, "column": 4 }, "end": { "line": 22, "column": 8 } } }, "property": { "type": "Identifier", "start": 507, "end": 514, "loc": { "start": { "line": 22, "column": 9 }, "end": { "line": 22, "column": 16 } }, "name": "players" }, "computed": false }, "property": { "type": "Identifier", "start": 515, "end": 518, "loc": { "start": { "line": 22, "column": 17 }, "end": { "line": 22, "column": 20 } }, "name": "set" }, "computed": false }, "arguments": [ { "type": "Identifier", "start": 519, "end": 526, "loc": { "start": { "line": 22, "column": 21 }, "end": { "line": 22, "column": 28 } }, "name": "eleme