├── .gitignore
├── .gitmodules
├── .npmignore
├── Gruntfile.js
├── LICENSE
├── README.md
├── api
└── index.html
├── build
├── cjs.js
├── cjs.min.js
└── cjs.min.js.map
├── package.json
├── resources
├── api_doc_generator
│ ├── lib
│ │ ├── dox-foundation.js
│ │ └── dox.js
│ ├── tasks
│ │ └── dox.js
│ └── views
│ │ ├── _footer.jade
│ │ ├── _head.jade
│ │ ├── css
│ │ └── cjs-dox.css
│ │ └── template.jade
├── docco.css
├── google-code-prettify
│ ├── desert.css
│ ├── doxy.css
│ ├── lang-apollo.js
│ ├── lang-basic.js
│ ├── lang-clj.js
│ ├── lang-css.js
│ ├── lang-dart.js
│ ├── lang-erlang.js
│ ├── lang-go.js
│ ├── lang-hs.js
│ ├── lang-lisp.js
│ ├── lang-llvm.js
│ ├── lang-lua.js
│ ├── lang-matlab.js
│ ├── lang-ml.js
│ ├── lang-mumps.js
│ ├── lang-n.js
│ ├── lang-pascal.js
│ ├── lang-proto.js
│ ├── lang-r.js
│ ├── lang-rd.js
│ ├── lang-scala.js
│ ├── lang-sql.js
│ ├── lang-tcl.js
│ ├── lang-tex.js
│ ├── lang-vb.js
│ ├── lang-vhdl.js
│ ├── lang-wiki.js
│ ├── lang-xq.js
│ ├── lang-yaml.js
│ ├── prettify.css
│ ├── prettify.js
│ ├── run_prettify.js
│ ├── sons-of-obsidian.css
│ └── sunburst.css
└── images
│ ├── ConstraintJS_logo.svg
│ ├── cjs_button.png
│ ├── cjs_logo_256.png
│ └── cjs_logo_64.png
├── src
├── array.js
├── binding.js
├── core.js
├── footer.js
├── header.js
├── liven.js
├── map.js
├── memoize.js
├── state_machine
│ ├── cjs_events.js
│ └── cjs_fsm.js
├── template
│ ├── cjs_parser.js
│ ├── cjs_template.js
│ └── jsep.js
└── util.js
├── test
├── chrome_memory_test_client.js
├── memory_test_extension
│ ├── background.js
│ ├── content_script.js
│ └── manifest.json
├── memory_tests.js
├── playground.html
├── resources
│ ├── qunit-1.12.0.css
│ └── qunit-1.12.0.js
├── unit_tests.html
└── unit_tests
│ ├── array_test.js
│ ├── binding_tests.js
│ ├── constraint_test.js
│ ├── example_tests.js
│ ├── fsm_test.js
│ ├── liven_test.js
│ ├── map_test.js
│ ├── memoize_test.js
│ ├── template_test.js
│ └── util_test.js
└── types
└── index.d.ts
/.gitignore:
--------------------------------------------------------------------------------
1 | *.swp
2 | node_modules
3 | *.DS_Store
4 | *.zip
5 |
--------------------------------------------------------------------------------
/.gitmodules:
--------------------------------------------------------------------------------
1 | [submodule "resources/cjs-dox"]
2 | path = resources/cjs-dox
3 | url = https://github.com/soney/cjs-dox.git
4 |
--------------------------------------------------------------------------------
/.npmignore:
--------------------------------------------------------------------------------
1 | dist
2 | annotated_source
3 | docs
4 | *.swp
5 | node_modules
6 | *.DS_Store
7 | ./*.zip
8 |
--------------------------------------------------------------------------------
/Gruntfile.js:
--------------------------------------------------------------------------------
1 | module.exports = function(grunt) {
2 | var package = grunt.file.readJSON('package.json'), // Project configuration.
3 | src_files = ["src/util.js", "src/core.js", "src/array.js", "src/map.js", "src/liven.js",
4 | "src/memoize.js", "src/binding.js", "src/state_machine/cjs_fsm.js",
5 | "src/state_machine/cjs_events.js", "src/template/cjs_parser.js",
6 | "src/template/cjs_template.js", "src/template/jsep.js"],
7 | enclosed_src_files = (["src/header.js"]).concat(src_files, "src/footer.js");
8 |
9 | grunt.initConfig({
10 | pkg: package,
11 | jshint: {
12 | source: {
13 | src: src_files
14 | },
15 | post_concat: {
16 | src: "build/cjs.js"
17 | }
18 | },
19 | uglify: {
20 | development: {
21 | options: {
22 | banner: '/* <%= pkg.name %> - v<%= pkg.version %> (<%= pkg.homepage %>) */',
23 | report: 'gzip',
24 | sourceMapIn: "build/cjs.js.map",
25 | sourceMap: "build/cjs.min.js.map",
26 | sourceMappingURL: "cjs.min.js.map",
27 | sourceMapPrefix: 1
28 | },
29 | src: "build/cjs.js", // Use concatenated files
30 | dest: "build/cjs.min.js"
31 | },
32 | production: {
33 | options: {
34 | banner: '/* <%= pkg.name %> - v<%= pkg.version %> (<%= pkg.homepage %>) */',
35 | sourceMap: "build/cjs.min.js.map",
36 | sourceMappingURL: "cjs.min.js.map",
37 | sourceMapPrefix: 1
38 | },
39 | src: "build/cjs.js", // Use concatenated files
40 | dest: "build/cjs.min.js"
41 | }
42 | },
43 | concat_sourcemap: {
44 | options: {
45 | process: {
46 | data: {
47 | version: package.version // the updated version will be added to the concatenated file
48 | }
49 | },
50 | sourceRoot: '..'
51 | },
52 | js: {
53 | src: enclosed_src_files,
54 | dest: "build/cjs.js"
55 | }
56 | },
57 | concat: {
58 | js: {
59 | options: {
60 | stripBanners: true,
61 | process: {
62 | data: {
63 | version: package.version // the updated version will be added to the concatenated file
64 | }
65 | }
66 | },
67 | src: enclosed_src_files,
68 | dest: "build/cjs.js"
69 | }
70 | },
71 | qunit: {
72 | files: ['test/unit_tests.html']
73 | },
74 | clean: {
75 | build: ["build/"]
76 | },
77 | watch: {
78 | test: {
79 | files: src_files.concat(['test/unit_tests.js', 'test/unit_tests/*.js']),
80 | tasks: ['jshint:source', 'concat_sourcemap', 'jshint:post_concat', 'qunit']
81 | },
82 | quickdev: {
83 | files: src_files,
84 | tasks: ['concat_sourcemap']
85 | },
86 | full: {
87 | files: src_files.concat(['test/unit_tests.js', 'test/unit_tests/*.js']),
88 | tasks: ['jshint:source', 'concat_sourcemap', 'jshint:post_concat', 'qunit', 'uglify']
89 | },
90 | docs: {
91 | files: enclosed_src_files.concat(['resources/api_doc_generator/views/*', 'resources/api_doc_generator/lib/**']),
92 | tasks: ['dox']
93 | }
94 | },
95 | compress: {
96 | production: {
97 | options: {
98 | archive: '<%= pkg.name %>-<%= pkg.version %>.zip'
99 | },
100 | files: [{
101 | expand: true,
102 | cwd: 'build/',
103 | src: '*',
104 | dest: '<%= pkg.name %>-<%= pkg.version %>'
105 | }]
106 | }
107 | },
108 | dox: {
109 | options: {
110 | title: "ConstraintJS Documentation",
111 | blob_name: "v<%= pkg.version %>"
112 | },
113 | files: {
114 | src: enclosed_src_files,
115 | dest: 'api'
116 | }
117 | }
118 | });
119 |
120 | grunt.registerTask('usetheforce_on', 'force the force option on if needed',
121 | function() {
122 | if (!grunt.option('force')) {
123 | grunt.config.set('usetheforce_set', true);
124 | grunt.option( 'force', true );
125 | }
126 | });
127 | grunt.registerTask('usetheforce_restore', 'turn force option off if we have previously set it',
128 | function() {
129 | if (grunt.config.get('usetheforce_set')) {
130 | grunt.option( 'force', false );
131 | }
132 | });
133 |
134 | // Load the plugin that provides the "uglify" task.
135 | grunt.loadNpmTasks('grunt-contrib-uglify');
136 | grunt.loadNpmTasks('grunt-contrib-jshint');
137 | grunt.loadNpmTasks('grunt-contrib-concat');
138 | grunt.loadNpmTasks('grunt-contrib-clean');
139 | grunt.loadNpmTasks('grunt-contrib-qunit');
140 | grunt.loadNpmTasks('grunt-contrib-watch');
141 | grunt.loadNpmTasks('grunt-contrib-compress');
142 | grunt.loadNpmTasks('grunt-concat-sourcemap');
143 | grunt.loadTasks('./resources/api_doc_generator/tasks');
144 |
145 | // Default task(s).
146 | grunt.registerTask('default', ['clean', 'jshint:source', 'concat', 'jshint:post_concat', 'qunit', 'uglify:production', 'dox']);
147 | grunt.registerTask('dev', ['clean', 'jshint:source', 'concat_sourcemap', 'jshint:post_concat', 'qunit', 'uglify:development']);
148 | grunt.registerTask('package', ['clean', 'jshint:source', 'concat', 'jshint:post_concat', 'qunit', 'uglify:production', 'compress', 'dox']);
149 | grunt.registerTask('docs', ['dox']);
150 |
151 | grunt.registerTask('watch_dev', ['usetheforce_on', 'concat_sourcemap', 'watch:quickdev', 'usetheforce_restore']);
152 | grunt.registerTask('watch_doc', ['dox', 'watch:docs']);
153 | grunt.registerTask('watch_dev_full', ['usetheforce_on', 'jshint:source', 'concat_sourcemap', 'jshint:post_concat', 'qunit', 'uglify:development', 'watch:full', 'usetheforce_restore']);
154 | };
155 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2013 Stephen Oney, http://cjs.from.so/
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining
4 | a copy of this software and associated documentation files (the
5 | "Software"), to deal in the Software without restriction, including
6 | without limitation the rights to use, copy, modify, merge, publish,
7 | distribute, sublicense, and/or sell copies of the Software, and to
8 | permit persons to whom the Software is furnished to do so, subject to
9 | the following conditions:
10 |
11 | The above copyright notice and this permission notice shall be
12 | included in all copies or substantial portions of the Software.
13 |
14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | ### Documentation
6 | For documentation or the full ConstraintJS API, visit [cjs.from.so/](http://cjs.from.so/ "ConstraintJS Website").
7 |
8 | ### Downloads
9 | * [Latest stable release](https://github.com/soney/constraintjs/releases/latest "Latest stable release")
10 | * [Latest beta release](https://raw.github.com/soney/constraintjs/master/build/cjs.js "Latest beta release") (not recommended)
11 |
12 | ### Building from source
13 | If you'd rather build from this repository, you must install [node.js](http://nodejs.org/ "node.js") and [Grunt](http://gruntjs.com/installing-grunt, "Grunt"). Then, from inside the constraintjs source directory, run:
14 |
15 | npm install .
16 | grunt
17 |
18 | The CJS Library will appear in the *build/* directory.
19 |
20 | ### Notes on Development
21 | Make changes to the files in *src/* instead of *build/*. After you change a file, be sure to run `grunt` to re-build the files in *build/*. By default, the sourcemap generated for *build/cjs.min.js* links to the *build/cjs.js* file. To build a sourcemap that links back to the original *src/* files (significantly more useful for development), change `grunt` in the instructions above to `grunt dev`:
22 |
23 | npm install .
24 | grunt dev
25 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "constraintjs",
3 | "version": "0.9.8-beta3",
4 | "description": "Constraint library for JavaScript",
5 | "author": "Stephen Oney (http://from.so/)",
6 | "homepage": "http://cjs.from.so/",
7 | "repository": {
8 | "type" : "git",
9 | "url" : "https://github.com/soney/constraintjs.git"
10 | },
11 | "licenses": [{
12 | "type": "MIT",
13 | "url": "https://github.com/soney/constraintjs/blob/master/LICENSE"
14 | }],
15 | "main": "build/cjs.js",
16 | "types": "./types/index.d.ts",
17 | "private": false,
18 | "dependencies": { },
19 | "devDependencies": {
20 | "grunt": "~0.4.2",
21 | "grunt-contrib-jshint": "~0.7",
22 | "grunt-contrib-qunit": "~0.3",
23 | "grunt-contrib-uglify": "~0.2",
24 | "grunt-contrib-concat": "~0.3",
25 | "grunt-contrib-watch": "~0.5",
26 | "grunt-contrib-clean": "~0.5",
27 | "grunt-contrib-compress": "~0.5",
28 | "grunt-concat-sourcemap": "~0.4",
29 | "underscore": "*",
30 | "commander": "~1.2.0",
31 | "jade": "*",
32 | "mkdirp": "*",
33 | "walkdir": "~0.0.7",
34 | "stylus": "~0.33.1",
35 | "rimraf": "2.x",
36 | "marked": ">= 0.2.10",
37 | "commander": "0.6.1",
38 | "mocha": "*",
39 | "should": "*"
40 | },
41 | "engines": {
42 | "node": ">= 0.4.7"
43 | },
44 | "scripts": {"test": "grunt test"}
45 | }
46 |
--------------------------------------------------------------------------------
/resources/api_doc_generator/lib/dox-foundation.js:
--------------------------------------------------------------------------------
1 | /*!
2 | * Load Dependancies
3 | */
4 | var fs = require('fs'),
5 | path = require('path'),
6 | jade = require('jade'),
7 | dox = require('./dox'),
8 | _ = require('underscore'),
9 | template;
10 |
11 | /**
12 | * Template used to produce the documentation
13 | */
14 | var templatePath = exports.templatePath = '../views/template.jade';
15 |
16 | var BASE_URL = "https://github.com/soney/ConstraintJS/blob/";
17 | var get_link = function(fname, line, blob_name) {
18 | var rv = BASE_URL+blob_name+'/'+fname+"#L"+line;
19 | return rv;
20 | };
21 |
22 | var get_doc = function(doc_info, options) {
23 | var info = {
24 | type: false,
25 | info: false,
26 | params: [],
27 | links: [],
28 | examples:[]
29 | },
30 | fname = doc_info.file,
31 | doc = doc_info.doc,
32 | link = get_link(fname, doc.line, options.blob_name);
33 | info.link = link;
34 | info.fname = fname.replace("../src/", "");
35 | info.line = doc.line;
36 |
37 | if(doc.description) { info.description = doc.description.full; }
38 |
39 | doc.tags.forEach(function(tag) {
40 | var type = tag.type;
41 | if(type === 'method' || type === 'class' || type === 'property') {
42 | info.type = type;
43 | } else if(tag.type === "param") {
44 | info.params.push(tag);
45 | } else if(tag.type === "return") {
46 | info.returns = tag;
47 | } else if(tag.type === "see") {
48 | info.links.push(tag.name);
49 | } else if(tag.type === "private") {
50 | info.private = true;
51 | } else if(tag.type === "expose") {
52 | info.exposed = true;
53 | } else if(tag.type === "example") {
54 | info.examples.push(tag.code);
55 | } else {
56 | //console.log(tag);
57 | }
58 | });
59 |
60 | return info;
61 | };
62 |
63 | /**
64 | * Parse source code to produce documentation
65 | */
66 | exports.render = function(docs, options) {
67 | templatePath = path.resolve(__dirname, templatePath);
68 | var template = fs.readFileSync(templatePath).toString(),
69 | options = _.extend({
70 | docs: docs
71 | }, options);
72 | return jade.compile(template, { filename: templatePath })(options);
73 | };
74 |
75 | /**
76 | * Test if a method should be ignored or not
77 | *
78 | * @param {Object} method
79 | * @return {Boolean} true if the method is not private nor must be ignored
80 | * @api private
81 | */
82 | exports.shouldPass = function(method) {
83 | if(method.isPrivate) {return false;}
84 | if(method.ignore) {return false;}
85 |
86 | return method.tags.filter(function(tag){
87 | return tag.type === "private" || tag.type === "ignore";
88 | }).length === 0;
89 | };
90 |
91 | /*
92 | * Create an array of all the right files in the source dir
93 | */
94 | exports.collectFiles = function(source, options, callback) {
95 | var dirtyFiles = [],
96 | ignore = options.ignore || [],
97 | files = [];
98 |
99 | // If more paths are given with the --source flag
100 | if(source.length >= 1){
101 | var dirtyPaths = source;
102 |
103 | dirtyPaths.forEach(function(dirtyPath){
104 | dirtyFiles = dirtyFiles.concat(require('walkdir').sync(path.resolve(process.cwd(), dirtyPath),{follow_symlinks:true}));
105 | });
106 | }
107 | // Just one path given with the --source flag
108 | else {
109 | source = path.resolve(process.cwd(), source);
110 | dirtyFiles = require('walkdir').sync(source,{follow_symlinks:true}); // tee hee!
111 | }
112 |
113 | dirtyFiles.forEach(function(file){
114 | file = path.relative(process.cwd(), file);
115 |
116 | var doNotIgnore = _.all(ignore, function(d) {
117 | // return true if no part of the path is in the ignore list
118 | return (file.indexOf(d) === -1);
119 | });
120 |
121 | if ((file.substr(-2) === 'js') && doNotIgnore) {
122 | files.push(file);
123 | }
124 | });
125 |
126 | return files;
127 | };
128 |
129 | /*
130 | * Dox all the files found by collectFiles
131 | */
132 | exports.doxFiles = function(source, target, options, files) {
133 | var source_to_return;
134 | files = files.map(function(file) {
135 | try {
136 | // If more paths are given with the --source flag
137 | if(source.length >= 1){
138 | var tmpSource = source;
139 |
140 | tmpSource.forEach(function(s){
141 | if(file.indexOf(s) !== -1) {
142 | source_to_return = s;
143 | }
144 | });
145 | } else {
146 | source_to_return = source;
147 | }
148 |
149 | var content = fs.readFileSync(file).toString();
150 |
151 | return {
152 | sourceFile: file,
153 | targetFile: path.relative(process.cwd(),target) + path.sep + file + '.html',
154 | dox: dox.parseComments(content, options)
155 | };
156 |
157 | } catch(e) { console.log(e); }
158 | });
159 |
160 | return files;
161 | };
162 |
163 | exports.compileDox = function(files, options) {
164 | var subjects = {};
165 | files.forEach(function(file) {
166 | var srcFile = file.sourceFile,
167 | dox = file.dox, lends = "";
168 | dox.forEach(function(d) {
169 | delete d.code;
170 | d.tags.forEach(function(tag) {
171 | var type = tag.type;
172 | var info = {doc: d, file: file.sourceFile};
173 | if(type === "method" || type === "property") {
174 | var name = lends + (tag.name || tag.string).replace(/\^\d+$/, "");
175 | if(name[0] === "{") {
176 | console.log(d);
177 | }
178 |
179 | if(subjects.hasOwnProperty(name)) {
180 | subjects[name].push(info);
181 | } else {
182 | subjects[name] = [info];
183 | }
184 | } else if(type === "lends") {
185 | lends = tag.string.length > 0 ? tag.string+"." : "";
186 | } else if(type === "expose" || type==="class") {
187 | var name = tag.string;
188 | if(subjects.hasOwnProperty(name)) {
189 | subjects[name].push(info);
190 | } else {
191 | subjects[name] = [info];
192 | }
193 | } else if(type === "see") {
194 | tag.name = lends+tag.local;
195 | tag.link = tag.name.replace(".", "_");
196 | } else {
197 | }
198 | });
199 | });
200 | });
201 |
202 | var tree = {children: []};
203 | var keys = [];
204 | for(var key in subjects) {
205 | if(subjects.hasOwnProperty(key)) {
206 | keys.push(key);
207 | }
208 | }
209 |
210 | keys = keys.sort(function(a, b) {
211 | var diff = a.split(".").length - b.split(".").length;
212 | if(diff === 0) {
213 | var pna = _.last(a.split(".")),
214 | pnb = _.last(b.split("."));
215 |
216 | if(pna[0].toLowerCase() !== pna[0] && pnb[0].toLowerCase() === pnb[0]) {
217 | return 1;
218 | } else if(pna[0].toLowerCase() === pna[0] && pnb[0].toLowerCase() !== pnb[0]) {
219 | return -1;
220 | }
221 | return a.localeCompare(b);
222 | } else {
223 | return diff;
224 | }
225 | });
226 |
227 | //sort by levels
228 | keys.forEach(function(key) {
229 | var objs = key.replace(".prototype", "").split("."),
230 | ctree = tree,
231 | info = get_doc_info(subjects[key], options);
232 |
233 | var level = 0;
234 | objs.forEach(function(obj, i) {
235 | var index = _ .chain(ctree.children)
236 | .pluck("propname")
237 | .indexOf(obj)
238 | .value();
239 | //console.log(index);
240 | if(index < 0) {
241 | var new_tree = {name: key, propname: obj, children: []};
242 | ctree.children.push(new_tree);
243 | ctree = new_tree;
244 | } else {
245 | ctree = ctree.children[index];
246 | }
247 | level++;
248 | });
249 |
250 | if(info.type === 'method' || info.type === 'class') {
251 | ctree.short_colloquial = ctree.propname.replace('.prototype', '')+'()';
252 | if(info.calltypes.length === 1) {
253 | ctree.colloquial = ctree.name + '(' + info.calltypes[0].params.map(function(x) { return x.name; }).join(', ') + ')';
254 | } else {
255 | ctree.colloquial = ctree.name + '(...)';
256 | }
257 | if(info.type === 'class') {
258 | ctree.colloquial = 'new ' + ctree.colloquial;
259 | }
260 | } else {
261 | ctree.short_colloquial = ctree.propname.replace('.prototype', '');
262 | ctree.colloquial = ctree.name.replace('.prototype', '');
263 | }
264 | ctree.short = ctree.name.indexOf(".")<0 ? ctree.name : "."+_.last(ctree.name.split("."));
265 |
266 | _.extend(ctree, info);
267 | });
268 | if(tree.children.length === 1) {
269 | tree = tree.children[0];
270 | }
271 |
272 | return tree;
273 | };
274 |
275 | var get_doc_info = function(docs, options) {
276 | var subinfos = docs.map(function(x) { return get_doc(x, options); }),
277 | info = {
278 | calltypes: [],
279 | description: "",
280 | type: "",
281 | sourceLinks: [],
282 | links: [],
283 | examples: []
284 | },
285 | has_source = false;
286 |
287 | _.each(subinfos, function(si) {
288 | if(si.returns || si.params.length>0) {
289 | info.calltypes.push(si);
290 | }
291 | if(si.description && (si.description.length > info.description.length)) {
292 | info.description = si.description;
293 | }
294 | var type = si.type;
295 | if(type === 'method' || type === 'class' || type === 'property') {
296 | info.type = type;
297 | }
298 |
299 | if(si.exposed) {
300 | info.sourceLinks.push({text:"(Exposed: "+si.fname+":"+si.line+")", link: si.link});
301 | } else {
302 | if(!has_source) {
303 | info.sourceLinks.push({text:"Source: "+si.fname+":"+si.line+"", link: si.link});
304 | }
305 | has_source = true;
306 | }
307 | info.links.push.apply(info.links, si.links);
308 | info.examples.push.apply(info.examples, si.examples);
309 | });
310 |
311 |
312 | return info;
313 | };
314 |
--------------------------------------------------------------------------------
/resources/api_doc_generator/lib/dox.js:
--------------------------------------------------------------------------------
1 | /*!
2 | * Module dependencies.
3 | */
4 |
5 | var markdown = require('marked'),
6 | /**
7 | * Escape the given `html`.
8 | *
9 | * @param {String} html
10 | * @return {String}
11 | * @api private
12 | */
13 |
14 | escape = function(html){
15 | return String(html) .replace(/&(?!\w+;)/g, '&')
16 | .replace(//g, '>');
18 | },
19 | stripOutsideTags = function(str) {
20 | return str.replace(/^<\w+>\s*/, '').replace(/\s*<\/\w+>\s*\n?\s*$/, '');
21 | };
22 |
23 | /**
24 | * Parse comments in the given string of `js`.
25 | *
26 | * @param {String} js
27 | * @param {Object} options
28 | * @return {Array}
29 | * @see exports.parseComment
30 | * @api public
31 | */
32 |
33 | var line_num;
34 | exports.parseComments = function(js, options) {
35 | options = options || {};
36 | js = js.replace(/\r\n/gm, '\n');
37 | line_num = 1;
38 |
39 | var comments = [],
40 | raw = options.raw,
41 | comment,
42 | buf = '',
43 | ignore,
44 | withinMultiline = false,
45 | withinSingle = false,
46 | code,
47 | start_line_num = line_num;
48 |
49 | for (var i = 0, len = js.length; i < len; ++i) {
50 | // start comment
51 | if (!withinMultiline && !withinSingle && '/' == js[i] && '*' == js[i+1]) {
52 | start_line_num = line_num;
53 | // code following previous comment
54 | if (buf.trim().length) {
55 | comment = comments[comments.length - 1];
56 | if(comment) {
57 | comment.code = code = buf.trim();
58 | }
59 | buf = '';
60 | }
61 | i += 2;
62 | withinMultiline = true;
63 | ignore = '!' == js[i];
64 | // end comment
65 | } else if (withinMultiline && !withinSingle && '*' == js[i] && '/' == js[i+1]) {
66 | i += 2;
67 | buf = buf.replace(/^[ \t]*\* ?/gm, '');
68 | var comment = exports.parseComment(buf, options);
69 | comment.ignore = ignore;
70 | comment.line = start_line_num;
71 | comments.push(comment);
72 | withinMultiline = ignore = false;
73 | buf = '';
74 | } else if (!withinSingle && !withinMultiline && '/' == js[i] && '/' == js[i+1]) {
75 | withinSingle = true;
76 | buf += js[i];
77 | } else if (withinSingle && !withinMultiline && '\n' == js[i]) {
78 | withinSingle = false;
79 | buf += js[i];
80 | // buffer comment or code
81 | } else {
82 | buf += js[i];
83 | }
84 | if('\n' == js[i]) {
85 | line_num++;
86 | }
87 |
88 | }
89 |
90 | if (comments.length === 0) {
91 | comments.push({
92 | tags: [],
93 | description: {full: '', summary: '', body: ''},
94 | isPrivate: false,
95 | line: start_line_num
96 | });
97 | }
98 |
99 | // trailing code
100 | if (buf.trim().length) {
101 | comment = comments[comments.length - 1];
102 | code = buf.trim();
103 | comment.code = code;
104 | }
105 |
106 | return comments;
107 | };
108 |
109 | /**
110 | * Parse the given comment `str`.
111 | *
112 | * The comment object returned contains the following
113 | *
114 | * - `tags` array of tag objects
115 | * - `description` the first line of the comment
116 | * - `body` lines following the description
117 | * - `content` both the description and the body
118 | * - `isPrivate` true when "@api private" is used
119 | *
120 | * @param {String} str
121 | * @param {Object} options
122 | * @return {Object}
123 | * @see exports.parseTag
124 | * @api public
125 | */
126 |
127 | exports.parseComment = function(str, options) {
128 | str = str.trim();
129 | options = options || {};
130 |
131 | var comment = { tags: [] },
132 | raw = options.raw,
133 | description = {};
134 |
135 | if(str.indexOf("@")===0 && str.indexOf("\n")<0) { // one-line comment
136 | var tags = '@' + str.split('@').slice(1).join('@');
137 | comment.tags = tags.split('\n').map(exports.parseTag);
138 | } else {
139 | // parse comment body
140 | description.full = str.split('\n@')[0];
141 | description.summary = description.full.split('\n\n')[0];
142 | description.body = description.full.split('\n\n').slice(1).join('\n\n');
143 | comment.description = description;
144 |
145 | // parse tags
146 | if (~str.indexOf('\n@')) {
147 | var tags = str.split('\n@').slice(1).join('\n@');
148 | comment.tags = tags.split('\n@').map(function(tag) { return "@" + tag; }).map(exports.parseTag);
149 | comment.isPrivate = comment.tags.some(function(tag){
150 | return 'api' == tag.type && 'private' == tag.visibility;
151 | })
152 | }
153 |
154 | // markdown
155 | if (!raw) {
156 | description.full = markdown(description.full);
157 | description.summary = markdown(description.summary);
158 | description.body = markdown(description.body);
159 | }
160 | }
161 |
162 |
163 | return comment;
164 | }
165 |
166 | /**
167 | * Parse tag string "@param {Array} name description" etc.
168 | *
169 | * @param {String}
170 | * @return {Object}
171 | * @api public
172 | */
173 |
174 | exports.parseTag = function(str) {
175 | var tag = {},
176 | parts = str.split(/[ ]+/),
177 | type = tag.type = parts.shift().replace('@', '');
178 |
179 | if(str.match(/^@example[\s\n]/)) {
180 | str = str.replace(/^@example/, "");
181 | //.trim();
182 | tag = {type: "example", code: markdown(str)};
183 | return tag;
184 | }
185 |
186 | switch (type) {
187 | case 'param':
188 | case 'property':
189 | tag.types = exports.parseTagTypes(parts.shift());
190 | tag.name = parts.shift() || '';
191 | tag.description = stripOutsideTags(markdown(parts.join(' ').replace(/^\s*-?\s*/, '')));
192 | break;
193 | case 'return':
194 | tag.types = exports.parseTagTypes(parts.shift());
195 | tag.description = stripOutsideTags(markdown(parts.join(' ').replace(/^\s*-?\s*/, '')));
196 | break;
197 | case 'see':
198 | if (~str.indexOf('http')) {
199 | tag.title = parts.length > 1
200 | ? parts.shift()
201 | : '';
202 | tag.url = parts.join(' ');
203 | } else {
204 | tag.local = parts.join(' ');
205 | }
206 | case 'api':
207 | tag.visibility = parts.shift();
208 | break;
209 | case 'type':
210 | tag.types = exports.parseTagTypes(parts.shift());
211 | break;
212 | case 'memberOf':
213 | tag.parent = parts.shift();
214 | break;
215 | case 'augments':
216 | tag.otherClass = parts.shift();
217 | break;
218 | case 'borrows':
219 | tag.otherMemberName = parts.join(' ').split(' as ')[0];
220 | tag.thisMemberName = parts.join(' ').split(' as ')[1];
221 | break;
222 | case 'throws':
223 | tag.types = exports.parseTagTypes(parts.shift());
224 | tag.description = parts.join(' ');
225 | break;
226 | default:
227 | tag.string = parts.join(' ');
228 | break;
229 | }
230 |
231 | return tag;
232 | }
233 |
234 | /**
235 | * Parse tag type string "{Array|Object}" etc.
236 | *
237 | * @param {String} str
238 | * @return {Array}
239 | * @api public
240 | */
241 |
242 | exports.parseTagTypes = function(str) {
243 | return str .replace(/[{}]/g, '')
244 | .split(/ *[|,\/] */);
245 | };
246 |
--------------------------------------------------------------------------------
/resources/api_doc_generator/tasks/dox.js:
--------------------------------------------------------------------------------
1 | /*
2 | * grunt-dox
3 | * https://github.com/punkave/grunt-dox
4 | *
5 | * Copyright (c) 2013 Matt McManus
6 | * Licensed under the MIT license.
7 | */
8 |
9 | var exec = require('child_process').exec,
10 | fs = require('fs'),
11 | mkdirp = require('mkdirp'),
12 | path = require('path'),
13 | rimraf = require('rimraf'),
14 | formatter = require('../lib/dox-foundation'),
15 | ignoredDirs = 'test,static,templates,node_modules';
16 |
17 | module.exports = function(grunt) {
18 | grunt.registerMultiTask('dox', 'Generate dox output ', function() {
19 | var src = this.filesSrc,
20 | dest = this.data.dest,
21 | indexPath = path.relative(process.cwd(), dest + path.sep + 'index.html'),
22 | ignore = ignoredDirs.trim().replace(' ', '').split(','),
23 | options = this.options();
24 |
25 | // Cleanup any existing docs
26 | rimraf.sync(dest);
27 |
28 | // Find, cleanup and validate all potential files
29 | var files = formatter.collectFiles(src, { ignore: ignore }, files),
30 | doxedFiles = formatter.doxFiles(src, dest, { raw: false }, files),
31 | dox = formatter.compileDox(doxedFiles, options),
32 | output = formatter.render(dox, options),
33 | dir = path.dirname(indexPath);
34 |
35 | if (!fs.existsSync(dir)) {
36 | mkdirp.sync(dir);
37 | }
38 | fs.writeFileSync(indexPath, output);
39 | });
40 | };
41 |
--------------------------------------------------------------------------------
/resources/api_doc_generator/views/_footer.jade:
--------------------------------------------------------------------------------
1 | script(src='http://code.jquery.com/jquery-1.10.1.min.js')
2 | script(src='http://netdna.bootstrapcdn.com/bootstrap/3.0.3/js/bootstrap.min.js')
3 | script(src='../resources/google-code-prettify/prettify.js')
4 | script(src='../builds/constraintjs-latest/cjs.min.js')
5 |
--------------------------------------------------------------------------------
/resources/api_doc_generator/views/_head.jade:
--------------------------------------------------------------------------------
1 | meta(name='viewport', content='width=device-width', charset='utf-8')
2 |
3 | title= title
4 |
5 | link(rel='stylesheet', href='http://netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css')
6 | link(rel='stylesheet', href='../style/stylesheet.css')
7 | link(rel='stylesheet', href='../style/page_style.css')
8 | link(rel='stylesheet', href='../resources/google-code-prettify/sunburst.css')
9 | |
--------------------------------------------------------------------------------
/resources/api_doc_generator/views/css/cjs-dox.css:
--------------------------------------------------------------------------------
1 | .classname {
2 | font-size: 1.5em;
3 | padding-top: 5px;
4 | padding-bottom: 5px;
5 | }
6 |
7 | .returns .type, .param .type {
8 | padding-right: 5px;
9 | margin-right: 15px;
10 | }
11 |
12 | .params .param {
13 | margin-left: 20px;
14 | margin-right: 15px;
15 | min-width: 180px;
16 | font-weight: 400;
17 | }
18 |
19 | .param .name {
20 | font-family: Menlo,Monaco,Consolas,"Courier New",monospace;
21 | margin-right: 8px;
22 | font-weight: 800;
23 | padding-right: 5px;
24 | padding-left: 15px;
25 | }
26 |
27 | .params .type {
28 | font-style: oblique;
29 | margin-right: 15px;
30 | color: #aaa;
31 | padding-left: 5px;
32 | padding-right: 5px;
33 | }
34 |
35 | .params {
36 | border: 1px solid #E7E7E7;
37 | border-radius: 2px;
38 | }
39 | .param {
40 | vertical-align: top;
41 | }
42 |
43 |
44 |
45 | .type:before {
46 | content: "(";
47 | }
48 | .type:after {
49 | content: ")";
50 | }
51 |
52 |
53 | .entry {
54 | margin-top: 5px;
55 | margin-bottom: 5px;
56 | border-radius: 3px;
57 | }
58 |
59 |
60 | .panel-footer {
61 | text-align: right;
62 | }
63 | body {
64 | tab-size: 4;
65 | }
66 |
67 | .returns {
68 | vertical-align: top;
69 | background-color: #F5F5F5;
70 | border-top: 1px dashed #DDD;
71 | }
72 |
73 | .returns .static {
74 | color: #aaa;
75 | font-style: oblique;
76 | padding-left: 15px;
77 | }
78 |
79 | .or {
80 | text-align: center;
81 | margin-top: 5px;
82 | margin-bottom: 5px;
83 | }
84 | .description {
85 | width: 100%;
86 | padding-left: 5px;
87 | }
88 | .calldesc {
89 | border-top: 1px solid #eee;
90 | border-bottom: 1px solid #eee;
91 | color: #333;
92 | font-family: Menlo,Monaco,Consolas,"Courier New",monospace;
93 | background-color: #333;
94 | font-weight: 400;
95 | background-color: #CCC;
96 | border: 1px solid #999;
97 | padding: 2px;
98 | }
99 | .noparam {
100 | padding-left: 15px;
101 | color: #aaa;
102 | font-style: oblique;
103 | }
104 | .sidebar .nav {
105 | /*
106 | display: none;
107 | */
108 | padding-left: 10px;
109 | }
110 | .sidebar .nav li > a {
111 | padding-top: 1px;
112 | padding-bottom: 1px;
113 | }
114 | .sidebar .nav.top {
115 | padding-left: 0px;
116 | }
117 | .sidebar .nav li.active {
118 | border-right: 2px solid red;
119 | background-color: #F0F0F0;
120 | }
121 | .sidebar {
122 | height: 500px;
123 | overflow: scroll;
124 | border: 1px solid #BBB;
125 | background-color: #F7F7F7;
126 | }
127 | li.haschildren > a {
128 | font-weight: 800;
129 | color: black;
130 | }
131 |
--------------------------------------------------------------------------------
/resources/api_doc_generator/views/template.jade:
--------------------------------------------------------------------------------
1 | mixin sidebarlist(tree, top)
2 | if top
3 | li.haschildren
4 | a(href='#'+tree.name.replace(/\./g, "_"))=tree.short_colloquial
5 | each item in tree.children
6 | li(class=item.children.length>0 ? "haschildren":"")
7 | a(href='#'+item.name.replace(/\./g, "_"))=item.short_colloquial
8 | +sidebarlist(item)
9 |
10 | mixin apidoclist(item)
11 | if item.colloquial
12 | .row(id=item.name.replace(/\./g, "_"))
13 | .col-md-12.entry
14 | .panel.panel-default
15 | .panel-heading.classname=item.colloquial
16 | .panel-body
17 | .desc!=item.description
18 | if item.calltypes && item.calltypes.length > 0
19 | table.params
20 | tbody
21 | each calltype,index in item.calltypes
22 | tr.callname
23 | td.calldesc(colspan=3)=item.short+'('+calltype.params.map(function(x){return x.name;}).join(", ")+')'
24 | each param in calltype.params
25 | tr.param
26 | td.name=param.name
27 | td.type=param.types
28 | td.description!=param.description
29 | if calltype.returns
30 | tr.returns
31 | td.static Returns
32 | td.type=calltype.returns.types
33 | td.description!=calltype.returns.description
34 |
35 | if item.examples && item.examples.length > 0
36 | .panel-body.examples
37 | h4=item.examples.length===1 ? "Example:" : "Example:"
38 | each example in item.examples
39 | .example!=example
40 | if item.examples && item.links.length > 0
41 | .panel-body.related
42 | h4 Related:
43 | ul.related_links
44 | each link in item.links
45 | li.also_see
46 | a(href="#"+link.replace(".","_"))=link
47 | .panel-footer
48 | if item.sourceLinks
49 | each link in item.sourceLinks
50 | a(target="_blank",href=link.link)=" " + link.text
51 | each child in item.children
52 | +apidoclist(child)
53 |
54 | doctype html
55 | html
56 | head
57 | include ./_head.jade
58 |
59 | body(data-spy="scroll",data-target=".sidebar")
60 | .container
61 | header.keystone.row
62 | .col-md-2
63 | a(href="..")
64 | img#cjs_logo(src="../resources/cjs_logo_256.png",title="ConstraintJS")
65 | .col-md-10
66 | ul.nav.navbar-nav.hidden-xs
67 | li
68 | a(href="..") Home
69 | li
70 | a(target="tut",href="https://github.com/soney/ConstraintJS/wiki") Tutorial
71 | li.active
72 | a(target="_blank",href=".") API
73 | .row
74 | .col-sm-3(role="complimentary").hidden-xs
75 | .sidebar.bs-sidebar(data-spy="affix", data-offset-top=0)
76 | ul.top.nav
77 | +sidebarlist(docs, true)
78 | .col-sm-9.content(role="main")
79 | h1 ConstraintJS API
80 | +apidoclist(docs)
81 |
82 | include ./_footer.jade
83 | script.
84 | $("pre").addClass("prettyprint");
85 | var height_diff = 100;
86 | $(window).on('resize', function() {
87 | $(".sidebar").height(window.innerHeight-height_diff+"px");
88 | });
89 | $(".sidebar").height(window.innerHeight-height_diff+"px");
90 | prettyPrint();
91 |
--------------------------------------------------------------------------------
/resources/docco.css:
--------------------------------------------------------------------------------
1 | /*--------------------- Typography ----------------------------*/
2 |
3 | @font-face {
4 | font-family: 'aller-light';
5 | src: url('public/fonts/aller-light.eot');
6 | src: url('public/fonts/aller-light.eot?#iefix') format('embedded-opentype'),
7 | url('public/fonts/aller-light.woff') format('woff'),
8 | url('public/fonts/aller-light.ttf') format('truetype');
9 | font-weight: normal;
10 | font-style: normal;
11 | }
12 |
13 | @font-face {
14 | font-family: 'aller-bold';
15 | src: url('public/fonts/aller-bold.eot');
16 | src: url('public/fonts/aller-bold.eot?#iefix') format('embedded-opentype'),
17 | url('public/fonts/aller-bold.woff') format('woff'),
18 | url('public/fonts/aller-bold.ttf') format('truetype');
19 | font-weight: normal;
20 | font-style: normal;
21 | }
22 |
23 | @font-face {
24 | font-family: 'novecento-bold';
25 | src: url('public/fonts/novecento-bold.eot');
26 | src: url('public/fonts/novecento-bold.eot?#iefix') format('embedded-opentype'),
27 | url('public/fonts/novecento-bold.woff') format('woff'),
28 | url('public/fonts/novecento-bold.ttf') format('truetype');
29 | font-weight: normal;
30 | font-style: normal;
31 | }
32 |
33 | /*--------------------- Layout ----------------------------*/
34 | html { height: 100%; }
35 | body {
36 | font-family: "aller-light";
37 | font-size: 14px;
38 | line-height: 18px;
39 | color: #30404f;
40 | margin: 0; padding: 0;
41 | height:100%;
42 | tab-size: 4;
43 | }
44 | #container { min-height: 100%; }
45 |
46 | a {
47 | color: #000;
48 | }
49 |
50 | b, strong {
51 | font-weight: normal;
52 | font-family: "aller-bold";
53 | }
54 |
55 | p, ul, ol {
56 | margin: 15px 0 0px;
57 | }
58 |
59 | h1, h2, h3, h4, h5, h6 {
60 | color: #112233;
61 | line-height: 1em;
62 | font-weight: normal;
63 | font-family: "novecento-bold";
64 | text-transform: uppercase;
65 | margin: 30px 0 15px 0;
66 | }
67 |
68 | h1 {
69 | margin-top: 40px;
70 | }
71 |
72 | hr {
73 | border: 0;
74 | background: 1px solid #ddd;
75 | height: 1px;
76 | margin: 20px 0;
77 | }
78 |
79 | pre, tt, code {
80 | font-size: 12px; line-height: 16px;
81 | font-family: Menlo, Monaco, Consolas, "Lucida Console", monospace;
82 | margin: 0; padding: 0;
83 | }
84 | .annotation pre {
85 | display: block;
86 | margin: 0;
87 | padding: 7px 10px;
88 | background: #fcfcfc;
89 | -moz-box-shadow: inset 0 0 10px rgba(0,0,0,0.1);
90 | -webkit-box-shadow: inset 0 0 10px rgba(0,0,0,0.1);
91 | box-shadow: inset 0 0 10px rgba(0,0,0,0.1);
92 | overflow-x: auto;
93 | }
94 | .annotation pre code {
95 | border: 0;
96 | padding: 0;
97 | background: transparent;
98 | }
99 |
100 |
101 | blockquote {
102 | border-left: 5px solid #ccc;
103 | margin: 0;
104 | padding: 1px 0 1px 1em;
105 | }
106 | .sections blockquote p {
107 | font-family: Menlo, Consolas, Monaco, monospace;
108 | font-size: 12px; line-height: 16px;
109 | color: #999;
110 | margin: 10px 0 0;
111 | white-space: pre-wrap;
112 | }
113 |
114 | ul.sections {
115 | list-style: none;
116 | padding:0 0 5px 0;;
117 | margin:0;
118 | }
119 |
120 | /*
121 | Force border-box so that % widths fit the parent
122 | container without overlap because of margin/padding.
123 |
124 | More Info : http://www.quirksmode.org/css/box.html
125 | */
126 | ul.sections > li > div {
127 | -moz-box-sizing: border-box; /* firefox */
128 | -ms-box-sizing: border-box; /* ie */
129 | -webkit-box-sizing: border-box; /* webkit */
130 | -khtml-box-sizing: border-box; /* konqueror */
131 | box-sizing: border-box; /* css3 */
132 | }
133 |
134 |
135 | /*---------------------- Jump Page -----------------------------*/
136 | #jump_to, #jump_page {
137 | margin: 0;
138 | background: white;
139 | -webkit-box-shadow: 0 0 25px #777; -moz-box-shadow: 0 0 25px #777;
140 | -webkit-border-bottom-left-radius: 5px; -moz-border-radius-bottomleft: 5px;
141 | font: 16px Arial;
142 | cursor: pointer;
143 | text-align: right;
144 | list-style: none;
145 | }
146 |
147 | #jump_to a {
148 | text-decoration: none;
149 | }
150 |
151 | #jump_to a.large {
152 | display: none;
153 | }
154 | #jump_to a.small {
155 | font-size: 22px;
156 | font-weight: bold;
157 | color: #676767;
158 | }
159 |
160 | #jump_to, #jump_wrapper {
161 | position: fixed;
162 | right: 0; top: 0;
163 | padding: 10px 15px;
164 | margin:0;
165 | }
166 |
167 | #jump_wrapper {
168 | display: none;
169 | padding:0;
170 | }
171 |
172 | #jump_to:hover #jump_wrapper {
173 | display: block;
174 | }
175 |
176 | #jump_page {
177 | padding: 5px 0 3px;
178 | margin: 0 0 25px 25px;
179 | }
180 |
181 | #jump_page .source {
182 | display: block;
183 | padding: 15px;
184 | text-decoration: none;
185 | border-top: 1px solid #eee;
186 | }
187 |
188 | #jump_page .source:hover {
189 | background: #f5f5ff;
190 | }
191 |
192 | #jump_page .source:first-child {
193 | }
194 |
195 | /*---------------------- Low resolutions (> 320px) ---------------------*/
196 | @media only screen and (min-width: 320px) {
197 | .pilwrap { display: none; }
198 |
199 | ul.sections > li > div {
200 | display: block;
201 | padding:5px 10px 0 10px;
202 | }
203 |
204 | ul.sections > li > div.annotation ul, ul.sections > li > div.annotation ol {
205 | padding-left: 30px;
206 | }
207 |
208 | ul.sections > li > div.content {
209 | background: #f5f5ff;
210 | overflow-x:auto;
211 | -webkit-box-shadow: inset 0 0 5px #e5e5ee;
212 | box-shadow: inset 0 0 5px #e5e5ee;
213 | border: 1px solid #dedede;
214 | margin:5px 10px 5px 10px;
215 | padding-bottom: 5px;
216 | }
217 |
218 | ul.sections > li > div.annotation pre {
219 | margin: 7px 0 7px;
220 | padding-left: 15px;
221 | }
222 |
223 | ul.sections > li > div.annotation p tt, .annotation code {
224 | background: #f8f8ff;
225 | border: 1px solid #dedede;
226 | font-size: 12px;
227 | padding: 0 0.2em;
228 | }
229 | }
230 |
231 | /*---------------------- (> 481px) ---------------------*/
232 | @media only screen and (min-width: 481px) {
233 | #container {
234 | position: relative;
235 | }
236 | body {
237 | background-color: #F5F5FF;
238 | font-size: 15px;
239 | line-height: 21px;
240 | }
241 | pre, tt, code {
242 | line-height: 18px;
243 | }
244 | p, ul, ol {
245 | margin: 0 0 15px;
246 | }
247 |
248 |
249 | #jump_to {
250 | padding: 5px 10px;
251 | }
252 | #jump_wrapper {
253 | padding: 0;
254 | }
255 | #jump_to, #jump_page {
256 | font: 10px Arial;
257 | text-transform: uppercase;
258 | }
259 | #jump_page .source {
260 | padding: 5px 10px;
261 | }
262 | #jump_to a.large {
263 | display: inline-block;
264 | }
265 | #jump_to a.small {
266 | display: none;
267 | }
268 |
269 |
270 |
271 | #background {
272 | position: absolute;
273 | top: 0; bottom: 0;
274 | width: 350px;
275 | background: #fff;
276 | border-right: 1px solid #e5e5ee;
277 | z-index: -1;
278 | }
279 |
280 | ul.sections > li > div.annotation ul, ul.sections > li > div.annotation ol {
281 | padding-left: 40px;
282 | }
283 |
284 | ul.sections > li {
285 | white-space: nowrap;
286 | }
287 |
288 | ul.sections > li > div {
289 | display: inline-block;
290 | }
291 |
292 | ul.sections > li > div.annotation {
293 | max-width: 350px;
294 | min-width: 350px;
295 | min-height: 5px;
296 | padding: 13px;
297 | overflow-x: hidden;
298 | white-space: normal;
299 | vertical-align: top;
300 | text-align: left;
301 | }
302 | ul.sections > li > div.annotation pre {
303 | margin: 15px 0 15px;
304 | padding-left: 15px;
305 | }
306 |
307 | ul.sections > li > div.content {
308 | padding: 13px;
309 | vertical-align: top;
310 | background: #f5f5ff;
311 | border: none;
312 | -webkit-box-shadow: none;
313 | box-shadow: none;
314 | }
315 |
316 | .pilwrap {
317 | position: relative;
318 | display: inline;
319 | }
320 |
321 | .pilcrow {
322 | font: 12px Arial;
323 | text-decoration: none;
324 | color: #454545;
325 | position: absolute;
326 | top: 3px; left: -20px;
327 | padding: 1px 2px;
328 | opacity: 0;
329 | -webkit-transition: opacity 0.2s linear;
330 | }
331 | .for-h1 .pilcrow {
332 | top: 47px;
333 | }
334 | .for-h2 .pilcrow, .for-h3 .pilcrow, .for-h4 .pilcrow {
335 | top: 35px;
336 | }
337 |
338 | ul.sections > li > div.annotation:hover .pilcrow {
339 | opacity: 1;
340 | }
341 | }
342 |
343 | /*---------------------- (> 1025px) ---------------------*/
344 | @media only screen and (min-width: 1025px) {
345 |
346 | body {
347 | font-size: 16px;
348 | line-height: 24px;
349 | }
350 |
351 | #background {
352 | width: 525px;
353 | }
354 | ul.sections > li > div.annotation {
355 | max-width: 525px;
356 | min-width: 525px;
357 | padding: 10px 25px 1px 50px;
358 | }
359 | ul.sections > li > div.content {
360 | padding: 9px 15px 16px 25px;
361 | }
362 | }
363 |
364 | /*---------------------- Syntax Highlighting -----------------------------*/
365 |
366 | td.linenos { background-color: #f0f0f0; padding-right: 10px; }
367 | span.lineno { background-color: #f0f0f0; padding: 0 5px 0 5px; }
368 | /*
369 |
370 | github.com style (c) Vasily Polovnyov
371 |
372 | */
373 |
374 | pre code {
375 | display: block; padding: 0.5em;
376 | color: #000;
377 | background: #f8f8ff
378 | }
379 |
380 | pre .comment,
381 | pre .template_comment,
382 | pre .diff .header,
383 | pre .javadoc {
384 | color: #408080;
385 | font-style: italic
386 | }
387 |
388 | pre .keyword,
389 | pre .assignment,
390 | pre .literal,
391 | pre .css .rule .keyword,
392 | pre .winutils,
393 | pre .javascript .title,
394 | pre .lisp .title,
395 | pre .subst {
396 | color: #954121;
397 | /*font-weight: bold*/
398 | }
399 |
400 | pre .number,
401 | pre .hexcolor {
402 | color: #40a070
403 | }
404 |
405 | pre .string,
406 | pre .tag .value,
407 | pre .phpdoc,
408 | pre .tex .formula {
409 | color: #219161;
410 | }
411 |
412 | pre .title,
413 | pre .id {
414 | color: #19469D;
415 | }
416 | pre .params {
417 | color: #00F;
418 | }
419 |
420 | pre .javascript .title,
421 | pre .lisp .title,
422 | pre .subst {
423 | font-weight: normal
424 | }
425 |
426 | pre .class .title,
427 | pre .haskell .label,
428 | pre .tex .command {
429 | color: #458;
430 | font-weight: bold
431 | }
432 |
433 | pre .tag,
434 | pre .tag .title,
435 | pre .rules .property,
436 | pre .django .tag .keyword {
437 | color: #000080;
438 | font-weight: normal
439 | }
440 |
441 | pre .attribute,
442 | pre .variable,
443 | pre .instancevar,
444 | pre .lisp .body {
445 | color: #008080
446 | }
447 |
448 | pre .regexp {
449 | color: #B68
450 | }
451 |
452 | pre .class {
453 | color: #458;
454 | font-weight: bold
455 | }
456 |
457 | pre .symbol,
458 | pre .ruby .symbol .string,
459 | pre .ruby .symbol .keyword,
460 | pre .ruby .symbol .keymethods,
461 | pre .lisp .keyword,
462 | pre .tex .special,
463 | pre .input_number {
464 | color: #990073
465 | }
466 |
467 | pre .builtin,
468 | pre .constructor,
469 | pre .built_in,
470 | pre .lisp .title {
471 | color: #0086b3
472 | }
473 |
474 | pre .preprocessor,
475 | pre .pi,
476 | pre .doctype,
477 | pre .shebang,
478 | pre .cdata {
479 | color: #999;
480 | font-weight: bold
481 | }
482 |
483 | pre .deletion {
484 | background: #fdd
485 | }
486 |
487 | pre .addition {
488 | background: #dfd
489 | }
490 |
491 | pre .diff .change {
492 | background: #0086b3
493 | }
494 |
495 | pre .chunk {
496 | color: #aaa
497 | }
498 |
499 | pre .tex .formula {
500 | opacity: 0.5;
501 | }
502 |
--------------------------------------------------------------------------------
/resources/google-code-prettify/desert.css:
--------------------------------------------------------------------------------
1 | /* desert scheme ported from vim to google prettify */
2 | pre.prettyprint { display: block; background-color: #333 }
3 | pre .nocode { background-color: none; color: #000 }
4 | pre .str { color: #ffa0a0 } /* string - pink */
5 | pre .kwd { color: #f0e68c; font-weight: bold }
6 | pre .com { color: #87ceeb } /* comment - skyblue */
7 | pre .typ { color: #98fb98 } /* type - lightgreen */
8 | pre .lit { color: #cd5c5c } /* literal - darkred */
9 | pre .pun { color: #fff } /* punctuation */
10 | pre .pln { color: #fff } /* plaintext */
11 | pre .tag { color: #f0e68c; font-weight: bold } /* html/xml tag - lightyellow */
12 | pre .atn { color: #bdb76b; font-weight: bold } /* attribute name - khaki */
13 | pre .atv { color: #ffa0a0 } /* attribute value - pink */
14 | pre .dec { color: #98fb98 } /* decimal - lightgreen */
15 |
16 | /* Specify class=linenums on a pre to get line numbering */
17 | ol.linenums { margin-top: 0; margin-bottom: 0; color: #AEAEAE } /* IE indents via margin-left */
18 | li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8 { list-style-type: none }
19 | /* Alternate shading for lines */
20 | li.L1,li.L3,li.L5,li.L7,li.L9 { }
21 |
22 | @media print {
23 | pre.prettyprint { background-color: none }
24 | pre .str, code .str { color: #060 }
25 | pre .kwd, code .kwd { color: #006; font-weight: bold }
26 | pre .com, code .com { color: #600; font-style: italic }
27 | pre .typ, code .typ { color: #404; font-weight: bold }
28 | pre .lit, code .lit { color: #044 }
29 | pre .pun, code .pun { color: #440 }
30 | pre .pln, code .pln { color: #000 }
31 | pre .tag, code .tag { color: #006; font-weight: bold }
32 | pre .atn, code .atn { color: #404 }
33 | pre .atv, code .atv { color: #060 }
34 | }
35 |
--------------------------------------------------------------------------------
/resources/google-code-prettify/doxy.css:
--------------------------------------------------------------------------------
1 | /* Doxy pretty-printing styles. Used with prettify.js. */
2 |
3 | pre .str, code .str { color: #fec243; } /* string - eggyolk gold */
4 | pre .kwd, code .kwd { color: #8470FF; } /* keyword - light slate blue */
5 | pre .com, code .com { color: #32cd32; font-style: italic; } /* comment - green */
6 | pre .typ, code .typ { color: #6ecbcc; } /* type - turq green */
7 | pre .lit, code .lit { color: #d06; } /* literal - cherry red */
8 | pre .pun, code .pun { color: #8B8970; } /* punctuation - lemon chiffon4 */
9 | pre .pln, code .pln { color: #f0f0f0; } /* plaintext - white */
10 | pre .tag, code .tag { color: #9c9cff; } /* html/xml tag (bluey) */
11 | pre .htm, code .htm { color: #dda0dd; } /* html tag light purply*/
12 | pre .xsl, code .xsl { color: #d0a0d0; } /* xslt tag light purply*/
13 | pre .atn, code .atn { color: #46eeee; font-weight: normal;} /* html/xml attribute name - lt turquoise */
14 | pre .atv, code .atv { color: #EEB4B4; } /* html/xml attribute value - rosy brown2 */
15 | pre .dec, code .dec { color: #3387CC; } /* decimal - blue */
16 |
17 | a {
18 | text-decoration: none;
19 | }
20 | pre.prettyprint, code.prettyprint {
21 | font-family:'Droid Sans Mono','CPMono_v07 Bold','Droid Sans';
22 | font-weight: bold;
23 | font-size: 9pt;
24 | background-color: #0f0f0f;
25 | -moz-border-radius: 8px;
26 | -webkit-border-radius: 8px;
27 | -o-border-radius: 8px;
28 | -ms-border-radius: 8px;
29 | -khtml-border-radius: 8px;
30 | border-radius: 8px;
31 | } /* background is black (well, just a tad less dark ) */
32 |
33 | pre.prettyprint {
34 | width: 95%;
35 | margin: 1em auto;
36 | padding: 1em;
37 | white-space: pre-wrap;
38 | }
39 |
40 | pre.prettyprint a, code.prettyprint a {
41 | text-decoration:none;
42 | }
43 | /* Specify class=linenums on a pre to get line numbering; line numbers themselves are the same color as punctuation */
44 | ol.linenums { margin-top: 0; margin-bottom: 0; color: #8B8970; } /* IE indents via margin-left */
45 | li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8 { list-style-type: none }
46 | /* Alternate shading for lines */
47 | li.L1,li.L3,li.L5,li.L7,li.L9 { }
48 |
49 | /* print is mostly unchanged from default at present */
50 | @media print {
51 | pre.prettyprint, code.prettyprint { background-color: #fff; }
52 | pre .str, code .str { color: #088; }
53 | pre .kwd, code .kwd { color: #006; font-weight: bold; }
54 | pre .com, code .com { color: #oc3; font-style: italic; }
55 | pre .typ, code .typ { color: #404; font-weight: bold; }
56 | pre .lit, code .lit { color: #044; }
57 | pre .pun, code .pun { color: #440; }
58 | pre .pln, code .pln { color: #000; }
59 | pre .tag, code .tag { color: #b66ff7; font-weight: bold; }
60 | pre .htm, code .htm { color: #606; font-weight: bold; }
61 | pre .xsl, code .xsl { color: #606; font-weight: bold; }
62 | pre .atn, code .atn { color: #c71585; font-weight: normal; }
63 | pre .atv, code .atv { color: #088; font-weight: normal; }
64 | }
65 |
--------------------------------------------------------------------------------
/resources/google-code-prettify/lang-apollo.js:
--------------------------------------------------------------------------------
1 | PR.registerLangHandler(PR.createSimpleLexer([["com",/^#[^\n\r]*/,null,"#"],["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \u00a0"],["str",/^"(?:[^"\\]|\\[\S\s])*(?:"|$)/,null,'"']],[["kwd",/^(?:ADS|AD|AUG|BZF|BZMF|CAE|CAF|CA|CCS|COM|CS|DAS|DCA|DCOM|DCS|DDOUBL|DIM|DOUBLE|DTCB|DTCF|DV|DXCH|EDRUPT|EXTEND|INCR|INDEX|NDX|INHINT|LXCH|MASK|MSK|MP|MSU|NOOP|OVSK|QXCH|RAND|READ|RELINT|RESUME|RETURN|ROR|RXOR|SQUARE|SU|TCR|TCAA|OVSK|TCF|TC|TS|WAND|WOR|WRITE|XCH|XLQ|XXALQ|ZL|ZQ|ADD|ADZ|SUB|SUZ|MPY|MPR|MPZ|DVP|COM|ABS|CLA|CLZ|LDQ|STO|STQ|ALS|LLS|LRS|TRA|TSQ|TMI|TOV|AXT|TIX|DLY|INP|OUT)\s/,
2 | null],["typ",/^(?:-?GENADR|=MINUS|2BCADR|VN|BOF|MM|-?2CADR|-?[1-6]DNADR|ADRES|BBCON|[ES]?BANK=?|BLOCK|BNKSUM|E?CADR|COUNT\*?|2?DEC\*?|-?DNCHAN|-?DNPTR|EQUALS|ERASE|MEMORY|2?OCT|REMADR|SETLOC|SUBRO|ORG|BSS|BES|SYN|EQU|DEFINE|END)\s/,null],["lit",/^'(?:-*(?:\w|\\[!-~])(?:[\w-]*|\\[!-~])[!=?]?)?/],["pln",/^-*(?:[!-z]|\\[!-~])(?:[\w-]*|\\[!-~])[!=?]?/],["pun",/^[^\w\t\n\r "'-);\\\xa0]+/]]),["apollo","agc","aea"]);
3 |
--------------------------------------------------------------------------------
/resources/google-code-prettify/lang-basic.js:
--------------------------------------------------------------------------------
1 | var a=null;
2 | PR.registerLangHandler(PR.createSimpleLexer([["str",/^"(?:[^\n\r"\\]|\\.)*(?:"|$)/,a,'"'],["pln",/^\s+/,a," \r\n\t\u00a0"]],[["com",/^REM[^\n\r]*/,a],["kwd",/^\b(?:AND|CLOSE|CLR|CMD|CONT|DATA|DEF ?FN|DIM|END|FOR|GET|GOSUB|GOTO|IF|INPUT|LET|LIST|LOAD|NEW|NEXT|NOT|ON|OPEN|OR|POKE|PRINT|READ|RESTORE|RETURN|RUN|SAVE|STEP|STOP|SYS|THEN|TO|VERIFY|WAIT)\b/,a],["pln",/^[a-z][^\W_]?(?:\$|%)?/i,a],["lit",/^(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?/i,a,"0123456789"],["pun",
3 | /^.[^\s\w"$%.]*/,a]]),["basic","cbm"]);
4 |
--------------------------------------------------------------------------------
/resources/google-code-prettify/lang-clj.js:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2011 Google Inc.
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | */
16 | var a=null;
17 | PR.registerLangHandler(PR.createSimpleLexer([["opn",/^[([{]+/,a,"([{"],["clo",/^[)\]}]+/,a,")]}"],["com",/^;[^\n\r]*/,a,";"],["pln",/^[\t\n\r \xa0]+/,a,"\t\n\r \u00a0"],["str",/^"(?:[^"\\]|\\[\S\s])*(?:"|$)/,a,'"']],[["kwd",/^(?:def|if|do|let|quote|var|fn|loop|recur|throw|try|monitor-enter|monitor-exit|defmacro|defn|defn-|macroexpand|macroexpand-1|for|doseq|dosync|dotimes|and|or|when|not|assert|doto|proxy|defstruct|first|rest|cons|defprotocol|deftype|defrecord|reify|defmulti|defmethod|meta|with-meta|ns|in-ns|create-ns|import|intern|refer|alias|namespace|resolve|ref|deref|refset|new|set!|memfn|to-array|into-array|aset|gen-class|reduce|map|filter|find|nil?|empty?|hash-map|hash-set|vec|vector|seq|flatten|reverse|assoc|dissoc|list|list?|disj|get|union|difference|intersection|extend|extend-type|extend-protocol|prn)\b/,a],
18 | ["typ",/^:[\dA-Za-z-]+/]]),["clj"]);
19 |
--------------------------------------------------------------------------------
/resources/google-code-prettify/lang-css.js:
--------------------------------------------------------------------------------
1 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\f\r ]+/,null," \t\r\n\u000c"]],[["str",/^"(?:[^\n\f\r"\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*"/,null],["str",/^'(?:[^\n\f\r'\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*'/,null],["lang-css-str",/^url\(([^"')]+)\)/i],["kwd",/^(?:url|rgb|!important|@import|@page|@media|@charset|inherit)(?=[^\w-]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*)\s*:/i],["com",/^\/\*[^*]*\*+(?:[^*/][^*]*\*+)*\//],
2 | ["com",/^(?:<\!--|--\>)/],["lit",/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],["lit",/^#[\da-f]{3,6}\b/i],["pln",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i],["pun",/^[^\s\w"']+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[["kwd",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[["str",/^[^"')]+/]]),["css-str"]);
3 |
--------------------------------------------------------------------------------
/resources/google-code-prettify/lang-dart.js:
--------------------------------------------------------------------------------
1 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \u00a0"]],[["com",/^#!.*/],["kwd",/^\b(?:import|library|part of|part|as|show|hide)\b/i],["com",/^\/\/.*/],["com",/^\/\*[^*]*\*+(?:[^*/][^*]*\*+)*\//],["kwd",/^\b(?:class|interface)\b/i],["kwd",/^\b(?:assert|break|case|catch|continue|default|do|else|finally|for|if|in|is|new|return|super|switch|this|throw|try|while)\b/i],["kwd",/^\b(?:abstract|const|extends|factory|final|get|implements|native|operator|set|static|typedef|var)\b/i],
2 | ["typ",/^\b(?:bool|double|dynamic|int|num|object|string|void)\b/i],["kwd",/^\b(?:false|null|true)\b/i],["str",/^r?'''[\S\s]*?[^\\]'''/],["str",/^r?"""[\S\s]*?[^\\]"""/],["str",/^r?'('|[^\n\f\r]*?[^\\]')/],["str",/^r?"("|[^\n\f\r]*?[^\\]")/],["pln",/^[$_a-z]\w*/i],["pun",/^[!%&*+/:<-?^|~-]/],["lit",/^\b0x[\da-f]+/i],["lit",/^\b\d+(?:\.\d*)?(?:e[+-]?\d+)?/i],["lit",/^\b\.\d+(?:e[+-]?\d+)?/i],["pun",/^[(),.;[\]{}]/]]),
3 | ["dart"]);
4 |
--------------------------------------------------------------------------------
/resources/google-code-prettify/lang-erlang.js:
--------------------------------------------------------------------------------
1 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t-\r ]+/,null,"\t\n\u000b\u000c\r "],["str",/^"(?:[^\n\f\r"\\]|\\[\S\s])*(?:"|$)/,null,'"'],["lit",/^[a-z]\w*/],["lit",/^'(?:[^\n\f\r'\\]|\\[^&])+'?/,null,"'"],["lit",/^\?[^\t\n ({]+/,null,"?"],["lit",/^(?:0o[0-7]+|0x[\da-f]+|\d+(?:\.\d+)?(?:e[+-]?\d+)?)/i,null,"0123456789"]],[["com",/^%[^\n]*/],["kwd",/^(?:module|attributes|do|let|in|letrec|apply|call|primop|case|of|end|when|fun|try|catch|receive|after|char|integer|float,atom,string,var)\b/],
2 | ["kwd",/^-[_a-z]+/],["typ",/^[A-Z_]\w*/],["pun",/^[,.;]/]]),["erlang","erl"]);
3 |
--------------------------------------------------------------------------------
/resources/google-code-prettify/lang-go.js:
--------------------------------------------------------------------------------
1 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \u00a0"],["pln",/^(?:"(?:[^"\\]|\\[\S\s])*(?:"|$)|'(?:[^'\\]|\\[\S\s])+(?:'|$)|`[^`]*(?:`|$))/,null,"\"'"]],[["com",/^(?:\/\/[^\n\r]*|\/\*[\S\s]*?\*\/)/],["pln",/^(?:[^"'/`]|\/(?![*/]))+/]]),["go"]);
2 |
--------------------------------------------------------------------------------
/resources/google-code-prettify/lang-hs.js:
--------------------------------------------------------------------------------
1 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t-\r ]+/,null,"\t\n\u000b\u000c\r "],["str",/^"(?:[^\n\f\r"\\]|\\[\S\s])*(?:"|$)/,null,'"'],["str",/^'(?:[^\n\f\r'\\]|\\[^&])'?/,null,"'"],["lit",/^(?:0o[0-7]+|0x[\da-f]+|\d+(?:\.\d+)?(?:e[+-]?\d+)?)/i,null,"0123456789"]],[["com",/^(?:--+[^\n\f\r]*|{-(?:[^-]|-+[^}-])*-})/],["kwd",/^(?:case|class|data|default|deriving|do|else|if|import|in|infix|infixl|infixr|instance|let|module|newtype|of|then|type|where|_)(?=[^\d'A-Za-z]|$)/,
2 | null],["pln",/^(?:[A-Z][\w']*\.)*[A-Za-z][\w']*/],["pun",/^[^\d\t-\r "'A-Za-z]+/]]),["hs"]);
3 |
--------------------------------------------------------------------------------
/resources/google-code-prettify/lang-lisp.js:
--------------------------------------------------------------------------------
1 | var a=null;
2 | PR.registerLangHandler(PR.createSimpleLexer([["opn",/^\(+/,a,"("],["clo",/^\)+/,a,")"],["com",/^;[^\n\r]*/,a,";"],["pln",/^[\t\n\r \xa0]+/,a,"\t\n\r \u00a0"],["str",/^"(?:[^"\\]|\\[\S\s])*(?:"|$)/,a,'"']],[["kwd",/^(?:block|c[ad]+r|catch|con[ds]|def(?:ine|un)|do|eq|eql|equal|equalp|eval-when|flet|format|go|if|labels|lambda|let|load-time-value|locally|macrolet|multiple-value-call|nil|progn|progv|quote|require|return-from|setq|symbol-macrolet|t|tagbody|the|throw|unwind)\b/,a],
3 | ["lit",/^[+-]?(?:[#0]x[\da-f]+|\d+\/\d+|(?:\.\d+|\d+(?:\.\d*)?)(?:[de][+-]?\d+)?)/i],["lit",/^'(?:-*(?:\w|\\[!-~])(?:[\w-]*|\\[!-~])[!=?]?)?/],["pln",/^-*(?:[_a-z]|\\[!-~])(?:[\w-]*|\\[!-~])[!=?]?/i],["pun",/^[^\w\t\n\r "'-);\\\xa0]+/]]),["cl","el","lisp","lsp","scm","ss","rkt"]);
4 |
--------------------------------------------------------------------------------
/resources/google-code-prettify/lang-llvm.js:
--------------------------------------------------------------------------------
1 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \u00a0"],["str",/^!?"(?:[^"\\]|\\[\S\s])*(?:"|$)/,null,'"'],["com",/^;[^\n\r]*/,null,";"]],[["pln",/^[!%@](?:[$\-.A-Z_a-z][\w$\-.]*|\d+)/],["kwd",/^[^\W\d]\w*/,null],["lit",/^\d+\.\d+/],["lit",/^(?:\d+|0[Xx][\dA-Fa-f]+)/],["pun",/^[(-*,:<->[\]{}]|\.\.\.$/]]),["llvm","ll"]);
2 |
--------------------------------------------------------------------------------
/resources/google-code-prettify/lang-lua.js:
--------------------------------------------------------------------------------
1 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \u00a0"],["str",/^(?:"(?:[^"\\]|\\[\S\s])*(?:"|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$))/,null,"\"'"]],[["com",/^--(?:\[(=*)\[[\S\s]*?(?:]\1]|$)|[^\n\r]*)/],["str",/^\[(=*)\[[\S\s]*?(?:]\1]|$)/],["kwd",/^(?:and|break|do|else|elseif|end|false|for|function|if|in|local|nil|not|or|repeat|return|then|true|until|while)\b/,null],["lit",/^[+-]?(?:0x[\da-f]+|(?:\.\d+|\d+(?:\.\d*)?)(?:e[+-]?\d+)?)/i],
2 | ["pln",/^[_a-z]\w*/i],["pun",/^[^\w\t\n\r \xa0][^\w\t\n\r "'+=\xa0-]*/]]),["lua"]);
3 |
--------------------------------------------------------------------------------
/resources/google-code-prettify/lang-ml.js:
--------------------------------------------------------------------------------
1 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \u00a0"],["com",/^#(?:if[\t\n\r \xa0]+(?:[$_a-z][\w']*|``[^\t\n\r`]*(?:``|$))|else|endif|light)/i,null,"#"],["str",/^(?:"(?:[^"\\]|\\[\S\s])*(?:"|$)|'(?:[^'\\]|\\[\S\s])(?:'|$))/,null,"\"'"]],[["com",/^(?:\/\/[^\n\r]*|\(\*[\S\s]*?\*\))/],["kwd",/^(?:abstract|and|as|assert|begin|class|default|delegate|do|done|downcast|downto|elif|else|end|exception|extern|false|finally|for|fun|function|if|in|inherit|inline|interface|internal|lazy|let|match|member|module|mutable|namespace|new|null|of|open|or|override|private|public|rec|return|static|struct|then|to|true|try|type|upcast|use|val|void|when|while|with|yield|asr|land|lor|lsl|lsr|lxor|mod|sig|atomic|break|checked|component|const|constraint|constructor|continue|eager|event|external|fixed|functor|global|include|method|mixin|object|parallel|process|protected|pure|sealed|trait|virtual|volatile)\b/],
2 | ["lit",/^[+-]?(?:0x[\da-f]+|(?:\.\d+|\d+(?:\.\d*)?)(?:e[+-]?\d+)?)/i],["pln",/^(?:[_a-z][\w']*[!#?]?|``[^\t\n\r`]*(?:``|$))/i],["pun",/^[^\w\t\n\r "'\xa0]+/]]),["fs","ml"]);
3 |
--------------------------------------------------------------------------------
/resources/google-code-prettify/lang-mumps.js:
--------------------------------------------------------------------------------
1 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \u00a0"],["str",/^"(?:[^"]|\\.)*"/,null,'"']],[["com",/^;[^\n\r]*/,null,";"],["dec",/^\$(?:d|device|ec|ecode|es|estack|et|etrap|h|horolog|i|io|j|job|k|key|p|principal|q|quit|st|stack|s|storage|sy|system|t|test|tl|tlevel|tr|trestart|x|y|z[a-z]*|a|ascii|c|char|d|data|e|extract|f|find|fn|fnumber|g|get|j|justify|l|length|na|name|o|order|p|piece|ql|qlength|qs|qsubscript|q|query|r|random|re|reverse|s|select|st|stack|t|text|tr|translate|nan)\b/i,
2 | null],["kwd",/^(?:[^$]b|break|c|close|d|do|e|else|f|for|g|goto|h|halt|h|hang|i|if|j|job|k|kill|l|lock|m|merge|n|new|o|open|q|quit|r|read|s|set|tc|tcommit|tre|trestart|tro|trollback|ts|tstart|u|use|v|view|w|write|x|xecute)\b/i,null],["lit",/^[+-]?(?:\.\d+|\d+(?:\.\d*)?)(?:e[+-]?\d+)?/i],["pln",/^[a-z][^\W_]*/i],["pun",/^[^\w\t\n\r"$%;^\xa0]|_/]]),["mumps"]);
3 |
--------------------------------------------------------------------------------
/resources/google-code-prettify/lang-n.js:
--------------------------------------------------------------------------------
1 | var a=null;
2 | PR.registerLangHandler(PR.createSimpleLexer([["str",/^(?:'(?:[^\n\r'\\]|\\.)*'|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,a,'"'],["com",/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\n\r]*)/,a,"#"],["pln",/^\s+/,a," \r\n\t\u00a0"]],[["str",/^@"(?:[^"]|"")*(?:"|$)/,a],["str",/^<#[^#>]*(?:#>|$)/,a],["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,a],["com",/^\/\/[^\n\r]*/,a],["com",/^\/\*[\S\s]*?(?:\*\/|$)/,
3 | a],["kwd",/^(?:abstract|and|as|base|catch|class|def|delegate|enum|event|extern|false|finally|fun|implements|interface|internal|is|macro|match|matches|module|mutable|namespace|new|null|out|override|params|partial|private|protected|public|ref|sealed|static|struct|syntax|this|throw|true|try|type|typeof|using|variant|virtual|volatile|when|where|with|assert|assert2|async|break|checked|continue|do|else|ensures|for|foreach|if|late|lock|new|nolate|otherwise|regexp|repeat|requires|return|surroundwith|unchecked|unless|using|while|yield)\b/,
4 | a],["typ",/^(?:array|bool|byte|char|decimal|double|float|int|list|long|object|sbyte|short|string|ulong|uint|ufloat|ulong|ushort|void)\b/,a],["lit",/^@[$_a-z][\w$@]*/i,a],["typ",/^@[A-Z]+[a-z][\w$@]*/,a],["pln",/^'?[$_a-z][\w$@]*/i,a],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,a,"0123456789"],["pun",/^.[^\s\w"-$'./@`]*/,a]]),["n","nemerle"]);
5 |
--------------------------------------------------------------------------------
/resources/google-code-prettify/lang-pascal.js:
--------------------------------------------------------------------------------
1 | var a=null;
2 | PR.registerLangHandler(PR.createSimpleLexer([["str",/^'(?:[^\n\r'\\]|\\.)*(?:'|$)/,a,"'"],["pln",/^\s+/,a," \r\n\t\u00a0"]],[["com",/^\(\*[\S\s]*?(?:\*\)|$)|^{[\S\s]*?(?:}|$)/,a],["kwd",/^(?:absolute|and|array|asm|assembler|begin|case|const|constructor|destructor|div|do|downto|else|end|external|for|forward|function|goto|if|implementation|in|inline|interface|interrupt|label|mod|not|object|of|or|packed|procedure|program|record|repeat|set|shl|shr|then|to|type|unit|until|uses|var|virtual|while|with|xor)\b/i,a],
3 | ["lit",/^(?:true|false|self|nil)/i,a],["pln",/^[a-z][^\W_]*/i,a],["lit",/^(?:\$[\da-f]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?)/i,a,"0123456789"],["pun",/^.[^\s\w$'./@]*/,a]]),["pascal"]);
4 |
--------------------------------------------------------------------------------
/resources/google-code-prettify/lang-proto.js:
--------------------------------------------------------------------------------
1 | PR.registerLangHandler(PR.sourceDecorator({keywords:"bytes,default,double,enum,extend,extensions,false,group,import,max,message,option,optional,package,repeated,required,returns,rpc,service,syntax,to,true",types:/^(bool|(double|s?fixed|[su]?int)(32|64)|float|string)\b/,cStyleComments:!0}),["proto"]);
2 |
--------------------------------------------------------------------------------
/resources/google-code-prettify/lang-r.js:
--------------------------------------------------------------------------------
1 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \u00a0"],["str",/^"(?:[^"\\]|\\[\S\s])*(?:"|$)/,null,'"'],["str",/^'(?:[^'\\]|\\[\S\s])*(?:'|$)/,null,"'"]],[["com",/^#.*/],["kwd",/^(?:if|else|for|while|repeat|in|next|break|return|switch|function)(?![\w.])/],["lit",/^0[Xx][\dA-Fa-f]+([Pp]\d+)?[Li]?/],["lit",/^[+-]?(\d+(\.\d+)?|\.\d+)([Ee][+-]?\d+)?[Li]?/],["lit",/^(?:NULL|NA(?:_(?:integer|real|complex|character)_)?|Inf|TRUE|FALSE|NaN|\.\.(?:\.|\d+))(?![\w.])/],
2 | ["pun",/^(?:<-|->>?|-|==|<=|>=|<|>|&&?|!=|\|\|?|[!*+/^]|%.*?%|[$=@~]|:{1,3}|[(),;?[\]{}])/],["pln",/^(?:[A-Za-z]+[\w.]*|\.[^\W\d][\w.]*)(?![\w.])/],["str",/^`.+`/]]),["r","s","R","S","Splus"]);
3 |
--------------------------------------------------------------------------------
/resources/google-code-prettify/lang-rd.js:
--------------------------------------------------------------------------------
1 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \u00a0"],["com",/^%[^\n\r]*/,null,"%"]],[["lit",/^\\(?:cr|l?dots|R|tab)\b/],["kwd",/^\\[@-Za-z]+/],["kwd",/^#(?:ifn?def|endif)/],["pln",/^\\[{}]/],["pun",/^[()[\]{}]+/]]),["Rd","rd"]);
2 |
--------------------------------------------------------------------------------
/resources/google-code-prettify/lang-scala.js:
--------------------------------------------------------------------------------
1 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \u00a0"],["str",/^"(?:""(?:""?(?!")|[^"\\]|\\.)*"{0,3}|(?:[^\n\r"\\]|\\.)*"?)/,null,'"'],["lit",/^`(?:[^\n\r\\`]|\\.)*`?/,null,"`"],["pun",/^[!#%&(--:-@[-^{-~]+/,null,"!#%&()*+,-:;<=>?@[\\]^{|}~"]],[["str",/^'(?:[^\n\r'\\]|\\(?:'|[^\n\r']+))'/],["lit",/^'[$A-Z_a-z][\w$]*(?![\w$'])/],["kwd",/^(?:abstract|case|catch|class|def|do|else|extends|final|finally|for|forSome|if|implicit|import|lazy|match|new|object|override|package|private|protected|requires|return|sealed|super|throw|trait|try|type|val|var|while|with|yield)\b/],
2 | ["lit",/^(?:true|false|null|this)\b/],["lit",/^(?:0(?:[0-7]+|x[\da-f]+)l?|(?:0|[1-9]\d*)(?:(?:\.\d+)?(?:e[+-]?\d+)?f?|l?)|\\.\d+(?:e[+-]?\d+)?f?)/i],["typ",/^[$_]*[A-Z][\d$A-Z_]*[a-z][\w$]*/],["pln",/^[$A-Z_a-z][\w$]*/],["com",/^\/(?:\/.*|\*(?:\/|\**[^*/])*(?:\*+\/?)?)/],["pun",/^(?:\.+|\/)/]]),["scala"]);
3 |
--------------------------------------------------------------------------------
/resources/google-code-prettify/lang-sql.js:
--------------------------------------------------------------------------------
1 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \u00a0"],["str",/^(?:"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*')/,null,"\"'"]],[["com",/^(?:--[^\n\r]*|\/\*[\S\s]*?(?:\*\/|$))/],["kwd",/^(?:add|all|alter|and|any|apply|as|asc|authorization|backup|begin|between|break|browse|bulk|by|cascade|case|check|checkpoint|close|clustered|coalesce|collate|column|commit|compute|connect|constraint|contains|containstable|continue|convert|create|cross|current|current_date|current_time|current_timestamp|current_user|cursor|database|dbcc|deallocate|declare|default|delete|deny|desc|disk|distinct|distributed|double|drop|dummy|dump|else|end|errlvl|escape|except|exec|execute|exists|exit|fetch|file|fillfactor|following|for|foreign|freetext|freetexttable|from|full|function|goto|grant|group|having|holdlock|identity|identitycol|identity_insert|if|in|index|inner|insert|intersect|into|is|join|key|kill|left|like|lineno|load|match|matched|merge|natural|national|nocheck|nonclustered|nocycle|not|null|nullif|of|off|offsets|on|open|opendatasource|openquery|openrowset|openxml|option|or|order|outer|over|partition|percent|pivot|plan|preceding|precision|primary|print|proc|procedure|public|raiserror|read|readtext|reconfigure|references|replication|restore|restrict|return|revoke|right|rollback|rowcount|rowguidcol|rows?|rule|save|schema|select|session_user|set|setuser|shutdown|some|start|statistics|system_user|table|textsize|then|to|top|tran|transaction|trigger|truncate|tsequal|unbounded|union|unique|unpivot|update|updatetext|use|user|using|values|varying|view|waitfor|when|where|while|with|within|writetext|xml)(?=[^\w-]|$)/i,
2 | null],["lit",/^[+-]?(?:0x[\da-f]+|(?:\.\d+|\d+(?:\.\d*)?)(?:e[+-]?\d+)?)/i],["pln",/^[_a-z][\w-]*/i],["pun",/^[^\w\t\n\r "'\xa0][^\w\t\n\r "'+\xa0-]*/]]),["sql"]);
3 |
--------------------------------------------------------------------------------
/resources/google-code-prettify/lang-tcl.js:
--------------------------------------------------------------------------------
1 | var a=null;
2 | PR.registerLangHandler(PR.createSimpleLexer([["opn",/^{+/,a,"{"],["clo",/^}+/,a,"}"],["com",/^#[^\n\r]*/,a,"#"],["pln",/^[\t\n\r \xa0]+/,a,"\t\n\r \u00a0"],["str",/^"(?:[^"\\]|\\[\S\s])*(?:"|$)/,a,'"']],[["kwd",/^(?:after|append|apply|array|break|case|catch|continue|error|eval|exec|exit|expr|for|foreach|if|incr|info|proc|return|set|switch|trace|uplevel|upvar|while)\b/,a],["lit",/^[+-]?(?:[#0]x[\da-f]+|\d+\/\d+|(?:\.\d+|\d+(?:\.\d*)?)(?:[de][+-]?\d+)?)/i],["lit",
3 | /^'(?:-*(?:\w|\\[!-~])(?:[\w-]*|\\[!-~])[!=?]?)?/],["pln",/^-*(?:[_a-z]|\\[!-~])(?:[\w-]*|\\[!-~])[!=?]?/i],["pun",/^[^\w\t\n\r "'-);\\\xa0]+/]]),["tcl"]);
4 |
--------------------------------------------------------------------------------
/resources/google-code-prettify/lang-tex.js:
--------------------------------------------------------------------------------
1 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \u00a0"],["com",/^%[^\n\r]*/,null,"%"]],[["kwd",/^\\[@-Za-z]+/],["kwd",/^\\./],["typ",/^[$&]/],["lit",/[+-]?(?:\.\d+|\d+(?:\.\d*)?)(cm|em|ex|in|pc|pt|bp|mm)/i],["pun",/^[()=[\]{}]+/]]),["latex","tex"]);
2 |
--------------------------------------------------------------------------------
/resources/google-code-prettify/lang-vb.js:
--------------------------------------------------------------------------------
1 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0\u2028\u2029]+/,null,"\t\n\r \u00a0\u2028\u2029"],["str",/^(?:["\u201c\u201d](?:[^"\u201c\u201d]|["\u201c\u201d]{2})(?:["\u201c\u201d]c|$)|["\u201c\u201d](?:[^"\u201c\u201d]|["\u201c\u201d]{2})*(?:["\u201c\u201d]|$))/i,null,'"\u201c\u201d'],["com",/^['\u2018\u2019](?:_(?:\r\n?|[^\r]?)|[^\n\r_\u2028\u2029])*/,null,"'\u2018\u2019"]],[["kwd",/^(?:addhandler|addressof|alias|and|andalso|ansi|as|assembly|auto|boolean|byref|byte|byval|call|case|catch|cbool|cbyte|cchar|cdate|cdbl|cdec|char|cint|class|clng|cobj|const|cshort|csng|cstr|ctype|date|decimal|declare|default|delegate|dim|directcast|do|double|each|else|elseif|end|endif|enum|erase|error|event|exit|finally|for|friend|function|get|gettype|gosub|goto|handles|if|implements|imports|in|inherits|integer|interface|is|let|lib|like|long|loop|me|mod|module|mustinherit|mustoverride|mybase|myclass|namespace|new|next|not|notinheritable|notoverridable|object|on|option|optional|or|orelse|overloads|overridable|overrides|paramarray|preserve|private|property|protected|public|raiseevent|readonly|redim|removehandler|resume|return|select|set|shadows|shared|short|single|static|step|stop|string|structure|sub|synclock|then|throw|to|try|typeof|unicode|until|variant|wend|when|while|with|withevents|writeonly|xor|endif|gosub|let|variant|wend)\b/i,
2 | null],["com",/^rem\b.*/i],["lit",/^(?:true\b|false\b|nothing\b|\d+(?:e[+-]?\d+[dfr]?|[dfilrs])?|(?:&h[\da-f]+|&o[0-7]+)[ils]?|\d*\.\d+(?:e[+-]?\d+)?[dfr]?|#\s+(?:\d+[/-]\d+[/-]\d+(?:\s+\d+:\d+(?::\d+)?(\s*(?:am|pm))?)?|\d+:\d+(?::\d+)?(\s*(?:am|pm))?)\s+#)/i],["pln",/^(?:(?:[a-z]|_\w)\w*(?:\[[!#%&@]+])?|\[(?:[a-z]|_\w)\w*])/i],["pun",/^[^\w\t\n\r "'[\]\xa0\u2018\u2019\u201c\u201d\u2028\u2029]+/],["pun",/^(?:\[|])/]]),["vb","vbs"]);
3 |
--------------------------------------------------------------------------------
/resources/google-code-prettify/lang-vhdl.js:
--------------------------------------------------------------------------------
1 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \u00a0"]],[["str",/^(?:[box]?"(?:[^"]|"")*"|'.')/i],["com",/^--[^\n\r]*/],["kwd",/^(?:abs|access|after|alias|all|and|architecture|array|assert|attribute|begin|block|body|buffer|bus|case|component|configuration|constant|disconnect|downto|else|elsif|end|entity|exit|file|for|function|generate|generic|group|guarded|if|impure|in|inertial|inout|is|label|library|linkage|literal|loop|map|mod|nand|new|next|nor|not|null|of|on|open|or|others|out|package|port|postponed|procedure|process|pure|range|record|register|reject|rem|report|return|rol|ror|select|severity|shared|signal|sla|sll|sra|srl|subtype|then|to|transport|type|unaffected|units|until|use|variable|wait|when|while|with|xnor|xor)(?=[^\w-]|$)/i,
2 | null],["typ",/^(?:bit|bit_vector|character|boolean|integer|real|time|string|severity_level|positive|natural|signed|unsigned|line|text|std_u?logic(?:_vector)?)(?=[^\w-]|$)/i,null],["typ",/^'(?:active|ascending|base|delayed|driving|driving_value|event|high|image|instance_name|last_active|last_event|last_value|left|leftof|length|low|path_name|pos|pred|quiet|range|reverse_range|right|rightof|simple_name|stable|succ|transaction|val|value)(?=[^\w-]|$)/i,null],["lit",/^\d+(?:_\d+)*(?:#[\w.\\]+#(?:[+-]?\d+(?:_\d+)*)?|(?:\.\d+(?:_\d+)*)?(?:e[+-]?\d+(?:_\d+)*)?)/i],
3 | ["pln",/^(?:[a-z]\w*|\\[^\\]*\\)/i],["pun",/^[^\w\t\n\r "'\xa0][^\w\t\n\r "'\xa0-]*/]]),["vhdl","vhd"]);
4 |
--------------------------------------------------------------------------------
/resources/google-code-prettify/lang-wiki.js:
--------------------------------------------------------------------------------
1 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\d\t a-gi-z\xa0]+/,null,"\t \u00a0abcdefgijklmnopqrstuvwxyz0123456789"],["pun",/^[*=[\]^~]+/,null,"=*~^[]"]],[["lang-wiki.meta",/(?:^^|\r\n?|\n)(#[a-z]+)\b/],["lit",/^[A-Z][a-z][\da-z]+[A-Z][a-z][^\W_]+\b/],["lang-",/^{{{([\S\s]+?)}}}/],["lang-",/^`([^\n\r`]+)`/],["str",/^https?:\/\/[^\s#/?]*(?:\/[^\s#?]*)?(?:\?[^\s#]*)?(?:#\S*)?/i],["pln",/^(?:\r\n|[\S\s])[^\n\r#*=A-[^`h{~]*/]]),["wiki"]);
2 | PR.registerLangHandler(PR.createSimpleLexer([["kwd",/^#[a-z]+/i,null,"#"]],[]),["wiki.meta"]);
3 |
--------------------------------------------------------------------------------
/resources/google-code-prettify/lang-yaml.js:
--------------------------------------------------------------------------------
1 | var a=null;
2 | PR.registerLangHandler(PR.createSimpleLexer([["pun",/^[:>?|]+/,a,":|>?"],["dec",/^%(?:YAML|TAG)[^\n\r#]+/,a,"%"],["typ",/^&\S+/,a,"&"],["typ",/^!\S*/,a,"!"],["str",/^"(?:[^"\\]|\\.)*(?:"|$)/,a,'"'],["str",/^'(?:[^']|'')*(?:'|$)/,a,"'"],["com",/^#[^\n\r]*/,a,"#"],["pln",/^\s+/,a," \t\r\n"]],[["dec",/^(?:---|\.\.\.)(?:[\n\r]|$)/],["pun",/^-/],["kwd",/^\w+:[\n\r ]/],["pln",/^\w+/]]),["yaml","yml"]);
3 |
--------------------------------------------------------------------------------
/resources/google-code-prettify/prettify.css:
--------------------------------------------------------------------------------
1 | .pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee}
--------------------------------------------------------------------------------
/resources/google-code-prettify/prettify.js:
--------------------------------------------------------------------------------
1 | !function(){var q=null;window.PR_SHOULD_USE_CONTINUATION=!0;
2 | (function(){function S(a){function d(e){var b=e.charCodeAt(0);if(b!==92)return b;var a=e.charAt(1);return(b=r[a])?b:"0"<=a&&a<="7"?parseInt(e.substring(1),8):a==="u"||a==="x"?parseInt(e.substring(2),16):e.charCodeAt(1)}function g(e){if(e<32)return(e<16?"\\x0":"\\x")+e.toString(16);e=String.fromCharCode(e);return e==="\\"||e==="-"||e==="]"||e==="^"?"\\"+e:e}function b(e){var b=e.substring(1,e.length-1).match(/\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\[0-3][0-7]{0,2}|\\[0-7]{1,2}|\\[\S\s]|[^\\]/g),e=[],a=
3 | b[0]==="^",c=["["];a&&c.push("^");for(var a=a?1:0,f=b.length;a122||(l<65||h>90||e.push([Math.max(65,h)|32,Math.min(l,90)|32]),l<97||h>122||e.push([Math.max(97,h)&-33,Math.min(l,122)&-33]))}}e.sort(function(e,a){return e[0]-a[0]||a[1]-e[1]});b=[];f=[];for(a=0;ah[0]&&(h[1]+1>h[0]&&c.push("-"),c.push(g(h[1])));c.push("]");return c.join("")}function s(e){for(var a=e.source.match(/\[(?:[^\\\]]|\\[\S\s])*]|\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\\d+|\\[^\dux]|\(\?[!:=]|[()^]|[^()[\\^]+/g),c=a.length,d=[],f=0,h=0;f=2&&e==="["?a[f]=b(l):e!=="\\"&&(a[f]=l.replace(/[A-Za-z]/g,function(a){a=a.charCodeAt(0);return"["+String.fromCharCode(a&-33,a|32)+"]"}));return a.join("")}for(var x=0,m=!1,j=!1,k=0,c=a.length;k=5&&"lang-"===w.substring(0,5))&&!(t&&typeof t[1]==="string"))f=!1,w="src";f||(r[z]=w)}h=c;c+=z.length;if(f){f=t[1];var l=z.indexOf(f),B=l+f.length;t[2]&&(B=z.length-t[2].length,l=B-f.length);w=w.substring(5);H(j+h,z.substring(0,l),g,k);H(j+h+l,f,I(w,f),k);H(j+h+B,z.substring(B),g,k)}else k.push(j+h,w)}a.g=k}var b={},s;(function(){for(var g=a.concat(d),j=[],k={},c=0,i=g.length;c=0;)b[n.charAt(e)]=r;r=r[1];n=""+r;k.hasOwnProperty(n)||(j.push(r),k[n]=q)}j.push(/[\S\s]/);s=S(j)})();var x=d.length;return g}function v(a){var d=[],g=[];a.tripleQuotedStrings?d.push(["str",/^(?:'''(?:[^'\\]|\\[\S\s]|''?(?=[^']))*(?:'''|$)|"""(?:[^"\\]|\\[\S\s]|""?(?=[^"]))*(?:"""|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$))/,q,"'\""]):a.multiLineStrings?d.push(["str",/^(?:'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$)|`(?:[^\\`]|\\[\S\s])*(?:`|$))/,
10 | q,"'\"`"]):d.push(["str",/^(?:'(?:[^\n\r'\\]|\\.)*(?:'|$)|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,q,"\"'"]);a.verbatimStrings&&g.push(["str",/^@"(?:[^"]|"")*(?:"|$)/,q]);var b=a.hashComments;b&&(a.cStyleComments?(b>1?d.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,q,"#"]):d.push(["com",/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\n\r]*)/,q,"#"]),g.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,q])):d.push(["com",
11 | /^#[^\n\r]*/,q,"#"]));a.cStyleComments&&(g.push(["com",/^\/\/[^\n\r]*/,q]),g.push(["com",/^\/\*[\S\s]*?(?:\*\/|$)/,q]));if(b=a.regexLiterals){var s=(b=b>1?"":"\n\r")?".":"[\\S\\s]";g.push(["lang-regex",RegExp("^(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*("+("/(?=[^/*"+b+"])(?:[^/\\x5B\\x5C"+b+"]|\\x5C"+s+"|\\x5B(?:[^\\x5C\\x5D"+b+"]|\\x5C"+
12 | s+")*(?:\\x5D|$))+/")+")")])}(b=a.types)&&g.push(["typ",b]);b=(""+a.keywords).replace(/^ | $/g,"");b.length&&g.push(["kwd",RegExp("^(?:"+b.replace(/[\s,]+/g,"|")+")\\b"),q]);d.push(["pln",/^\s+/,q," \r\n\t\u00a0"]);b="^.[^\\s\\w.$@'\"`/\\\\]*";a.regexLiterals&&(b+="(?!s*/)");g.push(["lit",/^@[$_a-z][\w$@]*/i,q],["typ",/^(?:[@_]?[A-Z]+[a-z][\w$@]*|\w+_t\b)/,q],["pln",/^[$_a-z][\w$@]*/i,q],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,q,"0123456789"],["pln",/^\\[\S\s]?/,
13 | q],["pun",RegExp(b),q]);return C(d,g)}function J(a,d,g){function b(a){var c=a.nodeType;if(c==1&&!x.test(a.className))if("br"===a.nodeName)s(a),a.parentNode&&a.parentNode.removeChild(a);else for(a=a.firstChild;a;a=a.nextSibling)b(a);else if((c==3||c==4)&&g){var d=a.nodeValue,i=d.match(m);if(i)c=d.substring(0,i.index),a.nodeValue=c,(d=d.substring(i.index+i[0].length))&&a.parentNode.insertBefore(j.createTextNode(d),a.nextSibling),s(a),c||a.parentNode.removeChild(a)}}function s(a){function b(a,c){var d=
14 | c?a.cloneNode(!1):a,e=a.parentNode;if(e){var e=b(e,1),g=a.nextSibling;e.appendChild(d);for(var i=g;i;i=g)g=i.nextSibling,e.appendChild(i)}return d}for(;!a.nextSibling;)if(a=a.parentNode,!a)return;for(var a=b(a.nextSibling,0),d;(d=a.parentNode)&&d.nodeType===1;)a=d;c.push(a)}for(var x=/(?:^|\s)nocode(?:\s|$)/,m=/\r\n?|\n/,j=a.ownerDocument,k=j.createElement("li");a.firstChild;)k.appendChild(a.firstChild);for(var c=[k],i=0;i=0;){var b=d[g];F.hasOwnProperty(b)?D.console&&console.warn("cannot override language handler %s",b):F[b]=a}}function I(a,d){if(!a||!F.hasOwnProperty(a))a=/^\s*=l&&(b+=2);g>=B&&(r+=2)}}finally{if(f)f.style.display=h}}catch(u){D.console&&console.log(u&&u.stack||u)}}var D=window,y=["break,continue,do,else,for,if,return,while"],E=[[y,"auto,case,char,const,default,double,enum,extern,float,goto,inline,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],
18 | "catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],M=[E,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,delegate,dynamic_cast,explicit,export,friend,generic,late_check,mutable,namespace,nullptr,property,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],N=[E,"abstract,assert,boolean,byte,extends,final,finally,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],
19 | O=[N,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,internal,into,is,let,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var,virtual,where"],E=[E,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"],P=[y,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],
20 | Q=[y,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],W=[y,"as,assert,const,copy,drop,enum,extern,fail,false,fn,impl,let,log,loop,match,mod,move,mut,priv,pub,pure,ref,self,static,struct,true,trait,type,unsafe,use"],y=[y,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],R=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,
21 | V=/\S/,X=v({keywords:[M,O,E,"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",P,Q,y],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),F={};p(X,["default-code"]);p(C([],[["pln",/^[^]+/],["dec",/^]*(?:>|$)/],["com",/^<\!--[\S\s]*?(?:--\>|$)/],["lang-",/^<\?([\S\s]+?)(?:\?>|$)/],["lang-",/^<%([\S\s]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-",
22 | /^]*>([\S\s]+?)<\/xmp\b[^>]*>/i],["lang-js",/^
7 |
9 |
10 |