soocrate-core
Version:
this is the core of soocrate application
1,544 lines (1,543 loc) • 132 kB
JSON
{
"type": "File",
"start": 0,
"end": 768,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 30,
"column": 19
}
},
"program": {
"type": "Program",
"start": 0,
"end": 768,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 30,
"column": 19
}
},
"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": 14,
"loc": {
"start": {
"line": 1,
"column": 7
},
"end": {
"line": 1,
"column": 14
}
},
"local": {
"type": "Identifier",
"start": 7,
"end": 14,
"loc": {
"start": {
"line": 1,
"column": 7
},
"end": {
"line": 1,
"column": 14
},
"identifierName": "VEditor"
},
"name": "VEditor"
}
}
],
"source": {
"type": "StringLiteral",
"start": 20,
"end": 38,
"loc": {
"start": {
"line": 1,
"column": 20
},
"end": {
"line": 1,
"column": 38
}
},
"extra": {
"rawValue": "./view/editor.js",
"raw": "'./view/editor.js'"
},
"value": "./view/editor.js"
}
},
{
"type": "ImportDeclaration",
"start": 40,
"end": 74,
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 2,
"column": 34
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 47,
"end": 52,
"loc": {
"start": {
"line": 2,
"column": 7
},
"end": {
"line": 2,
"column": 12
}
},
"local": {
"type": "Identifier",
"start": 47,
"end": 52,
"loc": {
"start": {
"line": 2,
"column": 7
},
"end": {
"line": 2,
"column": 12
},
"identifierName": "VLink"
},
"name": "VLink"
}
}
],
"source": {
"type": "StringLiteral",
"start": 58,
"end": 74,
"loc": {
"start": {
"line": 2,
"column": 18
},
"end": {
"line": 2,
"column": 34
}
},
"extra": {
"rawValue": "./view/link.js",
"raw": "'./view/link.js'"
},
"value": "./view/link.js"
}
},
{
"type": "ImportDeclaration",
"start": 76,
"end": 126,
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 3,
"column": 50
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 83,
"end": 96,
"loc": {
"start": {
"line": 3,
"column": 7
},
"end": {
"line": 3,
"column": 20
}
},
"local": {
"type": "Identifier",
"start": 83,
"end": 96,
"loc": {
"start": {
"line": 3,
"column": 7
},
"end": {
"line": 3,
"column": 20
},
"identifierName": "VStatesHeader"
},
"name": "VStatesHeader"
}
}
],
"source": {
"type": "StringLiteral",
"start": 102,
"end": 126,
"loc": {
"start": {
"line": 3,
"column": 26
},
"end": {
"line": 3,
"column": 50
}
},
"extra": {
"rawValue": "./view/statesheader.js",
"raw": "'./view/statesheader.js'"
},
"value": "./view/statesheader.js"
}
},
{
"type": "ImportDeclaration",
"start": 128,
"end": 184,
"loc": {
"start": {
"line": 4,
"column": 0
},
"end": {
"line": 4,
"column": 56
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 135,
"end": 148,
"loc": {
"start": {
"line": 4,
"column": 7
},
"end": {
"line": 4,
"column": 20
}
},
"local": {
"type": "Identifier",
"start": 135,
"end": 148,
"loc": {
"start": {
"line": 4,
"column": 7
},
"end": {
"line": 4,
"column": 20
},
"identifierName": "CStatesHeader"
},
"name": "CStatesHeader"
}
}
],
"source": {
"type": "StringLiteral",
"start": 154,
"end": 184,
"loc": {
"start": {
"line": 4,
"column": 26
},
"end": {
"line": 4,
"column": 56
}
},
"extra": {
"rawValue": "./controller/statesheader.js",
"raw": "'./controller/statesheader.js'"
},
"value": "./controller/statesheader.js"
}
},
{
"type": "ImportDeclaration",
"start": 186,
"end": 230,
"loc": {
"start": {
"line": 5,
"column": 0
},
"end": {
"line": 5,
"column": 44
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 193,
"end": 200,
"loc": {
"start": {
"line": 5,
"column": 7
},
"end": {
"line": 5,
"column": 14
}
},
"local": {
"type": "Identifier",
"start": 193,
"end": 200,
"loc": {
"start": {
"line": 5,
"column": 7
},
"end": {
"line": 5,
"column": 14
},
"identifierName": "CEditor"
},
"name": "CEditor"
}
}
],
"source": {
"type": "StringLiteral",
"start": 206,
"end": 230,
"loc": {
"start": {
"line": 5,
"column": 20
},
"end": {
"line": 5,
"column": 44
}
},
"extra": {
"rawValue": "./controller/editor.js",
"raw": "'./controller/editor.js'"
},
"value": "./controller/editor.js"
}
},
{
"type": "Identifier",
"start": 234,
"end": 745,
"loc": {
"start": {
"line": 7,
"column": 0
},
"end": {
"line": 28,
"column": 1
}
},
"id": {
"type": "Identifier",
"start": 240,
"end": 244,
"loc": {
"start": {
"line": 7,
"column": 6
},
"end": {
"line": 7,
"column": 10
},
"identifierName": "view"
},
"name": "view"
},
"superClass": null,
"body": {
"type": "ClassBody",
"start": 245,
"end": 745,
"loc": {
"start": {
"line": 7,
"column": 11
},
"end": {
"line": 28,
"column": 1
}
},
"body": [
{
"type": "ClassMethod",
"start": 252,
"end": 742,
"loc": {
"start": {
"line": 8,
"column": 4
},
"end": {
"line": 27,
"column": 5
}
},
"static": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 252,
"end": 263,
"loc": {
"start": {
"line": 8,
"column": 4
},
"end": {
"line": 8,
"column": 15
},
"identifierName": "constructor"
},
"name": "constructor"
},
"kind": "constructor",
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "Identifier",
"start": 264,
"end": 271,
"loc": {
"start": {
"line": 8,
"column": 16
},
"end": {
"line": 8,
"column": 23
},
"identifierName": "options"
},
"name": "options"
},
{
"type": "Identifier",
"start": 273,
"end": 278,
"loc": {
"start": {
"line": 8,
"column": 25
},
"end": {
"line": 8,
"column": 30
},
"identifierName": "model"
},
"name": "model"
}
],
"body": {
"type": "BlockStatement",
"start": 280,
"end": 742,
"loc": {
"start": {
"line": 8,
"column": 32
},
"end": {
"line": 27,
"column": 5
}
},
"body": [
{
"type": "VariableDeclaration",
"start": 328,
"end": 388,
"loc": {
"start": {
"line": 11,
"column": 8
},
"end": {
"line": 11,
"column": 68
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 334,
"end": 388,
"loc": {
"start": {
"line": 11,
"column": 14
},
"end": {
"line": 11,
"column": 68
}
},
"id": {
"type": "Identifier",
"start": 334,
"end": 336,
"loc": {
"start": {
"line": 11,
"column": 14
},
"end": {
"line": 11,
"column": 16
},
"identifierName": "ce"
},
"name": "ce",
"leadingComments": null
},
"init": {
"type": "NewExpression",
"start": 339,
"end": 388,
"loc": {
"start": {
"line": 11,
"column": 19
},
"end": {
"line": 11,
"column": 68
}
},
"callee": {
"type": "Identifier",
"start": 343,
"end": 350,
"loc": {
"start": {
"line": 11,
"column": 23
},
"end": {
"line": 11,
"column": 30
},
"identifierName": "CEditor"
},
"name": "CEditor"
},
"arguments": [
{
"type": "Identifier",
"start": 351,
"end": 356,
"loc": {
"start": {
"line": 11,
"column": 31
},
"end": {
"line": 11,
"column": 36
},
"identifierName": "model"
},
"name": "model"
},
{
"type": "MemberExpression",
"start": 358,
"end": 387,
"loc": {
"start": {
"line": 11,
"column": 38
},
"end": {
"line": 11,
"column": 67
}
},
"object": {
"type": "MemberExpression",
"start": 358,
"end": 382,
"loc": {
"start": {
"line": 11,
"column": 38
},
"end": {
"line": 11,
"column": 62
}
},
"object": {
"type": "Identifier",
"start": 358,
"end": 365,
"loc": {
"start": {
"line": 11,
"column": 38
},
"end": {
"line": 11,
"column": 45
},
"identifierName": "options"
},
"name": "options"
},
"property": {
"type": "Identifier",
"start": 366,
"end": 382,
"loc": {
"start": {
"line": 11,
"column": 46
},
"end": {
"line": 11,
"column": 62
},
"identifierName": "signalingOptions"
},
"name": "signalingOptions"
},
"computed": false
},
"property": {
"type": "Identifier",
"start": 383,
"end": 387,
"loc": {
"start": {
"line": 11,
"column": 63
},
"end": {
"line": 11,
"column": 67
},
"identifierName": "room"
},
"name": "room"
},
"computed": false
}
]
},
"leadingComments": null
}
],
"kind": "const",
"leadingComments": [
{
"type": "CommentLine",
"value": " #2 initialize the view",
"start": 291,
"end": 316,
"loc": {
"start": {
"line": 9,
"column": 8
},
"end": {
"line": 9,
"column": 33
}
}
}
]
},
{
"type": "VariableDeclaration",
"start": 400,
"end": 454,
"loc": {
"start": {
"line": 13,
"column": 8
},
"end": {
"line": 13,
"column": 62
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 406,
"end": 454,
"loc": {
"start": {
"line": 13,
"column": 14
},
"end": {
"line": 13,
"column": 62
}
},
"id": {
"type": "Identifier",
"start": 406,
"end": 409,
"loc": {
"start": {
"line": 13,
"column": 14
},
"end": {
"line": 13,
"column": 17
},
"identifierName": "vsh"
},
"name": "vsh"
},
"init": {
"type": "NewExpression",
"start": 412,
"end": 454,
"loc": {
"start": {
"line": 13,
"column": 20
},
"end": {
"line": 13,
"column": 62
}
},
"callee": {
"type": "Identifier",
"start": 416,
"end": 429,
"loc": {
"start": {
"line": 13,
"column": 24
},
"end": {
"line": 13,
"column": 37
},
"identifierName": "VStatesHeader"
},
"name": "VStatesHeader"
},
"arguments": [
{
"type": "Identifier",
"start": 430,
"end": 435,
"loc": {
"start": {
"line": 13,
"column": 38
},
"end": {
"line": 13,
"column": 43
},
"identifierName": "model"
},
"name": "model"
},
{
"type": "CallExpression",
"start": 437,
"end": 453,
"loc": {
"start": {
"line": 13,
"column": 45
},
"end": {
"line": 13,
"column": 61
}
},
"callee": {
"type": "Identifier",
"start": 437,
"end": 443,
"loc": {
"start": {
"line": 13,
"column": 45
},
"end": {
"line": 13,
"column": 51
},
"identifierName": "jQuery"
},
"name": "jQuery"
},
"arguments": [
{
"type": "StringLiteral",
"start": 444,
"end": 452,
"loc": {
"start": {
"line": 13,
"column": 52
},
"end": {
"line": 13,
"column": 60
}
},
"extra": {
"rawValue": "#state",
"raw": "\"#state\""
},
"value": "#state"
}
]
}
]
}
}
],
"kind": "const"
},
{
"type": "VariableDeclaration",
"start": 478,
"end": 522,
"loc": {
"start": {
"line": 17,
"column": 8
},
"end": {
"line": 17,
"column": 52
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 484,
"end": 522,
"loc": {
"start": {
"line": 17,
"column": 14
},
"end": {
"line": 17,
"column": 52
}
},
"id": {
"type": "Identifier",
"start": 484,
"end": 486,
"loc": {
"start": {
"line": 17,
"column": 14
},
"end": {
"line": 17,
"column": 16
},
"identifierName": "vl"
},
"name": "vl"
},
"init": {
"type": "NewExpression",
"start": 489,
"end": 522,
"loc": {
"start": {
"line": 17,
"column": 19
},
"end": {
"line": 17,
"column": 52
}
},
"callee": {
"type": "Identifier",
"start": 493,
"end": 498,
"loc": {
"start": {
"line": 17,
"column": 23
},
"end": {
"line": 17,
"column": 28
},
"identifierName": "VLink"
},
"name": "VLink"
},
"arguments": [
{
"type": "CallExpression",
"start": 499,
"end": 521,
"loc": {
"start": {
"line": 17,
"column": 29
},
"end": {
"line": 17,
"column": 51
}
},
"callee": {
"type": "Identifier",
"start": 499,
"end": 505,
"loc": {
"start": {
"line": 17,
"column": 29
},
"end": {
"line": 17,
"column": 35
},
"identifierName": "jQuery"
},
"name": "jQuery"
},
"arguments": [
{
"type": "StringLiteral",
"start": 506,
"end": 520,
"loc": {
"start": {
"line": 17,
"column": 36
},
"end": {
"line": 17,
"column": 50
}
},
"extra": {
"rawValue": "#sharinglink",
"raw": "\"#sharinglink\""
},
"value": "#sharinglink"
}
]
}
]
}
}
],
"kind": "const"
},
{
"type": "VariableDeclaration",
"start": 542,
"end": 574,
"loc": {
"start": {
"line": 20,
"column": 8
},
"end": {
"line": 20,
"column": 40
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 548,
"end": 574,
"loc": {
"start": {
"line": 20,
"column": 14
},
"end": {
"line": 20,
"column": 40
}
},
"id": {
"type": "Identifier",
"start": 548,
"end": 551,
"loc": {
"start": {
"line": 20,
"column": 14
},
"end": {
"line": 20,
"column": 17
},
"identifierName": "vsb"
},
"name": "vsb"
},
"init": {
"type": "CallExpression",
"start": 554,
"end": 574,
"loc": {
"start": {
"line": 20,
"column": 20
},
"end": {
"line": 20,
"column": 40
}
},
"callee": {
"type": "Identifier",
"start": 554,
"end": 560,
"loc": {
"start": {
"line": 20,
"column": 20
},
"end": {
"line": 20,
"column": 26
},
"identifierName": "jQuery"
},
"name": "jQuery"
},
"arguments": [
{
"type": "StringLiteral",
"start": 561,
"end": 573,
"loc": {
"start": {
"line": 20,
"column": 27
},
"end": {
"line": 20,
"column": 39
}
},
"extra": {
"rawValue": "#shareicon",
"raw": "\"#shareicon\""
},
"value": "#shareicon"
}
]
}
}
],
"kind": "const"
},
{
"type": "VariableDeclaration",
"start": 578,
"end": 628,
"loc": {
"start": {
"line": 21,
"column": 2
},
"end": {
"line": 21,
"column": 52
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 584,
"end": 628,
"loc": {
"start": {
"line": 21,
"column": 8
},
"end": {
"line": 21,
"column": 52
}
},
"id": {
"type": "Identifier",
"start": 584,
"end": 587,
"loc": {
"start": {
"line": 21,
"column": 8
},
"end": {
"line": 21,
"column": 11
},
"identifierName": "csh"
},
"name": "csh"
},
"init": {
"type": "NewExpression",
"start": 590,
"end": 628,
"loc": {
"start": {
"line": 21,
"column": 14
},
"end": {
"line": 21,
"column": 52
}
},
"callee": {
"type": "Identifier",
"start": 594,
"end": 607,
"loc": {
"start": {
"line": 21,
"column": 18
},
"end": {
"line": 21,
"column": 31
},
"identifierName": "CStatesHeader"
},
"name": "CStatesHeader"
},
"arguments": [
{
"type": "Identifier",
"start": 608,
"end": 613,
"loc": {
"start": {
"line": 21,
"column": 32
},
"end": {
"line": 21,
"column": 37
},
"identifierName": "model"
},
"name": "model"
},
{
"type": "Identifier",
"start": 615,
"end": 618,
"loc": {
"start": {
"line": 21,
"column": 39
},
"end": {
"line": 21,
"column": 42
},
"identifierName": "vsh"
},
"name": "vsh"
},
{
"type": "Identifier",
"start": 620,
"end": 622,
"loc": {
"start": {
"line": 21,
"column": 44
},
"end": {
"line": 21,
"column": 46
},
"identifierName": "vl"
},
"name": "vl"
},
{
"type": "Identifier",
"start": 624,
"end": 627,
"loc": {
"start": {
"line": 21,
"column": 48
},
"end": {
"line": 21,
"column": 51
},
"identifierName": "vsb"
},
"name": "vsb"
}
],
"trailingComments": null
},
"trailingComments": null
}
],
"kind": "const",
"trailingComments": [
{
"type": "CommentLine",
"value": " #3 initialize the controllers",
"start": 638,
"end": 670,
"loc": {
"start": {
"line": 22,
"column": 8
},
"end": {
"line": 22,
"column": 40
}
}
},
{
"type": "CommentLine",
"value": " model, statesView, linkView, shareView){",
"start": 680,
"end": 723,
"loc": {
"start": {
"line": 23,
"column": 8
},
"end": {
"line": 23,
"column": 51
}
}
}
]
}
],
"directives": []
}
}
]
},
"name": "_",
"leadingComments": [],
"trailingComments": []
},
{
"type": "Identifier",
"start": 749,
"end": 768,
"loc": {
"start": {
"line": 30,
"column": 0
},
"end": {
"line": 30,
"column": 19
}
},
"declaration": {
"type": "Identifier",
"start": 764,
"end": 768,
"loc": {
"start": {
"line": 30,
"column": 15
},
"end": {
"line": 30,
"column": 19
},
"identifierName": "view"
},
"name": "view"
},
"name": "_",
"leadingComments": [],
"trailingComments": []
},
{
"type": "ExportDefaultDeclaration",
"start": 749,
"end": 768,
"loc": {
"start": {
"line": 30,
"column": 0
},
"end": {
"line": 30,
"column": 19
}
},
"declaration": {
"type": "ClassDeclaration",
"start": 234,
"end": 745,
"loc": {
"start": {
"line": 7,
"column": 0
},
"end": {
"line": 28,
"column": 1
}
},
"id": {
"type": "Identifier",
"start": 240,
"end": 244,
"loc": {
"start": {
"line": 7,
"column": 6
},
"end": {
"line": 7,
"column": 10
},
"identifierName": "view"
},
"name": "view"
},
"superClass": null,
"body": {
"type": "ClassBody",
"start": 245,
"end": 745,
"loc": {
"start": {
"line": 7,
"column": 11
},
"end": {
"line": 28,
"column": 1
}
},
"body": [
{
"type": "ClassMethod",
"start": 252,
"end": 742,
"loc": {
"start": {
"line": 8,
"column": 4
},
"end": {
"line": 27,
"column": 5
}
},
"static": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 252,
"end": 263,
"loc": {
"start": {
"line": 8,
"column": 4
},
"end": {
"line": 8,
"column": 15
},
"identifierName": "constructor"
},
"name": "constructor"
},
"kind": "constructor",
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "Identifier",
"start": 264,
"end": 271,
"loc": {
"start": {
"line": 8,
"column": 16
},
"end": {
"line": 8,
"column": 23
},
"identifierName": "options"
},
"name": "options"
},
{
"type": "Identifier",
"start": 273,
"end": 278,
"loc": {
"start": {
"line": 8,
"column": 25
},
"end": {
"line": 8,
"column": 30
},
"identifierName": "model"
},
"name": "model"
}
],
"body": {
"type": "BlockStatement",
"start": 280,
"end": 742,
"loc": {
"start": {
"line": 8,
"column": 32
},
"end": {
"line": 27,
"column": 5
}
},
"body": [
{
"type": "VariableDeclaration",
"start": 328,
"end": 388,
"loc": {
"start": {
"line": 11,
"column": 8
},
"end": {
"line": 11,
"column": 68
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 334,
"end": 388,
"loc": {
"start": {
"line": 11,
"column": 14
},
"end": {
"line": 11,
"column": 68
}
},
"id": {
"type": "Identifier",
"start": 334,
"end": 336,
"loc": {
"start": {
"line": 11,
"column": 14
},
"end": {
"line": 11,
"column": 16
},
"identifierName": "ce"
},
"name": "ce",
"leadingComments": null
},
"init": {