rack-mini-profiler 1.1.2 → 1.1.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,810 @@
1
+ if (typeof prettyPrint === "undefined") {
2
+ // prettify.js
3
+ // http://code.google.com/p/google-code-prettify/
4
+ // prettier-ignore
5
+ window.PR_SHOULD_USE_CONTINUATION = true;
6
+ window.PR_TAB_WIDTH = 8;
7
+ window.PR_normalizedHtml = window.PR = window.prettyPrintOne = window.prettyPrint = void 0;
8
+
9
+ window._pr_isIE6 = function() {
10
+ var y =
11
+ navigator &&
12
+ navigator.userAgent &&
13
+ navigator.userAgent.match(/\bMSIE ([678])\./);
14
+ y = y ? +y[1] : false;
15
+
16
+ window._pr_isIE6 = function() {
17
+ return y;
18
+ };
19
+
20
+ return y;
21
+ };
22
+
23
+ (function () {
24
+ function y(b) {
25
+ return b.replace(L, "&").replace(M, "<").replace(N, ">");
26
+ }
27
+
28
+ function H(b, f, i) {
29
+ switch (b.nodeType) {
30
+ case 1:
31
+ var o = b.tagName.toLowerCase();
32
+ f.push("<", o);
33
+ var l = b.attributes,
34
+ n = l.length;
35
+
36
+ if (n) {
37
+ if (i) {
38
+ for (var r = [], j = n; --j >= 0;) {
39
+ r[j] = l[j];
40
+ }
41
+
42
+ r.sort(function (q, m) {
43
+ return q.name < m.name ? -1 : q.name === m.name ? 0 : 1;
44
+ });
45
+ l = r;
46
+ }
47
+
48
+ for (j = 0; j < n; ++j) {
49
+ r = l[j];
50
+ r.specified && f.push(" ", r.name.toLowerCase(), '="', r.value.replace(L, "&amp;").replace(M, "&lt;").replace(N, "&gt;").replace(X, "&quot;"), '"');
51
+ }
52
+ }
53
+
54
+ f.push(">");
55
+
56
+ for (l = b.firstChild; l; l = l.nextSibling) {
57
+ H(l, f, i);
58
+ }
59
+
60
+ if (b.firstChild || !/^(?:br|link|img)$/.test(o)) f.push("</", o, ">");
61
+ break;
62
+
63
+ case 3:
64
+ case 4:
65
+ f.push(y(b.nodeValue));
66
+ break;
67
+ }
68
+ }
69
+
70
+ function O(b) {
71
+ function f(c) {
72
+ if (c.charAt(0) !== "\\") return c.charCodeAt(0);
73
+
74
+ switch (c.charAt(1)) {
75
+ case "b":
76
+ return 8;
77
+
78
+ case "t":
79
+ return 9;
80
+
81
+ case "n":
82
+ return 10;
83
+
84
+ case "v":
85
+ return 11;
86
+
87
+ case "f":
88
+ return 12;
89
+
90
+ case "r":
91
+ return 13;
92
+
93
+ case "u":
94
+ case "x":
95
+ return parseInt(c.substring(2), 16) || c.charCodeAt(1);
96
+
97
+ case "0":
98
+ case "1":
99
+ case "2":
100
+ case "3":
101
+ case "4":
102
+ case "5":
103
+ case "6":
104
+ case "7":
105
+ return parseInt(c.substring(1), 8);
106
+
107
+ default:
108
+ return c.charCodeAt(1);
109
+ }
110
+ }
111
+
112
+ function i(c) {
113
+ if (c < 32) return (c < 16 ? "\\x0" : "\\x") + c.toString(16);
114
+ c = String.fromCharCode(c);
115
+ if (c === "\\" || c === "-" || c === "[" || c === "]") c = "\\" + c;
116
+ return c;
117
+ }
118
+
119
+ function o(c) {
120
+ var d = c.substring(1, c.length - 1).match(RegExp("\\\\u[0-9A-Fa-f]{4}|\\\\x[0-9A-Fa-f]{2}|\\\\[0-3][0-7]{0,2}|\\\\[0-7]{1,2}|\\\\[\\s\\S]|-|[^-\\\\]", "g"));
121
+ c = [];
122
+
123
+ for (var a = [], k = d[0] === "^", e = k ? 1 : 0, h = d.length; e < h; ++e) {
124
+ var g = d[e];
125
+
126
+ switch (g) {
127
+ case "\\B":
128
+ case "\\b":
129
+ case "\\D":
130
+ case "\\d":
131
+ case "\\S":
132
+ case "\\s":
133
+ case "\\W":
134
+ case "\\w":
135
+ c.push(g);
136
+ continue;
137
+ }
138
+
139
+ g = f(g);
140
+ var s;
141
+
142
+ if (e + 2 < h && "-" === d[e + 1]) {
143
+ s = f(d[e + 2]);
144
+ e += 2;
145
+ } else s = g;
146
+
147
+ a.push([g, s]);
148
+
149
+ if (!(s < 65 || g > 122)) {
150
+ s < 65 || g > 90 || a.push([Math.max(65, g) | 32, Math.min(s, 90) | 32]);
151
+ s < 97 || g > 122 || a.push([Math.max(97, g) & -33, Math.min(s, 122) & -33]);
152
+ }
153
+ }
154
+
155
+ a.sort(function (v, w) {
156
+ return v[0] - w[0] || w[1] - v[1];
157
+ });
158
+ d = [];
159
+ g = [NaN, NaN];
160
+
161
+ for (e = 0; e < a.length; ++e) {
162
+ h = a[e];
163
+ if (h[0] <= g[1] + 1) g[1] = Math.max(g[1], h[1]);else d.push(g = h);
164
+ }
165
+
166
+ a = ["["];
167
+ k && a.push("^");
168
+ a.push.apply(a, c);
169
+
170
+ for (e = 0; e < d.length; ++e) {
171
+ h = d[e];
172
+ a.push(i(h[0]));
173
+
174
+ if (h[1] > h[0]) {
175
+ h[1] + 1 > h[0] && a.push("-");
176
+ a.push(i(h[1]));
177
+ }
178
+ }
179
+
180
+ a.push("]");
181
+ return a.join("");
182
+ }
183
+
184
+ function l(c) {
185
+ for (var d = c.source.match(RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)", "g")), a = d.length, k = [], e = 0, h = 0; e < a; ++e) {
186
+ var g = d[e];
187
+ if (g === "(") ++h;else if ("\\" === g.charAt(0)) if ((g = +g.substring(1)) && g <= h) k[g] = -1;
188
+ }
189
+
190
+ for (e = 1; e < k.length; ++e) {
191
+ if (-1 === k[e]) k[e] = ++n;
192
+ }
193
+
194
+ for (h = e = 0; e < a; ++e) {
195
+ g = d[e];
196
+
197
+ if (g === "(") {
198
+ ++h;
199
+ if (k[h] === undefined) d[e] = "(?:";
200
+ } else if ("\\" === g.charAt(0)) if ((g = +g.substring(1)) && g <= h) d[e] = "\\" + k[h];
201
+ }
202
+
203
+ for (h = e = 0; e < a; ++e) {
204
+ if ("^" === d[e] && "^" !== d[e + 1]) d[e] = "";
205
+ }
206
+
207
+ if (c.ignoreCase && r) for (e = 0; e < a; ++e) {
208
+ g = d[e];
209
+ c = g.charAt(0);
210
+ if (g.length >= 2 && c === "[") d[e] = o(g);else if (c !== "\\") d[e] = g.replace(/[a-zA-Z]/g, function (s) {
211
+ s = s.charCodeAt(0);
212
+ return "[" + String.fromCharCode(s & -33, s | 32) + "]";
213
+ });
214
+ }
215
+ return d.join("");
216
+ }
217
+
218
+ for (var n = 0, r = false, j = false, q = 0, m = b.length; q < m; ++q) {
219
+ var t = b[q];
220
+ if (t.ignoreCase) j = true;else if (/[a-z]/i.test(t.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi, ""))) {
221
+ r = true;
222
+ j = false;
223
+ break;
224
+ }
225
+ }
226
+
227
+ var p = [];
228
+ q = 0;
229
+
230
+ for (m = b.length; q < m; ++q) {
231
+ t = b[q];
232
+ if (t.global || t.multiline) throw Error("" + t);
233
+ p.push("(?:" + l(t) + ")");
234
+ }
235
+
236
+ return RegExp(p.join("|"), j ? "gi" : "g");
237
+ }
238
+
239
+ function Y(b) {
240
+ var f = 0;
241
+ return function (i) {
242
+ for (var o = null, l = 0, n = 0, r = i.length; n < r; ++n) {
243
+ switch (i.charAt(n)) {
244
+ case "\t":
245
+ o || (o = []);
246
+ o.push(i.substring(l, n));
247
+ l = b - f % b;
248
+
249
+ for (f += l; l >= 0; l -= 16) {
250
+ o.push(" ".substring(0, l));
251
+ }
252
+
253
+ l = n + 1;
254
+ break;
255
+
256
+ case "\n":
257
+ f = 0;
258
+ break;
259
+
260
+ default:
261
+ ++f;
262
+ }
263
+ }
264
+
265
+ if (!o) return i;
266
+ o.push(i.substring(l));
267
+ return o.join("");
268
+ };
269
+ }
270
+
271
+ function I(b, f, i, o) {
272
+ if (f) {
273
+ b = {
274
+ source: f,
275
+ c: b
276
+ };
277
+ i(b);
278
+ o.push.apply(o, b.d);
279
+ }
280
+ }
281
+
282
+ function B(b, f) {
283
+ var i = {},
284
+ o;
285
+
286
+ (function () {
287
+ for (var r = b.concat(f), j = [], q = {}, m = 0, t = r.length; m < t; ++m) {
288
+ var p = r[m],
289
+ c = p[3];
290
+ if (c) for (var d = c.length; --d >= 0;) {
291
+ i[c.charAt(d)] = p;
292
+ }
293
+ p = p[1];
294
+ c = "" + p;
295
+
296
+ if (!q.hasOwnProperty(c)) {
297
+ j.push(p);
298
+ q[c] = null;
299
+ }
300
+ }
301
+
302
+ j.push(/[\0-\uffff]/);
303
+ o = O(j);
304
+ })();
305
+
306
+ var l = f.length;
307
+
308
+ function n(r) {
309
+ for (var j = r.c, q = [j, z], m = 0, t = r.source.match(o) || [], p = {}, c = 0, d = t.length; c < d; ++c) {
310
+ var a = t[c],
311
+ k = p[a],
312
+ e = void 0,
313
+ h;
314
+ if (typeof k === "string") h = false;else {
315
+ var g = i[a.charAt(0)];
316
+
317
+ if (g) {
318
+ e = a.match(g[1]);
319
+ k = g[0];
320
+ } else {
321
+ for (h = 0; h < l; ++h) {
322
+ g = f[h];
323
+
324
+ if (e = a.match(g[1])) {
325
+ k = g[0];
326
+ break;
327
+ }
328
+ }
329
+
330
+ e || (k = z);
331
+ }
332
+
333
+ if ((h = k.length >= 5 && "lang-" === k.substring(0, 5)) && !(e && typeof e[1] === "string")) {
334
+ h = false;
335
+ k = P;
336
+ }
337
+
338
+ h || (p[a] = k);
339
+ }
340
+ g = m;
341
+ m += a.length;
342
+
343
+ if (h) {
344
+ h = e[1];
345
+ var s = a.indexOf(h),
346
+ v = s + h.length;
347
+
348
+ if (e[2]) {
349
+ v = a.length - e[2].length;
350
+ s = v - h.length;
351
+ }
352
+
353
+ k = k.substring(5);
354
+ I(j + g, a.substring(0, s), n, q);
355
+ I(j + g + s, h, Q(k, h), q);
356
+ I(j + g + v, a.substring(v), n, q);
357
+ } else q.push(j + g, k);
358
+ }
359
+
360
+ r.d = q;
361
+ }
362
+
363
+ return n;
364
+ }
365
+
366
+ function x(b) {
367
+ var f = [],
368
+ i = [];
369
+ if (b.tripleQuotedStrings) f.push([A, /^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/, null, "'\""]);else b.multiLineStrings ? f.push([A, /^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/, null, "'\"`"]) : f.push([A, /^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/, null, "\"'"]);
370
+ b.verbatimStrings && i.push([A, /^@\"(?:[^\"]|\"\")*(?:\"|$)/, null]);
371
+ if (b.hashComments) if (b.cStyleComments) {
372
+ f.push([C, /^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\r\n]*)/, null, "#"]);
373
+ i.push([A, /^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/, null]);
374
+ } else f.push([C, /^#[^\r\n]*/, null, "#"]);
375
+
376
+ if (b.cStyleComments) {
377
+ i.push([C, /^\/\/[^\r\n]*/, null]);
378
+ i.push([C, /^\/\*[\s\S]*?(?:\*\/|$)/, null]);
379
+ }
380
+
381
+ b.regexLiterals && i.push(["lang-regex", RegExp("^" + Z + "(/(?=[^/*])(?:[^/\\x5B\\x5C]|\\x5C[\\s\\S]|\\x5B(?:[^\\x5C\\x5D]|\\x5C[\\s\\S])*(?:\\x5D|$))+/)")]);
382
+ b = b.keywords.replace(/^\s+|\s+$/g, "");
383
+ b.length && i.push([R, RegExp("^(?:" + b.replace(/\s+/g, "|") + ")\\b"), null]);
384
+ f.push([z, /^\s+/, null, " \r\n\t\xA0"]);
385
+ i.push([J, /^@[a-z_$][a-z_$@0-9]*/i, null], [S, /^@?[A-Z]+[a-z][A-Za-z_$@0-9]*/, null], [z, /^[a-z_$][a-z_$@0-9]*/i, null], [J, /^(?:0x[a-f0-9]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+\-]?\d+)?)[a-z]*/i, null, "0123456789"], [E, /^.[^\s\w\.$@\'\"\`\/\#]*/, null]);
386
+ return B(f, i);
387
+ }
388
+
389
+ function $(b) {
390
+ function f(D) {
391
+ if (D > r) {
392
+ if (j && j !== q) {
393
+ n.push("</span>");
394
+ j = null;
395
+ }
396
+
397
+ if (!j && q) {
398
+ j = q;
399
+ n.push('<span class="', j, '">');
400
+ }
401
+
402
+ var T = y(p(i.substring(r, D))).replace(e ? d : c, "$1&#160;");
403
+ e = k.test(T);
404
+ n.push(T.replace(a, s));
405
+ r = D;
406
+ }
407
+ }
408
+
409
+ var i = b.source,
410
+ o = b.g,
411
+ l = b.d,
412
+ n = [],
413
+ r = 0,
414
+ j = null,
415
+ q = null,
416
+ m = 0,
417
+ t = 0,
418
+ p = Y(window.PR_TAB_WIDTH),
419
+ c = /([\r\n ]) /g,
420
+ d = /(^| ) /gm,
421
+ a = /\r\n?|\n/g,
422
+ k = /[ \r\n]$/,
423
+ e = true,
424
+ h = window._pr_isIE6();
425
+
426
+ h = h ? b.b.tagName === "PRE" ? h === 6 ? "&#160;\r\n" : h === 7 ? "&#160;<br>\r" : "&#160;\r" : "&#160;<br />" : "<br />";
427
+ var g = b.b.className.match(/\blinenums\b(?::(\d+))?/),
428
+ s;
429
+
430
+ if (g) {
431
+ for (var v = [], w = 0; w < 10; ++w) {
432
+ v[w] = h + '</li><li class="L' + w + '">';
433
+ }
434
+
435
+ var F = g[1] && g[1].length ? g[1] - 1 : 0;
436
+ n.push('<ol class="linenums"><li class="L', F % 10, '"');
437
+ F && n.push(' value="', F + 1, '"');
438
+ n.push(">");
439
+
440
+ s = function s() {
441
+ var D = v[++F % 10];
442
+ return j ? "</span>" + D + '<span class="' + j + '">' : D;
443
+ };
444
+ } else s = h;
445
+
446
+ for (;;) {
447
+ if (m < o.length ? t < l.length ? o[m] <= l[t] : true : false) {
448
+ f(o[m]);
449
+
450
+ if (j) {
451
+ n.push("</span>");
452
+ j = null;
453
+ }
454
+
455
+ n.push(o[m + 1]);
456
+ m += 2;
457
+ } else if (t < l.length) {
458
+ f(l[t]);
459
+ q = l[t + 1];
460
+ t += 2;
461
+ } else break;
462
+ }
463
+
464
+ f(i.length);
465
+ j && n.push("</span>");
466
+ g && n.push("</li></ol>");
467
+ b.a = n.join("");
468
+ }
469
+
470
+ function u(b, f) {
471
+ for (var i = f.length; --i >= 0;) {
472
+ var o = f[i];
473
+ if (G.hasOwnProperty(o)) "console" in window && console.warn("cannot override language handler %s", o);else G[o] = b;
474
+ }
475
+ }
476
+
477
+ function Q(b, f) {
478
+ b && G.hasOwnProperty(b) || (b = /^\s*</.test(f) ? "default-markup" : "default-code");
479
+ return G[b];
480
+ }
481
+
482
+ function U(b) {
483
+ var f = b.f,
484
+ i = b.e;
485
+ b.a = f;
486
+
487
+ try {
488
+ var o,
489
+ l = f.match(aa);
490
+ f = [];
491
+ var n = 0,
492
+ r = [];
493
+ if (l) for (var j = 0, q = l.length; j < q; ++j) {
494
+ var m = l[j];
495
+
496
+ if (m.length > 1 && m.charAt(0) === "<") {
497
+ if (!ba.test(m)) if (ca.test(m)) {
498
+ f.push(m.substring(9, m.length - 3));
499
+ n += m.length - 12;
500
+ } else if (da.test(m)) {
501
+ f.push("\n");
502
+ ++n;
503
+ } else if (m.indexOf(V) >= 0 && m.replace(/\s(\w+)\s*=\s*(?:\"([^\"]*)\"|'([^\']*)'|(\S+))/g, ' $1="$2$3$4"').match(/[cC][lL][aA][sS][sS]=\"[^\"]*\bnocode\b/)) {
504
+ var t = m.match(W)[2],
505
+ p = 1,
506
+ c;
507
+ c = j + 1;
508
+
509
+ a: for (; c < q; ++c) {
510
+ var d = l[c].match(W);
511
+ if (d && d[2] === t) if (d[1] === "/") {
512
+ if (--p === 0) break a;
513
+ } else ++p;
514
+ }
515
+
516
+ if (c < q) {
517
+ r.push(n, l.slice(j, c + 1).join(""));
518
+ j = c;
519
+ } else r.push(n, m);
520
+ } else r.push(n, m);
521
+ } else {
522
+ var a;
523
+ p = m;
524
+ var k = p.indexOf("&");
525
+ if (k < 0) a = p;else {
526
+ for (--k; (k = p.indexOf("&#", k + 1)) >= 0;) {
527
+ var e = p.indexOf(";", k);
528
+
529
+ if (e >= 0) {
530
+ var h = p.substring(k + 3, e),
531
+ g = 10;
532
+
533
+ if (h && h.charAt(0) === "x") {
534
+ h = h.substring(1);
535
+ g = 16;
536
+ }
537
+
538
+ var s = parseInt(h, g);
539
+ isNaN(s) || (p = p.substring(0, k) + String.fromCharCode(s) + p.substring(e + 1));
540
+ }
541
+ }
542
+
543
+ a = p.replace(ea, "<").replace(fa, ">").replace(ga, "'").replace(ha, '"').replace(ia, " ").replace(ja, "&");
544
+ }
545
+ f.push(a);
546
+ n += a.length;
547
+ }
548
+ }
549
+ o = {
550
+ source: f.join(""),
551
+ h: r
552
+ };
553
+ var v = o.source;
554
+ b.source = v;
555
+ b.c = 0;
556
+ b.g = o.h;
557
+ Q(i, v)(b);
558
+ $(b);
559
+ } catch (w) {
560
+ if ("console" in window) console.log(w && w.stack ? w.stack : w);
561
+ }
562
+ }
563
+
564
+ var A = "str",
565
+ R = "kwd",
566
+ C = "com",
567
+ S = "typ",
568
+ J = "lit",
569
+ E = "pun",
570
+ z = "pln",
571
+ P = "src",
572
+ V = "nocode",
573
+ Z = function () {
574
+ for (var b = ["!", "!=", "!==", "#", "%", "%=", "&", "&&", "&&=", "&=", "(", "*", "*=", "+=", ",", "-=", "->", "/", "/=", ":", "::", ";", "<", "<<", "<<=", "<=", "=", "==", "===", ">", ">=", ">>", ">>=", ">>>", ">>>=", "?", "@", "[", "^", "^=", "^^", "^^=", "{", "|", "|=", "||", "||=", "~", "break", "case", "continue", "delete", "do", "else", "finally", "instanceof", "return", "throw", "try", "typeof"], f = "(?:^^|[+-]", i = 0; i < b.length; ++i) {
575
+ f += "|" + b[i].replace(/([^=<>:&a-z])/g, "\\$1");
576
+ }
577
+
578
+ f += ")\\s*";
579
+ return f;
580
+ }(),
581
+ L = /&/g,
582
+ M = /</g,
583
+ N = />/g,
584
+ X = /\"/g,
585
+ ea = /&lt;/g,
586
+ fa = /&gt;/g,
587
+ ga = /&apos;/g,
588
+ ha = /&quot;/g,
589
+ ja = /&amp;/g,
590
+ ia = /&nbsp;/g,
591
+ ka = /[\r\n]/g,
592
+ K = null,
593
+ aa = RegExp("[^<]+|<!--[\\s\\S]*?-->|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>|</?[a-zA-Z](?:[^>\"']|'[^']*'|\"[^\"]*\")*>|<", "g"),
594
+ ba = /^<\!--/,
595
+ ca = /^<!\[CDATA\[/,
596
+ da = /^<br\b/i,
597
+ W = /^<(\/?)([a-zA-Z][a-zA-Z0-9]*)/,
598
+ la = x({
599
+ keywords: "break continue do else for if return while auto case char const default double enum extern float goto int long register short signed sizeof static struct switch typedef union unsigned void volatile catch class delete false import new operator private protected public this throw true try typeof alignof align_union asm axiom bool concept concept_map const_cast constexpr decltype dynamic_cast explicit export friend inline late_check mutable namespace nullptr reinterpret_cast static_assert static_cast template typeid typename using virtual wchar_t where break continue do else for if return while auto case char const default double enum extern float goto int long register short signed sizeof static struct switch typedef union unsigned void volatile catch class delete false import new operator private protected public this throw true try typeof abstract boolean byte extends final finally implements import instanceof null native package strictfp super synchronized throws transient as base by checked decimal delegate descending event fixed foreach from group implicit in interface internal into is lock object out override orderby params partial readonly ref sbyte sealed stackalloc string select uint ulong unchecked unsafe ushort var break continue do else for if return while auto case char const default double enum extern float goto int long register short signed sizeof static struct switch typedef union unsigned void volatile catch class delete false import new operator private protected public this throw true try typeof debugger eval export function get null set undefined var with Infinity NaN 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 break continue do else for if return while 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 break continue do else for if return while 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 break continue do else for if return while case done elif esac eval fi function in local set then until ",
600
+ hashComments: true,
601
+ cStyleComments: true,
602
+ multiLineStrings: true,
603
+ regexLiterals: true
604
+ }),
605
+ G = {};
606
+
607
+ u(la, ["default-code"]);
608
+ u(B([], [[z, /^[^<?]+/], ["dec", /^<!\w[^>]*(?:>|$)/], [C, /^<\!--[\s\S]*?(?:-\->|$)/], ["lang-", /^<\?([\s\S]+?)(?:\?>|$)/], ["lang-", /^<%([\s\S]+?)(?:%>|$)/], [E, /^(?:<[%?]|[%?]>)/], ["lang-", /^<xmp\b[^>]*>([\s\S]+?)<\/xmp\b[^>]*>/i], ["lang-js", /^<script\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i], ["lang-css", /^<style\b[^>]*>([\s\S]*?)(<\/style\b[^>]*>)/i], ["lang-in.tag", /^(<\/?[a-z][^<>]*>)/i]]), ["default-markup", "htm", "html", "mxml", "xhtml", "xml", "xsl"]);
609
+ u(B([[z, /^[\s]+/, null, " \t\r\n"], ["atv", /^(?:\"[^\"]*\"?|\'[^\']*\'?)/, null, "\"'"]], [["tag", /^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i], ["atn", /^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i], ["lang-uq.val", /^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/], [E, /^[=<>\/]+/], ["lang-js", /^on\w+\s*=\s*\"([^\"]+)\"/i], ["lang-js", /^on\w+\s*=\s*\'([^\']+)\'/i], ["lang-js", /^on\w+\s*=\s*([^\"\'>\s]+)/i], ["lang-css", /^style\s*=\s*\"([^\"]+)\"/i], ["lang-css", /^style\s*=\s*\'([^\']+)\'/i], ["lang-css", /^style\s*=\s*([^\"\'>\s]+)/i]]), ["in.tag"]);
610
+ u(B([], [["atv", /^[\s\S]+/]]), ["uq.val"]);
611
+ u(x({
612
+ keywords: "break continue do else for if return while auto case char const default double enum extern float goto int long register short signed sizeof static struct switch typedef union unsigned void volatile catch class delete false import new operator private protected public this throw true try typeof alignof align_union asm axiom bool concept concept_map const_cast constexpr decltype dynamic_cast explicit export friend inline late_check mutable namespace nullptr reinterpret_cast static_assert static_cast template typeid typename using virtual wchar_t where ",
613
+ hashComments: true,
614
+ cStyleComments: true
615
+ }), ["c", "cc", "cpp", "cxx", "cyc", "m"]);
616
+ u(x({
617
+ keywords: "null true false"
618
+ }), ["json"]);
619
+ u(x({
620
+ keywords: "break continue do else for if return while auto case char const default double enum extern float goto int long register short signed sizeof static struct switch typedef union unsigned void volatile catch class delete false import new operator private protected public this throw true try typeof abstract boolean byte extends final finally implements import instanceof null native package strictfp super synchronized throws transient as base by checked decimal delegate descending event fixed foreach from group implicit in interface internal into is lock object out override orderby params partial readonly ref sbyte sealed stackalloc string select uint ulong unchecked unsafe ushort var ",
621
+ hashComments: true,
622
+ cStyleComments: true,
623
+ verbatimStrings: true
624
+ }), ["cs"]);
625
+ u(x({
626
+ keywords: "break continue do else for if return while auto case char const default double enum extern float goto int long register short signed sizeof static struct switch typedef union unsigned void volatile catch class delete false import new operator private protected public this throw true try typeof abstract boolean byte extends final finally implements import instanceof null native package strictfp super synchronized throws transient ",
627
+ cStyleComments: true
628
+ }), ["java"]);
629
+ u(x({
630
+ keywords: "break continue do else for if return while case done elif esac eval fi function in local set then until ",
631
+ hashComments: true,
632
+ multiLineStrings: true
633
+ }), ["bsh", "csh", "sh"]);
634
+ u(x({
635
+ keywords: "break continue do else for if return while 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 ",
636
+ hashComments: true,
637
+ multiLineStrings: true,
638
+ tripleQuotedStrings: true
639
+ }), ["cv", "py"]);
640
+ u(x({
641
+ keywords: "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 ",
642
+ hashComments: true,
643
+ multiLineStrings: true,
644
+ regexLiterals: true
645
+ }), ["perl", "pl", "pm"]);
646
+ u(x({
647
+ keywords: "break continue do else for if return while 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 ",
648
+ hashComments: true,
649
+ multiLineStrings: true,
650
+ regexLiterals: true
651
+ }), ["rb"]);
652
+ u(x({
653
+ keywords: "break continue do else for if return while auto case char const default double enum extern float goto int long register short signed sizeof static struct switch typedef union unsigned void volatile catch class delete false import new operator private protected public this throw true try typeof debugger eval export function get null set undefined var with Infinity NaN ",
654
+ cStyleComments: true,
655
+ regexLiterals: true
656
+ }), ["js"]);
657
+ u(B([], [[A, /^[\s\S]+/]]), ["regex"]);
658
+ window.PR_normalizedHtml = H;
659
+
660
+ window.prettyPrintOne = function (b, f) {
661
+ var i = {
662
+ f: b,
663
+ e: f
664
+ };
665
+ U(i);
666
+ return i.a;
667
+ };
668
+
669
+ window.prettyPrint = function (b) {
670
+ function f() {
671
+ for (var t = window.PR_SHOULD_USE_CONTINUATION ? j.now() + 250 : Infinity; q < o.length && j.now() < t; q++) {
672
+ var p = o[q];
673
+
674
+ if (p.className && p.className.indexOf("prettyprint") >= 0) {
675
+ var c = p.className.match(/\blang-(\w+)\b/);
676
+ if (c) c = c[1];
677
+
678
+ for (var d = false, a = p.parentNode; a; a = a.parentNode) {
679
+ if ((a.tagName === "pre" || a.tagName === "code" || a.tagName === "xmp") && a.className && a.className.indexOf("prettyprint") >= 0) {
680
+ d = true;
681
+ break;
682
+ }
683
+ }
684
+
685
+ if (!d) {
686
+ a = p;
687
+
688
+ if (null === K) {
689
+ d = document.createElement("PRE");
690
+ d.appendChild(document.createTextNode('<!DOCTYPE foo PUBLIC "foo bar">\n<foo />'));
691
+ K = !/</.test(d.innerHTML);
692
+ }
693
+
694
+ if (K) {
695
+ d = a.innerHTML;
696
+ if ("XMP" === a.tagName) d = y(d);else {
697
+ a = a;
698
+ if ("PRE" === a.tagName) a = true;else if (ka.test(d)) {
699
+ var k = "";
700
+ if (a.currentStyle) k = a.currentStyle.whiteSpace;else if (window.getComputedStyle) k = window.getComputedStyle(a, null).whiteSpace;
701
+ a = !k || k === "pre";
702
+ } else a = true;
703
+ a || (d = d.replace(/(<br\s*\/?>)[\r\n]+/g, "$1").replace(/(?:[\r\n]+[ \t]*)+/g, " "));
704
+ }
705
+ d = d;
706
+ } else {
707
+ d = [];
708
+
709
+ for (a = a.firstChild; a; a = a.nextSibling) {
710
+ H(a, d);
711
+ }
712
+
713
+ d = d.join("");
714
+ }
715
+
716
+ d = d.replace(/(?:\r\n?|\n)$/, "");
717
+ m = {
718
+ f: d,
719
+ e: c,
720
+ b: p
721
+ };
722
+ U(m);
723
+
724
+ if (p = m.a) {
725
+ c = m.b;
726
+
727
+ if ("XMP" === c.tagName) {
728
+ d = document.createElement("PRE");
729
+
730
+ for (a = 0; a < c.attributes.length; ++a) {
731
+ k = c.attributes[a];
732
+ if (k.specified) if (k.name.toLowerCase() === "class") d.className = k.value;else d.setAttribute(k.name, k.value);
733
+ }
734
+
735
+ d.innerHTML = p;
736
+ c.parentNode.replaceChild(d, c);
737
+ } else c.innerHTML = p;
738
+ }
739
+ }
740
+ }
741
+ }
742
+
743
+ if (q < o.length) setTimeout(f, 250);else b && b();
744
+ }
745
+
746
+ for (var i = [document.getElementsByTagName("pre"), document.getElementsByTagName("code"), document.getElementsByTagName("xmp")], o = [], l = 0; l < i.length; ++l) {
747
+ for (var n = 0, r = i[l].length; n < r; ++n) {
748
+ o.push(i[l][n]);
749
+ }
750
+ }
751
+
752
+ i = null;
753
+ var j = Date;
754
+ j.now || (j = {
755
+ now: function now() {
756
+ return new Date().getTime();
757
+ }
758
+ });
759
+ var q = 0,
760
+ m;
761
+ f();
762
+ };
763
+
764
+ window.PR = {
765
+ combinePrefixPatterns: O,
766
+ createSimpleLexer: B,
767
+ registerLangHandler: u,
768
+ sourceDecorator: x,
769
+ PR_ATTRIB_NAME: "atn",
770
+ PR_ATTRIB_VALUE: "atv",
771
+ PR_COMMENT: C,
772
+ PR_DECLARATION: "dec",
773
+ PR_KEYWORD: R,
774
+ PR_LITERAL: J,
775
+ PR_NOCODE: V,
776
+ PR_PLAIN: z,
777
+ PR_PUNCTUATION: E,
778
+ PR_SOURCE: P,
779
+ PR_STRING: A,
780
+ PR_TAG: "tag",
781
+ PR_TYPE: S
782
+ };
783
+ })(); // prettier-ignore
784
+ // lang-sql.js
785
+ // http://code.google.com/p/google-code-prettify/
786
+
787
+ PR.registerLangHandler(
788
+ PR.createSimpleLexer(
789
+ [
790
+ ["pln", /^[\t\n\r \xA0]+/, null, "\t\n\r \xA0"],
791
+ ["str", /^(?:"(?:[^\"\\]|\\.)*"|'(?:[^\'\\]|\\.)*')/, null, "\"'"]
792
+ ],
793
+ [
794
+ ["com", /^(?:--[^\r\n]*|\/\*[\s\S]*?(?:\*\/|$))/],
795
+ [
796
+ "kwd",
797
+ /^(?:ADD|ALL|ALTER|AND|ANY|AS|ASC|AUTHORIZATION|BACKUP|BEGIN|BETWEEN|BREAK|BROWSE|BULK|BY|CASCADE|CASE|CHECK|CHECKPOINT|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMN|COMMIT|COMPUTE|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|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|NATIONAL|NOCHECK|NONCLUSTERED|NOT|NULL|NULLIF|OF|OFF|OFFSETS|ON|OPEN|OPENDATASOURCE|OPENQUERY|OPENROWSET|OPENXML|OPTION|OR|ORDER|OUTER|OVER|PERCENT|PLAN|PRECISION|PRIMARY|PRINT|PROC|PROCEDURE|PUBLIC|RAISERROR|READ|READTEXT|RECONFIGURE|REFERENCES|REPLICATION|RESTORE|RESTRICT|RETURN|REVOKE|RIGHT|ROLLBACK|ROWCOUNT|ROWGUIDCOL|RULE|SAVE|SCHEMA|SELECT|SESSION_USER|SET|SETUSER|SHUTDOWN|SOME|STATISTICS|SYSTEM_USER|TABLE|TEXTSIZE|THEN|TO|TOP|TRAN|TRANSACTION|TRIGGER|TRUNCATE|TSEQUAL|UNION|UNIQUE|UPDATE|UPDATETEXT|USE|USER|VALUES|VARYING|VIEW|WAITFOR|WHEN|WHERE|WHILE|WITH|WRITETEXT)(?=[^\w-]|$)/i,
798
+ null
799
+ ],
800
+ [
801
+ "lit",
802
+ /^[+-]?(?:0x[\da-f]+|(?:(?:\.\d+|\d+(?:\.\d*)?)(?:e[+\-]?\d+)?))/i
803
+ ],
804
+ ["pln", /^[a-z_][\w-]*/i],
805
+ ["pun", /^[^\w\t\n\r \xA0\"\'][^\w\t\n\r \xA0+\-\"\']*/]
806
+ ]
807
+ ),
808
+ ["sql"]
809
+ );
810
+ }