speaker-calibration 2.2.215 → 2.2.217

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 (142) hide show
  1. package/.eslintignore +71 -71
  2. package/.eslintrc.json +40 -40
  3. package/.gitignore +81 -0
  4. package/.prettierignore +69 -69
  5. package/.prettierrc +14 -14
  6. package/LICENSE +20 -20
  7. package/README.md +133 -133
  8. package/__mocks__/fileMock.js +1 -1
  9. package/__mocks__/styleMock.js +1 -1
  10. package/babel.config.js +3 -3
  11. package/coverage/clover.xml +71 -71
  12. package/coverage/coverage-final.json +224 -224
  13. package/coverage/lcov-report/PythonServerInterface.js.html +265 -265
  14. package/coverage/lcov-report/base.css +354 -354
  15. package/coverage/lcov-report/block-navigation.js +82 -82
  16. package/coverage/lcov-report/favicon.png +0 -0
  17. package/coverage/lcov-report/index.html +123 -123
  18. package/coverage/lcov-report/prettify.css +101 -101
  19. package/coverage/lcov-report/prettify.js +937 -937
  20. package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  21. package/coverage/lcov-report/sorter.js +189 -189
  22. package/coverage/lcov-report/src/index.html +121 -121
  23. package/coverage/lcov-report/src/server/PythonServerInterface.js.html +268 -268
  24. package/coverage/lcov-report/src/server/index.html +123 -123
  25. package/coverage/lcov-report/src/tasks/audioCalibrator.js.html +499 -499
  26. package/coverage/lcov-report/src/tasks/audioRecorder.js.html +412 -412
  27. package/coverage/lcov-report/src/tasks/index.html +143 -143
  28. package/coverage/lcov-report/src/tasks/volume/index.html +123 -123
  29. package/coverage/lcov-report/src/tasks/volume/volume.js.html +409 -409
  30. package/coverage/lcov-report/src/utils.js.html +172 -172
  31. package/coverage/lcov.info +91 -91
  32. package/dist/Procfile +0 -0
  33. package/dist/example/NoSleep.min.js +1 -1
  34. package/dist/example/credentials.json.gpg +0 -0
  35. package/dist/example/fetch-languages-sheets.js +77 -77
  36. package/dist/example/i18n.js +28705 -28702
  37. package/dist/example/index.html +47 -47
  38. package/dist/example/listener.html +79 -79
  39. package/dist/example/server.js +51 -51
  40. package/dist/example/speaker.html +145 -145
  41. package/dist/example/speakerUI.js +273 -273
  42. package/dist/example/styles.css +99 -99
  43. package/dist/listener.js +13 -13
  44. package/dist/main.js +12 -12
  45. package/dist/main.js.LICENSE.txt +0 -0
  46. package/dist/mlsGen.js +6814 -6814
  47. package/dist/mlsGen.wasm +0 -0
  48. package/dist/package-lock.json +1018 -1018
  49. package/dist/package.json +18 -18
  50. package/doc/AudioCalibrator.html +417 -417
  51. package/doc/AudioPeer.html +251 -251
  52. package/doc/AudioRecorder.html +195 -195
  53. package/doc/ImpulseResponse.html +215 -215
  54. package/doc/Listener.html +308 -308
  55. package/doc/MlsGenInterface.html +226 -226
  56. package/doc/MyEventEmitter.html +274 -274
  57. package/doc/PythonServerAPI.html +109 -109
  58. package/doc/Speaker-Calibration-UML-Diagram.png +0 -0
  59. package/doc/Speaker.html +276 -276
  60. package/doc/Takes%20a%20target%20element%20where%20html%20elements%20will%20be%20appended..html +128 -128
  61. package/doc/Takes%20the%20url%20of%20the%20current%20site%0Aand%20a%20target%20element%20where%20html%20elements%20will%20be%20appended..html +138 -138
  62. package/doc/Takes%20the%20url%20of%20the%20current%20site%20and%20a%20target%20element%20where%20html%20elements%20will%20be%20appended..html +137 -137
  63. package/doc/Volume.html +88 -88
  64. package/doc/audioCalibrator.js.html +179 -179
  65. package/doc/audioPeer.js.html +175 -175
  66. package/doc/audioRecorder.js.html +163 -163
  67. package/doc/creates%20a%20new%20AudioRecorder%20instance.%20%0ASets%20up%20the%20audio%20context%20and%20file%20reader..html +114 -114
  68. package/doc/fonts/OpenSans-Bold-webfont.eot +0 -0
  69. package/doc/fonts/OpenSans-Bold-webfont.svg +1829 -1829
  70. package/doc/fonts/OpenSans-Bold-webfont.woff +0 -0
  71. package/doc/fonts/OpenSans-BoldItalic-webfont.eot +0 -0
  72. package/doc/fonts/OpenSans-BoldItalic-webfont.svg +1829 -1829
  73. package/doc/fonts/OpenSans-BoldItalic-webfont.woff +0 -0
  74. package/doc/fonts/OpenSans-Italic-webfont.eot +0 -0
  75. package/doc/fonts/OpenSans-Italic-webfont.svg +1829 -1829
  76. package/doc/fonts/OpenSans-Italic-webfont.woff +0 -0
  77. package/doc/fonts/OpenSans-Light-webfont.eot +0 -0
  78. package/doc/fonts/OpenSans-Light-webfont.svg +1830 -1830
  79. package/doc/fonts/OpenSans-Light-webfont.woff +0 -0
  80. package/doc/fonts/OpenSans-LightItalic-webfont.eot +0 -0
  81. package/doc/fonts/OpenSans-LightItalic-webfont.svg +1834 -1834
  82. package/doc/fonts/OpenSans-LightItalic-webfont.woff +0 -0
  83. package/doc/fonts/OpenSans-Regular-webfont.eot +0 -0
  84. package/doc/fonts/OpenSans-Regular-webfont.svg +1830 -1830
  85. package/doc/fonts/OpenSans-Regular-webfont.woff +0 -0
  86. package/doc/global.html +308 -308
  87. package/doc/index.html +58 -58
  88. package/doc/listener.js.html +170 -170
  89. package/doc/mlsGen_mlsGenInterface.js.html +117 -117
  90. package/doc/myEventEmitter.js.html +124 -124
  91. package/doc/peer-connection_audioPeer.js.html +188 -188
  92. package/doc/peer-connection_listener.js.html +311 -311
  93. package/doc/peer-connection_speaker.js.html +381 -381
  94. package/doc/sc-activity-diagram.png +0 -0
  95. package/doc/scripts/linenumber.js +25 -25
  96. package/doc/scripts/prettify/Apache-License-2.0.txt +202 -202
  97. package/doc/scripts/prettify/lang-css.js +24 -24
  98. package/doc/scripts/prettify/prettify.js +640 -640
  99. package/doc/server_PythonServerAPI.js.html +160 -160
  100. package/doc/speaker.js.html +248 -248
  101. package/doc/styles/jsdoc-default.css +371 -371
  102. package/doc/styles/prettify-jsdoc.css +111 -111
  103. package/doc/styles/prettify-tomorrow.css +163 -163
  104. package/doc/tasks_audioCalibrator.js.html +207 -207
  105. package/doc/tasks_audioRecorder.js.html +190 -190
  106. package/doc/tasks_impulse-response_impulseResponse.js.html +442 -442
  107. package/doc/tasks_impulse-response_mlsGen_mlsGenInterface.js.html +175 -175
  108. package/doc/tasks_volume_volume.js.html +185 -185
  109. package/doc/utils.js.html +105 -105
  110. package/jest.config.js +173 -173
  111. package/netlify.toml +26 -26
  112. package/package.json +78 -78
  113. package/src/config/firebase.js +26 -26
  114. package/src/index.html +21 -21
  115. package/src/listener-app/listener.js +153 -153
  116. package/src/main.js +23 -23
  117. package/src/myEventEmitter.js +83 -83
  118. package/src/peer-connection/audioPeer.js +183 -183
  119. package/src/peer-connection/listener.js +369 -366
  120. package/src/peer-connection/peerErrors.js +25 -25
  121. package/src/peer-connection/speaker.js +765 -744
  122. package/src/powerCheck.js +98 -98
  123. package/src/server/PythonServerAPI.js +869 -869
  124. package/src/tasks/audioCalibrator.js +360 -351
  125. package/src/tasks/audioRecorder.js +315 -315
  126. package/src/tasks/combination/combination.js +3160 -3160
  127. package/src/tasks/combination/mlsGen/mlsGen.cpp +98 -98
  128. package/src/tasks/combination/mlsGen/mlsGen.hpp +303 -303
  129. package/src/tasks/combination/mlsGen/mlsGenInterface.js +131 -131
  130. package/src/tasks/combination/mlsGen/mlsGenTest.cpp +180 -180
  131. package/src/tasks/impulse-response/impulseResponse.js +610 -610
  132. package/src/tasks/impulse-response/mlsGen/mlsGen.cpp +98 -98
  133. package/src/tasks/impulse-response/mlsGen/mlsGen.hpp +303 -303
  134. package/src/tasks/impulse-response/mlsGen/mlsGenInterface.js +131 -131
  135. package/src/tasks/impulse-response/mlsGen/mlsGenTest.cpp +180 -180
  136. package/src/tasks/volume/volume.cpp +2 -2
  137. package/src/tasks/volume/volume.hpp +22 -22
  138. package/src/tasks/volume/volume.js +279 -279
  139. package/src/utils.js +205 -205
  140. package/webpack.config.js +64 -64
  141. package/.github/workflows/update-phrases.yml +0 -37
  142. package/makefile +0 -74
@@ -1,640 +1,640 @@
1
- var q = null;
2
- window.PR_SHOULD_USE_CONTINUATION = !0;
3
- (function () {
4
- function L(a) {
5
- function m(a) {
6
- var f = a.charCodeAt(0);
7
- if (f !== 92) return f;
8
- var b = a.charAt(1);
9
- return (f = r[b])
10
- ? f
11
- : '0' <= b && b <= '7'
12
- ? parseInt(a.substring(1), 8)
13
- : b === 'u' || b === 'x'
14
- ? parseInt(a.substring(2), 16)
15
- : a.charCodeAt(1);
16
- }
17
- function e(a) {
18
- if (a < 32) return (a < 16 ? '\\x0' : '\\x') + a.toString(16);
19
- a = String.fromCharCode(a);
20
- if (a === '\\' || a === '-' || a === '[' || a === ']') a = '\\' + a;
21
- return a;
22
- }
23
- function h(a) {
24
- for (
25
- var f = a
26
- .substring(1, a.length - 1)
27
- .match(
28
- /\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\[0-3][0-7]{0,2}|\\[0-7]{1,2}|\\[\S\s]|[^\\]/g
29
- ),
30
- a = [],
31
- b = [],
32
- o = f[0] === '^',
33
- c = o ? 1 : 0,
34
- i = f.length;
35
- c < i;
36
- ++c
37
- ) {
38
- var j = f[c];
39
- if (/\\[bdsw]/i.test(j)) a.push(j);
40
- else {
41
- var j = m(j),
42
- d;
43
- c + 2 < i && '-' === f[c + 1] ? ((d = m(f[c + 2])), (c += 2)) : (d = j);
44
- b.push([j, d]);
45
- d < 65 ||
46
- j > 122 ||
47
- (d < 65 || j > 90 || b.push([Math.max(65, j) | 32, Math.min(d, 90) | 32]),
48
- d < 97 || j > 122 || b.push([Math.max(97, j) & -33, Math.min(d, 122) & -33]));
49
- }
50
- }
51
- b.sort(function (a, f) {
52
- return a[0] - f[0] || f[1] - a[1];
53
- });
54
- f = [];
55
- j = [NaN, NaN];
56
- for (c = 0; c < b.length; ++c)
57
- (i = b[c]), i[0] <= j[1] + 1 ? (j[1] = Math.max(j[1], i[1])) : f.push((j = i));
58
- b = ['['];
59
- o && b.push('^');
60
- b.push.apply(b, a);
61
- for (c = 0; c < f.length; ++c)
62
- (i = f[c]),
63
- b.push(e(i[0])),
64
- i[1] > i[0] && (i[1] + 1 > i[0] && b.push('-'), b.push(e(i[1])));
65
- b.push(']');
66
- return b.join('');
67
- }
68
- function y(a) {
69
- for (
70
- var f = a.source.match(
71
- /\[(?:[^\\\]]|\\[\S\s])*]|\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\\d+|\\[^\dux]|\(\?[!:=]|[()^]|[^()[\\^]+/g
72
- ),
73
- b = f.length,
74
- d = [],
75
- c = 0,
76
- i = 0;
77
- c < b;
78
- ++c
79
- ) {
80
- var j = f[c];
81
- j === '(' ? ++i : '\\' === j.charAt(0) && (j = +j.substring(1)) && j <= i && (d[j] = -1);
82
- }
83
- for (c = 1; c < d.length; ++c) -1 === d[c] && (d[c] = ++t);
84
- for (i = c = 0; c < b; ++c)
85
- (j = f[c]),
86
- j === '('
87
- ? (++i, d[i] === void 0 && (f[c] = '(?:'))
88
- : '\\' === j.charAt(0) && (j = +j.substring(1)) && j <= i && (f[c] = '\\' + d[i]);
89
- for (i = c = 0; c < b; ++c) '^' === f[c] && '^' !== f[c + 1] && (f[c] = '');
90
- if (a.ignoreCase && s)
91
- for (c = 0; c < b; ++c)
92
- (j = f[c]),
93
- (a = j.charAt(0)),
94
- j.length >= 2 && a === '['
95
- ? (f[c] = h(j))
96
- : a !== '\\' &&
97
- (f[c] = j.replace(/[A-Za-z]/g, function (a) {
98
- a = a.charCodeAt(0);
99
- return '[' + String.fromCharCode(a & -33, a | 32) + ']';
100
- }));
101
- return f.join('');
102
- }
103
- for (var t = 0, s = !1, l = !1, p = 0, d = a.length; p < d; ++p) {
104
- var g = a[p];
105
- if (g.ignoreCase) l = !0;
106
- else if (/[a-z]/i.test(g.source.replace(/\\u[\da-f]{4}|\\x[\da-f]{2}|\\[^UXux]/gi, ''))) {
107
- s = !0;
108
- l = !1;
109
- break;
110
- }
111
- }
112
- for (
113
- var r = {b: 8, t: 9, n: 10, v: 11, f: 12, r: 13}, n = [], p = 0, d = a.length;
114
- p < d;
115
- ++p
116
- ) {
117
- g = a[p];
118
- if (g.global || g.multiline) throw Error('' + g);
119
- n.push('(?:' + y(g) + ')');
120
- }
121
- return RegExp(n.join('|'), l ? 'gi' : 'g');
122
- }
123
- function M(a) {
124
- function m(a) {
125
- switch (a.nodeType) {
126
- case 1:
127
- if (e.test(a.className)) break;
128
- for (var g = a.firstChild; g; g = g.nextSibling) m(g);
129
- g = a.nodeName;
130
- if ('BR' === g || 'LI' === g) (h[s] = '\n'), (t[s << 1] = y++), (t[(s++ << 1) | 1] = a);
131
- break;
132
- case 3:
133
- case 4:
134
- (g = a.nodeValue),
135
- g.length &&
136
- ((g = p ? g.replace(/\r\n?/g, '\n') : g.replace(/[\t\n\r ]+/g, ' ')),
137
- (h[s] = g),
138
- (t[s << 1] = y),
139
- (y += g.length),
140
- (t[(s++ << 1) | 1] = a));
141
- }
142
- }
143
- var e = /(?:^|\s)nocode(?:\s|$)/,
144
- h = [],
145
- y = 0,
146
- t = [],
147
- s = 0,
148
- l;
149
- a.currentStyle
150
- ? (l = a.currentStyle.whiteSpace)
151
- : window.getComputedStyle &&
152
- (l = document.defaultView.getComputedStyle(a, q).getPropertyValue('white-space'));
153
- var p = l && 'pre' === l.substring(0, 3);
154
- m(a);
155
- return {a: h.join('').replace(/\n$/, ''), c: t};
156
- }
157
- function B(a, m, e, h) {
158
- m && ((a = {a: m, d: a}), e(a), h.push.apply(h, a.e));
159
- }
160
- function x(a, m) {
161
- function e(a) {
162
- for (
163
- var l = a.d, p = [l, 'pln'], d = 0, g = a.a.match(y) || [], r = {}, n = 0, z = g.length;
164
- n < z;
165
- ++n
166
- ) {
167
- var f = g[n],
168
- b = r[f],
169
- o = void 0,
170
- c;
171
- if (typeof b === 'string') c = !1;
172
- else {
173
- var i = h[f.charAt(0)];
174
- if (i) (o = f.match(i[1])), (b = i[0]);
175
- else {
176
- for (c = 0; c < t; ++c)
177
- if (((i = m[c]), (o = f.match(i[1])))) {
178
- b = i[0];
179
- break;
180
- }
181
- o || (b = 'pln');
182
- }
183
- if (
184
- (c = b.length >= 5 && 'lang-' === b.substring(0, 5)) &&
185
- !(o && typeof o[1] === 'string')
186
- )
187
- (c = !1), (b = 'src');
188
- c || (r[f] = b);
189
- }
190
- i = d;
191
- d += f.length;
192
- if (c) {
193
- c = o[1];
194
- var j = f.indexOf(c),
195
- k = j + c.length;
196
- o[2] && ((k = f.length - o[2].length), (j = k - c.length));
197
- b = b.substring(5);
198
- B(l + i, f.substring(0, j), e, p);
199
- B(l + i + j, c, C(b, c), p);
200
- B(l + i + k, f.substring(k), e, p);
201
- } else p.push(l + i, b);
202
- }
203
- a.e = p;
204
- }
205
- var h = {},
206
- y;
207
- (function () {
208
- for (var e = a.concat(m), l = [], p = {}, d = 0, g = e.length; d < g; ++d) {
209
- var r = e[d],
210
- n = r[3];
211
- if (n) for (var k = n.length; --k >= 0; ) h[n.charAt(k)] = r;
212
- r = r[1];
213
- n = '' + r;
214
- p.hasOwnProperty(n) || (l.push(r), (p[n] = q));
215
- }
216
- l.push(/[\S\s]/);
217
- y = L(l);
218
- })();
219
- var t = m.length;
220
- return e;
221
- }
222
- function u(a) {
223
- var m = [],
224
- e = [];
225
- a.tripleQuotedStrings
226
- ? m.push([
227
- 'str',
228
- /^(?:'''(?:[^'\\]|\\[\S\s]|''?(?=[^']))*(?:'''|$)|"""(?:[^"\\]|\\[\S\s]|""?(?=[^"]))*(?:"""|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$))/,
229
- q,
230
- '\'"',
231
- ])
232
- : a.multiLineStrings
233
- ? m.push([
234
- 'str',
235
- /^(?:'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$)|`(?:[^\\`]|\\[\S\s])*(?:`|$))/,
236
- q,
237
- '\'"`',
238
- ])
239
- : m.push(['str', /^(?:'(?:[^\n\r'\\]|\\.)*(?:'|$)|"(?:[^\n\r"\\]|\\.)*(?:"|$))/, q, '"\'']);
240
- a.verbatimStrings && e.push(['str', /^@"(?:[^"]|"")*(?:"|$)/, q]);
241
- var h = a.hashComments;
242
- h &&
243
- (a.cStyleComments
244
- ? (h > 1
245
- ? m.push(['com', /^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/, q, '#'])
246
- : m.push([
247
- 'com',
248
- /^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\n\r]*)/,
249
- q,
250
- '#',
251
- ]),
252
- e.push([
253
- 'str',
254
- /^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,
255
- q,
256
- ]))
257
- : m.push(['com', /^#[^\n\r]*/, q, '#']));
258
- a.cStyleComments &&
259
- (e.push(['com', /^\/\/[^\n\r]*/, q]), e.push(['com', /^\/\*[\S\s]*?(?:\*\/|$)/, q]));
260
- a.regexLiterals &&
261
- e.push([
262
- 'lang-regex',
263
- /^(?:^^\.?|[!+-]|!=|!==|#|%|%=|&|&&|&&=|&=|\(|\*|\*=|\+=|,|-=|->|\/|\/=|:|::|;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|[?@[^]|\^=|\^\^|\^\^=|{|\||\|=|\|\||\|\|=|~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\s*(\/(?=[^*/])(?:[^/[\\]|\\[\S\s]|\[(?:[^\\\]]|\\[\S\s])*(?:]|$))+\/)/,
264
- ]);
265
- (h = a.types) && e.push(['typ', h]);
266
- a = ('' + a.keywords).replace(/^ | $/g, '');
267
- a.length && e.push(['kwd', RegExp('^(?:' + a.replace(/[\s,]+/g, '|') + ')\\b'), q]);
268
- m.push(['pln', /^\s+/, q, ' \r\n\t\xa0']);
269
- e.push(
270
- ['lit', /^@[$_a-z][\w$@]*/i, q],
271
- ['typ', /^(?:[@_]?[A-Z]+[a-z][\w$@]*|\w+_t\b)/, q],
272
- ['pln', /^[$_a-z][\w$@]*/i, q],
273
- [
274
- 'lit',
275
- /^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,
276
- q,
277
- '0123456789',
278
- ],
279
- ['pln', /^\\[\S\s]?/, q],
280
- ['pun', /^.[^\s\w"-$'./@\\`]*/, q]
281
- );
282
- return x(m, e);
283
- }
284
- function D(a, m) {
285
- function e(a) {
286
- switch (a.nodeType) {
287
- case 1:
288
- if (k.test(a.className)) break;
289
- if ('BR' === a.nodeName) h(a), a.parentNode && a.parentNode.removeChild(a);
290
- else for (a = a.firstChild; a; a = a.nextSibling) e(a);
291
- break;
292
- case 3:
293
- case 4:
294
- if (p) {
295
- var b = a.nodeValue,
296
- d = b.match(t);
297
- if (d) {
298
- var c = b.substring(0, d.index);
299
- a.nodeValue = c;
300
- (b = b.substring(d.index + d[0].length)) &&
301
- a.parentNode.insertBefore(s.createTextNode(b), a.nextSibling);
302
- h(a);
303
- c || a.parentNode.removeChild(a);
304
- }
305
- }
306
- }
307
- }
308
- function h(a) {
309
- function b(a, d) {
310
- var e = d ? a.cloneNode(!1) : a,
311
- f = a.parentNode;
312
- if (f) {
313
- var f = b(f, 1),
314
- g = a.nextSibling;
315
- f.appendChild(e);
316
- for (var h = g; h; h = g) (g = h.nextSibling), f.appendChild(h);
317
- }
318
- return e;
319
- }
320
- for (; !a.nextSibling; ) if (((a = a.parentNode), !a)) return;
321
- for (var a = b(a.nextSibling, 0), e; (e = a.parentNode) && e.nodeType === 1; ) a = e;
322
- d.push(a);
323
- }
324
- var k = /(?:^|\s)nocode(?:\s|$)/,
325
- t = /\r\n?|\n/,
326
- s = a.ownerDocument,
327
- l;
328
- a.currentStyle
329
- ? (l = a.currentStyle.whiteSpace)
330
- : window.getComputedStyle &&
331
- (l = s.defaultView.getComputedStyle(a, q).getPropertyValue('white-space'));
332
- var p = l && 'pre' === l.substring(0, 3);
333
- for (l = s.createElement('LI'); a.firstChild; ) l.appendChild(a.firstChild);
334
- for (var d = [l], g = 0; g < d.length; ++g) e(d[g]);
335
- m === (m | 0) && d[0].setAttribute('value', m);
336
- var r = s.createElement('OL');
337
- r.className = 'linenums';
338
- for (var n = Math.max(0, (m - 1) | 0) || 0, g = 0, z = d.length; g < z; ++g)
339
- (l = d[g]),
340
- (l.className = 'L' + ((g + n) % 10)),
341
- l.firstChild || l.appendChild(s.createTextNode('\xa0')),
342
- r.appendChild(l);
343
- a.appendChild(r);
344
- }
345
- function k(a, m) {
346
- for (var e = m.length; --e >= 0; ) {
347
- var h = m[e];
348
- A.hasOwnProperty(h)
349
- ? window.console && console.warn('cannot override language handler %s', h)
350
- : (A[h] = a);
351
- }
352
- }
353
- function C(a, m) {
354
- if (!a || !A.hasOwnProperty(a)) a = /^\s*</.test(m) ? 'default-markup' : 'default-code';
355
- return A[a];
356
- }
357
- function E(a) {
358
- var m = a.g;
359
- try {
360
- var e = M(a.h),
361
- h = e.a;
362
- a.a = h;
363
- a.c = e.c;
364
- a.d = 0;
365
- C(m, h)(a);
366
- var k = /\bMSIE\b/.test(navigator.userAgent),
367
- m = /\n/g,
368
- t = a.a,
369
- s = t.length,
370
- e = 0,
371
- l = a.c,
372
- p = l.length,
373
- h = 0,
374
- d = a.e,
375
- g = d.length,
376
- a = 0;
377
- d[g] = s;
378
- var r, n;
379
- for (n = r = 0; n < g; )
380
- d[n] !== d[n + 2] ? ((d[r++] = d[n++]), (d[r++] = d[n++])) : (n += 2);
381
- g = r;
382
- for (n = r = 0; n < g; ) {
383
- for (var z = d[n], f = d[n + 1], b = n + 2; b + 2 <= g && d[b + 1] === f; ) b += 2;
384
- d[r++] = z;
385
- d[r++] = f;
386
- n = b;
387
- }
388
- for (d.length = r; h < p; ) {
389
- var o = l[h + 2] || s,
390
- c = d[a + 2] || s,
391
- b = Math.min(o, c),
392
- i = l[h + 1],
393
- j;
394
- if (i.nodeType !== 1 && (j = t.substring(e, b))) {
395
- k && (j = j.replace(m, '\r'));
396
- i.nodeValue = j;
397
- var u = i.ownerDocument,
398
- v = u.createElement('SPAN');
399
- v.className = d[a + 1];
400
- var x = i.parentNode;
401
- x.replaceChild(v, i);
402
- v.appendChild(i);
403
- e < o &&
404
- ((l[h + 1] = i = u.createTextNode(t.substring(b, o))),
405
- x.insertBefore(i, v.nextSibling));
406
- }
407
- e = b;
408
- e >= o && (h += 2);
409
- e >= c && (a += 2);
410
- }
411
- } catch (w) {
412
- 'console' in window && console.log(w && w.stack ? w.stack : w);
413
- }
414
- }
415
- var v = ['break,continue,do,else,for,if,return,while'],
416
- w = [
417
- [
418
- v,
419
- 'auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile',
420
- ],
421
- 'catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof',
422
- ],
423
- F = [
424
- w,
425
- '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,where',
426
- ],
427
- G = [
428
- w,
429
- 'abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient',
430
- ],
431
- H = [
432
- G,
433
- 'as,base,by,checked,decimal,delegate,descending,dynamic,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',
434
- ],
435
- w = [w, 'debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN'],
436
- I = [
437
- v,
438
- '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',
439
- ],
440
- J = [
441
- v,
442
- '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',
443
- ],
444
- v = [v, 'case,done,elif,esac,eval,fi,function,in,local,set,then,until'],
445
- K =
446
- /^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/,
447
- N = /\S/,
448
- O = u({
449
- keywords: [
450
- F,
451
- H,
452
- w,
453
- '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' +
454
- I,
455
- J,
456
- v,
457
- ],
458
- hashComments: !0,
459
- cStyleComments: !0,
460
- multiLineStrings: !0,
461
- regexLiterals: !0,
462
- }),
463
- A = {};
464
- k(O, ['default-code']);
465
- k(
466
- x(
467
- [],
468
- [
469
- ['pln', /^[^<?]+/],
470
- ['dec', /^<!\w[^>]*(?:>|$)/],
471
- ['com', /^<\!--[\S\s]*?(?:--\>|$)/],
472
- ['lang-', /^<\?([\S\s]+?)(?:\?>|$)/],
473
- ['lang-', /^<%([\S\s]+?)(?:%>|$)/],
474
- ['pun', /^(?:<[%?]|[%?]>)/],
475
- ['lang-', /^<xmp\b[^>]*>([\S\s]+?)<\/xmp\b[^>]*>/i],
476
- ['lang-js', /^<script\b[^>]*>([\S\s]*?)(<\/script\b[^>]*>)/i],
477
- ['lang-css', /^<style\b[^>]*>([\S\s]*?)(<\/style\b[^>]*>)/i],
478
- ['lang-in.tag', /^(<\/?[a-z][^<>]*>)/i],
479
- ]
480
- ),
481
- ['default-markup', 'htm', 'html', 'mxml', 'xhtml', 'xml', 'xsl']
482
- );
483
- k(
484
- x(
485
- [
486
- ['pln', /^\s+/, q, ' \t\r\n'],
487
- ['atv', /^(?:"[^"]*"?|'[^']*'?)/, q, '"\''],
488
- ],
489
- [
490
- ['tag', /^^<\/?[a-z](?:[\w-.:]*\w)?|\/?>$/i],
491
- ['atn', /^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],
492
- ['lang-uq.val', /^=\s*([^\s"'>]*(?:[^\s"'/>]|\/(?=\s)))/],
493
- ['pun', /^[/<->]+/],
494
- ['lang-js', /^on\w+\s*=\s*"([^"]+)"/i],
495
- ['lang-js', /^on\w+\s*=\s*'([^']+)'/i],
496
- ['lang-js', /^on\w+\s*=\s*([^\s"'>]+)/i],
497
- ['lang-css', /^style\s*=\s*"([^"]+)"/i],
498
- ['lang-css', /^style\s*=\s*'([^']+)'/i],
499
- ['lang-css', /^style\s*=\s*([^\s"'>]+)/i],
500
- ]
501
- ),
502
- ['in.tag']
503
- );
504
- k(x([], [['atv', /^[\S\s]+/]]), ['uq.val']);
505
- k(u({keywords: F, hashComments: !0, cStyleComments: !0, types: K}), [
506
- 'c',
507
- 'cc',
508
- 'cpp',
509
- 'cxx',
510
- 'cyc',
511
- 'm',
512
- ]);
513
- k(u({keywords: 'null,true,false'}), ['json']);
514
- k(u({keywords: H, hashComments: !0, cStyleComments: !0, verbatimStrings: !0, types: K}), ['cs']);
515
- k(u({keywords: G, cStyleComments: !0}), ['java']);
516
- k(u({keywords: v, hashComments: !0, multiLineStrings: !0}), ['bsh', 'csh', 'sh']);
517
- k(u({keywords: I, hashComments: !0, multiLineStrings: !0, tripleQuotedStrings: !0}), [
518
- 'cv',
519
- 'py',
520
- ]);
521
- k(
522
- u({
523
- keywords:
524
- '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',
525
- hashComments: !0,
526
- multiLineStrings: !0,
527
- regexLiterals: !0,
528
- }),
529
- ['perl', 'pl', 'pm']
530
- );
531
- k(u({keywords: J, hashComments: !0, multiLineStrings: !0, regexLiterals: !0}), ['rb']);
532
- k(u({keywords: w, cStyleComments: !0, regexLiterals: !0}), ['js']);
533
- k(
534
- u({
535
- keywords:
536
- 'all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes',
537
- hashComments: 3,
538
- cStyleComments: !0,
539
- multilineStrings: !0,
540
- tripleQuotedStrings: !0,
541
- regexLiterals: !0,
542
- }),
543
- ['coffee']
544
- );
545
- k(x([], [['str', /^[\S\s]+/]]), ['regex']);
546
- window.prettyPrintOne = function (a, m, e) {
547
- var h = document.createElement('PRE');
548
- h.innerHTML = a;
549
- e && D(h, e);
550
- E({g: m, i: e, h: h});
551
- return h.innerHTML;
552
- };
553
- window.prettyPrint = function (a) {
554
- function m() {
555
- for (
556
- var e = window.PR_SHOULD_USE_CONTINUATION ? l.now() + 250 : Infinity;
557
- p < h.length && l.now() < e;
558
- p++
559
- ) {
560
- var n = h[p],
561
- k = n.className;
562
- if (k.indexOf('prettyprint') >= 0) {
563
- var k = k.match(g),
564
- f,
565
- b;
566
- if ((b = !k)) {
567
- b = n;
568
- for (var o = void 0, c = b.firstChild; c; c = c.nextSibling)
569
- var i = c.nodeType,
570
- o = i === 1 ? (o ? b : c) : i === 3 ? (N.test(c.nodeValue) ? b : o) : o;
571
- b = (f = o === b ? void 0 : o) && 'CODE' === f.tagName;
572
- }
573
- b && (k = f.className.match(g));
574
- k && (k = k[1]);
575
- b = !1;
576
- for (o = n.parentNode; o; o = o.parentNode)
577
- if (
578
- (o.tagName === 'pre' || o.tagName === 'code' || o.tagName === 'xmp') &&
579
- o.className &&
580
- o.className.indexOf('prettyprint') >= 0
581
- ) {
582
- b = !0;
583
- break;
584
- }
585
- b ||
586
- ((b = (b = n.className.match(/\blinenums\b(?::(\d+))?/))
587
- ? b[1] && b[1].length
588
- ? +b[1]
589
- : !0
590
- : !1) && D(n, b),
591
- (d = {g: k, h: n, i: b}),
592
- E(d));
593
- }
594
- }
595
- p < h.length ? setTimeout(m, 250) : a && a();
596
- }
597
- for (
598
- var e = [
599
- document.getElementsByTagName('pre'),
600
- document.getElementsByTagName('code'),
601
- document.getElementsByTagName('xmp'),
602
- ],
603
- h = [],
604
- k = 0;
605
- k < e.length;
606
- ++k
607
- )
608
- for (var t = 0, s = e[k].length; t < s; ++t) h.push(e[k][t]);
609
- var e = q,
610
- l = Date;
611
- l.now ||
612
- (l = {
613
- now: function () {
614
- return +new Date();
615
- },
616
- });
617
- var p = 0,
618
- d,
619
- g = /\blang(?:uage)?-([\w.]+)(?!\S)/;
620
- m();
621
- };
622
- window.PR = {
623
- createSimpleLexer: x,
624
- registerLangHandler: k,
625
- sourceDecorator: u,
626
- PR_ATTRIB_NAME: 'atn',
627
- PR_ATTRIB_VALUE: 'atv',
628
- PR_COMMENT: 'com',
629
- PR_DECLARATION: 'dec',
630
- PR_KEYWORD: 'kwd',
631
- PR_LITERAL: 'lit',
632
- PR_NOCODE: 'nocode',
633
- PR_PLAIN: 'pln',
634
- PR_PUNCTUATION: 'pun',
635
- PR_SOURCE: 'src',
636
- PR_STRING: 'str',
637
- PR_TAG: 'tag',
638
- PR_TYPE: 'typ',
639
- };
640
- })();
1
+ var q = null;
2
+ window.PR_SHOULD_USE_CONTINUATION = !0;
3
+ (function () {
4
+ function L(a) {
5
+ function m(a) {
6
+ var f = a.charCodeAt(0);
7
+ if (f !== 92) return f;
8
+ var b = a.charAt(1);
9
+ return (f = r[b])
10
+ ? f
11
+ : '0' <= b && b <= '7'
12
+ ? parseInt(a.substring(1), 8)
13
+ : b === 'u' || b === 'x'
14
+ ? parseInt(a.substring(2), 16)
15
+ : a.charCodeAt(1);
16
+ }
17
+ function e(a) {
18
+ if (a < 32) return (a < 16 ? '\\x0' : '\\x') + a.toString(16);
19
+ a = String.fromCharCode(a);
20
+ if (a === '\\' || a === '-' || a === '[' || a === ']') a = '\\' + a;
21
+ return a;
22
+ }
23
+ function h(a) {
24
+ for (
25
+ var f = a
26
+ .substring(1, a.length - 1)
27
+ .match(
28
+ /\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\[0-3][0-7]{0,2}|\\[0-7]{1,2}|\\[\S\s]|[^\\]/g
29
+ ),
30
+ a = [],
31
+ b = [],
32
+ o = f[0] === '^',
33
+ c = o ? 1 : 0,
34
+ i = f.length;
35
+ c < i;
36
+ ++c
37
+ ) {
38
+ var j = f[c];
39
+ if (/\\[bdsw]/i.test(j)) a.push(j);
40
+ else {
41
+ var j = m(j),
42
+ d;
43
+ c + 2 < i && '-' === f[c + 1] ? ((d = m(f[c + 2])), (c += 2)) : (d = j);
44
+ b.push([j, d]);
45
+ d < 65 ||
46
+ j > 122 ||
47
+ (d < 65 || j > 90 || b.push([Math.max(65, j) | 32, Math.min(d, 90) | 32]),
48
+ d < 97 || j > 122 || b.push([Math.max(97, j) & -33, Math.min(d, 122) & -33]));
49
+ }
50
+ }
51
+ b.sort(function (a, f) {
52
+ return a[0] - f[0] || f[1] - a[1];
53
+ });
54
+ f = [];
55
+ j = [NaN, NaN];
56
+ for (c = 0; c < b.length; ++c)
57
+ (i = b[c]), i[0] <= j[1] + 1 ? (j[1] = Math.max(j[1], i[1])) : f.push((j = i));
58
+ b = ['['];
59
+ o && b.push('^');
60
+ b.push.apply(b, a);
61
+ for (c = 0; c < f.length; ++c)
62
+ (i = f[c]),
63
+ b.push(e(i[0])),
64
+ i[1] > i[0] && (i[1] + 1 > i[0] && b.push('-'), b.push(e(i[1])));
65
+ b.push(']');
66
+ return b.join('');
67
+ }
68
+ function y(a) {
69
+ for (
70
+ var f = a.source.match(
71
+ /\[(?:[^\\\]]|\\[\S\s])*]|\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\\d+|\\[^\dux]|\(\?[!:=]|[()^]|[^()[\\^]+/g
72
+ ),
73
+ b = f.length,
74
+ d = [],
75
+ c = 0,
76
+ i = 0;
77
+ c < b;
78
+ ++c
79
+ ) {
80
+ var j = f[c];
81
+ j === '(' ? ++i : '\\' === j.charAt(0) && (j = +j.substring(1)) && j <= i && (d[j] = -1);
82
+ }
83
+ for (c = 1; c < d.length; ++c) -1 === d[c] && (d[c] = ++t);
84
+ for (i = c = 0; c < b; ++c)
85
+ (j = f[c]),
86
+ j === '('
87
+ ? (++i, d[i] === void 0 && (f[c] = '(?:'))
88
+ : '\\' === j.charAt(0) && (j = +j.substring(1)) && j <= i && (f[c] = '\\' + d[i]);
89
+ for (i = c = 0; c < b; ++c) '^' === f[c] && '^' !== f[c + 1] && (f[c] = '');
90
+ if (a.ignoreCase && s)
91
+ for (c = 0; c < b; ++c)
92
+ (j = f[c]),
93
+ (a = j.charAt(0)),
94
+ j.length >= 2 && a === '['
95
+ ? (f[c] = h(j))
96
+ : a !== '\\' &&
97
+ (f[c] = j.replace(/[A-Za-z]/g, function (a) {
98
+ a = a.charCodeAt(0);
99
+ return '[' + String.fromCharCode(a & -33, a | 32) + ']';
100
+ }));
101
+ return f.join('');
102
+ }
103
+ for (var t = 0, s = !1, l = !1, p = 0, d = a.length; p < d; ++p) {
104
+ var g = a[p];
105
+ if (g.ignoreCase) l = !0;
106
+ else if (/[a-z]/i.test(g.source.replace(/\\u[\da-f]{4}|\\x[\da-f]{2}|\\[^UXux]/gi, ''))) {
107
+ s = !0;
108
+ l = !1;
109
+ break;
110
+ }
111
+ }
112
+ for (
113
+ var r = {b: 8, t: 9, n: 10, v: 11, f: 12, r: 13}, n = [], p = 0, d = a.length;
114
+ p < d;
115
+ ++p
116
+ ) {
117
+ g = a[p];
118
+ if (g.global || g.multiline) throw Error('' + g);
119
+ n.push('(?:' + y(g) + ')');
120
+ }
121
+ return RegExp(n.join('|'), l ? 'gi' : 'g');
122
+ }
123
+ function M(a) {
124
+ function m(a) {
125
+ switch (a.nodeType) {
126
+ case 1:
127
+ if (e.test(a.className)) break;
128
+ for (var g = a.firstChild; g; g = g.nextSibling) m(g);
129
+ g = a.nodeName;
130
+ if ('BR' === g || 'LI' === g) (h[s] = '\n'), (t[s << 1] = y++), (t[(s++ << 1) | 1] = a);
131
+ break;
132
+ case 3:
133
+ case 4:
134
+ (g = a.nodeValue),
135
+ g.length &&
136
+ ((g = p ? g.replace(/\r\n?/g, '\n') : g.replace(/[\t\n\r ]+/g, ' ')),
137
+ (h[s] = g),
138
+ (t[s << 1] = y),
139
+ (y += g.length),
140
+ (t[(s++ << 1) | 1] = a));
141
+ }
142
+ }
143
+ var e = /(?:^|\s)nocode(?:\s|$)/,
144
+ h = [],
145
+ y = 0,
146
+ t = [],
147
+ s = 0,
148
+ l;
149
+ a.currentStyle
150
+ ? (l = a.currentStyle.whiteSpace)
151
+ : window.getComputedStyle &&
152
+ (l = document.defaultView.getComputedStyle(a, q).getPropertyValue('white-space'));
153
+ var p = l && 'pre' === l.substring(0, 3);
154
+ m(a);
155
+ return {a: h.join('').replace(/\n$/, ''), c: t};
156
+ }
157
+ function B(a, m, e, h) {
158
+ m && ((a = {a: m, d: a}), e(a), h.push.apply(h, a.e));
159
+ }
160
+ function x(a, m) {
161
+ function e(a) {
162
+ for (
163
+ var l = a.d, p = [l, 'pln'], d = 0, g = a.a.match(y) || [], r = {}, n = 0, z = g.length;
164
+ n < z;
165
+ ++n
166
+ ) {
167
+ var f = g[n],
168
+ b = r[f],
169
+ o = void 0,
170
+ c;
171
+ if (typeof b === 'string') c = !1;
172
+ else {
173
+ var i = h[f.charAt(0)];
174
+ if (i) (o = f.match(i[1])), (b = i[0]);
175
+ else {
176
+ for (c = 0; c < t; ++c)
177
+ if (((i = m[c]), (o = f.match(i[1])))) {
178
+ b = i[0];
179
+ break;
180
+ }
181
+ o || (b = 'pln');
182
+ }
183
+ if (
184
+ (c = b.length >= 5 && 'lang-' === b.substring(0, 5)) &&
185
+ !(o && typeof o[1] === 'string')
186
+ )
187
+ (c = !1), (b = 'src');
188
+ c || (r[f] = b);
189
+ }
190
+ i = d;
191
+ d += f.length;
192
+ if (c) {
193
+ c = o[1];
194
+ var j = f.indexOf(c),
195
+ k = j + c.length;
196
+ o[2] && ((k = f.length - o[2].length), (j = k - c.length));
197
+ b = b.substring(5);
198
+ B(l + i, f.substring(0, j), e, p);
199
+ B(l + i + j, c, C(b, c), p);
200
+ B(l + i + k, f.substring(k), e, p);
201
+ } else p.push(l + i, b);
202
+ }
203
+ a.e = p;
204
+ }
205
+ var h = {},
206
+ y;
207
+ (function () {
208
+ for (var e = a.concat(m), l = [], p = {}, d = 0, g = e.length; d < g; ++d) {
209
+ var r = e[d],
210
+ n = r[3];
211
+ if (n) for (var k = n.length; --k >= 0; ) h[n.charAt(k)] = r;
212
+ r = r[1];
213
+ n = '' + r;
214
+ p.hasOwnProperty(n) || (l.push(r), (p[n] = q));
215
+ }
216
+ l.push(/[\S\s]/);
217
+ y = L(l);
218
+ })();
219
+ var t = m.length;
220
+ return e;
221
+ }
222
+ function u(a) {
223
+ var m = [],
224
+ e = [];
225
+ a.tripleQuotedStrings
226
+ ? m.push([
227
+ 'str',
228
+ /^(?:'''(?:[^'\\]|\\[\S\s]|''?(?=[^']))*(?:'''|$)|"""(?:[^"\\]|\\[\S\s]|""?(?=[^"]))*(?:"""|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$))/,
229
+ q,
230
+ '\'"',
231
+ ])
232
+ : a.multiLineStrings
233
+ ? m.push([
234
+ 'str',
235
+ /^(?:'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$)|`(?:[^\\`]|\\[\S\s])*(?:`|$))/,
236
+ q,
237
+ '\'"`',
238
+ ])
239
+ : m.push(['str', /^(?:'(?:[^\n\r'\\]|\\.)*(?:'|$)|"(?:[^\n\r"\\]|\\.)*(?:"|$))/, q, '"\'']);
240
+ a.verbatimStrings && e.push(['str', /^@"(?:[^"]|"")*(?:"|$)/, q]);
241
+ var h = a.hashComments;
242
+ h &&
243
+ (a.cStyleComments
244
+ ? (h > 1
245
+ ? m.push(['com', /^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/, q, '#'])
246
+ : m.push([
247
+ 'com',
248
+ /^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\n\r]*)/,
249
+ q,
250
+ '#',
251
+ ]),
252
+ e.push([
253
+ 'str',
254
+ /^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,
255
+ q,
256
+ ]))
257
+ : m.push(['com', /^#[^\n\r]*/, q, '#']));
258
+ a.cStyleComments &&
259
+ (e.push(['com', /^\/\/[^\n\r]*/, q]), e.push(['com', /^\/\*[\S\s]*?(?:\*\/|$)/, q]));
260
+ a.regexLiterals &&
261
+ e.push([
262
+ 'lang-regex',
263
+ /^(?:^^\.?|[!+-]|!=|!==|#|%|%=|&|&&|&&=|&=|\(|\*|\*=|\+=|,|-=|->|\/|\/=|:|::|;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|[?@[^]|\^=|\^\^|\^\^=|{|\||\|=|\|\||\|\|=|~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\s*(\/(?=[^*/])(?:[^/[\\]|\\[\S\s]|\[(?:[^\\\]]|\\[\S\s])*(?:]|$))+\/)/,
264
+ ]);
265
+ (h = a.types) && e.push(['typ', h]);
266
+ a = ('' + a.keywords).replace(/^ | $/g, '');
267
+ a.length && e.push(['kwd', RegExp('^(?:' + a.replace(/[\s,]+/g, '|') + ')\\b'), q]);
268
+ m.push(['pln', /^\s+/, q, ' \r\n\t\xa0']);
269
+ e.push(
270
+ ['lit', /^@[$_a-z][\w$@]*/i, q],
271
+ ['typ', /^(?:[@_]?[A-Z]+[a-z][\w$@]*|\w+_t\b)/, q],
272
+ ['pln', /^[$_a-z][\w$@]*/i, q],
273
+ [
274
+ 'lit',
275
+ /^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,
276
+ q,
277
+ '0123456789',
278
+ ],
279
+ ['pln', /^\\[\S\s]?/, q],
280
+ ['pun', /^.[^\s\w"-$'./@\\`]*/, q]
281
+ );
282
+ return x(m, e);
283
+ }
284
+ function D(a, m) {
285
+ function e(a) {
286
+ switch (a.nodeType) {
287
+ case 1:
288
+ if (k.test(a.className)) break;
289
+ if ('BR' === a.nodeName) h(a), a.parentNode && a.parentNode.removeChild(a);
290
+ else for (a = a.firstChild; a; a = a.nextSibling) e(a);
291
+ break;
292
+ case 3:
293
+ case 4:
294
+ if (p) {
295
+ var b = a.nodeValue,
296
+ d = b.match(t);
297
+ if (d) {
298
+ var c = b.substring(0, d.index);
299
+ a.nodeValue = c;
300
+ (b = b.substring(d.index + d[0].length)) &&
301
+ a.parentNode.insertBefore(s.createTextNode(b), a.nextSibling);
302
+ h(a);
303
+ c || a.parentNode.removeChild(a);
304
+ }
305
+ }
306
+ }
307
+ }
308
+ function h(a) {
309
+ function b(a, d) {
310
+ var e = d ? a.cloneNode(!1) : a,
311
+ f = a.parentNode;
312
+ if (f) {
313
+ var f = b(f, 1),
314
+ g = a.nextSibling;
315
+ f.appendChild(e);
316
+ for (var h = g; h; h = g) (g = h.nextSibling), f.appendChild(h);
317
+ }
318
+ return e;
319
+ }
320
+ for (; !a.nextSibling; ) if (((a = a.parentNode), !a)) return;
321
+ for (var a = b(a.nextSibling, 0), e; (e = a.parentNode) && e.nodeType === 1; ) a = e;
322
+ d.push(a);
323
+ }
324
+ var k = /(?:^|\s)nocode(?:\s|$)/,
325
+ t = /\r\n?|\n/,
326
+ s = a.ownerDocument,
327
+ l;
328
+ a.currentStyle
329
+ ? (l = a.currentStyle.whiteSpace)
330
+ : window.getComputedStyle &&
331
+ (l = s.defaultView.getComputedStyle(a, q).getPropertyValue('white-space'));
332
+ var p = l && 'pre' === l.substring(0, 3);
333
+ for (l = s.createElement('LI'); a.firstChild; ) l.appendChild(a.firstChild);
334
+ for (var d = [l], g = 0; g < d.length; ++g) e(d[g]);
335
+ m === (m | 0) && d[0].setAttribute('value', m);
336
+ var r = s.createElement('OL');
337
+ r.className = 'linenums';
338
+ for (var n = Math.max(0, (m - 1) | 0) || 0, g = 0, z = d.length; g < z; ++g)
339
+ (l = d[g]),
340
+ (l.className = 'L' + ((g + n) % 10)),
341
+ l.firstChild || l.appendChild(s.createTextNode('\xa0')),
342
+ r.appendChild(l);
343
+ a.appendChild(r);
344
+ }
345
+ function k(a, m) {
346
+ for (var e = m.length; --e >= 0; ) {
347
+ var h = m[e];
348
+ A.hasOwnProperty(h)
349
+ ? window.console && console.warn('cannot override language handler %s', h)
350
+ : (A[h] = a);
351
+ }
352
+ }
353
+ function C(a, m) {
354
+ if (!a || !A.hasOwnProperty(a)) a = /^\s*</.test(m) ? 'default-markup' : 'default-code';
355
+ return A[a];
356
+ }
357
+ function E(a) {
358
+ var m = a.g;
359
+ try {
360
+ var e = M(a.h),
361
+ h = e.a;
362
+ a.a = h;
363
+ a.c = e.c;
364
+ a.d = 0;
365
+ C(m, h)(a);
366
+ var k = /\bMSIE\b/.test(navigator.userAgent),
367
+ m = /\n/g,
368
+ t = a.a,
369
+ s = t.length,
370
+ e = 0,
371
+ l = a.c,
372
+ p = l.length,
373
+ h = 0,
374
+ d = a.e,
375
+ g = d.length,
376
+ a = 0;
377
+ d[g] = s;
378
+ var r, n;
379
+ for (n = r = 0; n < g; )
380
+ d[n] !== d[n + 2] ? ((d[r++] = d[n++]), (d[r++] = d[n++])) : (n += 2);
381
+ g = r;
382
+ for (n = r = 0; n < g; ) {
383
+ for (var z = d[n], f = d[n + 1], b = n + 2; b + 2 <= g && d[b + 1] === f; ) b += 2;
384
+ d[r++] = z;
385
+ d[r++] = f;
386
+ n = b;
387
+ }
388
+ for (d.length = r; h < p; ) {
389
+ var o = l[h + 2] || s,
390
+ c = d[a + 2] || s,
391
+ b = Math.min(o, c),
392
+ i = l[h + 1],
393
+ j;
394
+ if (i.nodeType !== 1 && (j = t.substring(e, b))) {
395
+ k && (j = j.replace(m, '\r'));
396
+ i.nodeValue = j;
397
+ var u = i.ownerDocument,
398
+ v = u.createElement('SPAN');
399
+ v.className = d[a + 1];
400
+ var x = i.parentNode;
401
+ x.replaceChild(v, i);
402
+ v.appendChild(i);
403
+ e < o &&
404
+ ((l[h + 1] = i = u.createTextNode(t.substring(b, o))),
405
+ x.insertBefore(i, v.nextSibling));
406
+ }
407
+ e = b;
408
+ e >= o && (h += 2);
409
+ e >= c && (a += 2);
410
+ }
411
+ } catch (w) {
412
+ 'console' in window && console.log(w && w.stack ? w.stack : w);
413
+ }
414
+ }
415
+ var v = ['break,continue,do,else,for,if,return,while'],
416
+ w = [
417
+ [
418
+ v,
419
+ 'auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile',
420
+ ],
421
+ 'catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof',
422
+ ],
423
+ F = [
424
+ w,
425
+ '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,where',
426
+ ],
427
+ G = [
428
+ w,
429
+ 'abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient',
430
+ ],
431
+ H = [
432
+ G,
433
+ 'as,base,by,checked,decimal,delegate,descending,dynamic,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',
434
+ ],
435
+ w = [w, 'debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN'],
436
+ I = [
437
+ v,
438
+ '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',
439
+ ],
440
+ J = [
441
+ v,
442
+ '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',
443
+ ],
444
+ v = [v, 'case,done,elif,esac,eval,fi,function,in,local,set,then,until'],
445
+ K =
446
+ /^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/,
447
+ N = /\S/,
448
+ O = u({
449
+ keywords: [
450
+ F,
451
+ H,
452
+ w,
453
+ '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' +
454
+ I,
455
+ J,
456
+ v,
457
+ ],
458
+ hashComments: !0,
459
+ cStyleComments: !0,
460
+ multiLineStrings: !0,
461
+ regexLiterals: !0,
462
+ }),
463
+ A = {};
464
+ k(O, ['default-code']);
465
+ k(
466
+ x(
467
+ [],
468
+ [
469
+ ['pln', /^[^<?]+/],
470
+ ['dec', /^<!\w[^>]*(?:>|$)/],
471
+ ['com', /^<\!--[\S\s]*?(?:--\>|$)/],
472
+ ['lang-', /^<\?([\S\s]+?)(?:\?>|$)/],
473
+ ['lang-', /^<%([\S\s]+?)(?:%>|$)/],
474
+ ['pun', /^(?:<[%?]|[%?]>)/],
475
+ ['lang-', /^<xmp\b[^>]*>([\S\s]+?)<\/xmp\b[^>]*>/i],
476
+ ['lang-js', /^<script\b[^>]*>([\S\s]*?)(<\/script\b[^>]*>)/i],
477
+ ['lang-css', /^<style\b[^>]*>([\S\s]*?)(<\/style\b[^>]*>)/i],
478
+ ['lang-in.tag', /^(<\/?[a-z][^<>]*>)/i],
479
+ ]
480
+ ),
481
+ ['default-markup', 'htm', 'html', 'mxml', 'xhtml', 'xml', 'xsl']
482
+ );
483
+ k(
484
+ x(
485
+ [
486
+ ['pln', /^\s+/, q, ' \t\r\n'],
487
+ ['atv', /^(?:"[^"]*"?|'[^']*'?)/, q, '"\''],
488
+ ],
489
+ [
490
+ ['tag', /^^<\/?[a-z](?:[\w-.:]*\w)?|\/?>$/i],
491
+ ['atn', /^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],
492
+ ['lang-uq.val', /^=\s*([^\s"'>]*(?:[^\s"'/>]|\/(?=\s)))/],
493
+ ['pun', /^[/<->]+/],
494
+ ['lang-js', /^on\w+\s*=\s*"([^"]+)"/i],
495
+ ['lang-js', /^on\w+\s*=\s*'([^']+)'/i],
496
+ ['lang-js', /^on\w+\s*=\s*([^\s"'>]+)/i],
497
+ ['lang-css', /^style\s*=\s*"([^"]+)"/i],
498
+ ['lang-css', /^style\s*=\s*'([^']+)'/i],
499
+ ['lang-css', /^style\s*=\s*([^\s"'>]+)/i],
500
+ ]
501
+ ),
502
+ ['in.tag']
503
+ );
504
+ k(x([], [['atv', /^[\S\s]+/]]), ['uq.val']);
505
+ k(u({keywords: F, hashComments: !0, cStyleComments: !0, types: K}), [
506
+ 'c',
507
+ 'cc',
508
+ 'cpp',
509
+ 'cxx',
510
+ 'cyc',
511
+ 'm',
512
+ ]);
513
+ k(u({keywords: 'null,true,false'}), ['json']);
514
+ k(u({keywords: H, hashComments: !0, cStyleComments: !0, verbatimStrings: !0, types: K}), ['cs']);
515
+ k(u({keywords: G, cStyleComments: !0}), ['java']);
516
+ k(u({keywords: v, hashComments: !0, multiLineStrings: !0}), ['bsh', 'csh', 'sh']);
517
+ k(u({keywords: I, hashComments: !0, multiLineStrings: !0, tripleQuotedStrings: !0}), [
518
+ 'cv',
519
+ 'py',
520
+ ]);
521
+ k(
522
+ u({
523
+ keywords:
524
+ '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',
525
+ hashComments: !0,
526
+ multiLineStrings: !0,
527
+ regexLiterals: !0,
528
+ }),
529
+ ['perl', 'pl', 'pm']
530
+ );
531
+ k(u({keywords: J, hashComments: !0, multiLineStrings: !0, regexLiterals: !0}), ['rb']);
532
+ k(u({keywords: w, cStyleComments: !0, regexLiterals: !0}), ['js']);
533
+ k(
534
+ u({
535
+ keywords:
536
+ 'all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes',
537
+ hashComments: 3,
538
+ cStyleComments: !0,
539
+ multilineStrings: !0,
540
+ tripleQuotedStrings: !0,
541
+ regexLiterals: !0,
542
+ }),
543
+ ['coffee']
544
+ );
545
+ k(x([], [['str', /^[\S\s]+/]]), ['regex']);
546
+ window.prettyPrintOne = function (a, m, e) {
547
+ var h = document.createElement('PRE');
548
+ h.innerHTML = a;
549
+ e && D(h, e);
550
+ E({g: m, i: e, h: h});
551
+ return h.innerHTML;
552
+ };
553
+ window.prettyPrint = function (a) {
554
+ function m() {
555
+ for (
556
+ var e = window.PR_SHOULD_USE_CONTINUATION ? l.now() + 250 : Infinity;
557
+ p < h.length && l.now() < e;
558
+ p++
559
+ ) {
560
+ var n = h[p],
561
+ k = n.className;
562
+ if (k.indexOf('prettyprint') >= 0) {
563
+ var k = k.match(g),
564
+ f,
565
+ b;
566
+ if ((b = !k)) {
567
+ b = n;
568
+ for (var o = void 0, c = b.firstChild; c; c = c.nextSibling)
569
+ var i = c.nodeType,
570
+ o = i === 1 ? (o ? b : c) : i === 3 ? (N.test(c.nodeValue) ? b : o) : o;
571
+ b = (f = o === b ? void 0 : o) && 'CODE' === f.tagName;
572
+ }
573
+ b && (k = f.className.match(g));
574
+ k && (k = k[1]);
575
+ b = !1;
576
+ for (o = n.parentNode; o; o = o.parentNode)
577
+ if (
578
+ (o.tagName === 'pre' || o.tagName === 'code' || o.tagName === 'xmp') &&
579
+ o.className &&
580
+ o.className.indexOf('prettyprint') >= 0
581
+ ) {
582
+ b = !0;
583
+ break;
584
+ }
585
+ b ||
586
+ ((b = (b = n.className.match(/\blinenums\b(?::(\d+))?/))
587
+ ? b[1] && b[1].length
588
+ ? +b[1]
589
+ : !0
590
+ : !1) && D(n, b),
591
+ (d = {g: k, h: n, i: b}),
592
+ E(d));
593
+ }
594
+ }
595
+ p < h.length ? setTimeout(m, 250) : a && a();
596
+ }
597
+ for (
598
+ var e = [
599
+ document.getElementsByTagName('pre'),
600
+ document.getElementsByTagName('code'),
601
+ document.getElementsByTagName('xmp'),
602
+ ],
603
+ h = [],
604
+ k = 0;
605
+ k < e.length;
606
+ ++k
607
+ )
608
+ for (var t = 0, s = e[k].length; t < s; ++t) h.push(e[k][t]);
609
+ var e = q,
610
+ l = Date;
611
+ l.now ||
612
+ (l = {
613
+ now: function () {
614
+ return +new Date();
615
+ },
616
+ });
617
+ var p = 0,
618
+ d,
619
+ g = /\blang(?:uage)?-([\w.]+)(?!\S)/;
620
+ m();
621
+ };
622
+ window.PR = {
623
+ createSimpleLexer: x,
624
+ registerLangHandler: k,
625
+ sourceDecorator: u,
626
+ PR_ATTRIB_NAME: 'atn',
627
+ PR_ATTRIB_VALUE: 'atv',
628
+ PR_COMMENT: 'com',
629
+ PR_DECLARATION: 'dec',
630
+ PR_KEYWORD: 'kwd',
631
+ PR_LITERAL: 'lit',
632
+ PR_NOCODE: 'nocode',
633
+ PR_PLAIN: 'pln',
634
+ PR_PUNCTUATION: 'pun',
635
+ PR_SOURCE: 'src',
636
+ PR_STRING: 'str',
637
+ PR_TAG: 'tag',
638
+ PR_TYPE: 'typ',
639
+ };
640
+ })();