@gmod/bed 2.0.5 → 2.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/CHANGELOG.md +17 -1
  2. package/README.md +11 -6
  3. package/dist/as/autoSqlSchemas.d.ts +10 -0
  4. package/dist/as/autoSqlSchemas.js +14 -0
  5. package/dist/as/autoSqlSchemas.js.map +1 -0
  6. package/dist/autoSql.d.ts +14 -0
  7. package/dist/autoSql.js +1515 -0
  8. package/dist/autoSql.js.map +1 -0
  9. package/dist/defaultTypes.d.ts +4 -0
  10. package/dist/defaultTypes.js +32 -0
  11. package/dist/defaultTypes.js.map +1 -0
  12. package/dist/index.d.ts +2 -0
  13. package/dist/index.js +8 -0
  14. package/dist/index.js.map +1 -0
  15. package/dist/parser.d.ts +13 -0
  16. package/dist/parser.js +104 -0
  17. package/dist/parser.js.map +1 -0
  18. package/dist/util.d.ts +1 -0
  19. package/dist/util.js +42 -0
  20. package/dist/util.js.map +1 -0
  21. package/esm/as/autoSqlSchemas.d.ts +10 -0
  22. package/esm/as/autoSqlSchemas.js +170 -0
  23. package/esm/as/autoSqlSchemas.js.map +1 -0
  24. package/esm/autoSql.d.ts +14 -0
  25. package/esm/autoSql.js +1515 -0
  26. package/esm/autoSql.js.map +1 -0
  27. package/esm/defaultTypes.d.ts +4 -0
  28. package/esm/defaultTypes.js +6 -0
  29. package/esm/defaultTypes.js.map +1 -0
  30. package/esm/index.d.ts +2 -0
  31. package/esm/index.js +3 -0
  32. package/esm/index.js.map +1 -0
  33. package/esm/parser.d.ts +13 -0
  34. package/esm/parser.js +95 -0
  35. package/esm/parser.js.map +1 -0
  36. package/esm/util.d.ts +1 -0
  37. package/esm/util.js +27 -0
  38. package/esm/util.js.map +1 -0
  39. package/package.json +24 -37
  40. package/src/as/README.md +7 -0
  41. package/src/as/autoSqlSchemas.js +176 -0
  42. package/{dist/main.js → src/autoSql.js} +189 -857
  43. package/src/defaultTypes.js +8 -0
  44. package/src/index.js +3 -0
  45. package/src/parser.js +104 -0
  46. package/src/util.js +26 -0
@@ -1,117 +1,23 @@
1
- module.exports =
2
- /******/ (function(modules) { // webpackBootstrap
3
- /******/ // The module cache
4
- /******/ var installedModules = {};
5
- /******/
6
- /******/ // The require function
7
- /******/ function __webpack_require__(moduleId) {
8
- /******/
9
- /******/ // Check if module is in cache
10
- /******/ if(installedModules[moduleId]) {
11
- /******/ return installedModules[moduleId].exports;
12
- /******/ }
13
- /******/ // Create a new module (and put it into the cache)
14
- /******/ var module = installedModules[moduleId] = {
15
- /******/ i: moduleId,
16
- /******/ l: false,
17
- /******/ exports: {}
18
- /******/ };
19
- /******/
20
- /******/ // Execute the module function
21
- /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
22
- /******/
23
- /******/ // Flag the module as loaded
24
- /******/ module.l = true;
25
- /******/
26
- /******/ // Return the exports of the module
27
- /******/ return module.exports;
28
- /******/ }
29
- /******/
30
- /******/
31
- /******/ // expose the modules object (__webpack_modules__)
32
- /******/ __webpack_require__.m = modules;
33
- /******/
34
- /******/ // expose the module cache
35
- /******/ __webpack_require__.c = installedModules;
36
- /******/
37
- /******/ // define getter function for harmony exports
38
- /******/ __webpack_require__.d = function(exports, name, getter) {
39
- /******/ if(!__webpack_require__.o(exports, name)) {
40
- /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
41
- /******/ }
42
- /******/ };
43
- /******/
44
- /******/ // define __esModule on exports
45
- /******/ __webpack_require__.r = function(exports) {
46
- /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
47
- /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
48
- /******/ }
49
- /******/ Object.defineProperty(exports, '__esModule', { value: true });
50
- /******/ };
51
- /******/
52
- /******/ // create a fake namespace object
53
- /******/ // mode & 1: value is a module id, require it
54
- /******/ // mode & 2: merge all properties of value into the ns
55
- /******/ // mode & 4: return value when already ns object
56
- /******/ // mode & 8|1: behave like require
57
- /******/ __webpack_require__.t = function(value, mode) {
58
- /******/ if(mode & 1) value = __webpack_require__(value);
59
- /******/ if(mode & 8) return value;
60
- /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
61
- /******/ var ns = Object.create(null);
62
- /******/ __webpack_require__.r(ns);
63
- /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
64
- /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
65
- /******/ return ns;
66
- /******/ };
67
- /******/
68
- /******/ // getDefaultExport function for compatibility with non-harmony modules
69
- /******/ __webpack_require__.n = function(module) {
70
- /******/ var getter = module && module.__esModule ?
71
- /******/ function getDefault() { return module['default']; } :
72
- /******/ function getModuleExports() { return module; };
73
- /******/ __webpack_require__.d(getter, 'a', getter);
74
- /******/ return getter;
75
- /******/ };
76
- /******/
77
- /******/ // Object.prototype.hasOwnProperty.call
78
- /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
79
- /******/
80
- /******/ // __webpack_public_path__
81
- /******/ __webpack_require__.p = "";
82
- /******/
83
- /******/
84
- /******/ // Load entry module and return exports
85
- /******/ return __webpack_require__(__webpack_require__.s = 4);
86
- /******/ })
87
- /************************************************************************/
88
- /******/ ([
89
- /* 0 */
90
- /***/ (function(module, exports, __webpack_require__) {
91
-
92
- "use strict";
93
1
  /*
94
2
  * Generated by PEG.js 0.10.0.
95
3
  *
96
4
  * http://pegjs.org/
97
5
  */
98
6
 
7
+ "use strict";
99
8
 
100
9
  function peg$subclass(child, parent) {
101
- function ctor() {
102
- this.constructor = child;
103
- }
104
-
10
+ function ctor() { this.constructor = child; }
105
11
  ctor.prototype = parent.prototype;
106
12
  child.prototype = new ctor();
107
13
  }
108
14
 
109
15
  function peg$SyntaxError(message, expected, found, location) {
110
- this.message = message;
16
+ this.message = message;
111
17
  this.expected = expected;
112
- this.found = found;
18
+ this.found = found;
113
19
  this.location = location;
114
- this.name = "SyntaxError";
20
+ this.name = "SyntaxError";
115
21
 
116
22
  if (typeof Error.captureStackTrace === "function") {
117
23
  Error.captureStackTrace(this, peg$SyntaxError);
@@ -120,50 +26,66 @@ function peg$SyntaxError(message, expected, found, location) {
120
26
 
121
27
  peg$subclass(peg$SyntaxError, Error);
122
28
 
123
- peg$SyntaxError.buildMessage = function (expected, found) {
29
+ peg$SyntaxError.buildMessage = function(expected, found) {
124
30
  var DESCRIBE_EXPECTATION_FNS = {
125
- literal: function literal(expectation) {
126
- return "\"" + literalEscape(expectation.text) + "\"";
127
- },
128
- "class": function _class(expectation) {
129
- var escapedParts = "",
130
- i;
131
-
132
- for (i = 0; i < expectation.parts.length; i++) {
133
- escapedParts += expectation.parts[i] instanceof Array ? classEscape(expectation.parts[i][0]) + "-" + classEscape(expectation.parts[i][1]) : classEscape(expectation.parts[i]);
134
- }
31
+ literal: function(expectation) {
32
+ return "\"" + literalEscape(expectation.text) + "\"";
33
+ },
34
+
35
+ "class": function(expectation) {
36
+ var escapedParts = "",
37
+ i;
38
+
39
+ for (i = 0; i < expectation.parts.length; i++) {
40
+ escapedParts += expectation.parts[i] instanceof Array
41
+ ? classEscape(expectation.parts[i][0]) + "-" + classEscape(expectation.parts[i][1])
42
+ : classEscape(expectation.parts[i]);
43
+ }
135
44
 
136
- return "[" + (expectation.inverted ? "^" : "") + escapedParts + "]";
137
- },
138
- any: function any(expectation) {
139
- return "any character";
140
- },
141
- end: function end(expectation) {
142
- return "end of input";
143
- },
144
- other: function other(expectation) {
145
- return expectation.description;
146
- }
147
- };
45
+ return "[" + (expectation.inverted ? "^" : "") + escapedParts + "]";
46
+ },
47
+
48
+ any: function(expectation) {
49
+ return "any character";
50
+ },
51
+
52
+ end: function(expectation) {
53
+ return "end of input";
54
+ },
55
+
56
+ other: function(expectation) {
57
+ return expectation.description;
58
+ }
59
+ };
148
60
 
149
61
  function hex(ch) {
150
62
  return ch.charCodeAt(0).toString(16).toUpperCase();
151
63
  }
152
64
 
153
65
  function literalEscape(s) {
154
- return s.replace(/\\/g, '\\\\').replace(/"/g, '\\"').replace(/\0/g, '\\0').replace(/\t/g, '\\t').replace(/\n/g, '\\n').replace(/\r/g, '\\r').replace(/[\x00-\x0F]/g, function (ch) {
155
- return '\\x0' + hex(ch);
156
- }).replace(/[\x10-\x1F\x7F-\x9F]/g, function (ch) {
157
- return '\\x' + hex(ch);
158
- });
66
+ return s
67
+ .replace(/\\/g, '\\\\')
68
+ .replace(/"/g, '\\"')
69
+ .replace(/\0/g, '\\0')
70
+ .replace(/\t/g, '\\t')
71
+ .replace(/\n/g, '\\n')
72
+ .replace(/\r/g, '\\r')
73
+ .replace(/[\x00-\x0F]/g, function(ch) { return '\\x0' + hex(ch); })
74
+ .replace(/[\x10-\x1F\x7F-\x9F]/g, function(ch) { return '\\x' + hex(ch); });
159
75
  }
160
76
 
161
77
  function classEscape(s) {
162
- return s.replace(/\\/g, '\\\\').replace(/\]/g, '\\]').replace(/\^/g, '\\^').replace(/-/g, '\\-').replace(/\0/g, '\\0').replace(/\t/g, '\\t').replace(/\n/g, '\\n').replace(/\r/g, '\\r').replace(/[\x00-\x0F]/g, function (ch) {
163
- return '\\x0' + hex(ch);
164
- }).replace(/[\x10-\x1F\x7F-\x9F]/g, function (ch) {
165
- return '\\x' + hex(ch);
166
- });
78
+ return s
79
+ .replace(/\\/g, '\\\\')
80
+ .replace(/\]/g, '\\]')
81
+ .replace(/\^/g, '\\^')
82
+ .replace(/-/g, '\\-')
83
+ .replace(/\0/g, '\\0')
84
+ .replace(/\t/g, '\\t')
85
+ .replace(/\n/g, '\\n')
86
+ .replace(/\r/g, '\\r')
87
+ .replace(/[\x00-\x0F]/g, function(ch) { return '\\x0' + hex(ch); })
88
+ .replace(/[\x10-\x1F\x7F-\x9F]/g, function(ch) { return '\\x' + hex(ch); });
167
89
  }
168
90
 
169
91
  function describeExpectation(expectation) {
@@ -172,8 +94,7 @@ peg$SyntaxError.buildMessage = function (expected, found) {
172
94
 
173
95
  function describeExpected(expected) {
174
96
  var descriptions = new Array(expected.length),
175
- i,
176
- j;
97
+ i, j;
177
98
 
178
99
  for (i = 0; i < expected.length; i++) {
179
100
  descriptions[i] = describeExpectation(expected[i]);
@@ -188,7 +109,6 @@ peg$SyntaxError.buildMessage = function (expected, found) {
188
109
  j++;
189
110
  }
190
111
  }
191
-
192
112
  descriptions.length = j;
193
113
  }
194
114
 
@@ -200,7 +120,9 @@ peg$SyntaxError.buildMessage = function (expected, found) {
200
120
  return descriptions[0] + " or " + descriptions[1];
201
121
 
202
122
  default:
203
- return descriptions.slice(0, -1).join(", ") + ", or " + descriptions[descriptions.length - 1];
123
+ return descriptions.slice(0, -1).join(", ")
124
+ + ", or "
125
+ + descriptions[descriptions.length - 1];
204
126
  }
205
127
  }
206
128
 
@@ -215,22 +137,15 @@ function peg$parse(input, options) {
215
137
  options = options !== void 0 ? options : {};
216
138
 
217
139
  var peg$FAILED = {},
218
- peg$startRuleFunctions = {
219
- declaration: peg$parsedeclaration
220
- },
221
- peg$startRuleFunction = peg$parsedeclaration,
140
+
141
+ peg$startRuleFunctions = { declaration: peg$parsedeclaration },
142
+ peg$startRuleFunction = peg$parsedeclaration,
143
+
222
144
  peg$c0 = "(",
223
145
  peg$c1 = peg$literalExpectation("(", false),
224
146
  peg$c2 = ")",
225
147
  peg$c3 = peg$literalExpectation(")", false),
226
- peg$c4 = function peg$c4(type, name, comment, fields) {
227
- return {
228
- type: type,
229
- name: name,
230
- comment: comment,
231
- fields: fields
232
- };
233
- },
148
+ peg$c4 = function(type, name, comment, fields) { return { type, name, comment, fields } },
234
149
  peg$c5 = "simple",
235
150
  peg$c6 = peg$literalExpectation("simple", false),
236
151
  peg$c7 = "object",
@@ -245,53 +160,30 @@ function peg$parse(input, options) {
245
160
  peg$c16 = peg$literalExpectation("index", false),
246
161
  peg$c17 = "unique",
247
162
  peg$c18 = peg$literalExpectation("unique", false),
248
- peg$c19 = function peg$c19(f1, w) {
249
- return w;
250
- },
251
- peg$c20 = function peg$c20(f1, fds) {
252
- if (f1.name) {
253
- fds.unshift(f1);
254
- }
255
-
256
- return fds;
257
- },
163
+ peg$c19 = function(f1, w) { return w; },
164
+ peg$c20 = function(f1, fds) {
165
+ if(f1.name) {
166
+ fds.unshift(f1);
167
+ }
168
+ return fds;
169
+ },
258
170
  peg$c21 = "#",
259
171
  peg$c22 = peg$literalExpectation("#", false),
260
172
  peg$c23 = ";",
261
173
  peg$c24 = peg$literalExpectation(";", false),
262
- peg$c25 = function peg$c25(type, name, comment) {
263
- return {
264
- type: type,
265
- name: name,
266
- comment: comment
267
- };
268
- },
174
+ peg$c25 = function(type, name, comment) { return { type, name, comment } },
269
175
  peg$c26 = "[",
270
176
  peg$c27 = peg$literalExpectation("[", false),
271
177
  peg$c28 = "]",
272
178
  peg$c29 = peg$literalExpectation("]", false),
273
- peg$c30 = function peg$c30(type, size, name, comment) {
274
- return {
275
- type: type,
276
- size: size,
277
- name: name,
278
- comment: comment
279
- };
280
- },
281
- peg$c31 = function peg$c31(type, vals, name, comment) {
282
- return {
283
- type: type,
284
- vals: vals,
285
- name: name,
286
- comment: comment
287
- };
288
- },
179
+ peg$c30 = function(type, size, name, comment) { return { type, size, name, comment } },
180
+ peg$c31 = function(type, vals, name, comment) { return { type, vals, name, comment } },
289
181
  peg$c32 = ",",
290
182
  peg$c33 = peg$literalExpectation(",", false),
291
- peg$c34 = function peg$c34(f1, fds) {
292
- fds.unshift(f1);
293
- return fds;
294
- },
183
+ peg$c34 = function(f1, fds) {
184
+ fds.unshift(f1);
185
+ return fds;
186
+ },
295
187
  peg$c35 = "int",
296
188
  peg$c36 = peg$literalExpectation("int", false),
297
189
  peg$c37 = "uint",
@@ -320,46 +212,35 @@ function peg$parse(input, options) {
320
212
  peg$c60 = peg$literalExpectation("bigint", false),
321
213
  peg$c61 = "set",
322
214
  peg$c62 = peg$literalExpectation("set", false),
323
- peg$c63 = function peg$c63(t, n) {
324
- return t + ' ' + n;
325
- },
215
+ peg$c63 = function(t, n) { return t+' '+n },
326
216
  peg$c64 = /^[a-zA-Z_]/,
327
217
  peg$c65 = peg$classExpectation([["a", "z"], ["A", "Z"], "_"], false, false),
328
218
  peg$c66 = /^[a-zA-Z0-9_]/,
329
219
  peg$c67 = peg$classExpectation([["a", "z"], ["A", "Z"], ["0", "9"], "_"], false, false),
330
- peg$c68 = function peg$c68(t) {
331
- return text();
332
- },
220
+ peg$c68 = function(t) { return text() },
333
221
  peg$c69 = "\"",
334
222
  peg$c70 = peg$literalExpectation("\"", false),
335
223
  peg$c71 = /^[^"]/,
336
224
  peg$c72 = peg$classExpectation(["\""], true, false),
337
- peg$c73 = function peg$c73(t) {
338
- return t.join('');
339
- },
225
+ peg$c73 = function(t) { return t.join('') },
340
226
  peg$c74 = /^[^\n\r]/,
341
227
  peg$c75 = peg$classExpectation(["\n", "\r"], true, false),
342
- peg$c76 = function peg$c76(t) {
343
- return t.join('').replace(/^"/, '').replace(/"$/, '');
344
- },
228
+ peg$c76 = function(t) { return t.join('').replace(/^"/,'').replace(/"$/,'') },
345
229
  peg$c77 = peg$otherExpectation("integer"),
346
230
  peg$c78 = /^[0-9]/,
347
231
  peg$c79 = peg$classExpectation([["0", "9"]], false, false),
348
- peg$c80 = function peg$c80() {
349
- return parseInt(text(), 10);
350
- },
232
+ peg$c80 = function() { return parseInt(text(), 10); },
351
233
  peg$c81 = peg$otherExpectation("whitespace"),
352
234
  peg$c82 = /^[ \t\n\r]/,
353
235
  peg$c83 = peg$classExpectation([" ", "\t", "\n", "\r"], false, false),
354
- peg$currPos = 0,
355
- peg$savedPos = 0,
356
- peg$posDetailsCache = [{
357
- line: 1,
358
- column: 1
359
- }],
360
- peg$maxFailPos = 0,
361
- peg$maxFailExpected = [],
362
- peg$silentFails = 0,
236
+
237
+ peg$currPos = 0,
238
+ peg$savedPos = 0,
239
+ peg$posDetailsCache = [{ line: 1, column: 1 }],
240
+ peg$maxFailPos = 0,
241
+ peg$maxFailExpected = [],
242
+ peg$silentFails = 0,
243
+
363
244
  peg$result;
364
245
 
365
246
  if ("startRule" in options) {
@@ -379,67 +260,55 @@ function peg$parse(input, options) {
379
260
  }
380
261
 
381
262
  function expected(description, location) {
382
- location = location !== void 0 ? location : peg$computeLocation(peg$savedPos, peg$currPos);
383
- throw peg$buildStructuredError([peg$otherExpectation(description)], input.substring(peg$savedPos, peg$currPos), location);
263
+ location = location !== void 0 ? location : peg$computeLocation(peg$savedPos, peg$currPos)
264
+
265
+ throw peg$buildStructuredError(
266
+ [peg$otherExpectation(description)],
267
+ input.substring(peg$savedPos, peg$currPos),
268
+ location
269
+ );
384
270
  }
385
271
 
386
272
  function error(message, location) {
387
- location = location !== void 0 ? location : peg$computeLocation(peg$savedPos, peg$currPos);
273
+ location = location !== void 0 ? location : peg$computeLocation(peg$savedPos, peg$currPos)
274
+
388
275
  throw peg$buildSimpleError(message, location);
389
276
  }
390
277
 
391
278
  function peg$literalExpectation(text, ignoreCase) {
392
- return {
393
- type: "literal",
394
- text: text,
395
- ignoreCase: ignoreCase
396
- };
279
+ return { type: "literal", text: text, ignoreCase: ignoreCase };
397
280
  }
398
281
 
399
282
  function peg$classExpectation(parts, inverted, ignoreCase) {
400
- return {
401
- type: "class",
402
- parts: parts,
403
- inverted: inverted,
404
- ignoreCase: ignoreCase
405
- };
283
+ return { type: "class", parts: parts, inverted: inverted, ignoreCase: ignoreCase };
406
284
  }
407
285
 
408
286
  function peg$anyExpectation() {
409
- return {
410
- type: "any"
411
- };
287
+ return { type: "any" };
412
288
  }
413
289
 
414
290
  function peg$endExpectation() {
415
- return {
416
- type: "end"
417
- };
291
+ return { type: "end" };
418
292
  }
419
293
 
420
294
  function peg$otherExpectation(description) {
421
- return {
422
- type: "other",
423
- description: description
424
- };
295
+ return { type: "other", description: description };
425
296
  }
426
297
 
427
298
  function peg$computePosDetails(pos) {
428
- var details = peg$posDetailsCache[pos],
429
- p;
299
+ var details = peg$posDetailsCache[pos], p;
430
300
 
431
301
  if (details) {
432
302
  return details;
433
303
  } else {
434
304
  p = pos - 1;
435
-
436
305
  while (!peg$posDetailsCache[p]) {
437
306
  p--;
438
307
  }
439
308
 
440
309
  details = peg$posDetailsCache[p];
441
310
  details = {
442
- line: details.line,
311
+ line: details.line,
443
312
  column: details.column
444
313
  };
445
314
 
@@ -461,25 +330,24 @@ function peg$parse(input, options) {
461
330
 
462
331
  function peg$computeLocation(startPos, endPos) {
463
332
  var startPosDetails = peg$computePosDetails(startPos),
464
- endPosDetails = peg$computePosDetails(endPos);
333
+ endPosDetails = peg$computePosDetails(endPos);
334
+
465
335
  return {
466
336
  start: {
467
337
  offset: startPos,
468
- line: startPosDetails.line,
338
+ line: startPosDetails.line,
469
339
  column: startPosDetails.column
470
340
  },
471
341
  end: {
472
342
  offset: endPos,
473
- line: endPosDetails.line,
343
+ line: endPosDetails.line,
474
344
  column: endPosDetails.column
475
345
  }
476
346
  };
477
347
  }
478
348
 
479
349
  function peg$fail(expected) {
480
- if (peg$currPos < peg$maxFailPos) {
481
- return;
482
- }
350
+ if (peg$currPos < peg$maxFailPos) { return; }
483
351
 
484
352
  if (peg$currPos > peg$maxFailPos) {
485
353
  peg$maxFailPos = peg$currPos;
@@ -494,68 +362,55 @@ function peg$parse(input, options) {
494
362
  }
495
363
 
496
364
  function peg$buildStructuredError(expected, found, location) {
497
- return new peg$SyntaxError(peg$SyntaxError.buildMessage(expected, found), expected, found, location);
365
+ return new peg$SyntaxError(
366
+ peg$SyntaxError.buildMessage(expected, found),
367
+ expected,
368
+ found,
369
+ location
370
+ );
498
371
  }
499
372
 
500
373
  function peg$parsedeclaration() {
501
374
  var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13;
375
+
502
376
  s0 = peg$currPos;
503
377
  s1 = peg$parse_();
504
-
505
378
  if (s1 !== peg$FAILED) {
506
379
  s2 = peg$parsedeclareType();
507
-
508
380
  if (s2 !== peg$FAILED) {
509
381
  s3 = peg$parse_();
510
-
511
382
  if (s3 !== peg$FAILED) {
512
383
  s4 = peg$parsedeclareName();
513
-
514
384
  if (s4 !== peg$FAILED) {
515
385
  s5 = peg$parse_();
516
-
517
386
  if (s5 !== peg$FAILED) {
518
387
  s6 = peg$parsecomment();
519
-
520
388
  if (s6 !== peg$FAILED) {
521
389
  s7 = peg$parse_();
522
-
523
390
  if (s7 !== peg$FAILED) {
524
391
  if (input.charCodeAt(peg$currPos) === 40) {
525
392
  s8 = peg$c0;
526
393
  peg$currPos++;
527
394
  } else {
528
395
  s8 = peg$FAILED;
529
-
530
- if (peg$silentFails === 0) {
531
- peg$fail(peg$c1);
532
- }
396
+ if (peg$silentFails === 0) { peg$fail(peg$c1); }
533
397
  }
534
-
535
398
  if (s8 !== peg$FAILED) {
536
399
  s9 = peg$parse_();
537
-
538
400
  if (s9 !== peg$FAILED) {
539
401
  s10 = peg$parsefieldList();
540
-
541
402
  if (s10 !== peg$FAILED) {
542
403
  s11 = peg$parse_();
543
-
544
404
  if (s11 !== peg$FAILED) {
545
405
  if (input.charCodeAt(peg$currPos) === 41) {
546
406
  s12 = peg$c2;
547
407
  peg$currPos++;
548
408
  } else {
549
409
  s12 = peg$FAILED;
550
-
551
- if (peg$silentFails === 0) {
552
- peg$fail(peg$c3);
553
- }
410
+ if (peg$silentFails === 0) { peg$fail(peg$c3); }
554
411
  }
555
-
556
412
  if (s12 !== peg$FAILED) {
557
413
  s13 = peg$parse_();
558
-
559
414
  if (s13 !== peg$FAILED) {
560
415
  peg$savedPos = s0;
561
416
  s1 = peg$c4(s2, s4, s6, s10);
@@ -624,34 +479,23 @@ function peg$parse(input, options) {
624
479
  peg$currPos += 6;
625
480
  } else {
626
481
  s0 = peg$FAILED;
627
-
628
- if (peg$silentFails === 0) {
629
- peg$fail(peg$c6);
630
- }
482
+ if (peg$silentFails === 0) { peg$fail(peg$c6); }
631
483
  }
632
-
633
484
  if (s0 === peg$FAILED) {
634
485
  if (input.substr(peg$currPos, 6) === peg$c7) {
635
486
  s0 = peg$c7;
636
487
  peg$currPos += 6;
637
488
  } else {
638
489
  s0 = peg$FAILED;
639
-
640
- if (peg$silentFails === 0) {
641
- peg$fail(peg$c8);
642
- }
490
+ if (peg$silentFails === 0) { peg$fail(peg$c8); }
643
491
  }
644
-
645
492
  if (s0 === peg$FAILED) {
646
493
  if (input.substr(peg$currPos, 5) === peg$c9) {
647
494
  s0 = peg$c9;
648
495
  peg$currPos += 5;
649
496
  } else {
650
497
  s0 = peg$FAILED;
651
-
652
- if (peg$silentFails === 0) {
653
- peg$fail(peg$c10);
654
- }
498
+ if (peg$silentFails === 0) { peg$fail(peg$c10); }
655
499
  }
656
500
  }
657
501
  }
@@ -661,15 +505,13 @@ function peg$parse(input, options) {
661
505
 
662
506
  function peg$parsedeclareName() {
663
507
  var s0, s1, s2, s3;
664
- s0 = peg$parsename();
665
508
 
509
+ s0 = peg$parsename();
666
510
  if (s0 === peg$FAILED) {
667
511
  s0 = peg$currPos;
668
512
  s1 = peg$parsename();
669
-
670
513
  if (s1 !== peg$FAILED) {
671
514
  s2 = peg$parseindexType();
672
-
673
515
  if (s2 !== peg$FAILED) {
674
516
  s1 = [s1, s2];
675
517
  s0 = s1;
@@ -681,23 +523,17 @@ function peg$parse(input, options) {
681
523
  peg$currPos = s0;
682
524
  s0 = peg$FAILED;
683
525
  }
684
-
685
526
  if (s0 === peg$FAILED) {
686
527
  s0 = peg$currPos;
687
528
  s1 = peg$parsename();
688
-
689
529
  if (s1 !== peg$FAILED) {
690
530
  if (input.substr(peg$currPos, 4) === peg$c11) {
691
531
  s2 = peg$c11;
692
532
  peg$currPos += 4;
693
533
  } else {
694
534
  s2 = peg$FAILED;
695
-
696
- if (peg$silentFails === 0) {
697
- peg$fail(peg$c12);
698
- }
535
+ if (peg$silentFails === 0) { peg$fail(peg$c12); }
699
536
  }
700
-
701
537
  if (s2 !== peg$FAILED) {
702
538
  s1 = [s1, s2];
703
539
  s0 = s1;
@@ -709,26 +545,19 @@ function peg$parse(input, options) {
709
545
  peg$currPos = s0;
710
546
  s0 = peg$FAILED;
711
547
  }
712
-
713
548
  if (s0 === peg$FAILED) {
714
549
  s0 = peg$currPos;
715
550
  s1 = peg$parsename();
716
-
717
551
  if (s1 !== peg$FAILED) {
718
552
  s2 = peg$parseindexType();
719
-
720
553
  if (s2 !== peg$FAILED) {
721
554
  if (input.substr(peg$currPos, 4) === peg$c11) {
722
555
  s3 = peg$c11;
723
556
  peg$currPos += 4;
724
557
  } else {
725
558
  s3 = peg$FAILED;
726
-
727
- if (peg$silentFails === 0) {
728
- peg$fail(peg$c12);
729
- }
559
+ if (peg$silentFails === 0) { peg$fail(peg$c12); }
730
560
  }
731
-
732
561
  if (s3 !== peg$FAILED) {
733
562
  s1 = [s1, s2, s3];
734
563
  s0 = s1;
@@ -759,34 +588,23 @@ function peg$parse(input, options) {
759
588
  peg$currPos += 7;
760
589
  } else {
761
590
  s0 = peg$FAILED;
762
-
763
- if (peg$silentFails === 0) {
764
- peg$fail(peg$c14);
765
- }
591
+ if (peg$silentFails === 0) { peg$fail(peg$c14); }
766
592
  }
767
-
768
593
  if (s0 === peg$FAILED) {
769
594
  if (input.substr(peg$currPos, 5) === peg$c15) {
770
595
  s0 = peg$c15;
771
596
  peg$currPos += 5;
772
597
  } else {
773
598
  s0 = peg$FAILED;
774
-
775
- if (peg$silentFails === 0) {
776
- peg$fail(peg$c16);
777
- }
599
+ if (peg$silentFails === 0) { peg$fail(peg$c16); }
778
600
  }
779
-
780
601
  if (s0 === peg$FAILED) {
781
602
  if (input.substr(peg$currPos, 6) === peg$c17) {
782
603
  s0 = peg$c17;
783
604
  peg$currPos += 6;
784
605
  } else {
785
606
  s0 = peg$FAILED;
786
-
787
- if (peg$silentFails === 0) {
788
- peg$fail(peg$c18);
789
- }
607
+ if (peg$silentFails === 0) { peg$fail(peg$c18); }
790
608
  }
791
609
  }
792
610
  }
@@ -796,8 +614,8 @@ function peg$parse(input, options) {
796
614
 
797
615
  function peg$parsecomment() {
798
616
  var s0;
799
- s0 = peg$parsenonQuotedString();
800
617
 
618
+ s0 = peg$parsenonQuotedString();
801
619
  if (s0 === peg$FAILED) {
802
620
  s0 = peg$parse_();
803
621
  }
@@ -807,20 +625,17 @@ function peg$parse(input, options) {
807
625
 
808
626
  function peg$parsefieldList() {
809
627
  var s0, s1, s2, s3, s4, s5, s6;
628
+
810
629
  s0 = peg$currPos;
811
630
  s1 = peg$parsefield();
812
-
813
631
  if (s1 !== peg$FAILED) {
814
632
  s2 = peg$parse_();
815
-
816
633
  if (s2 !== peg$FAILED) {
817
634
  s3 = [];
818
635
  s4 = peg$currPos;
819
636
  s5 = peg$parse_();
820
-
821
637
  if (s5 !== peg$FAILED) {
822
638
  s6 = peg$parsefield();
823
-
824
639
  if (s6 !== peg$FAILED) {
825
640
  peg$savedPos = s4;
826
641
  s5 = peg$c19(s1, s6);
@@ -833,15 +648,12 @@ function peg$parse(input, options) {
833
648
  peg$currPos = s4;
834
649
  s4 = peg$FAILED;
835
650
  }
836
-
837
651
  while (s4 !== peg$FAILED) {
838
652
  s3.push(s4);
839
653
  s4 = peg$currPos;
840
654
  s5 = peg$parse_();
841
-
842
655
  if (s5 !== peg$FAILED) {
843
656
  s6 = peg$parsefield();
844
-
845
657
  if (s6 !== peg$FAILED) {
846
658
  peg$savedPos = s4;
847
659
  s5 = peg$c19(s1, s6);
@@ -855,10 +667,8 @@ function peg$parse(input, options) {
855
667
  s4 = peg$FAILED;
856
668
  }
857
669
  }
858
-
859
670
  if (s3 !== peg$FAILED) {
860
671
  s4 = peg$parse_();
861
-
862
672
  if (s4 !== peg$FAILED) {
863
673
  peg$savedPos = s0;
864
674
  s1 = peg$c20(s1, s3);
@@ -891,10 +701,7 @@ function peg$parse(input, options) {
891
701
  peg$currPos++;
892
702
  } else {
893
703
  s0 = peg$FAILED;
894
-
895
- if (peg$silentFails === 0) {
896
- peg$fail(peg$c22);
897
- }
704
+ if (peg$silentFails === 0) { peg$fail(peg$c22); }
898
705
  }
899
706
 
900
707
  return s0;
@@ -902,18 +709,15 @@ function peg$parse(input, options) {
902
709
 
903
710
  function peg$parseinternalComment() {
904
711
  var s0, s1, s2, s3, s4;
712
+
905
713
  s0 = peg$currPos;
906
714
  s1 = peg$parse_();
907
-
908
715
  if (s1 !== peg$FAILED) {
909
716
  s2 = peg$parsecommentStart();
910
-
911
717
  if (s2 !== peg$FAILED) {
912
718
  s3 = peg$parsenonQuotedString();
913
-
914
719
  if (s3 !== peg$FAILED) {
915
720
  s4 = peg$parse_();
916
-
917
721
  if (s4 !== peg$FAILED) {
918
722
  s1 = [s1, s2, s3, s4];
919
723
  s0 = s1;
@@ -939,36 +743,27 @@ function peg$parse(input, options) {
939
743
 
940
744
  function peg$parsefield() {
941
745
  var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13;
746
+
942
747
  s0 = peg$currPos;
943
748
  s1 = peg$parsefieldType();
944
-
945
749
  if (s1 !== peg$FAILED) {
946
750
  s2 = peg$parse_();
947
-
948
751
  if (s2 !== peg$FAILED) {
949
752
  s3 = peg$parsename();
950
-
951
753
  if (s3 !== peg$FAILED) {
952
754
  s4 = peg$parse_();
953
-
954
755
  if (s4 !== peg$FAILED) {
955
756
  if (input.charCodeAt(peg$currPos) === 59) {
956
757
  s5 = peg$c23;
957
758
  peg$currPos++;
958
759
  } else {
959
760
  s5 = peg$FAILED;
960
-
961
- if (peg$silentFails === 0) {
962
- peg$fail(peg$c24);
963
- }
761
+ if (peg$silentFails === 0) { peg$fail(peg$c24); }
964
762
  }
965
-
966
763
  if (s5 !== peg$FAILED) {
967
764
  s6 = peg$parse_();
968
-
969
765
  if (s6 !== peg$FAILED) {
970
766
  s7 = peg$parsecomment();
971
-
972
767
  if (s7 !== peg$FAILED) {
973
768
  peg$savedPos = s0;
974
769
  s1 = peg$c25(s1, s3, s7);
@@ -1001,74 +796,51 @@ function peg$parse(input, options) {
1001
796
  peg$currPos = s0;
1002
797
  s0 = peg$FAILED;
1003
798
  }
1004
-
1005
799
  if (s0 === peg$FAILED) {
1006
800
  s0 = peg$currPos;
1007
801
  s1 = peg$parsefieldType();
1008
-
1009
802
  if (s1 !== peg$FAILED) {
1010
803
  s2 = peg$parse_();
1011
-
1012
804
  if (s2 !== peg$FAILED) {
1013
805
  if (input.charCodeAt(peg$currPos) === 91) {
1014
806
  s3 = peg$c26;
1015
807
  peg$currPos++;
1016
808
  } else {
1017
809
  s3 = peg$FAILED;
1018
-
1019
- if (peg$silentFails === 0) {
1020
- peg$fail(peg$c27);
1021
- }
810
+ if (peg$silentFails === 0) { peg$fail(peg$c27); }
1022
811
  }
1023
-
1024
812
  if (s3 !== peg$FAILED) {
1025
813
  s4 = peg$parse_();
1026
-
1027
814
  if (s4 !== peg$FAILED) {
1028
815
  s5 = peg$parsefieldSize();
1029
-
1030
816
  if (s5 !== peg$FAILED) {
1031
817
  s6 = peg$parse_();
1032
-
1033
818
  if (s6 !== peg$FAILED) {
1034
819
  if (input.charCodeAt(peg$currPos) === 93) {
1035
820
  s7 = peg$c28;
1036
821
  peg$currPos++;
1037
822
  } else {
1038
823
  s7 = peg$FAILED;
1039
-
1040
- if (peg$silentFails === 0) {
1041
- peg$fail(peg$c29);
1042
- }
824
+ if (peg$silentFails === 0) { peg$fail(peg$c29); }
1043
825
  }
1044
-
1045
826
  if (s7 !== peg$FAILED) {
1046
827
  s8 = peg$parse_();
1047
-
1048
828
  if (s8 !== peg$FAILED) {
1049
829
  s9 = peg$parsename();
1050
-
1051
830
  if (s9 !== peg$FAILED) {
1052
831
  s10 = peg$parse_();
1053
-
1054
832
  if (s10 !== peg$FAILED) {
1055
833
  if (input.charCodeAt(peg$currPos) === 59) {
1056
834
  s11 = peg$c23;
1057
835
  peg$currPos++;
1058
836
  } else {
1059
837
  s11 = peg$FAILED;
1060
-
1061
- if (peg$silentFails === 0) {
1062
- peg$fail(peg$c24);
1063
- }
838
+ if (peg$silentFails === 0) { peg$fail(peg$c24); }
1064
839
  }
1065
-
1066
840
  if (s11 !== peg$FAILED) {
1067
841
  s12 = peg$parse_();
1068
-
1069
842
  if (s12 !== peg$FAILED) {
1070
843
  s13 = peg$parsecomment();
1071
-
1072
844
  if (s13 !== peg$FAILED) {
1073
845
  peg$savedPos = s0;
1074
846
  s1 = peg$c30(s1, s5, s9, s13);
@@ -1125,74 +897,51 @@ function peg$parse(input, options) {
1125
897
  peg$currPos = s0;
1126
898
  s0 = peg$FAILED;
1127
899
  }
1128
-
1129
900
  if (s0 === peg$FAILED) {
1130
901
  s0 = peg$currPos;
1131
902
  s1 = peg$parsefieldType();
1132
-
1133
903
  if (s1 !== peg$FAILED) {
1134
904
  s2 = peg$parse_();
1135
-
1136
905
  if (s2 !== peg$FAILED) {
1137
906
  if (input.charCodeAt(peg$currPos) === 40) {
1138
907
  s3 = peg$c0;
1139
908
  peg$currPos++;
1140
909
  } else {
1141
910
  s3 = peg$FAILED;
1142
-
1143
- if (peg$silentFails === 0) {
1144
- peg$fail(peg$c1);
1145
- }
911
+ if (peg$silentFails === 0) { peg$fail(peg$c1); }
1146
912
  }
1147
-
1148
913
  if (s3 !== peg$FAILED) {
1149
914
  s4 = peg$parse_();
1150
-
1151
915
  if (s4 !== peg$FAILED) {
1152
916
  s5 = peg$parsefieldValues();
1153
-
1154
917
  if (s5 !== peg$FAILED) {
1155
918
  s6 = peg$parse_();
1156
-
1157
919
  if (s6 !== peg$FAILED) {
1158
920
  if (input.charCodeAt(peg$currPos) === 41) {
1159
921
  s7 = peg$c2;
1160
922
  peg$currPos++;
1161
923
  } else {
1162
924
  s7 = peg$FAILED;
1163
-
1164
- if (peg$silentFails === 0) {
1165
- peg$fail(peg$c3);
1166
- }
925
+ if (peg$silentFails === 0) { peg$fail(peg$c3); }
1167
926
  }
1168
-
1169
927
  if (s7 !== peg$FAILED) {
1170
928
  s8 = peg$parse_();
1171
-
1172
929
  if (s8 !== peg$FAILED) {
1173
930
  s9 = peg$parsename();
1174
-
1175
931
  if (s9 !== peg$FAILED) {
1176
932
  s10 = peg$parse_();
1177
-
1178
933
  if (s10 !== peg$FAILED) {
1179
934
  if (input.charCodeAt(peg$currPos) === 59) {
1180
935
  s11 = peg$c23;
1181
936
  peg$currPos++;
1182
937
  } else {
1183
938
  s11 = peg$FAILED;
1184
-
1185
- if (peg$silentFails === 0) {
1186
- peg$fail(peg$c24);
1187
- }
939
+ if (peg$silentFails === 0) { peg$fail(peg$c24); }
1188
940
  }
1189
-
1190
941
  if (s11 !== peg$FAILED) {
1191
942
  s12 = peg$parse_();
1192
-
1193
943
  if (s12 !== peg$FAILED) {
1194
944
  s13 = peg$parsecomment();
1195
-
1196
945
  if (s13 !== peg$FAILED) {
1197
946
  peg$savedPos = s0;
1198
947
  s1 = peg$c31(s1, s5, s9, s13);
@@ -1249,7 +998,6 @@ function peg$parse(input, options) {
1249
998
  peg$currPos = s0;
1250
999
  s0 = peg$FAILED;
1251
1000
  }
1252
-
1253
1001
  if (s0 === peg$FAILED) {
1254
1002
  s0 = peg$parseinternalComment();
1255
1003
  }
@@ -1261,30 +1009,23 @@ function peg$parse(input, options) {
1261
1009
 
1262
1010
  function peg$parsefieldValues() {
1263
1011
  var s0, s1, s2, s3, s4, s5, s6;
1012
+
1264
1013
  s0 = peg$currPos;
1265
1014
  s1 = peg$parsename();
1266
-
1267
1015
  if (s1 !== peg$FAILED) {
1268
1016
  s2 = [];
1269
1017
  s3 = peg$currPos;
1270
-
1271
1018
  if (input.charCodeAt(peg$currPos) === 44) {
1272
1019
  s4 = peg$c32;
1273
1020
  peg$currPos++;
1274
1021
  } else {
1275
1022
  s4 = peg$FAILED;
1276
-
1277
- if (peg$silentFails === 0) {
1278
- peg$fail(peg$c33);
1279
- }
1023
+ if (peg$silentFails === 0) { peg$fail(peg$c33); }
1280
1024
  }
1281
-
1282
1025
  if (s4 !== peg$FAILED) {
1283
1026
  s5 = peg$parse_();
1284
-
1285
1027
  if (s5 !== peg$FAILED) {
1286
1028
  s6 = peg$parsename();
1287
-
1288
1029
  if (s6 !== peg$FAILED) {
1289
1030
  peg$savedPos = s3;
1290
1031
  s4 = peg$c19(s1, s6);
@@ -1301,28 +1042,20 @@ function peg$parse(input, options) {
1301
1042
  peg$currPos = s3;
1302
1043
  s3 = peg$FAILED;
1303
1044
  }
1304
-
1305
1045
  while (s3 !== peg$FAILED) {
1306
1046
  s2.push(s3);
1307
1047
  s3 = peg$currPos;
1308
-
1309
1048
  if (input.charCodeAt(peg$currPos) === 44) {
1310
1049
  s4 = peg$c32;
1311
1050
  peg$currPos++;
1312
1051
  } else {
1313
1052
  s4 = peg$FAILED;
1314
-
1315
- if (peg$silentFails === 0) {
1316
- peg$fail(peg$c33);
1317
- }
1053
+ if (peg$silentFails === 0) { peg$fail(peg$c33); }
1318
1054
  }
1319
-
1320
1055
  if (s4 !== peg$FAILED) {
1321
1056
  s5 = peg$parse_();
1322
-
1323
1057
  if (s5 !== peg$FAILED) {
1324
1058
  s6 = peg$parsename();
1325
-
1326
1059
  if (s6 !== peg$FAILED) {
1327
1060
  peg$savedPos = s3;
1328
1061
  s4 = peg$c19(s1, s6);
@@ -1340,7 +1073,6 @@ function peg$parse(input, options) {
1340
1073
  s3 = peg$FAILED;
1341
1074
  }
1342
1075
  }
1343
-
1344
1076
  if (s2 !== peg$FAILED) {
1345
1077
  peg$savedPos = s0;
1346
1078
  s1 = peg$c34(s1, s2);
@@ -1365,178 +1097,119 @@ function peg$parse(input, options) {
1365
1097
  peg$currPos += 3;
1366
1098
  } else {
1367
1099
  s0 = peg$FAILED;
1368
-
1369
- if (peg$silentFails === 0) {
1370
- peg$fail(peg$c36);
1371
- }
1100
+ if (peg$silentFails === 0) { peg$fail(peg$c36); }
1372
1101
  }
1373
-
1374
1102
  if (s0 === peg$FAILED) {
1375
1103
  if (input.substr(peg$currPos, 4) === peg$c37) {
1376
1104
  s0 = peg$c37;
1377
1105
  peg$currPos += 4;
1378
1106
  } else {
1379
1107
  s0 = peg$FAILED;
1380
-
1381
- if (peg$silentFails === 0) {
1382
- peg$fail(peg$c38);
1383
- }
1108
+ if (peg$silentFails === 0) { peg$fail(peg$c38); }
1384
1109
  }
1385
-
1386
1110
  if (s0 === peg$FAILED) {
1387
1111
  if (input.substr(peg$currPos, 5) === peg$c39) {
1388
1112
  s0 = peg$c39;
1389
1113
  peg$currPos += 5;
1390
1114
  } else {
1391
1115
  s0 = peg$FAILED;
1392
-
1393
- if (peg$silentFails === 0) {
1394
- peg$fail(peg$c40);
1395
- }
1116
+ if (peg$silentFails === 0) { peg$fail(peg$c40); }
1396
1117
  }
1397
-
1398
1118
  if (s0 === peg$FAILED) {
1399
1119
  if (input.substr(peg$currPos, 6) === peg$c41) {
1400
1120
  s0 = peg$c41;
1401
1121
  peg$currPos += 6;
1402
1122
  } else {
1403
1123
  s0 = peg$FAILED;
1404
-
1405
- if (peg$silentFails === 0) {
1406
- peg$fail(peg$c42);
1407
- }
1124
+ if (peg$silentFails === 0) { peg$fail(peg$c42); }
1408
1125
  }
1409
-
1410
1126
  if (s0 === peg$FAILED) {
1411
1127
  if (input.substr(peg$currPos, 4) === peg$c43) {
1412
1128
  s0 = peg$c43;
1413
1129
  peg$currPos += 4;
1414
1130
  } else {
1415
1131
  s0 = peg$FAILED;
1416
-
1417
- if (peg$silentFails === 0) {
1418
- peg$fail(peg$c44);
1419
- }
1132
+ if (peg$silentFails === 0) { peg$fail(peg$c44); }
1420
1133
  }
1421
-
1422
1134
  if (s0 === peg$FAILED) {
1423
1135
  if (input.substr(peg$currPos, 5) === peg$c45) {
1424
1136
  s0 = peg$c45;
1425
1137
  peg$currPos += 5;
1426
1138
  } else {
1427
1139
  s0 = peg$FAILED;
1428
-
1429
- if (peg$silentFails === 0) {
1430
- peg$fail(peg$c46);
1431
- }
1140
+ if (peg$silentFails === 0) { peg$fail(peg$c46); }
1432
1141
  }
1433
-
1434
1142
  if (s0 === peg$FAILED) {
1435
1143
  if (input.substr(peg$currPos, 5) === peg$c47) {
1436
1144
  s0 = peg$c47;
1437
1145
  peg$currPos += 5;
1438
1146
  } else {
1439
1147
  s0 = peg$FAILED;
1440
-
1441
- if (peg$silentFails === 0) {
1442
- peg$fail(peg$c48);
1443
- }
1148
+ if (peg$silentFails === 0) { peg$fail(peg$c48); }
1444
1149
  }
1445
-
1446
1150
  if (s0 === peg$FAILED) {
1447
1151
  if (input.substr(peg$currPos, 4) === peg$c49) {
1448
1152
  s0 = peg$c49;
1449
1153
  peg$currPos += 4;
1450
1154
  } else {
1451
1155
  s0 = peg$FAILED;
1452
-
1453
- if (peg$silentFails === 0) {
1454
- peg$fail(peg$c50);
1455
- }
1156
+ if (peg$silentFails === 0) { peg$fail(peg$c50); }
1456
1157
  }
1457
-
1458
1158
  if (s0 === peg$FAILED) {
1459
1159
  if (input.substr(peg$currPos, 6) === peg$c51) {
1460
1160
  s0 = peg$c51;
1461
1161
  peg$currPos += 6;
1462
1162
  } else {
1463
1163
  s0 = peg$FAILED;
1464
-
1465
- if (peg$silentFails === 0) {
1466
- peg$fail(peg$c52);
1467
- }
1164
+ if (peg$silentFails === 0) { peg$fail(peg$c52); }
1468
1165
  }
1469
-
1470
1166
  if (s0 === peg$FAILED) {
1471
1167
  if (input.substr(peg$currPos, 7) === peg$c53) {
1472
1168
  s0 = peg$c53;
1473
1169
  peg$currPos += 7;
1474
1170
  } else {
1475
1171
  s0 = peg$FAILED;
1476
-
1477
- if (peg$silentFails === 0) {
1478
- peg$fail(peg$c54);
1479
- }
1172
+ if (peg$silentFails === 0) { peg$fail(peg$c54); }
1480
1173
  }
1481
-
1482
1174
  if (s0 === peg$FAILED) {
1483
1175
  if (input.substr(peg$currPos, 4) === peg$c55) {
1484
1176
  s0 = peg$c55;
1485
1177
  peg$currPos += 4;
1486
1178
  } else {
1487
1179
  s0 = peg$FAILED;
1488
-
1489
- if (peg$silentFails === 0) {
1490
- peg$fail(peg$c56);
1491
- }
1180
+ if (peg$silentFails === 0) { peg$fail(peg$c56); }
1492
1181
  }
1493
-
1494
1182
  if (s0 === peg$FAILED) {
1495
1183
  if (input.substr(peg$currPos, 6) === peg$c57) {
1496
1184
  s0 = peg$c57;
1497
1185
  peg$currPos += 6;
1498
1186
  } else {
1499
1187
  s0 = peg$FAILED;
1500
-
1501
- if (peg$silentFails === 0) {
1502
- peg$fail(peg$c58);
1503
- }
1188
+ if (peg$silentFails === 0) { peg$fail(peg$c58); }
1504
1189
  }
1505
-
1506
1190
  if (s0 === peg$FAILED) {
1507
1191
  if (input.substr(peg$currPos, 6) === peg$c59) {
1508
1192
  s0 = peg$c59;
1509
1193
  peg$currPos += 6;
1510
1194
  } else {
1511
1195
  s0 = peg$FAILED;
1512
-
1513
- if (peg$silentFails === 0) {
1514
- peg$fail(peg$c60);
1515
- }
1196
+ if (peg$silentFails === 0) { peg$fail(peg$c60); }
1516
1197
  }
1517
-
1518
1198
  if (s0 === peg$FAILED) {
1519
1199
  if (input.substr(peg$currPos, 3) === peg$c61) {
1520
1200
  s0 = peg$c61;
1521
1201
  peg$currPos += 3;
1522
1202
  } else {
1523
1203
  s0 = peg$FAILED;
1524
-
1525
- if (peg$silentFails === 0) {
1526
- peg$fail(peg$c62);
1527
- }
1204
+ if (peg$silentFails === 0) { peg$fail(peg$c62); }
1528
1205
  }
1529
-
1530
1206
  if (s0 === peg$FAILED) {
1531
1207
  s0 = peg$currPos;
1532
1208
  s1 = peg$parsedeclareType();
1533
-
1534
1209
  if (s1 !== peg$FAILED) {
1535
1210
  s2 = peg$parse_();
1536
-
1537
1211
  if (s2 !== peg$FAILED) {
1538
1212
  s3 = peg$parsedeclareName();
1539
-
1540
1213
  if (s3 !== peg$FAILED) {
1541
1214
  peg$savedPos = s0;
1542
1215
  s1 = peg$c63(s1, s3);
@@ -1573,8 +1246,8 @@ function peg$parse(input, options) {
1573
1246
 
1574
1247
  function peg$parsefieldSize() {
1575
1248
  var s0;
1576
- s0 = peg$parsenumber();
1577
1249
 
1250
+ s0 = peg$parsenumber();
1578
1251
  if (s0 === peg$FAILED) {
1579
1252
  s0 = peg$parsename();
1580
1253
  }
@@ -1584,49 +1257,35 @@ function peg$parse(input, options) {
1584
1257
 
1585
1258
  function peg$parsename() {
1586
1259
  var s0, s1, s2, s3, s4;
1260
+
1587
1261
  s0 = peg$currPos;
1588
1262
  s1 = peg$currPos;
1589
-
1590
1263
  if (peg$c64.test(input.charAt(peg$currPos))) {
1591
1264
  s2 = input.charAt(peg$currPos);
1592
1265
  peg$currPos++;
1593
1266
  } else {
1594
1267
  s2 = peg$FAILED;
1595
-
1596
- if (peg$silentFails === 0) {
1597
- peg$fail(peg$c65);
1598
- }
1268
+ if (peg$silentFails === 0) { peg$fail(peg$c65); }
1599
1269
  }
1600
-
1601
1270
  if (s2 !== peg$FAILED) {
1602
1271
  s3 = [];
1603
-
1604
1272
  if (peg$c66.test(input.charAt(peg$currPos))) {
1605
1273
  s4 = input.charAt(peg$currPos);
1606
1274
  peg$currPos++;
1607
1275
  } else {
1608
1276
  s4 = peg$FAILED;
1609
-
1610
- if (peg$silentFails === 0) {
1611
- peg$fail(peg$c67);
1612
- }
1277
+ if (peg$silentFails === 0) { peg$fail(peg$c67); }
1613
1278
  }
1614
-
1615
1279
  while (s4 !== peg$FAILED) {
1616
1280
  s3.push(s4);
1617
-
1618
1281
  if (peg$c66.test(input.charAt(peg$currPos))) {
1619
1282
  s4 = input.charAt(peg$currPos);
1620
1283
  peg$currPos++;
1621
1284
  } else {
1622
1285
  s4 = peg$FAILED;
1623
-
1624
- if (peg$silentFails === 0) {
1625
- peg$fail(peg$c67);
1626
- }
1286
+ if (peg$silentFails === 0) { peg$fail(peg$c67); }
1627
1287
  }
1628
1288
  }
1629
-
1630
1289
  if (s3 !== peg$FAILED) {
1631
1290
  s2 = [s2, s3];
1632
1291
  s1 = s2;
@@ -1638,72 +1297,53 @@ function peg$parse(input, options) {
1638
1297
  peg$currPos = s1;
1639
1298
  s1 = peg$FAILED;
1640
1299
  }
1641
-
1642
1300
  if (s1 !== peg$FAILED) {
1643
1301
  peg$savedPos = s0;
1644
1302
  s1 = peg$c68(s1);
1645
1303
  }
1646
-
1647
1304
  s0 = s1;
1305
+
1648
1306
  return s0;
1649
1307
  }
1650
1308
 
1651
1309
  function peg$parsequotedString() {
1652
1310
  var s0, s1, s2, s3;
1653
- s0 = peg$currPos;
1654
1311
 
1312
+ s0 = peg$currPos;
1655
1313
  if (input.charCodeAt(peg$currPos) === 34) {
1656
1314
  s1 = peg$c69;
1657
1315
  peg$currPos++;
1658
1316
  } else {
1659
1317
  s1 = peg$FAILED;
1660
-
1661
- if (peg$silentFails === 0) {
1662
- peg$fail(peg$c70);
1663
- }
1318
+ if (peg$silentFails === 0) { peg$fail(peg$c70); }
1664
1319
  }
1665
-
1666
1320
  if (s1 !== peg$FAILED) {
1667
1321
  s2 = [];
1668
-
1669
1322
  if (peg$c71.test(input.charAt(peg$currPos))) {
1670
1323
  s3 = input.charAt(peg$currPos);
1671
1324
  peg$currPos++;
1672
1325
  } else {
1673
1326
  s3 = peg$FAILED;
1674
-
1675
- if (peg$silentFails === 0) {
1676
- peg$fail(peg$c72);
1677
- }
1327
+ if (peg$silentFails === 0) { peg$fail(peg$c72); }
1678
1328
  }
1679
-
1680
1329
  while (s3 !== peg$FAILED) {
1681
1330
  s2.push(s3);
1682
-
1683
1331
  if (peg$c71.test(input.charAt(peg$currPos))) {
1684
1332
  s3 = input.charAt(peg$currPos);
1685
1333
  peg$currPos++;
1686
1334
  } else {
1687
1335
  s3 = peg$FAILED;
1688
-
1689
- if (peg$silentFails === 0) {
1690
- peg$fail(peg$c72);
1691
- }
1336
+ if (peg$silentFails === 0) { peg$fail(peg$c72); }
1692
1337
  }
1693
1338
  }
1694
-
1695
1339
  if (s2 !== peg$FAILED) {
1696
1340
  if (input.charCodeAt(peg$currPos) === 34) {
1697
1341
  s3 = peg$c69;
1698
1342
  peg$currPos++;
1699
1343
  } else {
1700
1344
  s3 = peg$FAILED;
1701
-
1702
- if (peg$silentFails === 0) {
1703
- peg$fail(peg$c70);
1704
- }
1345
+ if (peg$silentFails === 0) { peg$fail(peg$c70); }
1705
1346
  }
1706
-
1707
1347
  if (s3 !== peg$FAILED) {
1708
1348
  peg$savedPos = s0;
1709
1349
  s1 = peg$c73(s2);
@@ -1726,83 +1366,64 @@ function peg$parse(input, options) {
1726
1366
 
1727
1367
  function peg$parsenonQuotedString() {
1728
1368
  var s0, s1, s2;
1369
+
1729
1370
  s0 = peg$currPos;
1730
1371
  s1 = [];
1731
-
1732
1372
  if (peg$c74.test(input.charAt(peg$currPos))) {
1733
1373
  s2 = input.charAt(peg$currPos);
1734
1374
  peg$currPos++;
1735
1375
  } else {
1736
1376
  s2 = peg$FAILED;
1737
-
1738
- if (peg$silentFails === 0) {
1739
- peg$fail(peg$c75);
1740
- }
1377
+ if (peg$silentFails === 0) { peg$fail(peg$c75); }
1741
1378
  }
1742
-
1743
1379
  while (s2 !== peg$FAILED) {
1744
1380
  s1.push(s2);
1745
-
1746
1381
  if (peg$c74.test(input.charAt(peg$currPos))) {
1747
1382
  s2 = input.charAt(peg$currPos);
1748
1383
  peg$currPos++;
1749
1384
  } else {
1750
1385
  s2 = peg$FAILED;
1751
-
1752
- if (peg$silentFails === 0) {
1753
- peg$fail(peg$c75);
1754
- }
1386
+ if (peg$silentFails === 0) { peg$fail(peg$c75); }
1755
1387
  }
1756
1388
  }
1757
-
1758
1389
  if (s1 !== peg$FAILED) {
1759
1390
  peg$savedPos = s0;
1760
1391
  s1 = peg$c76(s1);
1761
1392
  }
1762
-
1763
1393
  s0 = s1;
1394
+
1764
1395
  return s0;
1765
1396
  }
1766
1397
 
1767
1398
  function peg$parsenumber() {
1768
1399
  var s0, s1, s2, s3;
1400
+
1769
1401
  peg$silentFails++;
1770
1402
  s0 = peg$currPos;
1771
1403
  s1 = peg$parse_();
1772
-
1773
1404
  if (s1 !== peg$FAILED) {
1774
1405
  s2 = [];
1775
-
1776
1406
  if (peg$c78.test(input.charAt(peg$currPos))) {
1777
1407
  s3 = input.charAt(peg$currPos);
1778
1408
  peg$currPos++;
1779
1409
  } else {
1780
1410
  s3 = peg$FAILED;
1781
-
1782
- if (peg$silentFails === 0) {
1783
- peg$fail(peg$c79);
1784
- }
1411
+ if (peg$silentFails === 0) { peg$fail(peg$c79); }
1785
1412
  }
1786
-
1787
1413
  if (s3 !== peg$FAILED) {
1788
1414
  while (s3 !== peg$FAILED) {
1789
1415
  s2.push(s3);
1790
-
1791
1416
  if (peg$c78.test(input.charAt(peg$currPos))) {
1792
1417
  s3 = input.charAt(peg$currPos);
1793
1418
  peg$currPos++;
1794
1419
  } else {
1795
1420
  s3 = peg$FAILED;
1796
-
1797
- if (peg$silentFails === 0) {
1798
- peg$fail(peg$c79);
1799
- }
1421
+ if (peg$silentFails === 0) { peg$fail(peg$c79); }
1800
1422
  }
1801
1423
  }
1802
1424
  } else {
1803
1425
  s2 = peg$FAILED;
1804
1426
  }
1805
-
1806
1427
  if (s2 !== peg$FAILED) {
1807
1428
  peg$savedPos = s0;
1808
1429
  s1 = peg$c80();
@@ -1815,15 +1436,10 @@ function peg$parse(input, options) {
1815
1436
  peg$currPos = s0;
1816
1437
  s0 = peg$FAILED;
1817
1438
  }
1818
-
1819
1439
  peg$silentFails--;
1820
-
1821
1440
  if (s0 === peg$FAILED) {
1822
1441
  s1 = peg$FAILED;
1823
-
1824
- if (peg$silentFails === 0) {
1825
- peg$fail(peg$c77);
1826
- }
1442
+ if (peg$silentFails === 0) { peg$fail(peg$c77); }
1827
1443
  }
1828
1444
 
1829
1445
  return s0;
@@ -1831,43 +1447,30 @@ function peg$parse(input, options) {
1831
1447
 
1832
1448
  function peg$parse_() {
1833
1449
  var s0, s1;
1450
+
1834
1451
  peg$silentFails++;
1835
1452
  s0 = [];
1836
-
1837
1453
  if (peg$c82.test(input.charAt(peg$currPos))) {
1838
1454
  s1 = input.charAt(peg$currPos);
1839
1455
  peg$currPos++;
1840
1456
  } else {
1841
1457
  s1 = peg$FAILED;
1842
-
1843
- if (peg$silentFails === 0) {
1844
- peg$fail(peg$c83);
1845
- }
1458
+ if (peg$silentFails === 0) { peg$fail(peg$c83); }
1846
1459
  }
1847
-
1848
1460
  while (s1 !== peg$FAILED) {
1849
1461
  s0.push(s1);
1850
-
1851
1462
  if (peg$c82.test(input.charAt(peg$currPos))) {
1852
1463
  s1 = input.charAt(peg$currPos);
1853
1464
  peg$currPos++;
1854
1465
  } else {
1855
1466
  s1 = peg$FAILED;
1856
-
1857
- if (peg$silentFails === 0) {
1858
- peg$fail(peg$c83);
1859
- }
1467
+ if (peg$silentFails === 0) { peg$fail(peg$c83); }
1860
1468
  }
1861
1469
  }
1862
-
1863
1470
  peg$silentFails--;
1864
-
1865
1471
  if (s0 === peg$FAILED) {
1866
1472
  s1 = peg$FAILED;
1867
-
1868
- if (peg$silentFails === 0) {
1869
- peg$fail(peg$c81);
1870
- }
1473
+ if (peg$silentFails === 0) { peg$fail(peg$c81); }
1871
1474
  }
1872
1475
 
1873
1476
  return s0;
@@ -1882,288 +1485,17 @@ function peg$parse(input, options) {
1882
1485
  peg$fail(peg$endExpectation());
1883
1486
  }
1884
1487
 
1885
- throw peg$buildStructuredError(peg$maxFailExpected, peg$maxFailPos < input.length ? input.charAt(peg$maxFailPos) : null, peg$maxFailPos < input.length ? peg$computeLocation(peg$maxFailPos, peg$maxFailPos + 1) : peg$computeLocation(peg$maxFailPos, peg$maxFailPos));
1488
+ throw peg$buildStructuredError(
1489
+ peg$maxFailExpected,
1490
+ peg$maxFailPos < input.length ? input.charAt(peg$maxFailPos) : null,
1491
+ peg$maxFailPos < input.length
1492
+ ? peg$computeLocation(peg$maxFailPos, peg$maxFailPos + 1)
1493
+ : peg$computeLocation(peg$maxFailPos, peg$maxFailPos)
1494
+ );
1886
1495
  }
1887
1496
  }
1888
1497
 
1889
1498
  module.exports = {
1890
1499
  SyntaxError: peg$SyntaxError,
1891
- parse: peg$parse
1892
- };
1893
-
1894
- /***/ }),
1895
- /* 1 */
1896
- /***/ (function(module, exports) {
1897
-
1898
- function _classCallCheck(instance, Constructor) {
1899
- if (!(instance instanceof Constructor)) {
1900
- throw new TypeError("Cannot call a class as a function");
1901
- }
1902
- }
1903
-
1904
- module.exports = _classCallCheck;
1905
-
1906
- /***/ }),
1907
- /* 2 */
1908
- /***/ (function(module, exports) {
1909
-
1910
- function _defineProperties(target, props) {
1911
- for (var i = 0; i < props.length; i++) {
1912
- var descriptor = props[i];
1913
- descriptor.enumerable = descriptor.enumerable || false;
1914
- descriptor.configurable = true;
1915
- if ("value" in descriptor) descriptor.writable = true;
1916
- Object.defineProperty(target, descriptor.key, descriptor);
1917
- }
1918
- }
1919
-
1920
- function _createClass(Constructor, protoProps, staticProps) {
1921
- if (protoProps) _defineProperties(Constructor.prototype, protoProps);
1922
- if (staticProps) _defineProperties(Constructor, staticProps);
1923
- return Constructor;
1924
- }
1925
-
1926
- module.exports = _createClass;
1927
-
1928
- /***/ }),
1929
- /* 3 */
1930
- /***/ (function(module, exports) {
1931
-
1932
- function _defineProperty(obj, key, value) {
1933
- if (key in obj) {
1934
- Object.defineProperty(obj, key, {
1935
- value: value,
1936
- enumerable: true,
1937
- configurable: true,
1938
- writable: true
1939
- });
1940
- } else {
1941
- obj[key] = value;
1942
- }
1943
-
1944
- return obj;
1945
- }
1946
-
1947
- module.exports = _defineProperty;
1948
-
1949
- /***/ }),
1950
- /* 4 */
1951
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
1952
-
1953
- "use strict";
1954
- // ESM COMPAT FLAG
1955
- __webpack_require__.r(__webpack_exports__);
1956
-
1957
- // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/classCallCheck.js
1958
- var classCallCheck = __webpack_require__(1);
1959
- var classCallCheck_default = /*#__PURE__*/__webpack_require__.n(classCallCheck);
1960
-
1961
- // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/createClass.js
1962
- var createClass = __webpack_require__(2);
1963
- var createClass_default = /*#__PURE__*/__webpack_require__.n(createClass);
1964
-
1965
- // EXTERNAL MODULE: ./src/autoSql.js
1966
- var autoSql = __webpack_require__(0);
1967
- var autoSql_default = /*#__PURE__*/__webpack_require__.n(autoSql);
1968
-
1969
- // CONCATENATED MODULE: ./src/as/bigInteract.as
1970
- /* harmony default export */ var bigInteract = ("table interact\n\"interaction between two regions\"\n (\n string chrom; \"Chromosome (or contig, scaffold, etc.). For interchromosomal, use 2 records\"\n uint chromStart; \"Start position of lower region. For interchromosomal, set to chromStart of this region\"\n uint chromEnd; \"End position of upper region. For interchromosomal, set to chromEnd of this region\"\n string name; \"Name of item, for display. Usually 'sourceName/targetName/exp' or empty\"\n uint score; \"Score (0-1000)\"\n double value; \"Strength of interaction or other data value. Typically basis for score\"\n string exp; \"Experiment name (metadata for filtering). Use . if not applicable\"\n string color; \"Item color. Specified as r,g,b or hexadecimal #RRGGBB or html color name, as in //www.w3.org/TR/css3-color/#html4. Use 0 and spectrum setting to shade by score\"\n string sourceChrom; \"Chromosome of source region (directional) or lower region. For non-directional interchromosomal, chrom of this region.\"\n uint sourceStart; \"Start position in chromosome of source/lower/this region\"\n uint sourceEnd; \"End position in chromosome of source/lower/this region\"\n string sourceName; \"Identifier of source/lower/this region\"\n string sourceStrand; \"Orientation of source/lower/this region: + or -. Use . if not applicable\"\n string targetChrom; \"Chromosome of target region (directional) or upper region. For non-directional interchromosomal, chrom of other region\"\n uint targetStart; \"Start position in chromosome of target/upper/this region\"\n uint targetEnd; \"End position in chromosome of target/upper/this region\"\n string targetName; \"Identifier of target/upper/this region\"\n string targetStrand; \"Orientation of target/upper/this region: + or -. Use . if not applicable\"\n\n )\n");
1971
- // CONCATENATED MODULE: ./src/as/bigMaf.as
1972
- /* harmony default export */ var bigMaf = ("table bedMaf\n\"Bed3 with MAF block\"\n (\n string chrom; \"Reference sequence chromosome or scaffold\"\n uint chromStart; \"Start position in chromosome\"\n uint chromEnd; \"End position in chromosome\"\n lstring mafBlock; \"MAF block\"\n )\n");
1973
- // CONCATENATED MODULE: ./src/as/bigPsl.as
1974
- /* harmony default export */ var bigPsl = ("table bigPsl\n\"bigPsl pairwise alignment\"\n (\n string chrom; \"Reference sequence chromosome or scaffold\"\n uint chromStart; \"Start position in chromosome\"\n uint chromEnd; \"End position in chromosome\"\n string name; \"Name or ID of item, ideally both human readable and unique\"\n uint score; \"Score (0-1000)\"\n char[1] strand; \"+ or - indicates whether the query aligns to the + or - strand on the reference\"\n uint thickStart; \"Start of where display should be thick (start codon)\"\n uint thickEnd; \"End of where display should be thick (stop codon)\"\n uint reserved; \"RGB value (use R,G,B string in input file)\"\n int blockCount; \"Number of blocks\"\n int[blockCount] blockSizes; \"Comma separated list of block sizes\"\n int[blockCount] chromStarts; \"Start positions relative to chromStart\"\n\n uint oChromStart;\"Start position in other chromosome\"\n uint oChromEnd; \"End position in other chromosome\"\n char[1] oStrand; \"+ or -, - means that psl was reversed into BED-compatible coordinates\" \n uint oChromSize; \"Size of other chromosome.\"\n int[blockCount] oChromStarts; \"Start positions relative to oChromStart or from oChromStart+oChromSize depending on strand\"\n\n lstring oSequence; \"Sequence on other chrom (or empty)\"\n string oCDS; \"CDS in NCBI format\"\n\n uint chromSize;\"Size of target chromosome\"\n\n uint match; \"Number of bases matched.\"\n uint misMatch; \" Number of bases that don't match \"\n uint repMatch; \" Number of bases that match but are part of repeats \"\n uint nCount; \" Number of 'N' bases \"\n uint seqType; \"0=empty, 1=nucleotide, 2=amino_acid\"\n )\n\n");
1975
- // CONCATENATED MODULE: ./src/as/bigNarrowPeak.as
1976
- /* harmony default export */ var bigNarrowPeak = ("table bigNarrowPeak\n\"BED6+4 Peaks of signal enrichment based on pooled, normalized (interpreted) data.\"\n(\n string chrom; \"Reference sequence chromosome or scaffold\"\n uint chromStart; \"Start position in chromosome\"\n uint chromEnd; \"End position in chromosome\"\n string name;\t \"Name given to a region (preferably unique). Use . if no name is assigned\"\n uint score; \"Indicates how dark the peak will be displayed in the browser (0-1000) \"\n char[1] strand; \"+ or - or . for unknown\"\n float signalValue; \"Measurement of average enrichment for the region\"\n float pValue; \"Statistical significance of signal value (-log10). Set to -1 if not used.\"\n float qValue; \"Statistical significance with multiple-test correction applied (FDR -log10). Set to -1 if not used.\"\n int peak; \"Point-source called for this peak; 0-based offset from chromStart. Set to -1 if no point-source called.\"\n)\n");
1977
- // CONCATENATED MODULE: ./src/as/bigGenePred.as
1978
- /* harmony default export */ var bigGenePred = ("table bigGenePred\n\"bigGenePred gene models\"\n (\n string chrom; \"Reference sequence chromosome or scaffold\"\n uint chromStart; \"Start position in chromosome\"\n uint chromEnd; \"End position in chromosome\"\n string name; \"Name or ID of item, ideally both human readable and unique\"\n uint score; \"Score (0-1000)\"\n char[1] strand; \"+ or - for strand\"\n uint thickStart; \"Start of where display should be thick (start codon)\"\n uint thickEnd; \"End of where display should be thick (stop codon)\"\n uint reserved; \"RGB value (use R,G,B string in input file)\"\n int blockCount; \"Number of blocks\"\n int[blockCount] blockSizes; \"Comma separated list of block sizes\"\n int[blockCount] chromStarts; \"Start positions relative to chromStart\"\n string name2; \"Alternative/human readable name\"\n string cdsStartStat; \"Status of CDS start annotation (none, unknown, incomplete, or complete)\"\n string cdsEndStat; \"Status of CDS end annotation (none, unknown, incomplete, or complete)\"\n int[blockCount] exonFrames; \"Exon frame {0,1,2}, or -1 if no frame for exon\"\n string type; \"Transcript type\"\n string geneName; \"Primary identifier for gene\"\n string geneName2; \"Alternative/human readable gene name\"\n string geneType; \"Gene type\"\n )\n\n");
1979
- // CONCATENATED MODULE: ./src/as/bigLink.as
1980
- /* harmony default export */ var bigLink = ("\n\ntable bigLink\n\"bigLink pairwise alignment\"\n (\n string chrom; \"Reference sequence chromosome or scaffold\"\n uint chromStart; \"Start position in chromosome\"\n uint chromEnd; \"End position in chromosome\"\n string name; \"Name or ID of item, ideally both human readable and unique\"\n uint qStart; \"start of alignment on query sequence\"\n )\n\n");
1981
- // CONCATENATED MODULE: ./src/as/bigChain.as
1982
- /* harmony default export */ var bigChain = ("\ntable bigChain\n\"bigChain pairwise alignment\"\n (\n string chrom; \"Reference sequence chromosome or scaffold\"\n uint chromStart; \"Start position in chromosome\"\n uint chromEnd; \"End position in chromosome\"\n string name; \"Name or ID of item, ideally both human readable and unique\"\n uint score; \"Score (0-1000)\"\n char[1] strand; \"+ or - for strand\"\n uint tSize; \"size of target sequence\"\n string qName; \"name of query sequence\"\n uint qSize; \"size of query sequence\"\n uint qStart; \"start of alignment on query sequence\"\n uint qEnd; \"end of alignment on query sequence\"\n uint chainScore; \"score from chain\"\n )\n\n");
1983
- // CONCATENATED MODULE: ./src/as/mafFrames.as
1984
- /* harmony default export */ var mafFrames = ("table mafFrames\n\"codon frame assignment for MAF components\"\n (\n string chrom; \"Reference sequence chromosome or scaffold\"\n uint chromStart; \"Start range in chromosome\"\n uint chromEnd; \"End range in chromosome\"\n string src; \"Name of sequence source in MAF\"\n ubyte frame; \"frame (0,1,2) for first base(+) or last bast(-)\"\n char[1] strand; \"+ or -\"\n string name; \"Name of gene used to define frame\"\n int prevFramePos; \"target position of the previous base (in transcription direction) that continues this frame, or -1 if none, or frame not contiguous\"\n int nextFramePos; \"target position of the next base (in transcription direction) that continues this frame, or -1 if none, or frame not contiguous\"\n ubyte isExonStart; \"does this start the CDS portion of an exon?\"\n ubyte isExonEnd; \"does this end the CDS portion of an exon?\"\n )\n");
1985
- // CONCATENATED MODULE: ./src/as/mafSummary.as
1986
- /* harmony default export */ var mafSummary = ("table mafSummary\n\"Positions and scores for alignment blocks\"\n (\n string chrom; \"Reference sequence chromosome or scaffold\"\n uint chromStart; \"Start position in chromosome\"\n uint chromEnd; \"End position in chromosome\"\n string src; \"Sequence name or database of alignment\"\n float score; \"Floating point score.\"\n char[1] leftStatus; \"Gap/break annotation for preceding block\"\n char[1] rightStatus; \"Gap/break annotation for following block\"\n )\n");
1987
- // CONCATENATED MODULE: ./src/as/defaultBedSchema.as
1988
- /* harmony default export */ var defaultBedSchema = ("table defaultBedSchema\n\"BED12\"\n (\n string chrom; \"The name of the chromosome (e.g. chr3, chrY, chr2_random) or scaffold (e.g. scaffold10671).\"\n uint chromStart; \"The starting position of the feature in the chromosome or scaffold. The first base in a chromosome is numbered 0.\"\n uint chromEnd; \"The ending position of the feature in the chromosome or scaffold. The chromEnd base is not included in the display of the feature. For example, the first 100 bases of a chromosome are defined as chromStart=0, chromEnd=100, and span the bases numbered 0-99.\"\n string name; \"Defines the name of the BED line.\"\n float score; \"Feature score, doesn't care about the 0-1000 limit as in bed\"\n char strand; \"Defines the strand. Either '.' (=no strand) or '+' or '-'\"\n uint thickStart; \"The starting position at which the feature is drawn thickly (for example, the start codon in gene displays). When there is no thick part, thickStart and thickEnd are usually set to the chromStart position.\"\n uint thickEnd; \"The ending position at which the feature is drawn thickly (for example the stop codon in gene displays).\"\n string itemRgb; \"An RGB value of the form R,G,B (e.g. 255,0,0). \"\n uint blockCount; \" The number of blocks (exons) in the BED line.\"\n uint[blockCount] blockSizes; \" A comma-separated list of the block sizes. The number of items in this list should correspond to blockCount.\"\n uint[blockCount] blockStarts; \"A comma-separated list of block starts. All of the blockStart positions should be calculated relative to chromStart. The number of items in this list should correspond to blockCount.\"\n )\n");
1989
- // CONCATENATED MODULE: ./src/defaultTypes.js
1990
-
1991
-
1992
-
1993
-
1994
-
1995
-
1996
-
1997
-
1998
-
1999
-
2000
-
2001
- var types = {
2002
- bigInteract: bigInteract,
2003
- bigMaf: bigMaf,
2004
- bigPsl: bigPsl,
2005
- bigNarrowPeak: bigNarrowPeak,
2006
- bigGenePred: bigGenePred,
2007
- bigLink: bigLink,
2008
- bigChain: bigChain,
2009
- mafFrames: mafFrames,
2010
- mafSummary: mafSummary,
2011
- defaultBedSchema: defaultBedSchema
1500
+ parse: peg$parse
2012
1501
  };
2013
- Object.keys(types).forEach(function (k) {
2014
- types[k] = autoSql_default.a.parse(types[k].trim());
2015
- });
2016
- /* harmony default export */ var defaultTypes = (types);
2017
- // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/defineProperty.js
2018
- var defineProperty = __webpack_require__(3);
2019
- var defineProperty_default = /*#__PURE__*/__webpack_require__.n(defineProperty);
2020
-
2021
- // CONCATENATED MODULE: ./src/util.js
2022
-
2023
-
2024
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
2025
-
2026
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { defineProperty_default()(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
2027
-
2028
- /*
2029
- * adds some type annotations to the autoSql schema
2030
- * for numeric fields ['uint', 'int', 'float', 'long'] "isNumeric" is added
2031
- * for array types "isArray" is added
2032
- * for numeric array types "isArray" and "arrayIsNumeric" is set
2033
- *
2034
- * @param autoSql - an autoSql schema from the peg parser
2035
- * @return autoSql with type annotations added
2036
- */
2037
- function detectTypes(autoSql) {
2038
- var numericTypes = ['uint', 'int', 'float', 'long'];
2039
- var fields = autoSql.fields.map(function (autoField) {
2040
- var type = {};
2041
-
2042
- if (!autoField.size && numericTypes.includes(autoField.type)) {
2043
- type.isNumeric = true;
2044
- }
2045
-
2046
- if (autoField.size && autoField.type !== 'char') {
2047
- type.isArray = true;
2048
- }
2049
-
2050
- if (autoField.size && numericTypes.includes(autoField.type)) {
2051
- type.arrayIsNumeric = true;
2052
- }
2053
-
2054
- return _objectSpread(_objectSpread({}, autoField), type);
2055
- });
2056
- return _objectSpread(_objectSpread({}, autoSql), {}, {
2057
- fields: fields
2058
- });
2059
- }
2060
- // CONCATENATED MODULE: ./src/parse.js
2061
-
2062
-
2063
-
2064
-
2065
-
2066
-
2067
- var parse_BED = /*#__PURE__*/function () {
2068
- function BED() {
2069
- var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
2070
-
2071
- classCallCheck_default()(this, BED);
2072
-
2073
- if (args.autoSql) {
2074
- this.autoSql = detectTypes(autoSql_default.a.parse(args.autoSql));
2075
- } else if (args.type) {
2076
- this.autoSql = detectTypes(defaultTypes[args.type] || function (e) {
2077
- throw e;
2078
- }(new Error('Type not found')));
2079
- } else {
2080
- this.autoSql = detectTypes(defaultTypes.defaultBedSchema);
2081
- }
2082
- }
2083
- /*
2084
- * parses a line of text as a BED line with the loaded autoSql schema
2085
- *
2086
- * @param line - a BED line as tab delimited text or array
2087
- * @param opts - supply opts.uniqueId
2088
- * @return a object representing a feature
2089
- */
2090
-
2091
-
2092
- createClass_default()(BED, [{
2093
- key: "parseLine",
2094
- value: function parseLine(line) {
2095
- var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
2096
- var autoSql = this.autoSql;
2097
- var uniqueId = opts.uniqueId;
2098
- var fields = line;
2099
-
2100
- if (!Array.isArray(line)) {
2101
- if (line.startsWith('track') || line.startsWith('browser')) {
2102
- throw new Error("track and browser line parsing is not supported, please filter:\n".concat(line));
2103
- }
2104
-
2105
- fields = line.split('\t');
2106
- }
2107
-
2108
- var featureData = {};
2109
-
2110
- if (uniqueId) {
2111
- featureData.uniqueId = uniqueId;
2112
- }
2113
-
2114
- for (var i = 0; i < autoSql.fields.length; i += 1) {
2115
- var autoField = autoSql.fields[i];
2116
- var columnVal = fields[i];
2117
- var isNumeric = autoField.isNumeric,
2118
- isArray = autoField.isArray,
2119
- arrayIsNumeric = autoField.arrayIsNumeric,
2120
- name = autoField.name;
2121
-
2122
- if (columnVal === null || columnVal === undefined) {
2123
- break;
2124
- }
2125
-
2126
- if (columnVal !== '.') {
2127
- if (isNumeric) {
2128
- var num = Number(columnVal); // if the number parse results in NaN, somebody probably
2129
- // listed the type erroneously as numeric, so don't use
2130
- // the parsed number
2131
-
2132
- columnVal = Number.isNaN(num) ? columnVal : num;
2133
- } else if (isArray) {
2134
- // parse array values
2135
- columnVal = columnVal.split(',');
2136
- if (columnVal[columnVal.length - 1] === '') columnVal.pop();
2137
- if (arrayIsNumeric) columnVal = columnVal.map(function (str) {
2138
- return Number(str);
2139
- });
2140
- }
2141
-
2142
- featureData[name] = columnVal;
2143
- }
2144
- }
2145
-
2146
- if (featureData.chrom) {
2147
- featureData.chrom = decodeURIComponent(featureData.chrom);
2148
- }
2149
-
2150
- featureData.strand = {
2151
- '.': 0,
2152
- '-': -1,
2153
- '+': 1
2154
- }[featureData.strand] || 0;
2155
- return featureData;
2156
- }
2157
- }]);
2158
-
2159
- return BED;
2160
- }();
2161
-
2162
-
2163
- // CONCATENATED MODULE: ./src/index.js
2164
- /** @module BED */
2165
-
2166
- /* harmony default export */ var src = __webpack_exports__["default"] = (parse_BED);
2167
-
2168
- /***/ })
2169
- /******/ ]);