├── config └── dev.env ├── .idea ├── .gitignore └── cytoscape.js-layout-service.iml ├── public ├── css │ ├── fonts │ │ ├── FontAwesome.otf │ │ ├── fontawesome-webfont.eot │ │ ├── fontawesome-webfont.ttf │ │ ├── fontawesome-webfont.woff │ │ ├── glyphicons-halflings-regular.eot │ │ ├── glyphicons-halflings-regular.ttf │ │ ├── glyphicons-halflings-regular.woff │ │ └── glyphicons-halflings-regular.woff2 │ ├── images │ │ ├── grid_background.gif │ │ ├── animated-overlay.gif │ │ ├── ui-icons_0B9BCD_256x240.png │ │ ├── ui-icons_1ABC9C_256x240.png │ │ ├── ui-icons_222222_256x240.png │ │ ├── ui-icons_228ef1_256x240.png │ │ ├── ui-icons_90B6CB_256x240.png │ │ ├── ui-icons_ef8c08_256x240.png │ │ ├── ui-icons_ffd27a_256x240.png │ │ ├── ui-icons_ffffff_256x240.png │ │ ├── ui-bg_flat_10_000000_40x100.png │ │ ├── ui-bg_glass_65_ffffff_1x400.png │ │ ├── ui-bg_glass_100_f6f6f6_1x400.png │ │ ├── ui-bg_glass_100_fdf5ce_1x400.png │ │ ├── ui-bg_gloss-wave_35_f6a828_500x100.png │ │ ├── ui-bg_diagonals-thick_18_b81900_40x40.png │ │ ├── ui-bg_diagonals-thick_20_666666_40x40.png │ │ ├── ui-bg_highlight-soft_100_eeeeee_1x100.png │ │ └── ui-bg_highlight-soft_75_ffe45c_1x100.png │ ├── bootstrap-colorpicker.min.css │ ├── my-style.css │ ├── cytoscape.js-panzoom.css │ ├── jquery-ui.theme.min.css │ ├── jquery-ui.structure.min.css │ └── font-awesome.min.css ├── js │ ├── IDGenerator.js │ ├── converter.json-to-graphml.js │ ├── utils.add-remove.js │ ├── cytoscape │ │ └── extensions │ │ │ └── ui │ │ │ └── cytoscape-panzoom.js │ ├── FileSaver.js │ ├── save-graph.code-workspace │ └── view_scripts │ │ ├── underscore-min.js │ │ ├── bootstrap-colorpicker.min.js │ │ └── backbone-min.js └── samples │ ├── sample16-compound-json.txt │ ├── sample2-simple-graphml.txt │ ├── sample1-simple-graphml.txt │ ├── sample7-simple-sbgnml.txt │ ├── sample4-simple-json.txt │ ├── sample17-simple-json-non-uniform-dimension.txt │ ├── sample9-compound-sbgnml.txt │ └── sample15-compound-json.txt ├── src ├── app.js └── index.js ├── .gitignore ├── LICENSE.md ├── package.json ├── tests ├── server.test.js ├── sampleRequest1.txt └── sampleRequest2.txt └── README.md /config/dev.env: -------------------------------------------------------------------------------- 1 | PORT = 5000 -------------------------------------------------------------------------------- /.idea/.gitignore: -------------------------------------------------------------------------------- 1 | # Default ignored files 2 | /shelf/ 3 | /workspace.xml 4 | # Editor-based HTTP Client requests 5 | /httpRequests/ 6 | -------------------------------------------------------------------------------- /public/css/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iVis-at-Bilkent/cytoscape.js-layout-service/HEAD/public/css/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /public/css/images/grid_background.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iVis-at-Bilkent/cytoscape.js-layout-service/HEAD/public/css/images/grid_background.gif -------------------------------------------------------------------------------- /public/css/images/animated-overlay.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iVis-at-Bilkent/cytoscape.js-layout-service/HEAD/public/css/images/animated-overlay.gif -------------------------------------------------------------------------------- /public/css/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iVis-at-Bilkent/cytoscape.js-layout-service/HEAD/public/css/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /public/css/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iVis-at-Bilkent/cytoscape.js-layout-service/HEAD/public/css/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /public/css/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iVis-at-Bilkent/cytoscape.js-layout-service/HEAD/public/css/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /public/css/images/ui-icons_0B9BCD_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iVis-at-Bilkent/cytoscape.js-layout-service/HEAD/public/css/images/ui-icons_0B9BCD_256x240.png -------------------------------------------------------------------------------- /public/css/images/ui-icons_1ABC9C_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iVis-at-Bilkent/cytoscape.js-layout-service/HEAD/public/css/images/ui-icons_1ABC9C_256x240.png -------------------------------------------------------------------------------- /public/css/images/ui-icons_222222_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iVis-at-Bilkent/cytoscape.js-layout-service/HEAD/public/css/images/ui-icons_222222_256x240.png -------------------------------------------------------------------------------- /public/css/images/ui-icons_228ef1_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iVis-at-Bilkent/cytoscape.js-layout-service/HEAD/public/css/images/ui-icons_228ef1_256x240.png -------------------------------------------------------------------------------- /public/css/images/ui-icons_90B6CB_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iVis-at-Bilkent/cytoscape.js-layout-service/HEAD/public/css/images/ui-icons_90B6CB_256x240.png -------------------------------------------------------------------------------- /public/css/images/ui-icons_ef8c08_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iVis-at-Bilkent/cytoscape.js-layout-service/HEAD/public/css/images/ui-icons_ef8c08_256x240.png -------------------------------------------------------------------------------- /public/css/images/ui-icons_ffd27a_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iVis-at-Bilkent/cytoscape.js-layout-service/HEAD/public/css/images/ui-icons_ffd27a_256x240.png -------------------------------------------------------------------------------- /public/css/images/ui-icons_ffffff_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iVis-at-Bilkent/cytoscape.js-layout-service/HEAD/public/css/images/ui-icons_ffffff_256x240.png -------------------------------------------------------------------------------- /public/css/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iVis-at-Bilkent/cytoscape.js-layout-service/HEAD/public/css/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /public/css/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iVis-at-Bilkent/cytoscape.js-layout-service/HEAD/public/css/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /public/css/images/ui-bg_flat_10_000000_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iVis-at-Bilkent/cytoscape.js-layout-service/HEAD/public/css/images/ui-bg_flat_10_000000_40x100.png -------------------------------------------------------------------------------- /public/css/images/ui-bg_glass_65_ffffff_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iVis-at-Bilkent/cytoscape.js-layout-service/HEAD/public/css/images/ui-bg_glass_65_ffffff_1x400.png -------------------------------------------------------------------------------- /public/css/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iVis-at-Bilkent/cytoscape.js-layout-service/HEAD/public/css/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /public/css/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iVis-at-Bilkent/cytoscape.js-layout-service/HEAD/public/css/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /public/css/images/ui-bg_glass_100_f6f6f6_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iVis-at-Bilkent/cytoscape.js-layout-service/HEAD/public/css/images/ui-bg_glass_100_f6f6f6_1x400.png -------------------------------------------------------------------------------- /public/css/images/ui-bg_glass_100_fdf5ce_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iVis-at-Bilkent/cytoscape.js-layout-service/HEAD/public/css/images/ui-bg_glass_100_fdf5ce_1x400.png -------------------------------------------------------------------------------- /src/app.js: -------------------------------------------------------------------------------- 1 | const {port, app} = require('./index.js'); 2 | 3 | module.exports = app.listen(process.env.PORT, () => { 4 | console.log("Listening on http://localhost:" + port); 5 | }); -------------------------------------------------------------------------------- /public/css/images/ui-bg_gloss-wave_35_f6a828_500x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iVis-at-Bilkent/cytoscape.js-layout-service/HEAD/public/css/images/ui-bg_gloss-wave_35_f6a828_500x100.png -------------------------------------------------------------------------------- /public/css/images/ui-bg_diagonals-thick_18_b81900_40x40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iVis-at-Bilkent/cytoscape.js-layout-service/HEAD/public/css/images/ui-bg_diagonals-thick_18_b81900_40x40.png -------------------------------------------------------------------------------- /public/css/images/ui-bg_diagonals-thick_20_666666_40x40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iVis-at-Bilkent/cytoscape.js-layout-service/HEAD/public/css/images/ui-bg_diagonals-thick_20_666666_40x40.png -------------------------------------------------------------------------------- /public/css/images/ui-bg_highlight-soft_100_eeeeee_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iVis-at-Bilkent/cytoscape.js-layout-service/HEAD/public/css/images/ui-bg_highlight-soft_100_eeeeee_1x100.png -------------------------------------------------------------------------------- /public/css/images/ui-bg_highlight-soft_75_ffe45c_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iVis-at-Bilkent/cytoscape.js-layout-service/HEAD/public/css/images/ui-bg_highlight-soft_75_ffe45c_1x100.png -------------------------------------------------------------------------------- /public/js/IDGenerator.js: -------------------------------------------------------------------------------- 1 | let count = 0; 2 | let pre = "_id_"; 3 | let post = "_"; 4 | function IDGenerator(){ 5 | } 6 | 7 | IDGenerator.generate = function(){ 8 | let res = pre + count + post; 9 | count++; 10 | return res; 11 | }; 12 | 13 | 14 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /node_modules 2 | /playground 3 | /forever 4 | .idea/compiler.xml 5 | .idea/copyright/profiles_settings.xml 6 | .idea/misc.xml 7 | cytoscape.js-layout-demo.iml 8 | .idea/encodings.xml 9 | .idea/workspace.xml 10 | .idea/modules.xml 11 | .idea/vcs.xml 12 | /playground 13 | /nbproject/private/ -------------------------------------------------------------------------------- /.idea/cytoscape.js-layout-service.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 iVis-at-Bilkent 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "cytoscape-web-service-final", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "dev": "env-cmd -f ./config/dev.env nodemon src/app.js -e html,js,css,txt", 8 | "debug": "node --inspect-brk src/app.js", 9 | "test": "env-cmd -f ./config/dev.env jest --watch", 10 | "start": "node src/app.js" 11 | }, 12 | "jest": { 13 | "testEnvironment": "node" 14 | }, 15 | "author": "", 16 | "license": "ISC", 17 | "dependencies": { 18 | "cytoscape": "^3.8.0", 19 | "cytoscape-avsdf": "*", 20 | "cytoscape-cise": "*", 21 | "cytoscape-cola": "*", 22 | "cytoscape-cose-bilkent": "^4.0.0", 23 | "cytoscape-dagre": "^2.2.2", 24 | "cytoscape-euler": "^1.2.1", 25 | "cytoscape-fcose": "*", 26 | "cytoscape-graphml": "^1.0.6", 27 | "cytoscape-klay": "^3.1.2", 28 | "express": "^4.17.1", 29 | "jquery": "^3.4.1", 30 | "jsdom": "^15.1.1", 31 | "nodemon": "^1.19.1", 32 | "sbgnml-to-cytoscape": "^4.0.4", 33 | "cors": "^2.8.5" 34 | }, 35 | "devDependencies": { 36 | "env-cmd": "^9.0.3", 37 | "jest": "^24.9.0", 38 | "supertest": "^4.0.2" 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /public/samples/sample16-compound-json.txt: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "group": "nodes", 4 | "data": { 5 | "id": "n0" 6 | }, 7 | "position": { 8 | "x": 173.49447644360816, 9 | "y": 75 10 | } 11 | }, 12 | { 13 | "group": "nodes", 14 | "data": { 15 | "width": 100, 16 | "height": 100, 17 | "parent": "n0", 18 | "id": "n1" 19 | }, 20 | "position": { 21 | "x": 138.49447644360816, 22 | "y": 75 23 | } 24 | }, 25 | { 26 | "group": "nodes", 27 | "data": { 28 | "width": 60, 29 | "height": 30, 30 | "parent": "n0", 31 | "id": "n2" 32 | }, 33 | "position": { 34 | "x": 228.49447644360816, 35 | "y": 40 36 | } 37 | }, 38 | { 39 | "group": "nodes", 40 | "data": { 41 | "width": 10, 42 | "id": "n3" 43 | }, 44 | "position": { 45 | "x": 20, 46 | "y": 85 47 | } 48 | }, 49 | { 50 | "group": "edges", 51 | "data": { 52 | "source": "n0", 53 | "target": "n3", 54 | "id": "e0" 55 | } 56 | } 57 | ] -------------------------------------------------------------------------------- /tests/server.test.js: -------------------------------------------------------------------------------- 1 | const request = require('supertest'); 2 | const app = require('../src/app'); 3 | const fs = require('fs'); 4 | const path = require('path'); 5 | 6 | let data, data1, data2; 7 | 8 | beforeEach(() => { 9 | console.log(path.resolve(__dirname, "./sampleRequest.txt")); 10 | 11 | data1 = fs.readFileSync(path.resolve(__dirname, "./sampleRequest1.txt"), 'utf8'); 12 | data2 = fs.readFileSync(path.resolve(__dirname, "./sampleRequest2.txt"), 'utf8'); 13 | }) 14 | 15 | test('Request to the server that should be accepted', async () => { 16 | await request(app) 17 | .post('/layout/graphml') 18 | .expect(200) 19 | .send(data1) 20 | .set('Accept', 'text/plain') 21 | .set('Content-Type', 'json'); 22 | }) 23 | 24 | test("Request to the server without body that shouldn't be accepted", async () => { 25 | await request(app) 26 | .post('/layout/graphml') 27 | .expect(500) 28 | .set('Accept', 'text/plain') 29 | .set('Content-Type', 'json'); 30 | }) 31 | 32 | test("Request to the server with correct file format that should be accepted", async() => { 33 | await request(app) 34 | .post('/layout/json') 35 | .expect(200) 36 | .send(data2) 37 | .set('Accept', 'text/plain') 38 | .set('Content-Type', 'json'); 39 | }) 40 | 41 | test("Request to the server with wrong file format that should not be accepted", async() => { 42 | await request(app) 43 | .post('/layout/sbgnml') 44 | .expect(500) 45 | .send(data2) 46 | .set('Accept', 'text/plain') 47 | .set('Content-Type', 'json'); 48 | }) 49 | -------------------------------------------------------------------------------- /public/samples/sample2-simple-graphml.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | yellow 5 | 6 | 7 | 8 | 9 | green 10 | 100.56108914098377 11 | 208.29033645074946 12 | 13 | 14 | 10 15 | 10 16 | 167.67245127762567 17 | 169.71445555298578 18 | 19 | 20 | 10 21 | 10 22 | blue 23 | 72.02913193870359 24 | 137.95693048031217 25 | 26 | 27 | red 28 | 139.8702776910818 29 | 99.18575348073682 30 | 31 | 32 | 20 33 | 20 34 | 25 35 | 81.12453021526721 36 | 37 | 38 | 25 39 | 25 40 | turquoise 41 | 89.06019253059503 42 | 27.5 43 | 44 | 45 | 1.0 46 | 47 | 48 | 1.0 49 | 50 | 51 | 2.0 52 | 53 | 54 | 55 | 56 | 57 | 1.1 58 | 59 | 60 | -------------------------------------------------------------------------------- /public/samples/sample1-simple-graphml.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 40 6 | 60 7 | 201.85189311015665 8 | 651.8939028876075 9 | 10 | 11 | 40 12 | 60 13 | 61.52641166827084 14 | 635.5925388376036 15 | 16 | 17 | 200 18 | 200 19 | 189.36804822769818 20 | 475.7819535160959 21 | 22 | 23 | 30 24 | 30 25 | 154.72855301549043 26 | 308.1120696819428 27 | 28 | 29 | 50 30 | 45 31 | 226.3645536780807 32 | 228.22586642175906 33 | 34 | 35 | 45 36 | 45 37 | 80.60190544676493 38 | 234.0054163665552 39 | 40 | 41 | 10 42 | 10 43 | 152.63007401184018 44 | 182.62967987442107 45 | 46 | 47 | 30 48 | 152.75533502866392 49 | 50 | 51 | 111.47192476497685 52 | 115.05433714147102 53 | 54 | 55 | 121.63541879667355 56 | 30 57 | 58 | 59 | 15 60 | 15 61 | 41.190890595326664 62 | 80.70511509363791 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | -------------------------------------------------------------------------------- /tests/sampleRequest1.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 40 6 | 60 7 | 201.85189311015665 8 | 651.8939028876075 9 | 10 | 11 | 40 12 | 60 13 | 61.52641166827084 14 | 635.5925388376036 15 | 16 | 17 | 200 18 | 200 19 | 189.36804822769818 20 | 475.7819535160959 21 | 22 | 23 | 30 24 | 30 25 | 154.72855301549043 26 | 308.1120696819428 27 | 28 | 29 | 50 30 | 45 31 | 226.3645536780807 32 | 228.22586642175906 33 | 34 | 35 | 45 36 | 45 37 | 80.60190544676493 38 | 234.0054163665552 39 | 40 | 41 | 10 42 | 10 43 | 152.63007401184018 44 | 182.62967987442107 45 | 46 | 47 | 30 48 | 152.75533502866392 49 | 50 | 51 | 111.47192476497685 52 | 115.05433714147102 53 | 54 | 55 | 121.63541879667355 56 | 30 57 | 58 | 59 | 15 60 | 15 61 | 41.190890595326664 62 | 80.70511509363791 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | { 79 | "name" : "fcose" 80 | } -------------------------------------------------------------------------------- /public/samples/sample7-simple-sbgnml.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 12 | 13 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /public/js/converter.json-to-graphml.js: -------------------------------------------------------------------------------- 1 | var handleNode = function (node, tabNum) { 2 | var txt = ""; 3 | var tabs = ""; 4 | for (var i = 0; i < tabNum; i++) 5 | tabs += "\t"; 6 | var oneMoreTab = tabs + "\t"; 7 | txt += tabs; 8 | txt += '\n'; 14 | 15 | txt += oneMoreTab; 16 | txt += '' + node.position("y") + '\n'; 17 | 18 | txt += oneMoreTab; 19 | txt += '' + node._private.style['height'].value + '\n'; 20 | 21 | txt += oneMoreTab; 22 | txt += '' + node._private.style['width'].value + '\n'; 23 | 24 | txt += oneMoreTab; 25 | txt += '' + node._private.style["background-color"].value[0] + " " + node._private.style["background-color"].value[1] + 26 | " " + node._private.style["background-color"].value[2] + '\n'; 27 | 28 | txt += oneMoreTab; 29 | txt += '' + node.data("name") + '\n'; 30 | 31 | txt += oneMoreTab; 32 | txt += '' + node._private.style["background-color"].value[0] + " " + node._private.style["background-color"].value[1] + 33 | " " + node._private.style["background-color"].value[2] + '\n'; 34 | 35 | txt += oneMoreTab; 36 | txt += '' + node.css("shape").substring(0,1).toUpperCase() + node.css("shape").substring(1,node.css("shape").length) + '\n'; 37 | 38 | 39 | 40 | 41 | var children = node.children(); 42 | if (children != null && children.length > 0) { 43 | txt += oneMoreTab; 44 | txt += '\n'; 46 | 47 | for (var i = 0; i < children.length; i++) { 48 | txt = txt + handleNode(children[i], tabNum + 2); 49 | } 50 | 51 | txt += oneMoreTab; 52 | txt += '\n'; 53 | } 54 | txt += tabs; 55 | txt += '\n'; 56 | return txt; 57 | }; 58 | 59 | 60 | var handleRootGraph = function () { 61 | var txt = ""; 62 | txt += "\n"; 63 | var orphans = cy.nodes().orphans(); 64 | for (var i = 0; i < orphans.length; i++) { 65 | txt = txt + handleNode(orphans[i], 2); 66 | } 67 | cy.edges().each(function () { 68 | txt = txt + "\n"; 69 | for (var i = 0; i < atts[2].length; i++) { 70 | txt += "" + this._private.data.x + "\n"; 71 | } 72 | txt += ""; 73 | }); 74 | txt += "\n" + "\n"; 75 | return txt; 76 | }; 77 | 78 | var jsonToGraphml = { 79 | createGraphml: function () { 80 | var self = this; 81 | var graphmlText = ""; 82 | 83 | //add headers 84 | graphmlText = graphmlText + "\n"; 85 | var objs = ['graph', 'node', 'edge']; 86 | for (var a = 0; a < 3; a++) { 87 | for (var i = 0; i < atts[a].length; i++) { 88 | graphmlText += "\n"; 89 | } 90 | } 91 | 92 | return graphmlText + handleRootGraph(); 93 | } 94 | }; -------------------------------------------------------------------------------- /public/js/utils.add-remove.js: -------------------------------------------------------------------------------- 1 | var addRemoveUtilities = { 2 | defaultsMap: {}, 3 | 4 | addNode: function (newNode) { 5 | var id_ = IDGenerator.generate(); 6 | 7 | var cssTemp = {}; 8 | cssTemp["content"] = newNode.name; 9 | cssTemp["background-color"] = newNode.color; 10 | cssTemp["shape"] = newNode.shape; 11 | cssTemp["width"] = newNode.w; 12 | cssTemp["height"] = newNode.h; 13 | cssTemp['border-color'] = newNode.borderColor; 14 | 15 | return cy.add({ 16 | group: "nodes", 17 | data: {id: id_, name: newNode.name, label: ''}, 18 | position: {x: newNode.x, y: newNode.y}, 19 | css: cssTemp 20 | }); 21 | }, 22 | 23 | removeNodes: function (nodes) { 24 | var removedEles = nodes.connectedEdges().remove(); 25 | var children = nodes.children(); 26 | if (children != null && children.length > 0) { 27 | removedEles = removedEles.union(this.removeNodes(children)); 28 | } 29 | var parents = nodes.parents(); 30 | removedEles = removedEles.union(nodes.remove()); 31 | cy.nodes().updateCompoundBounds(); 32 | return removedEles; 33 | }, 34 | 35 | addEdgeSelected: function (source, target) { 36 | if (cy.$("node:selected").length != 2) 37 | return; 38 | 39 | return cy.add({ 40 | group: "edges", 41 | data: { 42 | source: source, 43 | target: target, 44 | label: '' 45 | } 46 | }); 47 | }, 48 | 49 | 50 | addEdge: function (source, target, sbgnclass) { 51 | var defaultsMap = this.defaultsMap; 52 | var defaults = defaultsMap[sbgnclass]; 53 | var css = defaults ? { 54 | 'width': defaults['width'] 55 | } : {}; 56 | var eles = cy.add({ 57 | group: "edges", 58 | data: { 59 | source: source, 60 | target: target, 61 | sbgnclass: sbgnclass, 62 | label: '' 63 | }, 64 | css: css 65 | }); 66 | 67 | var newEdge = eles[eles.length - 1]; 68 | if (defaults && defaults['line-color']) { 69 | newEdge.data('lineColor', defaults['line-color']); 70 | } 71 | else { 72 | newEdge.data('lineColor', newEdge.css('line-color')); 73 | } 74 | newEdge.addClass('changeLineColor'); 75 | return newEdge; 76 | }, 77 | removeEdges: function (edges) { 78 | return edges.remove(); 79 | }, 80 | restoreEles: function (eles) { 81 | eles.restore(); 82 | return eles; 83 | }, 84 | removeElesSimply: function (eles) { 85 | cy.elements().unselect(); 86 | return eles.remove(); 87 | }, 88 | removeEles: function (eles) { 89 | cy.elements().unselect(); 90 | var edges = eles.edges(); 91 | var nodes = eles.nodes(); 92 | var removedEles = this.removeEdges(edges); 93 | removedEles = removedEles.union(this.removeNodes(nodes)); 94 | return removedEles; 95 | }, 96 | changeParent: function (nodes, oldParentId, newParentId) { 97 | var removedNodes = this.removeNodes(nodes); 98 | 99 | for (var i = 0; i < removedNodes.length; i++) { 100 | var removedNode = removedNodes[i]; 101 | var parentId = removedNode._private.data.parent; 102 | 103 | //Just alter the parent id of the nodesToMakeCompound 104 | if (parentId !== oldParentId || removedNode._private.data.source) { 105 | continue; 106 | } 107 | 108 | removedNode._private.data.parent = newParentId; 109 | if (removedNode._private.parent) { 110 | delete removedNode._private.parent; 111 | } 112 | } 113 | 114 | cy.add(removedNodes); 115 | cy.nodes().updateCompoundBounds(); 116 | } 117 | }; -------------------------------------------------------------------------------- /public/css/bootstrap-colorpicker.min.css: -------------------------------------------------------------------------------- 1 | .colorpicker-saturation{width:100px;height:100px;background-image:url(images/bootstrap-colorpicker/saturation.png);cursor:crosshair;float:left}.colorpicker-saturation i{display:block;height:5px;width:5px;border:1px solid #000;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;position:absolute;top:0;left:0;margin:-4px 0 0 -4px}.colorpicker-saturation i b{display:block;height:5px;width:5px;border:1px solid #fff;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.colorpicker-alpha,.colorpicker-hue{width:15px;height:100px;float:left;cursor:row-resize;margin-left:4px;margin-bottom:4px}.colorpicker-alpha i,.colorpicker-hue i{display:block;height:1px;background:#000;border-top:1px solid #fff;position:absolute;top:0;left:0;width:100%;margin-top:-1px}.colorpicker-hue{background-image:url(images/bootstrap-colorpicker/hue.png)}.colorpicker-alpha{background-image:url(images/bootstrap-colorpicker/alpha.png);display:none}.colorpicker-alpha,.colorpicker-hue,.colorpicker-saturation{background-size:contain}.colorpicker{padding:4px;min-width:130px;margin-top:1px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;z-index:2500}.colorpicker:after,.colorpicker:before{display:table;content:"";line-height:0}.colorpicker:after{clear:both}.colorpicker:before{content:'';display:inline-block;border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:7px solid #ccc;border-bottom-color:rgba(0,0,0,.2);position:absolute;top:-7px;left:6px}.colorpicker:after{content:'';display:inline-block;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #fff;position:absolute;top:-6px;left:7px}.colorpicker div{position:relative}.colorpicker.colorpicker-with-alpha{min-width:140px}.colorpicker.colorpicker-with-alpha .colorpicker-alpha{display:block}.colorpicker-color{height:10px;margin-top:5px;clear:both;background-image:url(images/bootstrap-colorpicker/alpha.png);background-position:0 100%}.colorpicker-color div{height:10px}.colorpicker-selectors{display:none;height:10px;margin-top:5px;clear:both}.colorpicker-selectors i{cursor:pointer;float:left;height:10px;width:10px}.colorpicker-selectors i+i{margin-left:3px}.colorpicker-element .add-on i,.colorpicker-element .input-group-addon i{display:inline-block;cursor:pointer;height:16px;vertical-align:text-top;width:16px}.colorpicker.colorpicker-inline{position:relative;display:inline-block;float:none;z-index:auto}.colorpicker.colorpicker-horizontal{width:110px;min-width:110px;height:auto}.colorpicker.colorpicker-horizontal .colorpicker-saturation{margin-bottom:4px}.colorpicker.colorpicker-horizontal .colorpicker-color{width:100px}.colorpicker.colorpicker-horizontal .colorpicker-alpha,.colorpicker.colorpicker-horizontal .colorpicker-hue{width:100px;height:15px;float:left;cursor:col-resize;margin-left:0;margin-bottom:4px}.colorpicker.colorpicker-horizontal .colorpicker-alpha i,.colorpicker.colorpicker-horizontal .colorpicker-hue i{display:block;height:15px;background:#fff;position:absolute;top:0;left:0;width:1px;border:none;margin-top:0}.colorpicker.colorpicker-horizontal .colorpicker-hue{background-image:url(images/bootstrap-colorpicker/hue-horizontal.png)}.colorpicker.colorpicker-horizontal .colorpicker-alpha{background-image:url(images/bootstrap-colorpicker/alpha-horizontal.png)}.colorpicker.colorpicker-hidden{display:none}.colorpicker.colorpicker-visible{display:block}.colorpicker-inline.colorpicker-visible{display:inline-block}.colorpicker-right:before{left:auto;right:6px}.colorpicker-right:after{left:auto;right:7px}.colorpicker-no-arrow:before{border-right:0;border-left:0}.colorpicker-no-arrow:after{border-right:0;border-left:0} 2 | /*# sourceMappingURL=bootstrap-colorpicker.min.css.map */ -------------------------------------------------------------------------------- /public/css/my-style.css: -------------------------------------------------------------------------------- 1 | #cy { 2 | margin: auto; 3 | border: 1px solid #ddd; 4 | height: 680px; 5 | width: 1000px; 6 | overflow: auto !important; 7 | border-radius: 0.25em; 8 | } 9 | 10 | i.shortcut { 11 | font-size: 8px; 12 | color: #ddd; 13 | float: right; 14 | padding: 5px 0 0 0; 15 | } 16 | .cy-panzoom { 17 | position: relative!important; 18 | float: right; 19 | margin-right: 5%; 20 | } 21 | .right-caret { 22 | border-bottom: 4px solid transparent; 23 | border-top: 4px solid transparent; 24 | border-left: 4px solid #000000; 25 | display: inline-block; 26 | height: 0; 27 | opacity:0.3; 28 | vertical-align: middle; 29 | width: 0; 30 | } 31 | .open > .dropdown-menu { 32 | animation-name: slidenavAnimation; 33 | animation-duration:.3s; 34 | animation-iteration-count: 1; 35 | animation-timing-function: ease; 36 | animation-fill-mode: forwards; 37 | 38 | -webkit-animation-name: slidenavAnimation; 39 | -webkit-animation-duration:.2s; 40 | -webkit-animation-iteration-count: 1; 41 | -webkit-animation-timing-function: ease; 42 | -webkit-animation-fill-mode: forwards; 43 | 44 | -moz-animation-name: slidenavAnimation; 45 | -moz-animation-duration:.2s; 46 | -moz-animation-iteration-count: 1; 47 | -moz-animation-timing-function: ease; 48 | -moz-animation-fill-mode: forwards; 49 | } 50 | @keyframes slidenavAnimation { 51 | from { 52 | opacity: 0; 53 | } 54 | to { 55 | opacity: 1; 56 | } 57 | } 58 | @-webkit-keyframes slidenavAnimation { 59 | from { 60 | opacity: 0; 61 | } 62 | to { 63 | opacity: 1; 64 | } 65 | } 66 | 67 | .nav-menu { 68 | border: 1px solid #ddd; 69 | border-radius: 0.25em; 70 | margin: auto; 71 | height: 40px; 72 | width: 1000px; 73 | } 74 | 75 | .nav li.dropdown ul.dropdown-menu li:HOVER ul { 76 | display:block; 77 | position:absolute; 78 | left:100%; 79 | -webkit-border-radius: 3px; 80 | -moz-border-radius: 3px; 81 | border-radius: 3px; 82 | } 83 | .nav li.dropdown ul.dropdown-menu ul { 84 | display: none; 85 | float:right; 86 | position: relative; 87 | top: auto; 88 | margin-top: -30px; 89 | } 90 | .dropdown .dropdown-menu{ 91 | z-index:3000; 92 | } 93 | 94 | .navbar .nav li.dropdown.open > .dropdown-toggle, 95 | .navbar .nav li.dropdown.active > .dropdown-toggle, 96 | .navbar .nav li.dropdown.open.active > .dropdown-toggle { 97 | color: #555555; 98 | background-color: #0B9BCD; 99 | text-shadow: none !important; 100 | } 101 | 102 | .dropdown-menu .active > a, 103 | .dropdown-menu .active > a:hover { 104 | color: #ffffff; 105 | text-decoration: none; 106 | background-color: #0B9BCD; 107 | background-image: none; 108 | filter: none; 109 | } 110 | .input-file{ 111 | float:left; 112 | text-align: right; 113 | color: #5e5e5e !important; 114 | font-size: 12px !important; 115 | } 116 | .label{ 117 | float:right; 118 | text-align: right; 119 | color: #5e5e5e !important; 120 | } 121 | #info-content{ 122 | margin: auto; 123 | height: 25px; 124 | width: 1000px; 125 | overflow: auto !important; 126 | } 127 | .menu-container { 128 | border: 1px solid #ddd; 129 | border-radius: 0.25em; 130 | margin: auto; 131 | height: 80px; 132 | width: 1000px; 133 | } 134 | .my-nav-bar { 135 | margin: auto; 136 | width: 1000px; 137 | overflow: visible !important; 138 | font-size: 12px !important; 139 | } 140 | #add-node-dialog{ 141 | position: relative; 142 | width: 15% 143 | } 144 | #cose-bilkent-settings-template{ 145 | position: absolute; 146 | width: 750px; 147 | } 148 | 149 | 150 | .sbgn-text { 151 | color :#4a4a4a; 152 | text-align: center; 153 | font-weight:bold; 154 | } 155 | 156 | .quick-help-content { 157 | font-size: 11px; 158 | margin-left: 20px; 159 | margin-right: 20px; 160 | } 161 | 162 | .sbgn-frame { 163 | border: 2px solid #4a4a4a; 164 | padding-bottom : 10px; 165 | background-color: white; 166 | 167 | } 168 | #fancybox-wrap { 169 | z-index : 4000 !important; 170 | } -------------------------------------------------------------------------------- /public/samples/sample4-simple-json.txt: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "group": "nodes", 4 | "data": { 5 | "id": "n0" 6 | }, 7 | "position": { 8 | "x": 44.04117227585641, 9 | "y": 173.20056449713445 10 | } 11 | }, 12 | { 13 | "group": "nodes", 14 | "data": { 15 | "id": "n1" 16 | }, 17 | "position": { 18 | "x": 113.21379366825988, 19 | "y": 113.1310958229268 20 | } 21 | }, 22 | { 23 | "group": "nodes", 24 | "data": { 25 | "id": "n2" 26 | }, 27 | "position": { 28 | "x": 183.53275276273519, 29 | "y": 182.04765804025033 30 | } 31 | }, 32 | { 33 | "group": "nodes", 34 | "data": { 35 | "id": "n3" 36 | }, 37 | "position": { 38 | "x": 176.537504054946, 39 | "y": 45.33730991165305 40 | } 41 | }, 42 | { 43 | "group": "nodes", 44 | "data": { 45 | "id": "n4" 46 | }, 47 | "position": { 48 | "x": 269.43225453686125, 49 | "y": 198.26955278495723 50 | } 51 | }, 52 | { 53 | "group": "nodes", 54 | "data": { 55 | "id": "n5" 56 | }, 57 | "position": { 58 | "x": 245.4354059020162, 59 | "y": 113.71167835793881 60 | } 61 | }, 62 | { 63 | "group": "nodes", 64 | "data": { 65 | "id": "n6" 66 | }, 67 | "position": { 68 | "x": 258.6774759046476, 69 | "y": 30 70 | } 71 | }, 72 | { 73 | "group": "nodes", 74 | "data": { 75 | "id": "n7" 76 | }, 77 | "position": { 78 | "x": 30, 79 | "y": 87.16143328467149 80 | } 81 | }, 82 | { 83 | "group": "nodes", 84 | "data": { 85 | "id": "n8" 86 | }, 87 | "position": { 88 | "x": 353.75598788828313, 89 | "y": 227.44715327226504 90 | } 91 | }, 92 | { 93 | "group": "nodes", 94 | "data": { 95 | "id": "n9" 96 | }, 97 | "position": { 98 | "x": 343.33569803146804, 99 | "y": 145.75025193786166 100 | } 101 | }, 102 | { 103 | "group": "edges", 104 | "data": { 105 | "source": "n0", 106 | "target": "n1", 107 | "id": "e0" 108 | } 109 | }, 110 | { 111 | "group": "edges", 112 | "data": { 113 | "source": "n1", 114 | "target": "n2", 115 | "id": "e1" 116 | } 117 | }, 118 | { 119 | "group": "edges", 120 | "data": { 121 | "source": "n1", 122 | "target": "n3", 123 | "id": "e2" 124 | } 125 | }, 126 | { 127 | "group": "edges", 128 | "data": { 129 | "source": "n1", 130 | "target": "n7", 131 | "id": "e3" 132 | } 133 | }, 134 | { 135 | "group": "edges", 136 | "data": { 137 | "source": "n2", 138 | "target": "n4", 139 | "id": "e4" 140 | } 141 | }, 142 | { 143 | "group": "edges", 144 | "data": { 145 | "source": "n2", 146 | "target": "n5", 147 | "id": "e5" 148 | } 149 | }, 150 | { 151 | "group": "edges", 152 | "data": { 153 | "source": "n4", 154 | "target": "n5", 155 | "id": "e6" 156 | } 157 | }, 158 | { 159 | "group": "edges", 160 | "data": { 161 | "source": "n5", 162 | "target": "n6", 163 | "id": "e7" 164 | } 165 | }, 166 | { 167 | "group": "edges", 168 | "data": { 169 | "source": "n3", 170 | "target": "n5", 171 | "id": "e8" 172 | } 173 | }, 174 | { 175 | "group": "edges", 176 | "data": { 177 | "source": "n4", 178 | "target": "n8", 179 | "id": "e9" 180 | } 181 | }, 182 | { 183 | "group": "edges", 184 | "data": { 185 | "source": "n4", 186 | "target": "n9", 187 | "id": "e10" 188 | } 189 | } 190 | ] -------------------------------------------------------------------------------- /public/samples/sample17-simple-json-non-uniform-dimension.txt: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "group": "nodes", 4 | "data": { 5 | "width": 15, 6 | "height": 15, 7 | "id": "n0" 8 | }, 9 | "position": { 10 | "x": 22.5, 11 | "y": 174.3047799558493 12 | } 13 | }, 14 | { 15 | "group": "nodes", 16 | "data": { 17 | "width": 20, 18 | "height": 20, 19 | "id": "n1" 20 | }, 21 | "position": { 22 | "x": 94.97444312230868, 23 | "y": 183.14860009233337 24 | } 25 | }, 26 | { 27 | "group": "nodes", 28 | "data": { 29 | "width": 20, 30 | "height": 20, 31 | "id": "n2" 32 | }, 33 | "position": { 34 | "x": 111.88841087337096, 35 | "y": 107.47798945656427 36 | } 37 | }, 38 | { 39 | "group": "nodes", 40 | "data": { 41 | "width": 30, 42 | "height": 30, 43 | "id": "n3" 44 | }, 45 | "position": { 46 | "x": 175.4422733426302, 47 | "y": 186.63887176223193 48 | } 49 | }, 50 | { 51 | "group": "nodes", 52 | "data": { 53 | "width": 40, 54 | "height": 40, 55 | "id": "n4" 56 | }, 57 | "position": { 58 | "x": 98.79011852365556, 59 | "y": 270.29270830364385 60 | } 61 | }, 62 | { 63 | "group": "nodes", 64 | "data": { 65 | "width": 40, 66 | "height": 40, 67 | "id": "n5" 68 | }, 69 | "position": { 70 | "x": 54.82764676660713, 71 | "y": 35 72 | } 73 | }, 74 | { 75 | "group": "nodes", 76 | "data": { 77 | "width": 40, 78 | "height": 40, 79 | "id": "n6" 80 | }, 81 | "position": { 82 | "x": 188.97825780575704, 83 | "y": 60.129890473365094 84 | } 85 | }, 86 | { 87 | "group": "nodes", 88 | "data": { 89 | "width": 40, 90 | "height": 40, 91 | "id": "n7" 92 | }, 93 | "position": { 94 | "x": 187.97403072609177, 95 | "y": 314.4121475826912 96 | } 97 | }, 98 | { 99 | "group": "nodes", 100 | "data": { 101 | "width": 40, 102 | "height": 40, 103 | "id": "n8" 104 | }, 105 | "position": { 106 | "x": 51.6095488071187, 107 | "y": 358.0566287994528 108 | } 109 | }, 110 | { 111 | "group": "nodes", 112 | "data": { 113 | "width": 50, 114 | "height": 50, 115 | "id": "n9" 116 | }, 117 | "position": { 118 | "x": 72.46549945774336, 119 | "y": 455.5923327122681 120 | } 121 | }, 122 | { 123 | "group": "edges", 124 | "data": { 125 | "source": "n0", 126 | "target": "n1", 127 | "id": "e0" 128 | } 129 | }, 130 | { 131 | "group": "edges", 132 | "data": { 133 | "source": "n1", 134 | "target": "n2", 135 | "id": "e1" 136 | } 137 | }, 138 | { 139 | "group": "edges", 140 | "data": { 141 | "source": "n1", 142 | "target": "n3", 143 | "id": "e2" 144 | } 145 | }, 146 | { 147 | "group": "edges", 148 | "data": { 149 | "source": "n1", 150 | "target": "n4", 151 | "id": "e3" 152 | } 153 | }, 154 | { 155 | "group": "edges", 156 | "data": { 157 | "source": "n2", 158 | "target": "n5", 159 | "id": "e4" 160 | } 161 | }, 162 | { 163 | "group": "edges", 164 | "data": { 165 | "source": "n2", 166 | "target": "n6", 167 | "id": "e5" 168 | } 169 | }, 170 | { 171 | "group": "edges", 172 | "data": { 173 | "source": "n4", 174 | "target": "n7", 175 | "id": "e6" 176 | } 177 | }, 178 | { 179 | "group": "edges", 180 | "data": { 181 | "source": "n4", 182 | "target": "n8", 183 | "id": "e7" 184 | } 185 | }, 186 | { 187 | "group": "edges", 188 | "data": { 189 | "source": "n8", 190 | "target": "n9", 191 | "id": "e8" 192 | } 193 | } 194 | ] -------------------------------------------------------------------------------- /public/css/cytoscape.js-panzoom.css: -------------------------------------------------------------------------------- 1 | .cy-panzoom { 2 | position: absolute; 3 | font-size: 12px; 4 | color: #fff; 5 | font-family: arial, helvetica, sans-serif; 6 | line-height: 1; 7 | color: #666; 8 | font-size: 11px; 9 | z-index: 99999; 10 | box-sizing: content-box; 11 | } 12 | 13 | .cy-panzoom-zoom-button { 14 | cursor: pointer; 15 | padding: 3px; 16 | text-align: center; 17 | position: absolute; 18 | border-radius: 3px; 19 | width: 10px; 20 | height: 10px; 21 | left: 16px; 22 | background: #fff; 23 | border: 1px solid #999; 24 | margin-left: -1px; 25 | margin-top: -1px; 26 | z-index: 1; 27 | box-sizing: content-box; 28 | } 29 | 30 | .cy-panzoom-zoom-button:active, 31 | .cy-panzoom-slider-handle:active, 32 | .cy-panzoom-slider-handle.active { 33 | background: #ddd; 34 | box-sizing: content-box; 35 | } 36 | 37 | .cy-panzoom-pan-button { 38 | position: absolute; 39 | z-index: 1; 40 | height: 16px; 41 | width: 16px; 42 | box-sizing: content-box; 43 | } 44 | 45 | .cy-panzoom-reset { 46 | top: 55px; 47 | box-sizing: content-box; 48 | } 49 | 50 | .cy-panzoom-zoom-in { 51 | top: 80px; 52 | box-sizing: content-box; 53 | } 54 | 55 | .cy-panzoom-zoom-out { 56 | top: 197px; 57 | box-sizing: content-box; 58 | } 59 | 60 | .cy-panzoom-pan-up { 61 | top: 0; 62 | left: 50%; 63 | margin-left: -5px; 64 | width: 0; 65 | height: 0; 66 | border-left: 5px solid transparent; 67 | border-right: 5px solid transparent; 68 | border-bottom: 5px solid #666; 69 | box-sizing: content-box; 70 | } 71 | 72 | .cy-panzoom-pan-down { 73 | bottom: 0; 74 | left: 50%; 75 | margin-left: -5px; 76 | width: 0; 77 | height: 0; 78 | border-left: 5px solid transparent; 79 | border-right: 5px solid transparent; 80 | border-top: 5px solid #666; 81 | box-sizing: content-box; 82 | } 83 | 84 | .cy-panzoom-pan-left { 85 | top: 50%; 86 | left: 0; 87 | margin-top: -5px; 88 | width: 0; 89 | height: 0; 90 | border-top: 5px solid transparent; 91 | border-bottom: 5px solid transparent; 92 | border-right: 5px solid #666; 93 | box-sizing: content-box; 94 | } 95 | 96 | .cy-panzoom-pan-right { 97 | top: 50%; 98 | right: 0; 99 | margin-top: -5px; 100 | width: 0; 101 | height: 0; 102 | border-top: 5px solid transparent; 103 | border-bottom: 5px solid transparent; 104 | border-left: 5px solid #666; 105 | box-sizing: content-box; 106 | } 107 | 108 | .cy-panzoom-pan-indicator { 109 | position: absolute; 110 | left: 0; 111 | top: 0; 112 | width: 8px; 113 | height: 8px; 114 | border-radius: 8px; 115 | background: #000; 116 | border-radius: 8px; 117 | margin-left: -5px; 118 | margin-top: -5px; 119 | display: none; 120 | z-index: 999; 121 | opacity: 0.6; 122 | box-sizing: content-box; 123 | } 124 | 125 | .cy-panzoom-slider { 126 | position: absolute; 127 | top: 97px; 128 | left: 17px; 129 | height: 100px; 130 | width: 15px; 131 | box-sizing: content-box; 132 | } 133 | 134 | .cy-panzoom-slider-background { 135 | position: absolute; 136 | top: 0; 137 | width: 2px; 138 | height: 100px; 139 | left: 5px; 140 | background: #fff; 141 | border-left: 1px solid #999; 142 | border-right: 1px solid #999; 143 | box-sizing: content-box; 144 | } 145 | 146 | .cy-panzoom-slider-handle { 147 | position: absolute; 148 | width: 16px; 149 | height: 8px; 150 | background: #fff; 151 | border: 1px solid #999; 152 | border-radius: 2px; 153 | margin-left: -2px; 154 | z-index: 999; 155 | line-height: 8px; 156 | cursor: default; 157 | box-sizing: content-box; 158 | } 159 | 160 | .cy-panzoom-slider-handle .icon { 161 | margin: 0 4px; 162 | line-height: 10px; 163 | box-sizing: content-box; 164 | } 165 | 166 | .cy-panzoom-no-zoom-tick { 167 | position: absolute; 168 | background: #666; 169 | border: 1px solid #fff; 170 | border-radius: 2px; 171 | margin-left: -1px; 172 | width: 8px; 173 | height: 2px; 174 | left: 3px; 175 | z-index: 1; 176 | margin-top: 3px; 177 | box-sizing: content-box; 178 | } 179 | 180 | .cy-panzoom-panner { 181 | position: absolute; 182 | left: 5px; 183 | top: 5px; 184 | height: 40px; 185 | width: 40px; 186 | background: #fff; 187 | border: 1px solid #999; 188 | border-radius: 40px; 189 | margin-left: -1px; 190 | box-sizing: content-box; 191 | } 192 | 193 | .cy-panzoom-panner-handle { 194 | position: absolute; 195 | left: 0; 196 | top: 0; 197 | outline: none; 198 | height: 40px; 199 | width: 40px; 200 | position: absolute; 201 | z-index: 999; 202 | box-sizing: content-box; 203 | } 204 | 205 | .cy-panzoom-zoom-only .cy-panzoom-slider, 206 | .cy-panzoom-zoom-only .cy-panzoom-panner { 207 | display: none; 208 | } 209 | 210 | .cy-panzoom-zoom-only .cy-panzoom-reset { 211 | top: 20px; 212 | } 213 | 214 | .cy-panzoom-zoom-only .cy-panzoom-zoom-in { 215 | top: 45px; 216 | } 217 | 218 | .cy-panzoom-zoom-only .cy-panzoom-zoom-out { 219 | top: 70px; 220 | } 221 | -------------------------------------------------------------------------------- /tests/sampleRequest2.txt: -------------------------------------------------------------------------------- 1 | [ 2 | [ 3 | { 4 | "group": "nodes", 5 | "data": { 6 | "id": "n0" 7 | }, 8 | "position": { 9 | "x": 100, 10 | "y": 100 11 | } 12 | }, 13 | { 14 | "group": "nodes", 15 | "data": { 16 | "id": "n1" 17 | }, 18 | "position": { 19 | "x": 200, 20 | "y": 200 21 | } 22 | }, 23 | { 24 | "group": "nodes", 25 | "data": { 26 | "id": "n2" 27 | }, 28 | "position": { 29 | "x": 300, 30 | "y": 300 31 | } 32 | }, 33 | { 34 | "group": "nodes", 35 | "data": { 36 | "id": "n3" 37 | }, 38 | "position": { 39 | "x": 400, 40 | "y": 400 41 | } 42 | }, 43 | { 44 | "group": "nodes", 45 | "data": { 46 | "id": "n4" 47 | }, 48 | "position": { 49 | "x": 500, 50 | "y": 500 51 | } 52 | }, 53 | { 54 | "group": "nodes", 55 | "data": { 56 | "id": "n5" 57 | }, 58 | "position": { 59 | "x": 600, 60 | "y": 600 61 | } 62 | }, 63 | { 64 | "group": "nodes", 65 | "data": { 66 | "id": "n6" 67 | }, 68 | "position": { 69 | "x": 700, 70 | "y": 700 71 | } 72 | }, 73 | { 74 | "group": "nodes", 75 | "data": { 76 | "id": "n7" 77 | }, 78 | "position": { 79 | "x": 800, 80 | "y": 800 81 | } 82 | }, 83 | { 84 | "group": "nodes", 85 | "data": { 86 | "id": "n8" 87 | }, 88 | "position": { 89 | "x": 900, 90 | "y": 900 91 | } 92 | }, 93 | { 94 | "group": "nodes", 95 | "data": { 96 | "id": "n9" 97 | }, 98 | "position": { 99 | "x": 1000, 100 | "y": 1000 101 | } 102 | }, 103 | { 104 | "group": "edges", 105 | "data": { 106 | "id": "e0", 107 | "source": "n0", 108 | "target": "n1" 109 | } 110 | }, 111 | { 112 | "group": "edges", 113 | "data": { 114 | "id": "e1", 115 | "source": "n1", 116 | "target": "n2" 117 | } 118 | }, 119 | { 120 | "group": "edges", 121 | "data": { 122 | "id": "e2", 123 | "source": "n1", 124 | "target": "n3" 125 | } 126 | }, 127 | { 128 | "group": "edges", 129 | "data": { 130 | "id": "e3", 131 | "source": "n1", 132 | "target": "n7" 133 | } 134 | }, 135 | { 136 | "group": "edges", 137 | "data": { 138 | "id": "e4", 139 | "source": "n2", 140 | "target": "n4" 141 | } 142 | }, 143 | { 144 | "group": "edges", 145 | "data": { 146 | "id": "e5", 147 | "source": "n2", 148 | "target": "n5" 149 | } 150 | }, 151 | { 152 | "group": "edges", 153 | "data": { 154 | "id": "e6", 155 | "source": "n4", 156 | "target": "n5" 157 | } 158 | }, 159 | { 160 | "group": "edges", 161 | "data": { 162 | "id": "e7", 163 | "source": "n5", 164 | "target": "n6" 165 | } 166 | }, 167 | { 168 | "group": "edges", 169 | "data": { 170 | "id": "e8", 171 | "source": "n3", 172 | "target": "n5" 173 | } 174 | }, 175 | { 176 | "group": "edges", 177 | "data": { 178 | "id": "e9", 179 | "source": "n4", 180 | "target": "n8" 181 | } 182 | }, 183 | { 184 | "group": "edges", 185 | "data": { 186 | "id": "e10", 187 | "source": "n4", 188 | "target": "n9" 189 | } 190 | } 191 | ], 192 | { 193 | "name" : "klay", 194 | "nodeDimensionsIncludeLabels": false, 195 | "animate": false, 196 | "klay": { 197 | "addUnnecessaryBendpoints": false, 198 | "aspectRatio": 1.6, 199 | "borderSpacing": 20, 200 | "compactComponents": false, 201 | "crossingMinimization": "LAYER_SWEEP", 202 | "cycleBreaking": "GREEDY", 203 | "direction": "UNDEFINED", 204 | "edgeRouting": "ORTHOGONAL", 205 | "edgeSpacingFactor": 0.5, 206 | "feedbackEdges": false, 207 | "fixedAlignment": "NONE", 208 | "inLayerSpacingFactor": 1, 209 | "layoutHierarchy": false, 210 | "linearSegmentsDeflectionDampening": 0.3, 211 | "mergeEdges": false, 212 | "mergeHierarchyCrossingEdges": true, 213 | "nodeLayering": "NETWORK_SIMPLEX", 214 | "nodePlacement": "BRANDES_KOEPF", 215 | "randomizationSeed": 1, 216 | "routeSelfLoopInside": false, 217 | "separateConnectedComponents": true, 218 | "spacing": 20, 219 | "thoroughness": 7 220 | } 221 | } 222 | ] -------------------------------------------------------------------------------- /public/js/cytoscape/extensions/ui/cytoscape-panzoom.js: -------------------------------------------------------------------------------- 1 | !function(){"use strict";var a=function(o,a){o&&a&&(a.fn.cyPanzoom=a.fn.cytoscapePanzoom=function(n){return e.apply(this,[n,o,a]),this},o("core","panzoom",function(n){return e.apply(this,[n,o,a]),this}))},t={zoomFactor:.05,zoomDelay:45,minZoom:.1,maxZoom:10,fitPadding:50,panSpeed:10,panDistance:10,panDragAreaSize:75,panMinPercentSpeed:.25,panInactiveArea:8,panIndicatorMinOpacity:.5,zoomOnly:!1,fitSelector:void 0,animateOnFit:function(){return!1},fitAnimationDuration:1e3,sliderHandleIcon:"fa fa-minus",zoomInIcon:"fa fa-plus",zoomOutIcon:"fa fa-minus",resetIcon:"fa fa-expand"},e=function(n,H,Q){var B=this,X=Q.extend(!0,{},t,n),o=n,a={destroy:function(){var n=Q(B.container()).find(".cy-panzoom");n.data("winbdgs").forEach(function(n){Q(window).unbind(n.evt,n.fn)}),n.data("cybdgs").forEach(function(n){B.off(n.evt,n.fn)}),n.remove()},init:function(){window;return Q(B.container()).each(function(){var n=Q(this);n.cytoscape=H;var e=[],i=Q(window),o=function(n,o){e.push({evt:n,fn:o}),i.bind(n,o)},c=function(n,o){for(var a=0;a');n.prepend(t),t.css("position","absolute"),t.data("winbdgs",e),t.data("cybdgs",a),X.zoomOnly&&t.addClass("cy-panzoom-zoom-only");var p=Q('
');t.append(p);var s=Q('
');t.append(s);var r=Q('
');t.append(r);var u=Q('
');t.append(u),u.append('
');var f=Q('
');u.append(f);var d=Q('
');u.append(d);var y=Q('
');t.append(y);var m=Q('
');y.append(m);var v=Q('
'),l=Q('
'),h=Q('
'),z=Q('
');y.append(v).append(l).append(h).append(z);var g=Q('
');function b(){clearInterval(I),c("mousemove",N),g.hide()}function x(){B.pan(),B.zoom();w=n.width()/2,M=n.height()/2}y.append(g);var w,M,I,Z=!1;function D(){Z=!0,x()}function P(){Z=!1}function O(n){Z||x(),B.zoom({level:n,renderedPosition:{x:w,y:M}})}var N=function(n){n.stopPropagation(),n.preventDefault(),clearInterval(I);var o,a,t,e,i,c,p,s,r,d,m,u,f,v,l=(a={x:(o=n).originalEvent.pageX-y.offset().left-y.width()/2,y:o.originalEvent.pageY-y.offset().top-y.height()/2},t=X.panDragAreaSize,e=Math.sqrt(a.x*a.x+a.y*a.y),i=Math.min(e/t,1),eX.maxZoom&&(o=X.maxZoom),o==X.maxZoom&&n==X.maxZoom||o==X.minZoom&&n==X.minZoom||O(o)};return D(),o(),t=setInterval(o,X.zoomDelay),!1}}),o("mouseup blur",function(){clearInterval(t),P()})}f.bind("mousedown",S=function(n){var a=n.target===f[0]?n.offsetY:0;q=!0,D(),f.addClass("active");var t=0;return o("mousemove",A=function(n){var o=+new Date;return t+10= 200 && xhr.status <= 299 55 | } 56 | 57 | // `a.click()` doesn't work for all browsers (#465) 58 | function click (node) { 59 | try { 60 | node.dispatchEvent(new MouseEvent('click')) 61 | } catch (e) { 62 | var evt = document.createEvent('MouseEvents') 63 | evt.initMouseEvent('click', true, true, window, 0, 0, 0, 80, 64 | 20, false, false, false, false, 0, null) 65 | node.dispatchEvent(evt) 66 | } 67 | } 68 | 69 | var saveAs = _global.saveAs || ( 70 | // probably in some web worker 71 | (typeof window !== 'object' || window !== _global) 72 | ? function saveAs () { /* noop */ } 73 | 74 | // Use download attribute first if possible (#193 Lumia mobile) 75 | : 'download' in HTMLAnchorElement.prototype 76 | ? function saveAs (blob, name, opts) { 77 | var URL = _global.URL || _global.webkitURL 78 | var a = document.createElement('a') 79 | name = name || blob.name || 'download' 80 | 81 | a.download = name 82 | a.rel = 'noopener' // tabnabbing 83 | 84 | // TODO: detect chrome extensions & packaged apps 85 | // a.target = '_blank' 86 | 87 | if (typeof blob === 'string') { 88 | // Support regular links 89 | a.href = blob 90 | if (a.origin !== location.origin) { 91 | corsEnabled(a.href) 92 | ? download(blob, name, opts) 93 | : click(a, a.target = '_blank') 94 | } else { 95 | click(a) 96 | } 97 | } else { 98 | // Support blobs 99 | a.href = URL.createObjectURL(blob) 100 | setTimeout(function () { URL.revokeObjectURL(a.href) }, 4E4) // 40s 101 | setTimeout(function () { click(a) }, 0) 102 | } 103 | } 104 | 105 | // Use msSaveOrOpenBlob as a second approach 106 | : 'msSaveOrOpenBlob' in navigator 107 | ? function saveAs (blob, name, opts) { 108 | name = name || blob.name || 'download' 109 | 110 | if (typeof blob === 'string') { 111 | if (corsEnabled(blob)) { 112 | download(blob, name, opts) 113 | } else { 114 | var a = document.createElement('a') 115 | a.href = blob 116 | a.target = '_blank' 117 | setTimeout(function () { click(a) }) 118 | } 119 | } else { 120 | navigator.msSaveOrOpenBlob(bom(blob, opts), name) 121 | } 122 | } 123 | 124 | // Fallback to using FileReader and a popup 125 | : function saveAs (blob, name, opts, popup) { 126 | // Open a popup immediately do go around popup blocker 127 | // Mostly only available on user interaction and the fileReader is async so... 128 | popup = popup || open('', '_blank') 129 | if (popup) { 130 | popup.document.title = 131 | popup.document.body.innerText = 'downloading...' 132 | } 133 | 134 | if (typeof blob === 'string') return download(blob, name, opts) 135 | 136 | var force = blob.type === 'application/octet-stream' 137 | var isSafari = /constructor/i.test(_global.HTMLElement) || _global.safari 138 | var isChromeIOS = /CriOS\/[\d]+/.test(navigator.userAgent) 139 | 140 | if ((isChromeIOS || (force && isSafari)) && typeof FileReader !== 'undefined') { 141 | // Safari doesn't allow downloading of blob URLs 142 | var reader = new FileReader() 143 | reader.onloadend = function () { 144 | var url = reader.result 145 | url = isChromeIOS ? url : url.replace(/^data:[^;]*;/, 'data:attachment/file;') 146 | if (popup) popup.location.href = url 147 | else location = url 148 | popup = null // reverse-tabnabbing #460 149 | } 150 | reader.readAsDataURL(blob) 151 | } else { 152 | var URL = _global.URL || _global.webkitURL 153 | var url = URL.createObjectURL(blob) 154 | if (popup) popup.location = url 155 | else location.href = url 156 | popup = null // reverse-tabnabbing #460 157 | setTimeout(function () { URL.revokeObjectURL(url) }, 4E4) // 40s 158 | } 159 | } 160 | ) 161 | 162 | _global.saveAs = saveAs.saveAs = saveAs 163 | 164 | if (typeof module !== 'undefined') { 165 | module.exports = saveAs; 166 | } -------------------------------------------------------------------------------- /public/js/save-graph.code-workspace: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "group": "nodes", 4 | "data": { 5 | "width": 60, 6 | "height": 40, 7 | "clusterID": null, 8 | "id": "n0" 9 | }, 10 | "position": { 11 | "x": 201, 12 | "y": 651 13 | } 14 | }, 15 | { 16 | "group": "nodes", 17 | "data": { 18 | "width": 60, 19 | "height": 40, 20 | "clusterID": null, 21 | "id": "n1" 22 | }, 23 | "position": { 24 | "x": 61, 25 | "y": 635 26 | } 27 | }, 28 | { 29 | "group": "nodes", 30 | "data": { 31 | "width": 200, 32 | "height": 200, 33 | "clusterID": null, 34 | "id": "n2" 35 | }, 36 | "position": { 37 | "x": 189, 38 | "y": 475 39 | } 40 | }, 41 | { 42 | "group": "nodes", 43 | "data": { 44 | "width": 30, 45 | "height": 30, 46 | "clusterID": null, 47 | "id": "n3" 48 | }, 49 | "position": { 50 | "x": 154, 51 | "y": 308 52 | } 53 | }, 54 | { 55 | "group": "nodes", 56 | "data": { 57 | "width": 45, 58 | "height": 50, 59 | "clusterID": null, 60 | "id": "n4" 61 | }, 62 | "position": { 63 | "x": 226, 64 | "y": 228 65 | } 66 | }, 67 | { 68 | "group": "nodes", 69 | "data": { 70 | "width": 45, 71 | "height": 45, 72 | "clusterID": null, 73 | "id": "n5" 74 | }, 75 | "position": { 76 | "x": 80, 77 | "y": 234 78 | } 79 | }, 80 | { 81 | "group": "nodes", 82 | "data": { 83 | "width": 10, 84 | "height": 10, 85 | "clusterID": null, 86 | "id": "n6" 87 | }, 88 | "position": { 89 | "x": 152, 90 | "y": 182 91 | } 92 | }, 93 | { 94 | "group": "nodes", 95 | "data": { 96 | "width": null, 97 | "height": null, 98 | "clusterID": null, 99 | "id": "n7" 100 | }, 101 | "position": { 102 | "x": 30, 103 | "y": 152 104 | } 105 | }, 106 | { 107 | "group": "nodes", 108 | "data": { 109 | "width": null, 110 | "height": null, 111 | "clusterID": null, 112 | "id": "n8" 113 | }, 114 | "position": { 115 | "x": 111, 116 | "y": 115 117 | } 118 | }, 119 | { 120 | "group": "nodes", 121 | "data": { 122 | "width": null, 123 | "height": null, 124 | "clusterID": null, 125 | "id": "n9" 126 | }, 127 | "position": { 128 | "x": 121, 129 | "y": 30 130 | } 131 | }, 132 | { 133 | "group": "nodes", 134 | "data": { 135 | "width": 15, 136 | "height": 15, 137 | "clusterID": null, 138 | "id": "n10" 139 | }, 140 | "position": { 141 | "x": 41, 142 | "y": 80 143 | } 144 | }, 145 | { 146 | "group": "edges", 147 | "data": { 148 | "source": "n0", 149 | "target": "n2", 150 | "id": "e0" 151 | }, 152 | "id": "e0" 153 | }, 154 | { 155 | "group": "edges", 156 | "data": { 157 | "source": "n1", 158 | "target": "n2", 159 | "id": "e1" 160 | }, 161 | "id": "e1" 162 | }, 163 | { 164 | "group": "edges", 165 | "data": { 166 | "source": "n2", 167 | "target": "n3", 168 | "id": "e2" 169 | }, 170 | "id": "e2" 171 | }, 172 | { 173 | "group": "edges", 174 | "data": { 175 | "source": "n3", 176 | "target": "n5", 177 | "id": "e3" 178 | }, 179 | "id": "e3" 180 | }, 181 | { 182 | "group": "edges", 183 | "data": { 184 | "source": "n3", 185 | "target": "n4", 186 | "id": "e4" 187 | }, 188 | "id": "e4" 189 | }, 190 | { 191 | "group": "edges", 192 | "data": { 193 | "source": "n4", 194 | "target": "n6", 195 | "id": "e5" 196 | }, 197 | "id": "e5" 198 | }, 199 | { 200 | "group": "edges", 201 | "data": { 202 | "source": "n6", 203 | "target": "n5", 204 | "id": "e6" 205 | }, 206 | "id": "e6" 207 | }, 208 | { 209 | "group": "edges", 210 | "data": { 211 | "source": "n5", 212 | "target": "n7", 213 | "id": "e7" 214 | }, 215 | "id": "e7" 216 | }, 217 | { 218 | "group": "edges", 219 | "data": { 220 | "source": "n6", 221 | "target": "n8", 222 | "id": "e8" 223 | }, 224 | "id": "e8" 225 | }, 226 | { 227 | "group": "edges", 228 | "data": { 229 | "source": "n8", 230 | "target": "n7", 231 | "id": "e9" 232 | }, 233 | "id": "e9" 234 | }, 235 | { 236 | "group": "edges", 237 | "data": { 238 | "source": "n8", 239 | "target": "n9", 240 | "id": "e10" 241 | }, 242 | "id": "e10" 243 | }, 244 | { 245 | "group": "edges", 246 | "data": { 247 | "source": "n8", 248 | "target": "n10", 249 | "id": "e11" 250 | }, 251 | "id": "e11" 252 | } 253 | ] -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- 1 | const express = require('express'); 2 | const app = express(); 3 | const cytoscape = require('cytoscape'); 4 | const cors = require('cors'); 5 | 6 | const port = process.env.PORT || 4000; 7 | 8 | // to serve the html 9 | const path = require("path"); 10 | 11 | // to support sbgnml type of input 12 | let convert = require('sbgnml-to-cytoscape'); 13 | 14 | // for graphml 15 | const jsdom = require("jsdom"); 16 | const { JSDOM } = jsdom; 17 | const { window } = new JSDOM(); 18 | const { document } = (new JSDOM('')).window; 19 | global.document = document; 20 | 21 | const $ = jQuery = require('jquery')(window); 22 | 23 | const graphml = require('cytoscape-graphml'); 24 | cytoscape.use(graphml, $); 25 | 26 | // for fcose 27 | const fcose = require('cytoscape-fcose'); 28 | cytoscape.use(fcose); 29 | 30 | // for cose-bilkent 31 | const coseBilkent = require('cytoscape-cose-bilkent'); 32 | cytoscape.use(coseBilkent); 33 | 34 | // for cise layout, Needs to be fixed, some problems 35 | const cise = require('cytoscape-cise'); 36 | cytoscape.use(cise); 37 | 38 | // for dagre layout 39 | const dagre = require('cytoscape-dagre'); 40 | cytoscape.use(dagre); 41 | 42 | // for klay layout 43 | const klay = require('cytoscape-klay'); 44 | cytoscape.use(klay); 45 | 46 | // TODO test layouts below 47 | // for avsdf layout 48 | const avsdf = require('cytoscape-avsdf'); 49 | cytoscape.use(avsdf); 50 | 51 | // cola layout 52 | const cola = require('cytoscape-cola'); 53 | cytoscape.use(cola); 54 | 55 | // euler layout 56 | const euler = require('cytoscape-euler'); 57 | cytoscape.use(euler); 58 | 59 | let cy; 60 | let options; 61 | let data; 62 | let body; 63 | 64 | app.use(express.static(path.join(__dirname, "../public/"))); 65 | app.use(cors()); 66 | 67 | // middleware to manage the formats of files 68 | app.use((req, res, next) => { 69 | if (req.method === "POST") { 70 | body = ''; 71 | options = ''; 72 | data = ''; 73 | 74 | req.on('data', chunk => { 75 | body += chunk; 76 | }) 77 | 78 | req.on('end', () => { 79 | let id = body.indexOf('{'); 80 | options = body.substring(id); 81 | data = body.substring(0, id); 82 | 83 | let foundSBGN = body.includes("sbgn"); 84 | let foundGML = body.includes("graphml"); 85 | let isJson = !(foundGML || foundSBGN); 86 | 87 | if (isJson) { 88 | try { 89 | body = JSON.parse(body); 90 | } catch (e) { 91 | console.log(e); 92 | } 93 | data = body[0]; 94 | options = body[1]; 95 | } else { 96 | try { 97 | options = JSON.parse(options); 98 | } catch (e) { 99 | console.log(e); 100 | } 101 | if (foundSBGN) { // sbgnml 102 | data = convert(data); 103 | } 104 | } 105 | next(); 106 | }) 107 | } else 108 | next(); 109 | }) 110 | // whether to include edges in the output or not 111 | // POST /layout/:format?edges=true 112 | // POST /layout/:format?clusters=true 113 | app.post('/layout/:format', (req, res) => { 114 | options.animate = false; 115 | let size = 30; 116 | 117 | cy = cytoscape({ 118 | styleEnabled: true, 119 | headless: true 120 | }); 121 | 122 | 123 | if (req.params.format === "graphml") { 124 | cy.graphml(data); 125 | cy.filter((element, i) => { 126 | return element.isNode(); 127 | }).forEach((node) => { 128 | node.css("width", parseInt(node.data('width')) || size); 129 | node.css("height", parseInt(node.data('height')) || size); 130 | }) 131 | 132 | cy.layout(options).run(); 133 | } 134 | else { 135 | cy.add(data); 136 | 137 | cy.filter((element, i) => { 138 | return element.isNode(); 139 | }).forEach((node) => { 140 | if (req.params.format === "json") { 141 | node.css("width", node.data().width || size); 142 | node.css("height", node.data().height || size); 143 | } 144 | else { 145 | node.css("width", node.data().bbox.w || size); 146 | node.css("height", node.data().bbox.h || size); 147 | } 148 | }) 149 | 150 | 151 | try { 152 | cy.layout(options).run(); 153 | } 154 | catch (e) { 155 | console.log(e); 156 | return res.status(500).send(e + ""); 157 | } 158 | } 159 | let ret = {}; 160 | 161 | // whether to return edges or not 162 | cy.filter((element, i) => { 163 | return true; 164 | }).forEach((ele) => { 165 | if (ele.isNode()) { 166 | if (req.params.format === "json") { 167 | let obj = {}; 168 | obj["position"] = { x: ele.position().x, y: ele.position().y }; 169 | obj["data"] = { width: ele.data().width, height: ele.data().height, clusterID: ele.data().clusterID, parent: ele.data().parent }; 170 | ret[ele.data().id] = obj; 171 | } 172 | else if (req.params.format === "graphml") { 173 | let obj = {}; 174 | obj["position"] = { x: parseInt(ele.data('x')), y: parseInt(ele.data('y')) }; 175 | obj["data"] = { width: parseInt(ele.data('width')), height: parseInt(ele.data('height')), clusterID: parseInt(ele.data('clusterID')), parent: ele.data("parent") }; 176 | ret[ele.id()] = obj; 177 | } 178 | else if (req.params.format === "sbgnml") { 179 | let obj = {}; 180 | obj["position"] = { x: ele.data().bbox.x, y: ele.data().bbox.y }; 181 | obj["data"] = { width: ele.data().bbox.w || ele.data().bbox.width, height: ele.data().bbox.h || ele.data().bbox.height, clusterID: ele.data().clusterID, parent: ele.data().parent }; 182 | ret[ele.id()] = obj; 183 | } 184 | } 185 | else if (!ele.isNode() && req.query.edges) { 186 | ret[ele.id()] = { source: ele.data().source, target: ele.data().target }; 187 | } 188 | 189 | }); 190 | 191 | return res.status(200).send(ret); 192 | }); 193 | 194 | 195 | module.exports = { 196 | port, 197 | app 198 | }; -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Cytoscape.js Layout Web Service 2 | ================================================================================ 3 | 4 | This repository implements a web service for [Cytoscape.js](http://js.cytoscape.org/) layouts. Applications not directly working on a Cytoscape.js canvas or applications that prefer a backend service for layout may use this as a service. 5 | 6 | Cytoscape.js Layout Web service is distributed under the [MIT License](https://opensource.org/licenses/MIT). 7 | A sample server deployment along with a simple client-side demo can be found [here](https://cytoscape-ivis-layout-service.herokuapp.com/). 8 | 9 | ### Setup the server 10 | First go and pull everything from this git repository. Then execute: 11 | ``` 12 | npm install 13 | ``` 14 | to install all of the dependencies for the server. 15 | 16 | To run the server on the port that is assigned in the index.html(3000 by default) execute: 17 | ``` 18 | npm run dev 19 | ``` 20 | 21 | ### Test the server 22 | To test the server execute: 23 | ``` 24 | npm test 25 | ``` 26 | and you will have 4 basic test cases executed, that check if the server is up and working as expected with different types of inputs. 27 | 28 | 29 | ### Supported formats 30 | This web service supports the following input formats for graphs: 31 | - [JSON](https://www.json.org/) 32 | - [GraphML](http://graphml.graphdrawing.org/) 33 | - [SBGN-ML](https://github.com/sbgn/sbgn/wiki/SBGN_ML) 34 | 35 | ### Supported layouts 36 | The supported layout styles are: 37 | - [fcose](https://github.com/iVis-at-Bilkent/cytoscape.js-fcose) 38 | - [cose-bilkent](https://github.com/cytoscape/cytoscape.js-cose-bilkent) 39 | - [cise](https://github.com/iVis-at-Bilkent/cytoscape.js-cise) 40 | - [cose](https://github.com/iVis-at-Bilkent/cytoscape.js-cose) 41 | - [dagre](https://github.com/cytoscape/cytoscape.js-dagre) 42 | - [klay](https://github.com/cytoscape/cytoscape.js-klay) 43 | - [avsdf](https://github.com/iVis-at-Bilkent/cytoscape.js-avsdf) 44 | - [cola](https://github.com/cytoscape/cytoscape.js-cola) 45 | - [euler](https://github.com/cytoscape/cytoscape.js-euler) 46 | 47 | ## Usage 48 | Request to layout the graph: 49 | ``` 50 | POST /layout/:file_format 51 | ``` 52 | needs to be send to https://cytoscape-layout-service.herokuapp.com, and the type of the request must be 'text' or 'text/plain'. 53 | By default nodes with their positions (x,y) and their dimension (width, height) if given will be returned. If you want edges to be returned as well, you should set edges option to the request, which is false by default: 54 | ``` 55 | POST /layout/:file_format?edges=true 56 | ``` 57 | 58 | The format of the request depends on the format used for specifying the topology of the underlying graph as described below. 59 | 60 | In any case it contains an array where the first element of the array is also an array that consists of the topology of the graph (JSON, GraphML or SBGN-ML), and the second element is a JSON object, where the options for the layout are defined needs to be passed as a body of the request. Name field of the options body must be specified, other fields are optional. 61 | 62 | If user wants to provide ```width``` and ```height``` for each node individually, they should include them in the data object as in the samples below. 63 | 64 | - [Sample JSON request body](https://github.com/iVis-at-Bilkent/cytoscape.js-layout-service/blob/master/public/samples/sample4-simple-json.txt) (simple) 65 | 66 | - [Sample JSON request body](https://github.com/iVis-at-Bilkent/cytoscape.js-layout-service/blob/master/public/samples/json_sample_width_height.json) (dimensions included) 67 | 68 | - [Sample SBGN-ML request body](https://github.com/iVis-at-Bilkent/cytoscape.js-layout-service/blob/master/public/samples/sample7-simple-sbgnml.txt) 69 | 70 | - [Sample GraphML request body](https://github.com/iVis-at-Bilkent/cytoscape.js-layout-service/blob/master/public/samples/sample2-simple-graphml.txt) 71 | 72 | After the request is sent, the server will layout the given graph and return the JSON file with the node names and their positions. 73 | If an error occurs, the response of the server will consist of the error's body. 74 | 75 | ### Compounds 76 | Compounds are supported built into the SBGN-ML format (e.g. molecular complexes and compartments). Similarly the server will recognize compound structures in GraphML and JSON formats as well. Conventions used by Cytoscape.js for representing compounds with GraphML and JSON formats are supported by this web service. 77 | 78 | ### Clusters 79 | Clusters are supported only in GraphML and JSON formats. In JSON format, clusterID field has to go to the data section of each node that has a cluster assigned to it. Similarly, in GraphML, clusterID key needs to be provided for each node that is part of a cluster. 80 | 81 | ## Third-party libraries: 82 | Following is a list of third-party libraries used in building this web service: 83 | - [express](https://www.npmjs.com/package/express) 84 | - [sbgnml-to-cytoscape](https://www.npmjs.com/package/sbgnml-to-cytoscape) 85 | - [jsdom](https://www.npmjs.com/package/jsdom) 86 | - [jQuery](https://www.npmjs.com/package/jquery) 87 | - [jQuery-migrate](https://www.npmjs.com/package/jquery-migrate) 88 | - [cytoscape-graphml](https://www.npmjs.com/package/cytoscape-graphml) 89 | - [cytoscape-fcose](https://www.npmjs.com/package/cytoscape-fcose) 90 | - [cytoscape-cose-bilkent](https://www.npmjs.com/package/cytoscape-cose-bilkent) 91 | - [cytoscape-dagre](https://www.npmjs.com/package/cytoscape-dagre) 92 | - [cytoscape-klay](https://www.npmjs.com/package/cytoscape-klay) 93 | - [cytoscape-avsdf](https://www.npmjs.com/package/cytoscape-avsdf) 94 | - [cytoscape-cola](https://www.npmjs.com/package/cytoscape-cola) 95 | - [cytoscape-euler](https://www.npmjs.com/package/cytoscape-euler) 96 | - [cytoscape-spread](https://www.npmjs.com/package/cytoscape-spread) 97 | - [cytoscape-cise](https://www.npmjs.com/package/cytoscape-cise) 98 | - [nodemon](https://www.npmjs.com/package/nodemon) 99 | - [jest](https://www.npmjs.com/package/jest) 100 | - [super-test](https://www.npmjs.com/package/supertest) 101 | ### Demo client 102 | - [bootstrap](https://getbootstrap.com) 103 | - [underscore.js](https://underscorejs.org) 104 | - [backbone.js](https://backbonejs.org) 105 | - [FileSaver.js](https://github.com/eligrey/FileSaver.js/) 106 | - [cytoscape-panzoom](https://github.com/cytoscape/cytoscape.js-panzoom) 107 | - [cytoscape-undo-redo.js](https://github.com/iVis-at-Bilkent/cytoscape.js-undo-redo) 108 | 109 | ## Team 110 | 111 | * [Perman Atayev](https://github.com/PermanAtayev) and [Ugur Dogrusoz](https://github.com/ugurdogrusoz) of [i-Vis at Bilkent University](http://www.cs.bilkent.edu.tr/~ivis). 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | -------------------------------------------------------------------------------- /public/samples/sample9-compound-sbgnml.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | -------------------------------------------------------------------------------- /public/css/jquery-ui.theme.min.css: -------------------------------------------------------------------------------- 1 | /*! jQuery UI - v1.11.4 - 2016-06-03 2 | * http://jqueryui.com 3 | * Copyright jQuery Foundation and other contributors; Licensed MIT */ 4 | 5 | .ui-widget{font-family:Trebuchet MS,Tahoma,Verdana,Arial,sans-serif;font-size:1.1em}.ui-widget .ui-widget{font-size:1em}.ui-widget input,.ui-widget select,.ui-widget textarea,.ui-widget button{font-family:Trebuchet MS,Tahoma,Verdana,Arial,sans-serif;font-size:1em}.ui-widget-content{border:1px solid #ddd;background:#eee url("images/ui-bg_highlight-soft_100_eeeeee_1x100.png") 50% top repeat-x;color:#333}.ui-widget-content a{color:#333}.ui-widget-header{border:1px solid #e78f08;background:#f6a828 url("images/ui-bg_gloss-wave_35_f6a828_500x100.png") 50% 50% repeat-x;color:#fff;font-weight:bold}.ui-widget-header a{color:#fff}.ui-state-default,.ui-widget-content .ui-state-default,.ui-widget-header .ui-state-default{border:1px solid #ccc;background:#f6f6f6 url("images/ui-bg_glass_100_f6f6f6_1x400.png") 50% 50% repeat-x;font-weight:bold;color:#1c94c4}.ui-state-default a,.ui-state-default a:link,.ui-state-default a:visited{color:#1c94c4;text-decoration:none}.ui-state-hover,.ui-widget-content .ui-state-hover,.ui-widget-header .ui-state-hover,.ui-state-focus,.ui-widget-content .ui-state-focus,.ui-widget-header .ui-state-focus{border:1px solid #fbcb09;background:#fdf5ce url("images/ui-bg_glass_100_fdf5ce_1x400.png") 50% 50% repeat-x;font-weight:bold;color:#c77405}.ui-state-hover a,.ui-state-hover a:hover,.ui-state-hover a:link,.ui-state-hover a:visited,.ui-state-focus a,.ui-state-focus a:hover,.ui-state-focus a:link,.ui-state-focus a:visited{color:#c77405;text-decoration:none}.ui-state-active,.ui-widget-content .ui-state-active,.ui-widget-header .ui-state-active{border:1px solid #fbd850;background:#fff url("images/ui-bg_glass_65_ffffff_1x400.png") 50% 50% repeat-x;font-weight:bold;color:#eb8f00}.ui-state-active a,.ui-state-active a:link,.ui-state-active a:visited{color:#eb8f00;text-decoration:none}.ui-state-highlight,.ui-widget-content .ui-state-highlight,.ui-widget-header .ui-state-highlight{border:1px solid #fed22f;background:#ffe45c url("images/ui-bg_highlight-soft_75_ffe45c_1x100.png") 50% top repeat-x;color:#363636}.ui-state-highlight a,.ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a{color:#363636}.ui-state-error,.ui-widget-content .ui-state-error,.ui-widget-header .ui-state-error{border:1px solid #cd0a0a;background:#b81900 url("images/ui-bg_diagonals-thick_18_b81900_40x40.png") 50% 50% repeat;color:#fff}.ui-state-error a,.ui-widget-content .ui-state-error a,.ui-widget-header .ui-state-error a{color:#fff}.ui-state-error-text,.ui-widget-content .ui-state-error-text,.ui-widget-header .ui-state-error-text{color:#fff}.ui-priority-primary,.ui-widget-content .ui-priority-primary,.ui-widget-header .ui-priority-primary{font-weight:bold}.ui-priority-secondary,.ui-widget-content .ui-priority-secondary,.ui-widget-header .ui-priority-secondary{opacity:.7;filter:Alpha(Opacity=70);font-weight:normal}.ui-state-disabled,.ui-widget-content .ui-state-disabled,.ui-widget-header .ui-state-disabled{opacity:.35;filter:Alpha(Opacity=35);background-image:none}.ui-state-disabled .ui-icon{filter:Alpha(Opacity=35)}.ui-icon{width:16px;height:16px}.ui-icon,.ui-widget-content .ui-icon{background-image:url("images/ui-icons_222222_256x240.png")}.ui-widget-header .ui-icon{background-image:url("images/ui-icons_ffffff_256x240.png")}.ui-state-default .ui-icon{background-image:url("images/ui-icons_ef8c08_256x240.png")}.ui-state-hover .ui-icon,.ui-state-focus .ui-icon{background-image:url("images/ui-icons_ef8c08_256x240.png")}.ui-state-active .ui-icon{background-image:url("images/ui-icons_ef8c08_256x240.png")}.ui-state-highlight .ui-icon{background-image:url("images/ui-icons_228ef1_256x240.png")}.ui-state-error .ui-icon,.ui-state-error-text .ui-icon{background-image:url("images/ui-icons_ffd27a_256x240.png")}.ui-icon-blank{background-position:16px 16px}.ui-icon-carat-1-n{background-position:0 0}.ui-icon-carat-1-ne{background-position:-16px 0}.ui-icon-carat-1-e{background-position:-32px 0}.ui-icon-carat-1-se{background-position:-48px 0}.ui-icon-carat-1-s{background-position:-64px 0}.ui-icon-carat-1-sw{background-position:-80px 0}.ui-icon-carat-1-w{background-position:-96px 0}.ui-icon-carat-1-nw{background-position:-112px 0}.ui-icon-carat-2-n-s{background-position:-128px 0}.ui-icon-carat-2-e-w{background-position:-144px 0}.ui-icon-triangle-1-n{background-position:0 -16px}.ui-icon-triangle-1-ne{background-position:-16px -16px}.ui-icon-triangle-1-e{background-position:-32px -16px}.ui-icon-triangle-1-se{background-position:-48px -16px}.ui-icon-triangle-1-s{background-position:-64px -16px}.ui-icon-triangle-1-sw{background-position:-80px -16px}.ui-icon-triangle-1-w{background-position:-96px -16px}.ui-icon-triangle-1-nw{background-position:-112px -16px}.ui-icon-triangle-2-n-s{background-position:-128px -16px}.ui-icon-triangle-2-e-w{background-position:-144px -16px}.ui-icon-arrow-1-n{background-position:0 -32px}.ui-icon-arrow-1-ne{background-position:-16px -32px}.ui-icon-arrow-1-e{background-position:-32px -32px}.ui-icon-arrow-1-se{background-position:-48px -32px}.ui-icon-arrow-1-s{background-position:-64px -32px}.ui-icon-arrow-1-sw{background-position:-80px -32px}.ui-icon-arrow-1-w{background-position:-96px -32px}.ui-icon-arrow-1-nw{background-position:-112px -32px}.ui-icon-arrow-2-n-s{background-position:-128px -32px}.ui-icon-arrow-2-ne-sw{background-position:-144px -32px}.ui-icon-arrow-2-e-w{background-position:-160px -32px}.ui-icon-arrow-2-se-nw{background-position:-176px -32px}.ui-icon-arrowstop-1-n{background-position:-192px -32px}.ui-icon-arrowstop-1-e{background-position:-208px -32px}.ui-icon-arrowstop-1-s{background-position:-224px -32px}.ui-icon-arrowstop-1-w{background-position:-240px -32px}.ui-icon-arrowthick-1-n{background-position:0 -48px}.ui-icon-arrowthick-1-ne{background-position:-16px -48px}.ui-icon-arrowthick-1-e{background-position:-32px -48px}.ui-icon-arrowthick-1-se{background-position:-48px -48px}.ui-icon-arrowthick-1-s{background-position:-64px -48px}.ui-icon-arrowthick-1-sw{background-position:-80px -48px}.ui-icon-arrowthick-1-w{background-position:-96px -48px}.ui-icon-arrowthick-1-nw{background-position:-112px -48px}.ui-icon-arrowthick-2-n-s{background-position:-128px -48px}.ui-icon-arrowthick-2-ne-sw{background-position:-144px -48px}.ui-icon-arrowthick-2-e-w{background-position:-160px -48px}.ui-icon-arrowthick-2-se-nw{background-position:-176px -48px}.ui-icon-arrowthickstop-1-n{background-position:-192px -48px}.ui-icon-arrowthickstop-1-e{background-position:-208px -48px}.ui-icon-arrowthickstop-1-s{background-position:-224px -48px}.ui-icon-arrowthickstop-1-w{background-position:-240px -48px}.ui-icon-arrowreturnthick-1-w{background-position:0 -64px}.ui-icon-arrowreturnthick-1-n{background-position:-16px -64px}.ui-icon-arrowreturnthick-1-e{background-position:-32px -64px}.ui-icon-arrowreturnthick-1-s{background-position:-48px -64px}.ui-icon-arrowreturn-1-w{background-position:-64px -64px}.ui-icon-arrowreturn-1-n{background-position:-80px -64px}.ui-icon-arrowreturn-1-e{background-position:-96px -64px}.ui-icon-arrowreturn-1-s{background-position:-112px -64px}.ui-icon-arrowrefresh-1-w{background-position:-128px -64px}.ui-icon-arrowrefresh-1-n{background-position:-144px -64px}.ui-icon-arrowrefresh-1-e{background-position:-160px -64px}.ui-icon-arrowrefresh-1-s{background-position:-176px -64px}.ui-icon-arrow-4{background-position:0 -80px}.ui-icon-arrow-4-diag{background-position:-16px -80px}.ui-icon-extlink{background-position:-32px -80px}.ui-icon-newwin{background-position:-48px -80px}.ui-icon-refresh{background-position:-64px -80px}.ui-icon-shuffle{background-position:-80px -80px}.ui-icon-transfer-e-w{background-position:-96px -80px}.ui-icon-transferthick-e-w{background-position:-112px -80px}.ui-icon-folder-collapsed{background-position:0 -96px}.ui-icon-folder-open{background-position:-16px -96px}.ui-icon-document{background-position:-32px -96px}.ui-icon-document-b{background-position:-48px -96px}.ui-icon-note{background-position:-64px -96px}.ui-icon-mail-closed{background-position:-80px -96px}.ui-icon-mail-open{background-position:-96px -96px}.ui-icon-suitcase{background-position:-112px -96px}.ui-icon-comment{background-position:-128px -96px}.ui-icon-person{background-position:-144px -96px}.ui-icon-print{background-position:-160px -96px}.ui-icon-trash{background-position:-176px -96px}.ui-icon-locked{background-position:-192px -96px}.ui-icon-unlocked{background-position:-208px -96px}.ui-icon-bookmark{background-position:-224px -96px}.ui-icon-tag{background-position:-240px -96px}.ui-icon-home{background-position:0 -112px}.ui-icon-flag{background-position:-16px -112px}.ui-icon-calendar{background-position:-32px -112px}.ui-icon-cart{background-position:-48px -112px}.ui-icon-pencil{background-position:-64px -112px}.ui-icon-clock{background-position:-80px -112px}.ui-icon-disk{background-position:-96px -112px}.ui-icon-calculator{background-position:-112px -112px}.ui-icon-zoomin{background-position:-128px -112px}.ui-icon-zoomout{background-position:-144px -112px}.ui-icon-search{background-position:-160px -112px}.ui-icon-wrench{background-position:-176px -112px}.ui-icon-gear{background-position:-192px -112px}.ui-icon-heart{background-position:-208px -112px}.ui-icon-star{background-position:-224px -112px}.ui-icon-link{background-position:-240px -112px}.ui-icon-cancel{background-position:0 -128px}.ui-icon-plus{background-position:-16px -128px}.ui-icon-plusthick{background-position:-32px -128px}.ui-icon-minus{background-position:-48px -128px}.ui-icon-minusthick{background-position:-64px -128px}.ui-icon-close{background-position:-80px -128px}.ui-icon-closethick{background-position:-96px -128px}.ui-icon-key{background-position:-112px -128px}.ui-icon-lightbulb{background-position:-128px -128px}.ui-icon-scissors{background-position:-144px -128px}.ui-icon-clipboard{background-position:-160px -128px}.ui-icon-copy{background-position:-176px -128px}.ui-icon-contact{background-position:-192px -128px}.ui-icon-image{background-position:-208px -128px}.ui-icon-video{background-position:-224px -128px}.ui-icon-script{background-position:-240px -128px}.ui-icon-alert{background-position:0 -144px}.ui-icon-info{background-position:-16px -144px}.ui-icon-notice{background-position:-32px -144px}.ui-icon-help{background-position:-48px -144px}.ui-icon-check{background-position:-64px -144px}.ui-icon-bullet{background-position:-80px -144px}.ui-icon-radio-on{background-position:-96px -144px}.ui-icon-radio-off{background-position:-112px -144px}.ui-icon-pin-w{background-position:-128px -144px}.ui-icon-pin-s{background-position:-144px -144px}.ui-icon-play{background-position:0 -160px}.ui-icon-pause{background-position:-16px -160px}.ui-icon-seek-next{background-position:-32px -160px}.ui-icon-seek-prev{background-position:-48px -160px}.ui-icon-seek-end{background-position:-64px -160px}.ui-icon-seek-start{background-position:-80px -160px}.ui-icon-seek-first{background-position:-80px -160px}.ui-icon-stop{background-position:-96px -160px}.ui-icon-eject{background-position:-112px -160px}.ui-icon-volume-off{background-position:-128px -160px}.ui-icon-volume-on{background-position:-144px -160px}.ui-icon-power{background-position:0 -176px}.ui-icon-signal-diag{background-position:-16px -176px}.ui-icon-signal{background-position:-32px -176px}.ui-icon-battery-0{background-position:-48px -176px}.ui-icon-battery-1{background-position:-64px -176px}.ui-icon-battery-2{background-position:-80px -176px}.ui-icon-battery-3{background-position:-96px -176px}.ui-icon-circle-plus{background-position:0 -192px}.ui-icon-circle-minus{background-position:-16px -192px}.ui-icon-circle-close{background-position:-32px -192px}.ui-icon-circle-triangle-e{background-position:-48px -192px}.ui-icon-circle-triangle-s{background-position:-64px -192px}.ui-icon-circle-triangle-w{background-position:-80px -192px}.ui-icon-circle-triangle-n{background-position:-96px -192px}.ui-icon-circle-arrow-e{background-position:-112px -192px}.ui-icon-circle-arrow-s{background-position:-128px -192px}.ui-icon-circle-arrow-w{background-position:-144px -192px}.ui-icon-circle-arrow-n{background-position:-160px -192px}.ui-icon-circle-zoomin{background-position:-176px -192px}.ui-icon-circle-zoomout{background-position:-192px -192px}.ui-icon-circle-check{background-position:-208px -192px}.ui-icon-circlesmall-plus{background-position:0 -208px}.ui-icon-circlesmall-minus{background-position:-16px -208px}.ui-icon-circlesmall-close{background-position:-32px -208px}.ui-icon-squaresmall-plus{background-position:-48px -208px}.ui-icon-squaresmall-minus{background-position:-64px -208px}.ui-icon-squaresmall-close{background-position:-80px -208px}.ui-icon-grip-dotted-vertical{background-position:0 -224px}.ui-icon-grip-dotted-horizontal{background-position:-16px -224px}.ui-icon-grip-solid-vertical{background-position:-32px -224px}.ui-icon-grip-solid-horizontal{background-position:-48px -224px}.ui-icon-gripsmall-diagonal-se{background-position:-64px -224px}.ui-icon-grip-diagonal-se{background-position:-80px -224px}.ui-corner-all,.ui-corner-top,.ui-corner-left,.ui-corner-tl{border-top-left-radius:4px}.ui-corner-all,.ui-corner-top,.ui-corner-right,.ui-corner-tr{border-top-right-radius:4px}.ui-corner-all,.ui-corner-bottom,.ui-corner-left,.ui-corner-bl{border-bottom-left-radius:4px}.ui-corner-all,.ui-corner-bottom,.ui-corner-right,.ui-corner-br{border-bottom-right-radius:4px}.ui-widget-overlay{background:#666 url("images/ui-bg_diagonals-thick_20_666666_40x40.png") 50% 50% repeat;opacity:.5;filter:Alpha(Opacity=50)}.ui-widget-shadow{margin:-5px 0 0 -5px;padding:5px;background:#000;opacity:.2;filter:Alpha(Opacity=20);border-radius:5px} -------------------------------------------------------------------------------- /public/css/jquery-ui.structure.min.css: -------------------------------------------------------------------------------- 1 | /*! jQuery UI - v1.11.4 - 2016-06-03 2 | * http://jqueryui.com 3 | * Copyright jQuery Foundation and other contributors; Licensed MIT */ 4 | 5 | .ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:before,.ui-helper-clearfix:after{content:"";display:table;border-collapse:collapse}.ui-helper-clearfix:after{clear:both}.ui-helper-clearfix{min-height:0}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-front{z-index:100}.ui-state-disabled{cursor:default!important}.ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}.ui-draggable-handle{-ms-touch-action:none;touch-action:none}.ui-resizable{position:relative}.ui-resizable-handle{position:absolute;font-size:0.1px;display:block;-ms-touch-action:none;touch-action:none}.ui-resizable-disabled .ui-resizable-handle,.ui-resizable-autohide .ui-resizable-handle{display:none}.ui-resizable-n{cursor:n-resize;height:7px;width:100%;top:-5px;left:0}.ui-resizable-s{cursor:s-resize;height:7px;width:100%;bottom:-5px;left:0}.ui-resizable-e{cursor:e-resize;width:7px;right:-5px;top:0;height:100%}.ui-resizable-w{cursor:w-resize;width:7px;left:-5px;top:0;height:100%}.ui-resizable-se{cursor:se-resize;width:12px;height:12px;right:1px;bottom:1px}.ui-resizable-sw{cursor:sw-resize;width:9px;height:9px;left:-5px;bottom:-5px}.ui-resizable-nw{cursor:nw-resize;width:9px;height:9px;left:-5px;top:-5px}.ui-resizable-ne{cursor:ne-resize;width:9px;height:9px;right:-5px;top:-5px}.ui-selectable{-ms-touch-action:none;touch-action:none}.ui-selectable-helper{position:absolute;z-index:100;border:1px dotted black}.ui-sortable-handle{-ms-touch-action:none;touch-action:none}.ui-accordion .ui-accordion-header{display:block;cursor:pointer;position:relative;margin:2px 0 0 0;padding:.5em .5em .5em .7em;min-height:0;font-size:100%}.ui-accordion .ui-accordion-icons{padding-left:2.2em}.ui-accordion .ui-accordion-icons .ui-accordion-icons{padding-left:2.2em}.ui-accordion .ui-accordion-header .ui-accordion-header-icon{position:absolute;left:.5em;top:50%;margin-top:-8px}.ui-accordion .ui-accordion-content{padding:1em 2.2em;border-top:0;overflow:auto}.ui-autocomplete{position:absolute;top:0;left:0;cursor:default}.ui-button{display:inline-block;position:relative;padding:0;line-height:normal;margin-right:.1em;cursor:pointer;vertical-align:middle;text-align:center;overflow:visible}.ui-button,.ui-button:link,.ui-button:visited,.ui-button:hover,.ui-button:active{text-decoration:none}.ui-button-icon-only{width:2.2em}button.ui-button-icon-only{width:2.4em}.ui-button-icons-only{width:3.4em}button.ui-button-icons-only{width:3.7em}.ui-button .ui-button-text{display:block;line-height:normal}.ui-button-text-only .ui-button-text{padding:.4em 1em}.ui-button-icon-only .ui-button-text,.ui-button-icons-only .ui-button-text{padding:.4em;text-indent:-9999999px}.ui-button-text-icon-primary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 1em .4em 2.1em}.ui-button-text-icon-secondary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 2.1em .4em 1em}.ui-button-text-icons .ui-button-text{padding-left:2.1em;padding-right:2.1em}input.ui-button{padding:.4em 1em}.ui-button-icon-only .ui-icon,.ui-button-text-icon-primary .ui-icon,.ui-button-text-icon-secondary .ui-icon,.ui-button-text-icons .ui-icon,.ui-button-icons-only .ui-icon{position:absolute;top:50%;margin-top:-8px}.ui-button-icon-only .ui-icon{left:50%;margin-left:-8px}.ui-button-text-icon-primary .ui-button-icon-primary,.ui-button-text-icons .ui-button-icon-primary,.ui-button-icons-only .ui-button-icon-primary{left:.5em}.ui-button-text-icon-secondary .ui-button-icon-secondary,.ui-button-text-icons .ui-button-icon-secondary,.ui-button-icons-only .ui-button-icon-secondary{right:.5em}.ui-buttonset{margin-right:7px}.ui-buttonset .ui-button{margin-left:0;margin-right:-.3em}input.ui-button::-moz-focus-inner,button.ui-button::-moz-focus-inner{border:0;padding:0}.ui-datepicker{width:17em;padding:.2em .2em 0;display:none}.ui-datepicker .ui-datepicker-header{position:relative;padding:.2em 0}.ui-datepicker .ui-datepicker-prev,.ui-datepicker .ui-datepicker-next{position:absolute;top:2px;width:1.8em;height:1.8em}.ui-datepicker .ui-datepicker-prev-hover,.ui-datepicker .ui-datepicker-next-hover{top:1px}.ui-datepicker .ui-datepicker-prev{left:2px}.ui-datepicker .ui-datepicker-next{right:2px}.ui-datepicker .ui-datepicker-prev-hover{left:1px}.ui-datepicker .ui-datepicker-next-hover{right:1px}.ui-datepicker .ui-datepicker-prev span,.ui-datepicker .ui-datepicker-next span{display:block;position:absolute;left:50%;margin-left:-8px;top:50%;margin-top:-8px}.ui-datepicker .ui-datepicker-title{margin:0 2.3em;line-height:1.8em;text-align:center}.ui-datepicker .ui-datepicker-title select{font-size:1em;margin:1px 0}.ui-datepicker select.ui-datepicker-month,.ui-datepicker select.ui-datepicker-year{width:45%}.ui-datepicker table{width:100%;font-size:.9em;border-collapse:collapse;margin:0 0 .4em}.ui-datepicker th{padding:.7em .3em;text-align:center;font-weight:bold;border:0}.ui-datepicker td{border:0;padding:1px}.ui-datepicker td span,.ui-datepicker td a{display:block;padding:.2em;text-align:right;text-decoration:none}.ui-datepicker .ui-datepicker-buttonpane{background-image:none;margin:.7em 0 0 0;padding:0 .2em;border-left:0;border-right:0;border-bottom:0}.ui-datepicker .ui-datepicker-buttonpane button{float:right;margin:.5em .2em .4em;cursor:pointer;padding:.2em .6em .3em .6em;width:auto;overflow:visible}.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current{float:left}.ui-datepicker.ui-datepicker-multi{width:auto}.ui-datepicker-multi .ui-datepicker-group{float:left}.ui-datepicker-multi .ui-datepicker-group table{width:95%;margin:0 auto .4em}.ui-datepicker-multi-2 .ui-datepicker-group{width:50%}.ui-datepicker-multi-3 .ui-datepicker-group{width:33.3%}.ui-datepicker-multi-4 .ui-datepicker-group{width:25%}.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header,.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header{border-left-width:0}.ui-datepicker-multi .ui-datepicker-buttonpane{clear:left}.ui-datepicker-row-break{clear:both;width:100%;font-size:0}.ui-datepicker-rtl{direction:rtl}.ui-datepicker-rtl .ui-datepicker-prev{right:2px;left:auto}.ui-datepicker-rtl .ui-datepicker-next{left:2px;right:auto}.ui-datepicker-rtl .ui-datepicker-prev:hover{right:1px;left:auto}.ui-datepicker-rtl .ui-datepicker-next:hover{left:1px;right:auto}.ui-datepicker-rtl .ui-datepicker-buttonpane{clear:right}.ui-datepicker-rtl .ui-datepicker-buttonpane button{float:left}.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current,.ui-datepicker-rtl .ui-datepicker-group{float:right}.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header,.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header{border-right-width:0;border-left-width:1px}.ui-dialog{overflow:hidden;position:absolute;top:0;left:0;padding:.2em;outline:0}.ui-dialog .ui-dialog-titlebar{padding:.4em 1em;position:relative}.ui-dialog .ui-dialog-title{float:left;margin:.1em 0;white-space:nowrap;width:90%;overflow:hidden;text-overflow:ellipsis}.ui-dialog .ui-dialog-titlebar-close{position:absolute;right:.3em;top:50%;width:20px;margin:-10px 0 0 0;padding:1px;height:20px}.ui-dialog .ui-dialog-content{position:relative;border:0;padding:.5em 1em;background:none;overflow:auto}.ui-dialog .ui-dialog-buttonpane{text-align:left;border-width:1px 0 0 0;background-image:none;margin-top:.5em;padding:.3em 1em .5em .4em}.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset{float:right}.ui-dialog .ui-dialog-buttonpane button{margin:.5em .4em .5em 0;cursor:pointer}.ui-dialog .ui-resizable-se{width:12px;height:12px;right:-5px;bottom:-5px;background-position:16px 16px}.ui-draggable .ui-dialog-titlebar{cursor:move}.ui-menu{list-style:none;padding:0;margin:0;display:block;outline:none}.ui-menu .ui-menu{position:absolute}.ui-menu .ui-menu-item{position:relative;margin:0;padding:3px 1em 3px .4em;cursor:pointer;min-height:0;list-style-image:url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7")}.ui-menu .ui-menu-divider{margin:5px 0;height:0;font-size:0;line-height:0;border-width:1px 0 0 0}.ui-menu .ui-state-focus,.ui-menu .ui-state-active{margin:-1px}.ui-menu-icons{position:relative}.ui-menu-icons .ui-menu-item{padding-left:2em}.ui-menu .ui-icon{position:absolute;top:0;bottom:0;left:.2em;margin:auto 0}.ui-menu .ui-menu-icon{left:auto;right:0}.ui-progressbar{height:2em;text-align:left;overflow:hidden}.ui-progressbar .ui-progressbar-value{margin:-1px;height:100%}.ui-progressbar .ui-progressbar-overlay{background:url("data:image/gif;base64,R0lGODlhKAAoAIABAAAAAP///yH/C05FVFNDQVBFMi4wAwEAAAAh+QQJAQABACwAAAAAKAAoAAACkYwNqXrdC52DS06a7MFZI+4FHBCKoDeWKXqymPqGqxvJrXZbMx7Ttc+w9XgU2FB3lOyQRWET2IFGiU9m1frDVpxZZc6bfHwv4c1YXP6k1Vdy292Fb6UkuvFtXpvWSzA+HycXJHUXiGYIiMg2R6W459gnWGfHNdjIqDWVqemH2ekpObkpOlppWUqZiqr6edqqWQAAIfkECQEAAQAsAAAAACgAKAAAApSMgZnGfaqcg1E2uuzDmmHUBR8Qil95hiPKqWn3aqtLsS18y7G1SzNeowWBENtQd+T1JktP05nzPTdJZlR6vUxNWWjV+vUWhWNkWFwxl9VpZRedYcflIOLafaa28XdsH/ynlcc1uPVDZxQIR0K25+cICCmoqCe5mGhZOfeYSUh5yJcJyrkZWWpaR8doJ2o4NYq62lAAACH5BAkBAAEALAAAAAAoACgAAAKVDI4Yy22ZnINRNqosw0Bv7i1gyHUkFj7oSaWlu3ovC8GxNso5fluz3qLVhBVeT/Lz7ZTHyxL5dDalQWPVOsQWtRnuwXaFTj9jVVh8pma9JjZ4zYSj5ZOyma7uuolffh+IR5aW97cHuBUXKGKXlKjn+DiHWMcYJah4N0lYCMlJOXipGRr5qdgoSTrqWSq6WFl2ypoaUAAAIfkECQEAAQAsAAAAACgAKAAAApaEb6HLgd/iO7FNWtcFWe+ufODGjRfoiJ2akShbueb0wtI50zm02pbvwfWEMWBQ1zKGlLIhskiEPm9R6vRXxV4ZzWT2yHOGpWMyorblKlNp8HmHEb/lCXjcW7bmtXP8Xt229OVWR1fod2eWqNfHuMjXCPkIGNileOiImVmCOEmoSfn3yXlJWmoHGhqp6ilYuWYpmTqKUgAAIfkECQEAAQAsAAAAACgAKAAAApiEH6kb58biQ3FNWtMFWW3eNVcojuFGfqnZqSebuS06w5V80/X02pKe8zFwP6EFWOT1lDFk8rGERh1TTNOocQ61Hm4Xm2VexUHpzjymViHrFbiELsefVrn6XKfnt2Q9G/+Xdie499XHd2g4h7ioOGhXGJboGAnXSBnoBwKYyfioubZJ2Hn0RuRZaflZOil56Zp6iioKSXpUAAAh+QQJAQABACwAAAAAKAAoAAACkoQRqRvnxuI7kU1a1UU5bd5tnSeOZXhmn5lWK3qNTWvRdQxP8qvaC+/yaYQzXO7BMvaUEmJRd3TsiMAgswmNYrSgZdYrTX6tSHGZO73ezuAw2uxuQ+BbeZfMxsexY35+/Qe4J1inV0g4x3WHuMhIl2jXOKT2Q+VU5fgoSUI52VfZyfkJGkha6jmY+aaYdirq+lQAACH5BAkBAAEALAAAAAAoACgAAAKWBIKpYe0L3YNKToqswUlvznigd4wiR4KhZrKt9Upqip61i9E3vMvxRdHlbEFiEXfk9YARYxOZZD6VQ2pUunBmtRXo1Lf8hMVVcNl8JafV38aM2/Fu5V16Bn63r6xt97j09+MXSFi4BniGFae3hzbH9+hYBzkpuUh5aZmHuanZOZgIuvbGiNeomCnaxxap2upaCZsq+1kAACH5BAkBAAEALAAAAAAoACgAAAKXjI8By5zf4kOxTVrXNVlv1X0d8IGZGKLnNpYtm8Lr9cqVeuOSvfOW79D9aDHizNhDJidFZhNydEahOaDH6nomtJjp1tutKoNWkvA6JqfRVLHU/QUfau9l2x7G54d1fl995xcIGAdXqMfBNadoYrhH+Mg2KBlpVpbluCiXmMnZ2Sh4GBqJ+ckIOqqJ6LmKSllZmsoq6wpQAAAh+QQJAQABACwAAAAAKAAoAAAClYx/oLvoxuJDkU1a1YUZbJ59nSd2ZXhWqbRa2/gF8Gu2DY3iqs7yrq+xBYEkYvFSM8aSSObE+ZgRl1BHFZNr7pRCavZ5BW2142hY3AN/zWtsmf12p9XxxFl2lpLn1rseztfXZjdIWIf2s5dItwjYKBgo9yg5pHgzJXTEeGlZuenpyPmpGQoKOWkYmSpaSnqKileI2FAAACH5BAkBAAEALAAAAAAoACgAAAKVjB+gu+jG4kORTVrVhRlsnn2dJ3ZleFaptFrb+CXmO9OozeL5VfP99HvAWhpiUdcwkpBH3825AwYdU8xTqlLGhtCosArKMpvfa1mMRae9VvWZfeB2XfPkeLmm18lUcBj+p5dnN8jXZ3YIGEhYuOUn45aoCDkp16hl5IjYJvjWKcnoGQpqyPlpOhr3aElaqrq56Bq7VAAAOw==");height:100%;filter:alpha(opacity=25);opacity:0.25}.ui-progressbar-indeterminate .ui-progressbar-value{background-image:none}.ui-selectmenu-menu{padding:0;margin:0;position:absolute;top:0;left:0;display:none}.ui-selectmenu-menu .ui-menu{overflow:auto;overflow-x:hidden;padding-bottom:1px}.ui-selectmenu-menu .ui-menu .ui-selectmenu-optgroup{font-size:1em;font-weight:bold;line-height:1.5;padding:2px 0.4em;margin:0.5em 0 0 0;height:auto;border:0}.ui-selectmenu-open{display:block}.ui-selectmenu-button{display:inline-block;overflow:hidden;position:relative;text-decoration:none;cursor:pointer}.ui-selectmenu-button span.ui-icon{right:0.5em;left:auto;margin-top:-8px;position:absolute;top:50%}.ui-selectmenu-button span.ui-selectmenu-text{text-align:left;padding:0.4em 2.1em 0.4em 1em;display:block;line-height:1.4;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ui-slider{position:relative;text-align:left}.ui-slider .ui-slider-handle{position:absolute;z-index:2;width:1.2em;height:1.2em;cursor:default;-ms-touch-action:none;touch-action:none}.ui-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;background-position:0 0}.ui-slider.ui-state-disabled .ui-slider-handle,.ui-slider.ui-state-disabled .ui-slider-range{filter:inherit}.ui-slider-horizontal{height:.8em}.ui-slider-horizontal .ui-slider-handle{top:-.3em;margin-left:-.6em}.ui-slider-horizontal .ui-slider-range{top:0;height:100%}.ui-slider-horizontal .ui-slider-range-min{left:0}.ui-slider-horizontal .ui-slider-range-max{right:0}.ui-slider-vertical{width:.8em;height:100px}.ui-slider-vertical .ui-slider-handle{left:-.3em;margin-left:0;margin-bottom:-.6em}.ui-slider-vertical .ui-slider-range{left:0;width:100%}.ui-slider-vertical .ui-slider-range-min{bottom:0}.ui-slider-vertical .ui-slider-range-max{top:0}.ui-spinner{position:relative;display:inline-block;overflow:hidden;padding:0;vertical-align:middle}.ui-spinner-input{border:none;background:none;color:inherit;padding:0;margin:.2em 0;vertical-align:middle;margin-left:.4em;margin-right:22px}.ui-spinner-button{width:16px;height:50%;font-size:.5em;padding:0;margin:0;text-align:center;position:absolute;cursor:default;display:block;overflow:hidden;right:0}.ui-spinner a.ui-spinner-button{border-top:none;border-bottom:none;border-right:none}.ui-spinner .ui-icon{position:absolute;margin-top:-8px;top:50%;left:0}.ui-spinner-up{top:0}.ui-spinner-down{bottom:0}.ui-spinner .ui-icon-triangle-1-s{background-position:-65px -16px}.ui-tabs{position:relative;padding:.2em}.ui-tabs .ui-tabs-nav{margin:0;padding:.2em .2em 0}.ui-tabs .ui-tabs-nav li{list-style:none;float:left;position:relative;top:0;margin:1px .2em 0 0;border-bottom-width:0;padding:0;white-space:nowrap}.ui-tabs .ui-tabs-nav .ui-tabs-anchor{float:left;padding:.5em 1em;text-decoration:none}.ui-tabs .ui-tabs-nav li.ui-tabs-active{margin-bottom:-1px;padding-bottom:1px}.ui-tabs .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor,.ui-tabs .ui-tabs-nav li.ui-state-disabled .ui-tabs-anchor,.ui-tabs .ui-tabs-nav li.ui-tabs-loading .ui-tabs-anchor{cursor:text}.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor{cursor:pointer}.ui-tabs .ui-tabs-panel{display:block;border-width:0;padding:1em 1.4em;background:none}.ui-tooltip{padding:8px;position:absolute;z-index:9999;max-width:300px;-webkit-box-shadow:0 0 5px #aaa;box-shadow:0 0 5px #aaa}body .ui-tooltip{border-width:2px} -------------------------------------------------------------------------------- /public/samples/sample15-compound-json.txt: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "group": "nodes", 4 | "data": { 5 | "width": 161, 6 | "height": 210, 7 | "clusterID": 0, 8 | "id": "n3" 9 | }, 10 | "position": { 11 | "x": 909.9422216835551, 12 | "y": 1733.6473809309432 13 | } 14 | }, 15 | { 16 | "group": "nodes", 17 | "data": { 18 | "width": 43, 19 | "height": 43, 20 | "clusterID": 3, 21 | "parent": "n3", 22 | "id": "n3:n0" 23 | }, 24 | "position": { 25 | "x": 1000.2692732123134, 26 | "y": 1685.4624984136162 27 | } 28 | }, 29 | { 30 | "group": "nodes", 31 | "data": { 32 | "width": 43, 33 | "height": 43, 34 | "clusterID": 3, 35 | "parent": "n3", 36 | "id": "n3:n1" 37 | }, 38 | "position": { 39 | "x": 819.6151701547968, 40 | "y": 1781.8322634482683 41 | } 42 | }, 43 | { 44 | "group": "nodes", 45 | "data": { 46 | "width": 43, 47 | "height": 43, 48 | "clusterID": 3, 49 | "parent": "n3", 50 | "id": "n3:n2" 51 | }, 52 | "position": { 53 | "x": 958.1271042008805, 54 | "y": 1823.9744324597016 55 | } 56 | }, 57 | { 58 | "group": "nodes", 59 | "data": { 60 | "width": 43, 61 | "height": 43, 62 | "clusterID": 3, 63 | "parent": "n3", 64 | "id": "n3:n3" 65 | }, 66 | "position": { 67 | "x": 861.7573391662288, 68 | "y": 1643.3203294021846 69 | } 70 | }, 71 | { 72 | "group": "nodes", 73 | "data": { 74 | "width": 133, 75 | "height": 218, 76 | "clusterID": 0, 77 | "id": "n4" 78 | }, 79 | "position": { 80 | "x": 1190.0923398920565, 81 | "y": 1434.7155637434184 82 | } 83 | }, 84 | { 85 | "group": "nodes", 86 | "data": { 87 | "width": 42, 88 | "height": 43, 89 | "clusterID": 4, 90 | "parent": "n4", 91 | "id": "n4:n0" 92 | }, 93 | "position": { 94 | "x": 1308.2006372494802, 95 | "y": 1441.1208044158989 96 | } 97 | }, 98 | { 99 | "group": "nodes", 100 | "data": { 101 | "width": 43, 102 | "height": 42, 103 | "clusterID": 4, 104 | "parent": "n4", 105 | "id": "n4:n1" 106 | }, 107 | "position": { 108 | "x": 1084.555278582042, 109 | "y": 1348.3208801490744 110 | } 111 | }, 112 | { 113 | "group": "nodes", 114 | "data": { 115 | "width": 43, 116 | "height": 42, 117 | "clusterID": 4, 118 | "parent": "n4", 119 | "id": "n4:n2" 120 | }, 121 | "position": { 122 | "x": 1211.1685209545349, 123 | "y": 1555.2205114874664 124 | } 125 | }, 126 | { 127 | "group": "nodes", 128 | "data": { 129 | "width": 43, 130 | "height": 43, 131 | "clusterID": 4, 132 | "parent": "n4", 133 | "id": "n4:n3" 134 | }, 135 | "position": { 136 | "x": 1072.4840425346329, 137 | "y": 1497.8985446003448 138 | } 139 | }, 140 | { 141 | "group": "nodes", 142 | "data": { 143 | "width": 43, 144 | "height": 41, 145 | "clusterID": 4, 146 | "parent": "n4", 147 | "id": "n4:n4" 148 | }, 149 | "position": { 150 | "x": 1229.9925292563228, 151 | "y": 1313.7106159993705 152 | } 153 | }, 154 | { 155 | "group": "nodes", 156 | "data": { 157 | "width": 79, 158 | "height": 151, 159 | "clusterID": 0, 160 | "id": "n5" 161 | }, 162 | "position": { 163 | "x": 1443.1353673275476, 164 | "y": 1224.3723583396104 165 | } 166 | }, 167 | { 168 | "group": "nodes", 169 | "data": { 170 | "width": 43, 171 | "height": 43, 172 | "clusterID": 6, 173 | "parent": "n5", 174 | "id": "n5:n0" 175 | }, 176 | "position": { 177 | "x": 1437.6825890415491, 178 | "y": 1274.9063713785226 179 | } 180 | }, 181 | { 182 | "group": "nodes", 183 | "data": { 184 | "width": 43, 185 | "height": 42, 186 | "clusterID": 6, 187 | "parent": "n5", 188 | "id": "n5:n1" 189 | }, 190 | "position": { 191 | "x": 1448.588145613546, 192 | "y": 1173.338345300698 193 | } 194 | }, 195 | { 196 | "group": "nodes", 197 | "data": { 198 | "width": 118, 199 | "height": 140, 200 | "clusterID": 0, 201 | "id": "n6" 202 | }, 203 | "position": { 204 | "x": 1490.2763857085201, 205 | "y": 1494.958307274132 206 | } 207 | }, 208 | { 209 | "group": "nodes", 210 | "data": { 211 | "width": 43, 212 | "height": 43, 213 | "clusterID": 5, 214 | "parent": "n6", 215 | "id": "n6:n0" 216 | }, 217 | "position": { 218 | "x": 1548.7551438126914, 219 | "y": 1562.3182917993925 220 | } 221 | }, 222 | { 223 | "group": "nodes", 224 | "data": { 225 | "width": 44, 226 | "height": 45, 227 | "clusterID": 5, 228 | "parent": "n6", 229 | "id": "n6:n1" 230 | }, 231 | "position": { 232 | "x": 1545.8098692052602, 233 | "y": 1428.5983227488714 234 | } 235 | }, 236 | { 237 | "group": "nodes", 238 | "data": { 239 | "width": 43, 240 | "height": 43, 241 | "clusterID": 5, 242 | "parent": "n6", 243 | "id": "n6:n2" 244 | }, 245 | "position": { 246 | "x": 1431.7976276043487, 247 | "y": 1498.533389278625 248 | } 249 | }, 250 | { 251 | "group": "nodes", 252 | "data": { 253 | "width": 176, 254 | "height": 112, 255 | "clusterID": 0, 256 | "id": "n7" 257 | }, 258 | "position": { 259 | "x": 1256.6855808290916, 260 | "y": 1756.2012717981456 261 | } 262 | }, 263 | { 264 | "group": "nodes", 265 | "data": { 266 | "width": 43, 267 | "height": 43, 268 | "clusterID": 1, 269 | "parent": "n7", 270 | "id": "n7:n0" 271 | }, 272 | "position": { 273 | "x": 1191.0800255545819, 274 | "y": 1817.4980302054728 275 | } 276 | }, 277 | { 278 | "group": "nodes", 279 | "data": { 280 | "width": 43, 281 | "height": 41, 282 | "clusterID": 1, 283 | "parent": "n7", 284 | "id": "n7:n1" 285 | }, 286 | "position": { 287 | "x": 1238.8053264560215, 288 | "y": 1693.9045133908185 289 | } 290 | }, 291 | { 292 | "group": "nodes", 293 | "data": { 294 | "width": 43, 295 | "height": 43, 296 | "clusterID": 1, 297 | "parent": "n7", 298 | "id": "n7:n2" 299 | }, 300 | "position": { 301 | "x": 1322.2911361036013, 302 | "y": 1796.7791037046331 303 | } 304 | }, 305 | { 306 | "group": "nodes", 307 | "data": { 308 | "width": 132, 309 | "height": 161, 310 | "clusterID": 0, 311 | "id": "n8" 312 | }, 313 | "position": { 314 | "x": 661.8857530610976, 315 | "y": 1410.1863350558174 316 | } 317 | }, 318 | { 319 | "group": "nodes", 320 | "data": { 321 | "width": 43, 322 | "height": 48, 323 | "clusterID": 2, 324 | "parent": "n8", 325 | "id": "n8:n0" 326 | }, 327 | "position": { 328 | "x": 598.4527815919248, 329 | "y": 1429.4402445327544 330 | } 331 | }, 332 | { 333 | "group": "nodes", 334 | "data": { 335 | "width": 42, 336 | "height": 49, 337 | "clusterID": 2, 338 | "parent": "n8", 339 | "id": "n8:n1" 340 | }, 341 | "position": { 342 | "x": 725.8187245302704, 343 | "y": 1477.435020171697 344 | } 345 | }, 346 | { 347 | "group": "nodes", 348 | "data": { 349 | "width": 43, 350 | "height": 49, 351 | "clusterID": 2, 352 | "parent": "n8", 353 | "id": "n8:n2" 354 | }, 355 | "position": { 356 | "x": 703.7501434261545, 357 | "y": 1342.937649939938 358 | } 359 | }, 360 | { 361 | "group": "edges", 362 | "data": { 363 | "source": "n7:n1", 364 | "target": "n6:n2", 365 | "id": "e0" 366 | } 367 | }, 368 | { 369 | "group": "edges", 370 | "data": { 371 | "source": "n6:n0", 372 | "target": "n6:n2", 373 | "id": "e1" 374 | } 375 | }, 376 | { 377 | "group": "edges", 378 | "data": { 379 | "source": "n3:n1", 380 | "target": "n3:n3", 381 | "id": "e2" 382 | } 383 | }, 384 | { 385 | "group": "edges", 386 | "data": { 387 | "source": "n4:n2", 388 | "target": "n3:n2", 389 | "id": "e3" 390 | } 391 | }, 392 | { 393 | "group": "edges", 394 | "data": { 395 | "source": "n7:n1", 396 | "target": "n3:n0", 397 | "id": "e4" 398 | } 399 | }, 400 | { 401 | "group": "edges", 402 | "data": { 403 | "source": "n4:n1", 404 | "target": "n4:n3", 405 | "id": "e5" 406 | } 407 | }, 408 | { 409 | "group": "edges", 410 | "data": { 411 | "source": "n6:n1", 412 | "target": "n6:n2", 413 | "id": "e6" 414 | } 415 | }, 416 | { 417 | "group": "edges", 418 | "data": { 419 | "source": "n5:n0", 420 | "target": "n4:n0", 421 | "id": "e7" 422 | } 423 | }, 424 | { 425 | "group": "edges", 426 | "data": { 427 | "source": "n3:n0", 428 | "target": "n3:n1", 429 | "id": "e8" 430 | } 431 | }, 432 | { 433 | "group": "edges", 434 | "data": { 435 | "source": "n4:n3", 436 | "target": "n3:n0", 437 | "id": "e9" 438 | } 439 | }, 440 | { 441 | "group": "edges", 442 | "data": { 443 | "source": "n5:n0", 444 | "target": "n4:n4", 445 | "id": "e10" 446 | } 447 | }, 448 | { 449 | "group": "edges", 450 | "data": { 451 | "source": "n4:n1", 452 | "target": "n3:n3", 453 | "id": "e11" 454 | } 455 | }, 456 | { 457 | "group": "edges", 458 | "data": { 459 | "source": "n6:n1", 460 | "target": "n6:n0", 461 | "id": "e12" 462 | } 463 | }, 464 | { 465 | "group": "edges", 466 | "data": { 467 | "source": "n4:n3", 468 | "target": "n4:n2", 469 | "id": "e13" 470 | } 471 | }, 472 | { 473 | "group": "edges", 474 | "data": { 475 | "source": "n3:n2", 476 | "target": "n3:n1", 477 | "id": "e14" 478 | } 479 | }, 480 | { 481 | "group": "edges", 482 | "data": { 483 | "source": "n4:n4", 484 | "target": "n4:n1", 485 | "id": "e15" 486 | } 487 | }, 488 | { 489 | "group": "edges", 490 | "data": { 491 | "source": "n7:n1", 492 | "target": "n7:n2", 493 | "id": "e16" 494 | } 495 | }, 496 | { 497 | "group": "edges", 498 | "data": { 499 | "source": "n6:n2", 500 | "target": "n5:n0", 501 | "id": "e17" 502 | } 503 | }, 504 | { 505 | "group": "edges", 506 | "data": { 507 | "source": "n3:n3", 508 | "target": "n8:n1", 509 | "id": "e18" 510 | } 511 | }, 512 | { 513 | "group": "edges", 514 | "data": { 515 | "source": "n4:n4", 516 | "target": "n5:n1", 517 | "id": "e19" 518 | } 519 | }, 520 | { 521 | "group": "edges", 522 | "data": { 523 | "source": "n7:n0", 524 | "target": "n7:n2", 525 | "id": "e20" 526 | } 527 | }, 528 | { 529 | "group": "edges", 530 | "data": { 531 | "source": "n8:n1", 532 | "target": "n8:n2", 533 | "id": "e21" 534 | } 535 | }, 536 | { 537 | "group": "edges", 538 | "data": { 539 | "source": "n4:n2", 540 | "target": "n4:n0", 541 | "id": "e22" 542 | } 543 | }, 544 | { 545 | "group": "edges", 546 | "data": { 547 | "source": "n4:n3", 548 | "target": "n4:n0", 549 | "id": "e23" 550 | } 551 | }, 552 | { 553 | "group": "edges", 554 | "data": { 555 | "source": "n8:n1", 556 | "target": "n8:n0", 557 | "id": "e24" 558 | } 559 | }, 560 | { 561 | "group": "edges", 562 | "data": { 563 | "source": "n4:n0", 564 | "target": "n4:n4", 565 | "id": "e25" 566 | } 567 | } 568 | ] -------------------------------------------------------------------------------- /public/js/view_scripts/underscore-min.js: -------------------------------------------------------------------------------- 1 | // Underscore.js 1.9.1 2 | // http://underscorejs.org 3 | // (c) 2009-2018 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors 4 | // Underscore may be freely distributed under the MIT license. 5 | !function(){var n="object"==typeof self&&self.self===self&&self||"object"==typeof global&&global.global===global&&global||this||{},r=n._,e=Array.prototype,o=Object.prototype,s="undefined"!=typeof Symbol?Symbol.prototype:null,u=e.push,c=e.slice,p=o.toString,i=o.hasOwnProperty,t=Array.isArray,a=Object.keys,l=Object.create,f=function(){},h=function(n){return n instanceof h?n:this instanceof h?void(this._wrapped=n):new h(n)};"undefined"==typeof exports||exports.nodeType?n._=h:("undefined"!=typeof module&&!module.nodeType&&module.exports&&(exports=module.exports=h),exports._=h),h.VERSION="1.9.1";var v,y=function(u,i,n){if(void 0===i)return u;switch(null==n?3:n){case 1:return function(n){return u.call(i,n)};case 3:return function(n,r,t){return u.call(i,n,r,t)};case 4:return function(n,r,t,e){return u.call(i,n,r,t,e)}}return function(){return u.apply(i,arguments)}},d=function(n,r,t){return h.iteratee!==v?h.iteratee(n,r):null==n?h.identity:h.isFunction(n)?y(n,r,t):h.isObject(n)&&!h.isArray(n)?h.matcher(n):h.property(n)};h.iteratee=v=function(n,r){return d(n,r,1/0)};var g=function(u,i){return i=null==i?u.length-1:+i,function(){for(var n=Math.max(arguments.length-i,0),r=Array(n),t=0;t":">",'"':""","'":"'","`":"`"},P=h.invert(L),W=function(r){var t=function(n){return r[n]},n="(?:"+h.keys(r).join("|")+")",e=RegExp(n),u=RegExp(n,"g");return function(n){return n=null==n?"":""+n,e.test(n)?n.replace(u,t):n}};h.escape=W(L),h.unescape=W(P),h.result=function(n,r,t){h.isArray(r)||(r=[r]);var e=r.length;if(!e)return h.isFunction(t)?t.call(n):t;for(var u=0;u/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var J=/(.)^/,U={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},V=/\\|'|\r|\n|\u2028|\u2029/g,$=function(n){return"\\"+U[n]};h.template=function(i,n,r){!n&&r&&(n=r),n=h.defaults({},n,h.templateSettings);var t,e=RegExp([(n.escape||J).source,(n.interpolate||J).source,(n.evaluate||J).source].join("|")+"|$","g"),o=0,a="__p+='";i.replace(e,function(n,r,t,e,u){return a+=i.slice(o,u).replace(V,$),o=u+n.length,r?a+="'+\n((__t=("+r+"))==null?'':_.escape(__t))+\n'":t?a+="'+\n((__t=("+t+"))==null?'':__t)+\n'":e&&(a+="';\n"+e+"\n__p+='"),n}),a+="';\n",n.variable||(a="with(obj||{}){\n"+a+"}\n"),a="var __t,__p='',__j=Array.prototype.join,"+"print=function(){__p+=__j.call(arguments,'');};\n"+a+"return __p;\n";try{t=new Function(n.variable||"obj","_",a)}catch(n){throw n.source=a,n}var u=function(n){return t.call(this,n,h)},c=n.variable||"obj";return u.source="function("+c+"){\n"+a+"}",u},h.chain=function(n){var r=h(n);return r._chain=!0,r};var G=function(n,r){return n._chain?h(r).chain():r};h.mixin=function(t){return h.each(h.functions(t),function(n){var r=h[n]=t[n];h.prototype[n]=function(){var n=[this._wrapped];return u.apply(n,arguments),G(this,r.apply(h,n))}}),h},h.mixin(h),h.each(["pop","push","reverse","shift","sort","splice","unshift"],function(r){var t=e[r];h.prototype[r]=function(){var n=this._wrapped;return t.apply(n,arguments),"shift"!==r&&"splice"!==r||0!==n.length||delete n[0],G(this,n)}}),h.each(["concat","join","slice"],function(n){var r=e[n];h.prototype[n]=function(){return G(this,r.apply(this._wrapped,arguments))}}),h.prototype.value=function(){return this._wrapped},h.prototype.valueOf=h.prototype.toJSON=h.prototype.value,h.prototype.toString=function(){return String(this._wrapped)},"function"==typeof define&&define.amd&&define("underscore",[],function(){return h})}(); -------------------------------------------------------------------------------- /public/css/font-awesome.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Font Awesome 4.0.3 by @davegandy - http://fontawesome.io - @fontawesome 3 | * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) 4 | */@font-face{font-family:'FontAwesome';src:url('fonts/fontawesome-webfont.eot?v=4.0.3');src:url('fonts/fontawesome-webfont.eot?#iefix&v=4.0.3') format('embedded-opentype'),url('fonts/fontawesome-webfont.woff?v=4.0.3') format('woff'),url('fonts/fontawesome-webfont.ttf?v=4.0.3') format('truetype'),url('fonts/fontawesome-webfont.svg?v=4.0.3#fontawesomeregular') format('svg');font-weight:normal;font-style:normal}.fa{display:inline-block;font-family:FontAwesome;font-style:normal;font-weight:normal;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale} .fa-lg{font-size:1.3333333333333333em;line-height:.75em;vertical-align:-15%} .fa-2x{font-size:2em} .fa-3x{font-size:3em} .fa-4x{font-size:4em} .fa-5x{font-size:5em} .fa-fw{width:1.2857142857142858em;text-align:center} .fa-ul{padding-left:0;margin-left:2.142857142857143em;list-style-type:none} .fa-ul>li{position:relative} .fa-li{position:absolute;left:-2.142857142857143em;width:2.142857142857143em;top:.14285714285714285em;text-align:center} .fa-li.fa-lg{left:-1.8571428571428572em} .fa-border{padding:.2em .25em .15em;border:solid .08em #eee;border-radius:.1em} .pull-right{float:right} .pull-left{float:left} .fa.pull-left{margin-right:.3em} .fa.pull-right{margin-left:.3em} .fa-spin{-webkit-animation:spin 2s infinite linear;-moz-animation:spin 2s infinite linear;-o-animation:spin 2s infinite linear;animation:spin 2s infinite linear} @-moz-keyframes spin{0%{-moz-transform:rotate(0deg)}100%{-moz-transform:rotate(359deg)}} @-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg)}} @-o-keyframes spin{0%{-o-transform:rotate(0deg)}100%{-o-transform:rotate(359deg)}} @-ms-keyframes spin{0%{-ms-transform:rotate(0deg)}100%{-ms-transform:rotate(359deg)}} @keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(359deg)}} .fa-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-ms-transform:rotate(90deg);-o-transform:rotate(90deg);transform:rotate(90deg)} .fa-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-ms-transform:rotate(180deg);-o-transform:rotate(180deg);transform:rotate(180deg)} .fa-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);-webkit-transform:rotate(270deg);-moz-transform:rotate(270deg);-ms-transform:rotate(270deg);-o-transform:rotate(270deg);transform:rotate(270deg)} .fa-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0,mirror=1);-webkit-transform:scale(-1,1);-moz-transform:scale(-1,1);-ms-transform:scale(-1,1);-o-transform:scale(-1,1);transform:scale(-1,1)} .fa-flip-vertical{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2,mirror=1);-webkit-transform:scale(1,-1);-moz-transform:scale(1,-1);-ms-transform:scale(1,-1);-o-transform:scale(1,-1);transform:scale(1,-1)} .fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle} .fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center} .fa-stack-1x{line-height:inherit} .fa-stack-2x{font-size:2em} .fa-inverse{color:#fff} .fa-glass:before{content:"\f000"} .fa-music:before{content:"\f001"} .fa-search:before{content:"\f002"} .fa-envelope-o:before{content:"\f003"} .fa-heart:before{content:"\f004"} .fa-star:before{content:"\f005"} .fa-star-o:before{content:"\f006"} .fa-user:before{content:"\f007"} .fa-film:before{content:"\f008"} .fa-th-large:before{content:"\f009"} .fa-th:before{content:"\f00a"} .fa-th-list:before{content:"\f00b"} .fa-check:before{content:"\f00c"} .fa-times:before{content:"\f00d"} .fa-search-plus:before{content:"\f00e"} .fa-search-minus:before{content:"\f010"} .fa-power-off:before{content:"\f011"} .fa-signal:before{content:"\f012"} .fa-gear:before,.fa-cog:before{content:"\f013"} .fa-trash-o:before{content:"\f014"} .fa-home:before{content:"\f015"} .fa-file-o:before{content:"\f016"} .fa-clock-o:before{content:"\f017"} .fa-road:before{content:"\f018"} .fa-download:before{content:"\f019"} .fa-arrow-circle-o-down:before{content:"\f01a"} .fa-arrow-circle-o-up:before{content:"\f01b"} .fa-inbox:before{content:"\f01c"} .fa-play-circle-o:before{content:"\f01d"} .fa-rotate-right:before,.fa-repeat:before{content:"\f01e"} .fa-refresh:before{content:"\f021"} .fa-list-alt:before{content:"\f022"} .fa-lock:before{content:"\f023"} .fa-flag:before{content:"\f024"} .fa-headphones:before{content:"\f025"} .fa-volume-off:before{content:"\f026"} .fa-volume-down:before{content:"\f027"} .fa-volume-up:before{content:"\f028"} .fa-qrcode:before{content:"\f029"} .fa-barcode:before{content:"\f02a"} .fa-tag:before{content:"\f02b"} .fa-tags:before{content:"\f02c"} .fa-book:before{content:"\f02d"} .fa-bookmark:before{content:"\f02e"} .fa-print:before{content:"\f02f"} .fa-camera:before{content:"\f030"} .fa-font:before{content:"\f031"} .fa-bold:before{content:"\f032"} .fa-italic:before{content:"\f033"} .fa-text-height:before{content:"\f034"} .fa-text-width:before{content:"\f035"} .fa-align-left:before{content:"\f036"} .fa-align-center:before{content:"\f037"} .fa-align-right:before{content:"\f038"} .fa-align-justify:before{content:"\f039"} .fa-list:before{content:"\f03a"} .fa-dedent:before,.fa-outdent:before{content:"\f03b"} .fa-indent:before{content:"\f03c"} .fa-video-camera:before{content:"\f03d"} .fa-picture-o:before{content:"\f03e"} .fa-pencil:before{content:"\f040"} .fa-map-marker:before{content:"\f041"} .fa-adjust:before{content:"\f042"} .fa-tint:before{content:"\f043"} .fa-edit:before,.fa-pencil-square-o:before{content:"\f044"} .fa-share-square-o:before{content:"\f045"} .fa-check-square-o:before{content:"\f046"} .fa-arrows:before{content:"\f047"} .fa-step-backward:before{content:"\f048"} .fa-fast-backward:before{content:"\f049"} .fa-backward:before{content:"\f04a"} .fa-play:before{content:"\f04b"} .fa-pause:before{content:"\f04c"} .fa-stop:before{content:"\f04d"} .fa-forward:before{content:"\f04e"} .fa-fast-forward:before{content:"\f050"} .fa-step-forward:before{content:"\f051"} .fa-eject:before{content:"\f052"} .fa-chevron-left:before{content:"\f053"} .fa-chevron-right:before{content:"\f054"} .fa-plus-circle:before{content:"\f055"} .fa-minus-circle:before{content:"\f056"} .fa-times-circle:before{content:"\f057"} .fa-check-circle:before{content:"\f058"} .fa-question-circle:before{content:"\f059"} .fa-info-circle:before{content:"\f05a"} .fa-crosshairs:before{content:"\f05b"} .fa-times-circle-o:before{content:"\f05c"} .fa-check-circle-o:before{content:"\f05d"} .fa-ban:before{content:"\f05e"} .fa-arrow-left:before{content:"\f060"} .fa-arrow-right:before{content:"\f061"} .fa-arrow-up:before{content:"\f062"} .fa-arrow-down:before{content:"\f063"} .fa-mail-forward:before,.fa-share:before{content:"\f064"} .fa-expand:before{content:"\f065"} .fa-compress:before{content:"\f066"} .fa-plus:before{content:"\f067"} .fa-minus:before{content:"\f068"} .fa-asterisk:before{content:"\f069"} .fa-exclamation-circle:before{content:"\f06a"} .fa-gift:before{content:"\f06b"} .fa-leaf:before{content:"\f06c"} .fa-fire:before{content:"\f06d"} .fa-eye:before{content:"\f06e"} .fa-eye-slash:before{content:"\f070"} .fa-warning:before,.fa-exclamation-triangle:before{content:"\f071"} .fa-plane:before{content:"\f072"} .fa-calendar:before{content:"\f073"} .fa-random:before{content:"\f074"} .fa-comment:before{content:"\f075"} .fa-magnet:before{content:"\f076"} .fa-chevron-up:before{content:"\f077"} .fa-chevron-down:before{content:"\f078"} .fa-retweet:before{content:"\f079"} .fa-shopping-cart:before{content:"\f07a"} .fa-folder:before{content:"\f07b"} .fa-folder-open:before{content:"\f07c"} .fa-arrows-v:before{content:"\f07d"} .fa-arrows-h:before{content:"\f07e"} .fa-bar-chart-o:before{content:"\f080"} .fa-twitter-square:before{content:"\f081"} .fa-facebook-square:before{content:"\f082"} .fa-camera-retro:before{content:"\f083"} .fa-key:before{content:"\f084"} .fa-gears:before,.fa-cogs:before{content:"\f085"} .fa-comments:before{content:"\f086"} .fa-thumbs-o-up:before{content:"\f087"} .fa-thumbs-o-down:before{content:"\f088"} .fa-star-half:before{content:"\f089"} .fa-heart-o:before{content:"\f08a"} .fa-sign-out:before{content:"\f08b"} .fa-linkedin-square:before{content:"\f08c"} .fa-thumb-tack:before{content:"\f08d"} .fa-external-link:before{content:"\f08e"} .fa-sign-in:before{content:"\f090"} .fa-trophy:before{content:"\f091"} .fa-github-square:before{content:"\f092"} .fa-upload:before{content:"\f093"} .fa-lemon-o:before{content:"\f094"} .fa-phone:before{content:"\f095"} .fa-square-o:before{content:"\f096"} .fa-bookmark-o:before{content:"\f097"} .fa-phone-square:before{content:"\f098"} .fa-twitter:before{content:"\f099"} .fa-facebook:before{content:"\f09a"} .fa-github:before{content:"\f09b"} .fa-unlock:before{content:"\f09c"} .fa-credit-card:before{content:"\f09d"} .fa-rss:before{content:"\f09e"} .fa-hdd-o:before{content:"\f0a0"} .fa-bullhorn:before{content:"\f0a1"} .fa-bell:before{content:"\f0f3"} .fa-certificate:before{content:"\f0a3"} .fa-hand-o-right:before{content:"\f0a4"} .fa-hand-o-left:before{content:"\f0a5"} .fa-hand-o-up:before{content:"\f0a6"} .fa-hand-o-down:before{content:"\f0a7"} .fa-arrow-circle-left:before{content:"\f0a8"} .fa-arrow-circle-right:before{content:"\f0a9"} .fa-arrow-circle-up:before{content:"\f0aa"} .fa-arrow-circle-down:before{content:"\f0ab"} .fa-globe:before{content:"\f0ac"} .fa-wrench:before{content:"\f0ad"} .fa-tasks:before{content:"\f0ae"} .fa-filter:before{content:"\f0b0"} .fa-briefcase:before{content:"\f0b1"} .fa-arrows-alt:before{content:"\f0b2"} .fa-group:before,.fa-users:before{content:"\f0c0"} .fa-chain:before,.fa-link:before{content:"\f0c1"} .fa-cloud:before{content:"\f0c2"} .fa-flask:before{content:"\f0c3"} .fa-cut:before,.fa-scissors:before{content:"\f0c4"} .fa-copy:before,.fa-files-o:before{content:"\f0c5"} .fa-paperclip:before{content:"\f0c6"} .fa-save:before,.fa-floppy-o:before{content:"\f0c7"} .fa-square:before{content:"\f0c8"} .fa-bars:before{content:"\f0c9"} .fa-list-ul:before{content:"\f0ca"} .fa-list-ol:before{content:"\f0cb"} .fa-strikethrough:before{content:"\f0cc"} .fa-underline:before{content:"\f0cd"} .fa-table:before{content:"\f0ce"} .fa-magic:before{content:"\f0d0"} .fa-truck:before{content:"\f0d1"} .fa-pinterest:before{content:"\f0d2"} .fa-pinterest-square:before{content:"\f0d3"} .fa-google-plus-square:before{content:"\f0d4"} .fa-google-plus:before{content:"\f0d5"} .fa-money:before{content:"\f0d6"} .fa-caret-down:before{content:"\f0d7"} .fa-caret-up:before{content:"\f0d8"} .fa-caret-left:before{content:"\f0d9"} .fa-caret-right:before{content:"\f0da"} .fa-columns:before{content:"\f0db"} .fa-unsorted:before,.fa-sort:before{content:"\f0dc"} .fa-sort-down:before,.fa-sort-asc:before{content:"\f0dd"} .fa-sort-up:before,.fa-sort-desc:before{content:"\f0de"} .fa-envelope:before{content:"\f0e0"} .fa-linkedin:before{content:"\f0e1"} .fa-rotate-left:before,.fa-undo:before{content:"\f0e2"} .fa-legal:before,.fa-gavel:before{content:"\f0e3"} .fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"} .fa-comment-o:before{content:"\f0e5"} .fa-comments-o:before{content:"\f0e6"} .fa-flash:before,.fa-bolt:before{content:"\f0e7"} .fa-sitemap:before{content:"\f0e8"} .fa-umbrella:before{content:"\f0e9"} .fa-paste:before,.fa-clipboard:before{content:"\f0ea"} .fa-lightbulb-o:before{content:"\f0eb"} .fa-exchange:before{content:"\f0ec"} .fa-cloud-download:before{content:"\f0ed"} .fa-cloud-upload:before{content:"\f0ee"} .fa-user-md:before{content:"\f0f0"} .fa-stethoscope:before{content:"\f0f1"} .fa-suitcase:before{content:"\f0f2"} .fa-bell-o:before{content:"\f0a2"} .fa-coffee:before{content:"\f0f4"} .fa-cutlery:before{content:"\f0f5"} .fa-file-text-o:before{content:"\f0f6"} .fa-building-o:before{content:"\f0f7"} .fa-hospital-o:before{content:"\f0f8"} .fa-ambulance:before{content:"\f0f9"} .fa-medkit:before{content:"\f0fa"} .fa-fighter-jet:before{content:"\f0fb"} .fa-beer:before{content:"\f0fc"} .fa-h-square:before{content:"\f0fd"} .fa-plus-square:before{content:"\f0fe"} .fa-angle-double-left:before{content:"\f100"} .fa-angle-double-right:before{content:"\f101"} .fa-angle-double-up:before{content:"\f102"} .fa-angle-double-down:before{content:"\f103"} .fa-angle-left:before{content:"\f104"} .fa-angle-right:before{content:"\f105"} .fa-angle-up:before{content:"\f106"} .fa-angle-down:before{content:"\f107"} .fa-desktop:before{content:"\f108"} .fa-laptop:before{content:"\f109"} .fa-tablet:before{content:"\f10a"} .fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"} .fa-circle-o:before{content:"\f10c"} .fa-quote-left:before{content:"\f10d"} .fa-quote-right:before{content:"\f10e"} .fa-spinner:before{content:"\f110"} .fa-circle:before{content:"\f111"} .fa-mail-reply:before,.fa-reply:before{content:"\f112"} .fa-github-alt:before{content:"\f113"} .fa-folder-o:before{content:"\f114"} .fa-folder-open-o:before{content:"\f115"} .fa-smile-o:before{content:"\f118"} .fa-frown-o:before{content:"\f119"} .fa-meh-o:before{content:"\f11a"} .fa-gamepad:before{content:"\f11b"} .fa-keyboard-o:before{content:"\f11c"} .fa-flag-o:before{content:"\f11d"} .fa-flag-checkered:before{content:"\f11e"} .fa-terminal:before{content:"\f120"} .fa-code:before{content:"\f121"} .fa-reply-all:before{content:"\f122"} .fa-mail-reply-all:before{content:"\f122"} .fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"} .fa-location-arrow:before{content:"\f124"} .fa-crop:before{content:"\f125"} .fa-code-fork:before{content:"\f126"} .fa-unlink:before,.fa-chain-broken:before{content:"\f127"} .fa-question:before{content:"\f128"} .fa-info:before{content:"\f129"} .fa-exclamation:before{content:"\f12a"} .fa-superscript:before{content:"\f12b"} .fa-subscript:before{content:"\f12c"} .fa-eraser:before{content:"\f12d"} .fa-puzzle-piece:before{content:"\f12e"} .fa-microphone:before{content:"\f130"} .fa-microphone-slash:before{content:"\f131"} .fa-shield:before{content:"\f132"} .fa-calendar-o:before{content:"\f133"} .fa-fire-extinguisher:before{content:"\f134"} .fa-rocket:before{content:"\f135"} .fa-maxcdn:before{content:"\f136"} .fa-chevron-circle-left:before{content:"\f137"} .fa-chevron-circle-right:before{content:"\f138"} .fa-chevron-circle-up:before{content:"\f139"} .fa-chevron-circle-down:before{content:"\f13a"} .fa-html5:before{content:"\f13b"} .fa-css3:before{content:"\f13c"} .fa-anchor:before{content:"\f13d"} .fa-unlock-alt:before{content:"\f13e"} .fa-bullseye:before{content:"\f140"} .fa-ellipsis-h:before{content:"\f141"} .fa-ellipsis-v:before{content:"\f142"} .fa-rss-square:before{content:"\f143"} .fa-play-circle:before{content:"\f144"} .fa-ticket:before{content:"\f145"} .fa-minus-square:before{content:"\f146"} .fa-minus-square-o:before{content:"\f147"} .fa-level-up:before{content:"\f148"} .fa-level-down:before{content:"\f149"} .fa-check-square:before{content:"\f14a"} .fa-pencil-square:before{content:"\f14b"} .fa-external-link-square:before{content:"\f14c"} .fa-share-square:before{content:"\f14d"} .fa-compass:before{content:"\f14e"} .fa-toggle-down:before,.fa-caret-square-o-down:before{content:"\f150"} .fa-toggle-up:before,.fa-caret-square-o-up:before{content:"\f151"} .fa-toggle-right:before,.fa-caret-square-o-right:before{content:"\f152"} .fa-euro:before,.fa-eur:before{content:"\f153"} .fa-gbp:before{content:"\f154"} .fa-dollar:before,.fa-usd:before{content:"\f155"} .fa-rupee:before,.fa-inr:before{content:"\f156"} .fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:"\f157"} .fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:"\f158"} .fa-won:before,.fa-krw:before{content:"\f159"} .fa-bitcoin:before,.fa-btc:before{content:"\f15a"} .fa-file:before{content:"\f15b"} .fa-file-text:before{content:"\f15c"} .fa-sort-alpha-asc:before{content:"\f15d"} .fa-sort-alpha-desc:before{content:"\f15e"} .fa-sort-amount-asc:before{content:"\f160"} .fa-sort-amount-desc:before{content:"\f161"} .fa-sort-numeric-asc:before{content:"\f162"} .fa-sort-numeric-desc:before{content:"\f163"} .fa-thumbs-up:before{content:"\f164"} .fa-thumbs-down:before{content:"\f165"} .fa-youtube-square:before{content:"\f166"} .fa-youtube:before{content:"\f167"} .fa-xing:before{content:"\f168"} .fa-xing-square:before{content:"\f169"} .fa-youtube-play:before{content:"\f16a"} .fa-dropbox:before{content:"\f16b"} .fa-stack-overflow:before{content:"\f16c"} .fa-instagram:before{content:"\f16d"} .fa-flickr:before{content:"\f16e"} .fa-adn:before{content:"\f170"} .fa-bitbucket:before{content:"\f171"} .fa-bitbucket-square:before{content:"\f172"} .fa-tumblr:before{content:"\f173"} .fa-tumblr-square:before{content:"\f174"} .fa-long-arrow-down:before{content:"\f175"} .fa-long-arrow-up:before{content:"\f176"} .fa-long-arrow-left:before{content:"\f177"} .fa-long-arrow-right:before{content:"\f178"} .fa-apple:before{content:"\f179"} .fa-windows:before{content:"\f17a"} .fa-android:before{content:"\f17b"} .fa-linux:before{content:"\f17c"} .fa-dribbble:before{content:"\f17d"} .fa-skype:before{content:"\f17e"} .fa-foursquare:before{content:"\f180"} .fa-trello:before{content:"\f181"} .fa-female:before{content:"\f182"} .fa-male:before{content:"\f183"} .fa-gittip:before{content:"\f184"} .fa-sun-o:before{content:"\f185"} .fa-moon-o:before{content:"\f186"} .fa-archive:before{content:"\f187"} .fa-bug:before{content:"\f188"} .fa-vk:before{content:"\f189"} .fa-weibo:before{content:"\f18a"} .fa-renren:before{content:"\f18b"} .fa-pagelines:before{content:"\f18c"} .fa-stack-exchange:before{content:"\f18d"} .fa-arrow-circle-o-right:before{content:"\f18e"} .fa-arrow-circle-o-left:before{content:"\f190"} .fa-toggle-left:before,.fa-caret-square-o-left:before{content:"\f191"} .fa-dot-circle-o:before{content:"\f192"} .fa-wheelchair:before{content:"\f193"} .fa-vimeo-square:before{content:"\f194"} .fa-turkish-lira:before,.fa-try:before{content:"\f195"} .fa-plus-square-o:before{content:"\f196"} -------------------------------------------------------------------------------- /public/js/view_scripts/bootstrap-colorpicker.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap Colorpicker v2.3.3 3 | * http://mjolnic.github.io/bootstrap-colorpicker/ 4 | */ 5 | !function(a){"use strict";"object"==typeof exports?module.exports=a(window.jQuery):"function"==typeof define&&define.amd?define(["jquery"],a):window.jQuery&&!window.jQuery.fn.colorpicker&&a(window.jQuery)}(function(a){"use strict";var b=function(b,c){this.value={h:0,s:0,b:0,a:1},this.origFormat=null,c&&a.extend(this.colors,c),b&&(void 0!==b.toLowerCase?(b+="",this.setColor(b)):void 0!==b.h&&(this.value=b))};b.prototype={constructor:b,colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32",transparent:"transparent"},_sanitizeNumber:function(a){return"number"==typeof a?a:isNaN(a)||null===a||""===a||void 0===a?1:""===a?0:void 0!==a.toLowerCase?(a.match(/^\./)&&(a="0"+a),Math.ceil(100*parseFloat(a))/100):1},isTransparent:function(a){return a?(a=a.toLowerCase().trim(),"transparent"===a||a.match(/#?00000000/)||a.match(/(rgba|hsla)\(0,0,0,0?\.?0\)/)):!1},rgbaIsTransparent:function(a){return 0===a.r&&0===a.g&&0===a.b&&0===a.a},setColor:function(a){a=a.toLowerCase().trim(),a&&(this.isTransparent(a)?this.value={h:0,s:0,b:0,a:0}:this.value=this.stringToHSB(a)||{h:0,s:0,b:0,a:1})},stringToHSB:function(b){b=b.toLowerCase();var c;"undefined"!=typeof this.colors[b]&&(b=this.colors[b],c="alias");var d=this,e=!1;return a.each(this.stringParsers,function(a,f){var g=f.re.exec(b),h=g&&f.parse.apply(d,[g]),i=c||f.format||"rgba";return h?(e=i.match(/hsla?/)?d.RGBtoHSB.apply(d,d.HSLtoRGB.apply(d,h)):d.RGBtoHSB.apply(d,h),d.origFormat=i,!1):!0}),e},setHue:function(a){this.value.h=1-a},setSaturation:function(a){this.value.s=a},setBrightness:function(a){this.value.b=1-a},setAlpha:function(a){this.value.a=Math.round(parseInt(100*(1-a),10)/100*100)/100},toRGB:function(a,b,c,d){a||(a=this.value.h,b=this.value.s,c=this.value.b),a*=360;var e,f,g,h,i;return a=a%360/60,i=c*b,h=i*(1-Math.abs(a%2-1)),e=f=g=c-i,a=~~a,e+=[i,h,0,0,h,i][a],f+=[h,i,i,h,0,0][a],g+=[0,0,h,i,i,h][a],{r:Math.round(255*e),g:Math.round(255*f),b:Math.round(255*g),a:d||this.value.a}},toHex:function(a,b,c,d){var e=this.toRGB(a,b,c,d);return this.rgbaIsTransparent(e)?"transparent":"#"+(1<<24|parseInt(e.r)<<16|parseInt(e.g)<<8|parseInt(e.b)).toString(16).substr(1)},toHSL:function(a,b,c,d){a=a||this.value.h,b=b||this.value.s,c=c||this.value.b,d=d||this.value.a;var e=a,f=(2-b)*c,g=b*c;return g/=f>0&&1>=f?f:2-f,f/=2,g>1&&(g=1),{h:isNaN(e)?0:e,s:isNaN(g)?0:g,l:isNaN(f)?0:f,a:isNaN(d)?0:d}},toAlias:function(a,b,c,d){var e=this.toHex(a,b,c,d);for(var f in this.colors)if(this.colors[f]===e)return f;return!1},RGBtoHSB:function(a,b,c,d){a/=255,b/=255,c/=255;var e,f,g,h;return g=Math.max(a,b,c),h=g-Math.min(a,b,c),e=0===h?null:g===a?(b-c)/h:g===b?(c-a)/h+2:(a-b)/h+4,e=(e+360)%6*60/360,f=0===h?0:h/g,{h:this._sanitizeNumber(e),s:f,b:g,a:this._sanitizeNumber(d)}},HueToRGB:function(a,b,c){return 0>c?c+=1:c>1&&(c-=1),1>6*c?a+(b-a)*c*6:1>2*c?b:2>3*c?a+(b-a)*(2/3-c)*6:a},HSLtoRGB:function(a,b,c,d){0>b&&(b=0);var e;e=.5>=c?c*(1+b):c+b-c*b;var f=2*c-e,g=a+1/3,h=a,i=a-1/3,j=Math.round(255*this.HueToRGB(f,e,g)),k=Math.round(255*this.HueToRGB(f,e,h)),l=Math.round(255*this.HueToRGB(f,e,i));return[j,k,l,this._sanitizeNumber(d)]},toString:function(a){a=a||"rgba";var b=!1;switch(a){case"rgb":return b=this.toRGB(),this.rgbaIsTransparent(b)?"transparent":"rgb("+b.r+","+b.g+","+b.b+")";case"rgba":return b=this.toRGB(),"rgba("+b.r+","+b.g+","+b.b+","+b.a+")";case"hsl":return b=this.toHSL(),"hsl("+Math.round(360*b.h)+","+Math.round(100*b.s)+"%,"+Math.round(100*b.l)+"%)";case"hsla":return b=this.toHSL(),"hsla("+Math.round(360*b.h)+","+Math.round(100*b.s)+"%,"+Math.round(100*b.l)+"%,"+b.a+")";case"hex":return this.toHex();case"alias":return this.toAlias()||this.toHex();default:return b}},stringParsers:[{re:/rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*?\)/,format:"rgb",parse:function(a){return[a[1],a[2],a[3],1]}},{re:/rgb\(\s*(\d*(?:\.\d+)?)\%\s*,\s*(\d*(?:\.\d+)?)\%\s*,\s*(\d*(?:\.\d+)?)\%\s*?\)/,format:"rgb",parse:function(a){return[2.55*a[1],2.55*a[2],2.55*a[3],1]}},{re:/rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d*(?:\.\d+)?)\s*)?\)/,format:"rgba",parse:function(a){return[a[1],a[2],a[3],a[4]]}},{re:/rgba\(\s*(\d*(?:\.\d+)?)\%\s*,\s*(\d*(?:\.\d+)?)\%\s*,\s*(\d*(?:\.\d+)?)\%\s*(?:,\s*(\d*(?:\.\d+)?)\s*)?\)/,format:"rgba",parse:function(a){return[2.55*a[1],2.55*a[2],2.55*a[3],a[4]]}},{re:/hsl\(\s*(\d*(?:\.\d+)?)\s*,\s*(\d*(?:\.\d+)?)\%\s*,\s*(\d*(?:\.\d+)?)\%\s*?\)/,format:"hsl",parse:function(a){return[a[1]/360,a[2]/100,a[3]/100,a[4]]}},{re:/hsla\(\s*(\d*(?:\.\d+)?)\s*,\s*(\d*(?:\.\d+)?)\%\s*,\s*(\d*(?:\.\d+)?)\%\s*(?:,\s*(\d*(?:\.\d+)?)\s*)?\)/,format:"hsla",parse:function(a){return[a[1]/360,a[2]/100,a[3]/100,a[4]]}},{re:/#?([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/,format:"hex",parse:function(a){return[parseInt(a[1],16),parseInt(a[2],16),parseInt(a[3],16),1]}},{re:/#?([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/,format:"hex",parse:function(a){return[parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16),parseInt(a[3]+a[3],16),1]}}],colorNameToHex:function(a){return"undefined"!=typeof this.colors[a.toLowerCase()]?this.colors[a.toLowerCase()]:!1}};var c={horizontal:!1,inline:!1,color:!1,format:!1,input:"input",container:!1,component:".add-on, .input-group-addon",sliders:{saturation:{maxLeft:100,maxTop:100,callLeft:"setSaturation",callTop:"setBrightness"},hue:{maxLeft:0,maxTop:100,callLeft:!1,callTop:"setHue"},alpha:{maxLeft:0,maxTop:100,callLeft:!1,callTop:"setAlpha"}},slidersHorz:{saturation:{maxLeft:100,maxTop:100,callLeft:"setSaturation",callTop:"setBrightness"},hue:{maxLeft:100,maxTop:0,callLeft:"setHue",callTop:!1},alpha:{maxLeft:100,maxTop:0,callLeft:"setAlpha",callTop:!1}},template:'