@magicpixel/rn-mp-client-sdk 0.12.0 → 1.12.1

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 (102) hide show
  1. package/lib/commonjs/common/app-types.js.map +1 -1
  2. package/lib/commonjs/common/constants.js +5 -26
  3. package/lib/commonjs/common/constants.js.map +1 -1
  4. package/lib/commonjs/common/data-store.js +36 -117
  5. package/lib/commonjs/common/data-store.js.map +1 -1
  6. package/lib/commonjs/common/event-bus.js +3 -10
  7. package/lib/commonjs/common/event-bus.js.map +1 -1
  8. package/lib/commonjs/common/logger.js +9 -18
  9. package/lib/commonjs/common/logger.js.map +1 -1
  10. package/lib/commonjs/common/network-service.js +6 -21
  11. package/lib/commonjs/common/network-service.js.map +1 -1
  12. package/lib/commonjs/common/reporter.js +8 -31
  13. package/lib/commonjs/common/reporter.js.map +1 -1
  14. package/lib/commonjs/common/utils.js +64 -65
  15. package/lib/commonjs/common/utils.js.map +1 -1
  16. package/lib/commonjs/coverage/lcov-report/block-navigation.js +6 -19
  17. package/lib/commonjs/coverage/lcov-report/block-navigation.js.map +1 -1
  18. package/lib/commonjs/coverage/lcov-report/prettify.js +2 -182
  19. package/lib/commonjs/coverage/lcov-report/prettify.js.map +1 -1
  20. package/lib/commonjs/coverage/lcov-report/sorter.js +64 -94
  21. package/lib/commonjs/coverage/lcov-report/sorter.js.map +1 -1
  22. package/lib/commonjs/eedl/eedl.js +207 -84
  23. package/lib/commonjs/eedl/eedl.js.map +1 -1
  24. package/lib/commonjs/index.js +104 -95
  25. package/lib/commonjs/index.js.map +1 -1
  26. package/lib/commonjs/models/geo-api-response.js +2 -0
  27. package/lib/commonjs/models/geo-api-response.js.map +1 -0
  28. package/lib/commonjs/models/mp-client-sdk.js +3 -11
  29. package/lib/commonjs/models/mp-client-sdk.js.map +1 -1
  30. package/lib/commonjs/processors/data-element.processor.js +85 -80
  31. package/lib/commonjs/processors/data-element.processor.js.map +1 -1
  32. package/lib/commonjs/processors/geo-location.processor.js +70 -0
  33. package/lib/commonjs/processors/geo-location.processor.js.map +1 -0
  34. package/lib/commonjs/processors/qc.processor.js +2 -25
  35. package/lib/commonjs/processors/qc.processor.js.map +1 -1
  36. package/lib/commonjs/processors/tag.processor.js +17 -86
  37. package/lib/commonjs/processors/tag.processor.js.map +1 -1
  38. package/lib/commonjs/processors/trans-function.processor.js +5 -23
  39. package/lib/commonjs/processors/trans-function.processor.js.map +1 -1
  40. package/lib/commonjs/processors/visit-id.processor.js +4 -50
  41. package/lib/commonjs/processors/visit-id.processor.js.map +1 -1
  42. package/lib/module/common/app-types.js.map +1 -1
  43. package/lib/module/common/constants.js +4 -22
  44. package/lib/module/common/constants.js.map +1 -1
  45. package/lib/module/common/data-store.js +35 -108
  46. package/lib/module/common/data-store.js.map +1 -1
  47. package/lib/module/common/event-bus.js +3 -6
  48. package/lib/module/common/event-bus.js.map +1 -1
  49. package/lib/module/common/logger.js +9 -16
  50. package/lib/module/common/logger.js.map +1 -1
  51. package/lib/module/common/network-service.js +6 -11
  52. package/lib/module/common/network-service.js.map +1 -1
  53. package/lib/module/common/reporter.js +8 -19
  54. package/lib/module/common/reporter.js.map +1 -1
  55. package/lib/module/common/utils.js +63 -56
  56. package/lib/module/common/utils.js.map +1 -1
  57. package/lib/module/coverage/lcov-report/block-navigation.js +6 -19
  58. package/lib/module/coverage/lcov-report/block-navigation.js.map +1 -1
  59. package/lib/module/coverage/lcov-report/prettify.js +2 -182
  60. package/lib/module/coverage/lcov-report/prettify.js.map +1 -1
  61. package/lib/module/coverage/lcov-report/sorter.js +64 -94
  62. package/lib/module/coverage/lcov-report/sorter.js.map +1 -1
  63. package/lib/module/eedl/eedl.js +206 -76
  64. package/lib/module/eedl/eedl.js.map +1 -1
  65. package/lib/module/index.js +102 -57
  66. package/lib/module/index.js.map +1 -1
  67. package/lib/module/models/geo-api-response.js +2 -0
  68. package/lib/module/models/geo-api-response.js.map +1 -0
  69. package/lib/module/models/mp-client-sdk.js +0 -5
  70. package/lib/module/models/mp-client-sdk.js.map +1 -1
  71. package/lib/module/processors/data-element.processor.js +82 -71
  72. package/lib/module/processors/data-element.processor.js.map +1 -1
  73. package/lib/module/processors/geo-location.processor.js +63 -0
  74. package/lib/module/processors/geo-location.processor.js.map +1 -0
  75. package/lib/module/processors/qc.processor.js +2 -11
  76. package/lib/module/processors/qc.processor.js.map +1 -1
  77. package/lib/module/processors/tag.processor.js +17 -57
  78. package/lib/module/processors/tag.processor.js.map +1 -1
  79. package/lib/module/processors/trans-function.processor.js +5 -12
  80. package/lib/module/processors/trans-function.processor.js.map +1 -1
  81. package/lib/module/processors/visit-id.processor.js +4 -27
  82. package/lib/module/processors/visit-id.processor.js.map +1 -1
  83. package/lib/typescript/common/app-types.d.ts +3 -0
  84. package/lib/typescript/common/constants.d.ts +1 -0
  85. package/lib/typescript/common/data-store.d.ts +8 -0
  86. package/lib/typescript/common/utils.d.ts +19 -0
  87. package/lib/typescript/eedl/eedl.d.ts +16 -5
  88. package/lib/typescript/index.d.ts +53 -0
  89. package/lib/typescript/models/geo-api-response.d.ts +12 -0
  90. package/lib/typescript/processors/data-element.processor.d.ts +10 -1
  91. package/lib/typescript/processors/geo-location.processor.d.ts +10 -0
  92. package/package.json +25 -10
  93. package/src/common/app-types.ts +3 -0
  94. package/src/common/constants.ts +2 -0
  95. package/src/common/data-store.ts +38 -0
  96. package/src/common/network-service.ts +2 -0
  97. package/src/common/utils.ts +58 -0
  98. package/src/eedl/eedl.ts +241 -18
  99. package/src/index.tsx +98 -3
  100. package/src/models/geo-api-response.ts +13 -0
  101. package/src/processors/data-element.processor.ts +140 -70
  102. package/src/processors/geo-location.processor.ts +91 -0
@@ -1,6 +1,5 @@
1
1
  /* eslint-disable */
2
2
  window.PR_SHOULD_USE_CONTINUATION = true;
3
-
4
3
  (function () {
5
4
  var h = ["break,continue,do,else,for,if,return,while"];
6
5
  var u = [h, "auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"];
@@ -30,15 +29,12 @@ window.PR_SHOULD_USE_CONTINUATION = true;
30
29
  var n = "atv";
31
30
  var N = "nocode";
32
31
  var M = "(?:^^\\.?|[+-]|\\!|\\!=|\\!==|\\#|\\%|\\%=|&|&&|&&=|&=|\\(|\\*|\\*=|\\+=|\\,|\\-=|\\->|\\/|\\/=|:|::|\\;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|\\?|\\@|\\[|\\^|\\^=|\\^\\^|\\^\\^=|\\{|\\||\\|=|\\|\\||\\|\\|=|\\~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";
33
-
34
32
  function k(Z) {
35
33
  var ad = 0;
36
34
  var S = false;
37
35
  var ac = false;
38
-
39
36
  for (var V = 0, U = Z.length; V < U; ++V) {
40
37
  var ae = Z[V];
41
-
42
38
  if (ae.ignoreCase) {
43
39
  ac = true;
44
40
  } else {
@@ -49,7 +45,6 @@ window.PR_SHOULD_USE_CONTINUATION = true;
49
45
  }
50
46
  }
51
47
  }
52
-
53
48
  var Y = {
54
49
  b: 8,
55
50
  t: 9,
@@ -58,17 +53,13 @@ window.PR_SHOULD_USE_CONTINUATION = true;
58
53
  f: 12,
59
54
  r: 13
60
55
  };
61
-
62
56
  function ab(ah) {
63
57
  var ag = ah.charCodeAt(0);
64
-
65
58
  if (ag !== 92) {
66
59
  return ag;
67
60
  }
68
-
69
61
  var af = ah.charAt(1);
70
62
  ag = Y[af];
71
-
72
63
  if (ag) {
73
64
  return ag;
74
65
  } else {
@@ -83,156 +74,123 @@ window.PR_SHOULD_USE_CONTINUATION = true;
83
74
  }
84
75
  }
85
76
  }
86
-
87
77
  function T(af) {
88
78
  if (af < 32) {
89
79
  return (af < 16 ? "\\x0" : "\\x") + af.toString(16);
90
80
  }
91
-
92
81
  var ag = String.fromCharCode(af);
93
-
94
82
  if (ag === "\\" || ag === "-" || ag === "[" || ag === "]") {
95
83
  ag = "\\" + ag;
96
84
  }
97
-
98
85
  return ag;
99
86
  }
100
-
101
87
  function X(am) {
102
88
  var aq = am.substring(1, am.length - 1).match(new 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"));
103
89
  var ak = [];
104
90
  var af = [];
105
91
  var ao = aq[0] === "^";
106
-
107
92
  for (var ar = ao ? 1 : 0, aj = aq.length; ar < aj; ++ar) {
108
93
  var ah = aq[ar];
109
-
110
94
  if (/\\[bdsw]/i.test(ah)) {
111
95
  ak.push(ah);
112
96
  } else {
113
97
  var ag = ab(ah);
114
98
  var al;
115
-
116
99
  if (ar + 2 < aj && "-" === aq[ar + 1]) {
117
100
  al = ab(aq[ar + 2]);
118
101
  ar += 2;
119
102
  } else {
120
103
  al = ag;
121
104
  }
122
-
123
105
  af.push([ag, al]);
124
-
125
106
  if (!(al < 65 || ag > 122)) {
126
107
  if (!(al < 65 || ag > 90)) {
127
108
  af.push([Math.max(65, ag) | 32, Math.min(al, 90) | 32]);
128
109
  }
129
-
130
110
  if (!(al < 97 || ag > 122)) {
131
111
  af.push([Math.max(97, ag) & ~32, Math.min(al, 122) & ~32]);
132
112
  }
133
113
  }
134
114
  }
135
115
  }
136
-
137
116
  af.sort(function (av, au) {
138
117
  return av[0] - au[0] || au[1] - av[1];
139
118
  });
140
119
  var ai = [];
141
120
  var ap = [NaN, NaN];
142
-
143
121
  for (var ar = 0; ar < af.length; ++ar) {
144
122
  var at = af[ar];
145
-
146
123
  if (at[0] <= ap[1] + 1) {
147
124
  ap[1] = Math.max(ap[1], at[1]);
148
125
  } else {
149
126
  ai.push(ap = at);
150
127
  }
151
128
  }
152
-
153
129
  var an = ["["];
154
-
155
130
  if (ao) {
156
131
  an.push("^");
157
132
  }
158
-
159
133
  an.push.apply(an, ak);
160
-
161
134
  for (var ar = 0; ar < ai.length; ++ar) {
162
135
  var at = ai[ar];
163
136
  an.push(T(at[0]));
164
-
165
137
  if (at[1] > at[0]) {
166
138
  if (at[1] + 1 > at[0]) {
167
139
  an.push("-");
168
140
  }
169
-
170
141
  an.push(T(at[1]));
171
142
  }
172
143
  }
173
-
174
144
  an.push("]");
175
145
  return an.join("");
176
146
  }
177
-
178
147
  function W(al) {
179
148
  var aj = al.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)", "g"));
180
149
  var ah = aj.length;
181
150
  var an = [];
182
-
183
151
  for (var ak = 0, am = 0; ak < ah; ++ak) {
184
152
  var ag = aj[ak];
185
-
186
153
  if (ag === "(") {
187
154
  ++am;
188
155
  } else {
189
156
  if ("\\" === ag.charAt(0)) {
190
157
  var af = +ag.substring(1);
191
-
192
158
  if (af && af <= am) {
193
159
  an[af] = -1;
194
160
  }
195
161
  }
196
162
  }
197
163
  }
198
-
199
164
  for (var ak = 1; ak < an.length; ++ak) {
200
165
  if (-1 === an[ak]) {
201
166
  an[ak] = ++ad;
202
167
  }
203
168
  }
204
-
205
169
  for (var ak = 0, am = 0; ak < ah; ++ak) {
206
170
  var ag = aj[ak];
207
-
208
171
  if (ag === "(") {
209
172
  ++am;
210
-
211
173
  if (an[am] === undefined) {
212
174
  aj[ak] = "(?:";
213
175
  }
214
176
  } else {
215
177
  if ("\\" === ag.charAt(0)) {
216
178
  var af = +ag.substring(1);
217
-
218
179
  if (af && af <= am) {
219
180
  aj[ak] = "\\" + an[am];
220
181
  }
221
182
  }
222
183
  }
223
184
  }
224
-
225
185
  for (var ak = 0, am = 0; ak < ah; ++ak) {
226
186
  if ("^" === aj[ak] && "^" !== aj[ak + 1]) {
227
187
  aj[ak] = "";
228
188
  }
229
189
  }
230
-
231
190
  if (al.ignoreCase && S) {
232
191
  for (var ak = 0; ak < ah; ++ak) {
233
192
  var ag = aj[ak];
234
193
  var ai = ag.charAt(0);
235
-
236
194
  if (ag.length >= 2 && ai === "[") {
237
195
  aj[ak] = X(ag);
238
196
  } else {
@@ -245,25 +203,18 @@ window.PR_SHOULD_USE_CONTINUATION = true;
245
203
  }
246
204
  }
247
205
  }
248
-
249
206
  return aj.join("");
250
207
  }
251
-
252
208
  var aa = [];
253
-
254
209
  for (var V = 0, U = Z.length; V < U; ++V) {
255
210
  var ae = Z[V];
256
-
257
211
  if (ae.global || ae.multiline) {
258
212
  throw new Error("" + ae);
259
213
  }
260
-
261
214
  aa.push("(?:" + W(ae) + ")");
262
215
  }
263
-
264
216
  return new RegExp(aa.join("|"), ac ? "gi" : "g");
265
217
  }
266
-
267
218
  function a(V) {
268
219
  var U = /(?:^|\s)nocode(?:\s|$)/;
269
220
  var X = [];
@@ -271,7 +222,6 @@ window.PR_SHOULD_USE_CONTINUATION = true;
271
222
  var Z = [];
272
223
  var W = 0;
273
224
  var S;
274
-
275
225
  if (V.currentStyle) {
276
226
  S = V.currentStyle.whiteSpace;
277
227
  } else {
@@ -279,63 +229,50 @@ window.PR_SHOULD_USE_CONTINUATION = true;
279
229
  S = document.defaultView.getComputedStyle(V, null).getPropertyValue("white-space");
280
230
  }
281
231
  }
282
-
283
232
  var Y = S && "pre" === S.substring(0, 3);
284
-
285
233
  function aa(ab) {
286
234
  switch (ab.nodeType) {
287
235
  case 1:
288
236
  if (U.test(ab.className)) {
289
237
  return;
290
238
  }
291
-
292
239
  for (var ae = ab.firstChild; ae; ae = ae.nextSibling) {
293
240
  aa(ae);
294
241
  }
295
-
296
242
  var ad = ab.nodeName;
297
-
298
243
  if ("BR" === ad || "LI" === ad) {
299
244
  X[W] = "\n";
300
245
  Z[W << 1] = T++;
301
246
  Z[W++ << 1 | 1] = ab;
302
247
  }
303
-
304
248
  break;
305
-
306
249
  case 3:
307
250
  case 4:
308
251
  var ac = ab.nodeValue;
309
-
310
252
  if (ac.length) {
311
253
  if (!Y) {
312
254
  ac = ac.replace(/[ \t\r\n]+/g, " ");
313
255
  } else {
314
256
  ac = ac.replace(/\r\n?/g, "\n");
315
257
  }
316
-
317
258
  X[W] = ac;
318
259
  Z[W << 1] = T;
319
260
  T += ac.length;
320
261
  Z[W++ << 1 | 1] = ab;
321
262
  }
322
-
323
263
  break;
324
264
  }
325
265
  }
326
-
327
266
  aa(V);
328
267
  return {
329
268
  sourceCode: X.join("").replace(/\n$/, ""),
330
269
  spans: Z
331
270
  };
332
271
  }
333
-
334
272
  function B(S, U, W, T) {
335
273
  if (!U) {
336
274
  return;
337
275
  }
338
-
339
276
  var V = {
340
277
  sourceCode: U,
341
278
  basePos: S
@@ -343,73 +280,57 @@ window.PR_SHOULD_USE_CONTINUATION = true;
343
280
  W(V);
344
281
  T.push.apply(T, V.decorations);
345
282
  }
346
-
347
283
  var v = /\S/;
348
-
349
284
  function o(S) {
350
285
  var V = undefined;
351
-
352
286
  for (var U = S.firstChild; U; U = U.nextSibling) {
353
287
  var T = U.nodeType;
354
288
  V = T === 1 ? V ? S : U : T === 3 ? v.test(U.nodeValue) ? S : V : V;
355
289
  }
356
-
357
290
  return V === S ? undefined : V;
358
291
  }
359
-
360
292
  function g(U, T) {
361
293
  var S = {};
362
294
  var V;
363
-
364
295
  (function () {
365
296
  var ad = U.concat(T);
366
297
  var ah = [];
367
298
  var ag = {};
368
-
369
299
  for (var ab = 0, Z = ad.length; ab < Z; ++ab) {
370
300
  var Y = ad[ab];
371
301
  var ac = Y[3];
372
-
373
302
  if (ac) {
374
303
  for (var ae = ac.length; --ae >= 0;) {
375
304
  S[ac.charAt(ae)] = Y;
376
305
  }
377
306
  }
378
-
379
307
  var af = Y[1];
380
308
  var aa = "" + af;
381
-
382
309
  if (!ag.hasOwnProperty(aa)) {
383
310
  ah.push(af);
384
311
  ag[aa] = null;
385
312
  }
386
313
  }
387
-
388
314
  ah.push(/[\0-\uffff]/);
389
315
  V = k(ah);
390
316
  })();
391
-
392
317
  var X = T.length;
393
-
394
318
  var W = function (ah) {
395
319
  var Z = ah.sourceCode,
396
- Y = ah.basePos;
320
+ Y = ah.basePos;
397
321
  var ad = [Y, F];
398
322
  var af = 0;
399
323
  var an = Z.match(V) || [];
400
324
  var aj = {};
401
-
402
325
  for (var ae = 0, aq = an.length; ae < aq; ++ae) {
403
326
  var ag = an[ae];
404
327
  var ap = aj[ag];
405
328
  var ai = void 0;
406
329
  var am;
407
-
408
330
  if (typeof ap === "string") {
409
331
  am = false;
410
332
  } else {
411
333
  var aa = S[ag.charAt(0)];
412
-
413
334
  if (aa) {
414
335
  ai = ag.match(aa[1]);
415
336
  ap = aa[0];
@@ -417,62 +338,49 @@ window.PR_SHOULD_USE_CONTINUATION = true;
417
338
  for (var ao = 0; ao < X; ++ao) {
418
339
  aa = T[ao];
419
340
  ai = ag.match(aa[1]);
420
-
421
341
  if (ai) {
422
342
  ap = aa[0];
423
343
  break;
424
344
  }
425
345
  }
426
-
427
346
  if (!ai) {
428
347
  ap = F;
429
348
  }
430
349
  }
431
-
432
350
  am = ap.length >= 5 && "lang-" === ap.substring(0, 5);
433
-
434
351
  if (am && !(ai && typeof ai[1] === "string")) {
435
352
  am = false;
436
353
  ap = J;
437
354
  }
438
-
439
355
  if (!am) {
440
356
  aj[ag] = ap;
441
357
  }
442
358
  }
443
-
444
359
  var ab = af;
445
360
  af += ag.length;
446
-
447
361
  if (!am) {
448
362
  ad.push(Y + ab, ap);
449
363
  } else {
450
364
  var al = ai[1];
451
365
  var ak = ag.indexOf(al);
452
366
  var ac = ak + al.length;
453
-
454
367
  if (ai[2]) {
455
368
  ac = ag.length - ai[2].length;
456
369
  ak = ac - al.length;
457
370
  }
458
-
459
371
  var ar = ap.substring(5);
460
372
  B(Y + ab, ag.substring(0, ak), W, ad);
461
373
  B(Y + ab + ak, al, q(ar, al), ad);
462
374
  B(Y + ab + ac, ag.substring(ac), W, ad);
463
375
  }
464
376
  }
465
-
466
377
  ah.decorations = ad;
467
378
  };
468
-
469
379
  return W;
470
380
  }
471
-
472
381
  function i(T) {
473
382
  var W = [],
474
- S = [];
475
-
383
+ S = [];
476
384
  if (T.tripleQuotedStrings) {
477
385
  W.push([C, /^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/, null, "'\""]);
478
386
  } else {
@@ -482,13 +390,10 @@ window.PR_SHOULD_USE_CONTINUATION = true;
482
390
  W.push([C, /^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/, null, "\"'"]);
483
391
  }
484
392
  }
485
-
486
393
  if (T.verbatimStrings) {
487
394
  S.push([C, /^@\"(?:[^\"]|\"\")*(?:\"|$)/, null]);
488
395
  }
489
-
490
396
  var Y = T.hashComments;
491
-
492
397
  if (Y) {
493
398
  if (T.cStyleComments) {
494
399
  if (Y > 1) {
@@ -496,40 +401,31 @@ window.PR_SHOULD_USE_CONTINUATION = true;
496
401
  } else {
497
402
  W.push([j, /^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\r\n]*)/, null, "#"]);
498
403
  }
499
-
500
404
  S.push([C, /^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/, null]);
501
405
  } else {
502
406
  W.push([j, /^#[^\r\n]*/, null, "#"]);
503
407
  }
504
408
  }
505
-
506
409
  if (T.cStyleComments) {
507
410
  S.push([j, /^\/\/[^\r\n]*/, null]);
508
411
  S.push([j, /^\/\*[\s\S]*?(?:\*\/|$)/, null]);
509
412
  }
510
-
511
413
  if (T.regexLiterals) {
512
414
  var X = "/(?=[^/*])(?:[^/\\x5B\\x5C]|\\x5C[\\s\\S]|\\x5B(?:[^\\x5C\\x5D]|\\x5C[\\s\\S])*(?:\\x5D|$))+/";
513
415
  S.push(["lang-regex", new RegExp("^" + M + "(" + X + ")")]);
514
416
  }
515
-
516
417
  var V = T.types;
517
-
518
418
  if (V) {
519
419
  S.push([O, V]);
520
420
  }
521
-
522
421
  var U = ("" + T.keywords).replace(/^ | $/g, "");
523
-
524
422
  if (U.length) {
525
423
  S.push([z, new RegExp("^(?:" + U.replace(/[\s,]+/g, "|") + ")\\b"), null]);
526
424
  }
527
-
528
425
  W.push([F, /^\s+/, null, " \r\n\t\xA0"]);
529
426
  S.push([G, /^@[a-z_$][a-z_$@0-9]*/i, null], [O, /^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/, null], [F, /^[a-z_$][a-z_$@0-9]*/i, null], [G, new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*", "i"), null, "0123456789"], [F, /^\\[\s\S]?/, null], [L, /^.[^\s\w\.$@\'\"\`\/\#\\]*/, null]);
530
427
  return g(W, S);
531
428
  }
532
-
533
429
  var K = i({
534
430
  keywords: A,
535
431
  hashComments: true,
@@ -537,13 +433,11 @@ window.PR_SHOULD_USE_CONTINUATION = true;
537
433
  multiLineStrings: true,
538
434
  regexLiterals: true
539
435
  });
540
-
541
436
  function Q(V, ag) {
542
437
  var U = /(?:^|\s)nocode(?:\s|$)/;
543
438
  var ab = /\r\n?|\n/;
544
439
  var ac = V.ownerDocument;
545
440
  var S;
546
-
547
441
  if (V.currentStyle) {
548
442
  S = V.currentStyle.whiteSpace;
549
443
  } else {
@@ -551,26 +445,20 @@ window.PR_SHOULD_USE_CONTINUATION = true;
551
445
  S = ac.defaultView.getComputedStyle(V, null).getPropertyValue("white-space");
552
446
  }
553
447
  }
554
-
555
448
  var Z = S && "pre" === S.substring(0, 3);
556
449
  var af = ac.createElement("LI");
557
-
558
450
  while (V.firstChild) {
559
451
  af.appendChild(V.firstChild);
560
452
  }
561
-
562
453
  var W = [af];
563
-
564
454
  function ae(al) {
565
455
  switch (al.nodeType) {
566
456
  case 1:
567
457
  if (U.test(al.className)) {
568
458
  break;
569
459
  }
570
-
571
460
  if ("BR" === al.nodeName) {
572
461
  ad(al);
573
-
574
462
  if (al.parentNode) {
575
463
  al.parentNode.removeChild(al);
576
464
  }
@@ -579,99 +467,75 @@ window.PR_SHOULD_USE_CONTINUATION = true;
579
467
  ae(an);
580
468
  }
581
469
  }
582
-
583
470
  break;
584
-
585
471
  case 3:
586
472
  case 4:
587
473
  if (Z) {
588
474
  var am = al.nodeValue;
589
475
  var aj = am.match(ab);
590
-
591
476
  if (aj) {
592
477
  var ai = am.substring(0, aj.index);
593
478
  al.nodeValue = ai;
594
479
  var ah = am.substring(aj.index + aj[0].length);
595
-
596
480
  if (ah) {
597
481
  var ak = al.parentNode;
598
482
  ak.insertBefore(ac.createTextNode(ah), al.nextSibling);
599
483
  }
600
-
601
484
  ad(al);
602
-
603
485
  if (!ai) {
604
486
  al.parentNode.removeChild(al);
605
487
  }
606
488
  }
607
489
  }
608
-
609
490
  break;
610
491
  }
611
492
  }
612
-
613
493
  function ad(ak) {
614
494
  while (!ak.nextSibling) {
615
495
  ak = ak.parentNode;
616
-
617
496
  if (!ak) {
618
497
  return;
619
498
  }
620
499
  }
621
-
622
500
  function ai(al, ar) {
623
501
  var aq = ar ? al.cloneNode(false) : al;
624
502
  var ao = al.parentNode;
625
-
626
503
  if (ao) {
627
504
  var ap = ai(ao, 1);
628
505
  var an = al.nextSibling;
629
506
  ap.appendChild(aq);
630
-
631
507
  for (var am = an; am; am = an) {
632
508
  an = am.nextSibling;
633
509
  ap.appendChild(am);
634
510
  }
635
511
  }
636
-
637
512
  return aq;
638
513
  }
639
-
640
514
  var ah = ai(ak.nextSibling, 0);
641
-
642
515
  for (var aj; (aj = ah.parentNode) && aj.nodeType === 1;) {
643
516
  ah = aj;
644
517
  }
645
-
646
518
  W.push(ah);
647
519
  }
648
-
649
520
  for (var Y = 0; Y < W.length; ++Y) {
650
521
  ae(W[Y]);
651
522
  }
652
-
653
523
  if (ag === (ag | 0)) {
654
524
  W[0].setAttribute("value", ag);
655
525
  }
656
-
657
526
  var aa = ac.createElement("OL");
658
527
  aa.className = "linenums";
659
528
  var X = Math.max(0, ag - 1 | 0) || 0;
660
-
661
529
  for (var Y = 0, T = W.length; Y < T; ++Y) {
662
530
  af = W[Y];
663
531
  af.className = "L" + (Y + X) % 10;
664
-
665
532
  if (!af.firstChild) {
666
533
  af.appendChild(ac.createTextNode("\xA0"));
667
534
  }
668
-
669
535
  aa.appendChild(af);
670
536
  }
671
-
672
537
  V.appendChild(aa);
673
538
  }
674
-
675
539
  function D(ac) {
676
540
  var aj = /\bMSIE\b/.test(navigator.userAgent);
677
541
  var am = /\n/g;
@@ -686,7 +550,6 @@ window.PR_SHOULD_USE_CONTINUATION = true;
686
550
  var Z = 0;
687
551
  X[Y] = an;
688
552
  var ar, aq;
689
-
690
553
  for (aq = ar = 0; aq < Y;) {
691
554
  if (X[aq] !== X[aq + 2]) {
692
555
  X[ar++] = X[aq++];
@@ -695,26 +558,20 @@ window.PR_SHOULD_USE_CONTINUATION = true;
695
558
  aq += 2;
696
559
  }
697
560
  }
698
-
699
561
  Y = ar;
700
-
701
562
  for (aq = ar = 0; aq < Y;) {
702
563
  var at = X[aq];
703
564
  var ab = X[aq + 1];
704
565
  var W = aq + 2;
705
-
706
566
  while (W + 2 <= Y && X[W + 1] === ab) {
707
567
  W += 2;
708
568
  }
709
-
710
569
  X[ar++] = at;
711
570
  X[ar++] = ab;
712
571
  aq = W;
713
572
  }
714
-
715
573
  Y = X.length = ar;
716
574
  var ae = null;
717
-
718
575
  while (ah < T) {
719
576
  var af = aa[ah];
720
577
  var S = aa[ah + 2] || an;
@@ -723,12 +580,10 @@ window.PR_SHOULD_USE_CONTINUATION = true;
723
580
  var W = Math.min(S, ap);
724
581
  var ak = aa[ah + 1];
725
582
  var U;
726
-
727
583
  if (ak.nodeType !== 1 && (U = al.substring(V, W))) {
728
584
  if (aj) {
729
585
  U = U.replace(am, "\r");
730
586
  }
731
-
732
587
  ak.nodeValue = U;
733
588
  var ai = ak.ownerDocument;
734
589
  var ao = ai.createElement("SPAN");
@@ -736,31 +591,24 @@ window.PR_SHOULD_USE_CONTINUATION = true;
736
591
  var ad = ak.parentNode;
737
592
  ad.replaceChild(ao, ak);
738
593
  ao.appendChild(ak);
739
-
740
594
  if (V < S) {
741
595
  aa[ah + 1] = ak = ai.createTextNode(al.substring(W, S));
742
596
  ad.insertBefore(ak, ao.nextSibling);
743
597
  }
744
598
  }
745
-
746
599
  V = W;
747
-
748
600
  if (V >= S) {
749
601
  ah += 2;
750
602
  }
751
-
752
603
  if (V >= ap) {
753
604
  Z += 2;
754
605
  }
755
606
  }
756
607
  }
757
-
758
608
  var t = {};
759
-
760
609
  function c(U, V) {
761
610
  for (var S = V.length; --S >= 0;) {
762
611
  var T = V[S];
763
-
764
612
  if (!t.hasOwnProperty(T)) {
765
613
  t[T] = U;
766
614
  } else {
@@ -770,15 +618,12 @@ window.PR_SHOULD_USE_CONTINUATION = true;
770
618
  }
771
619
  }
772
620
  }
773
-
774
621
  function q(T, S) {
775
622
  if (!(T && t.hasOwnProperty(T))) {
776
623
  T = /^\s*</.test(S) ? "default-markup" : "default-code";
777
624
  }
778
-
779
625
  return t[T];
780
626
  }
781
-
782
627
  c(K, ["default-code"]);
783
628
  c(g([], [[F, /^[^<?]+/], [E, /^<!\w[^>]*(?:>|$)/], [j, /^<\!--[\s\S]*?(?:-\->|$)/], ["lang-", /^<\?([\s\S]+?)(?:\?>|$)/], ["lang-", /^<%([\s\S]+?)(?:%>|$)/], [L, /^(?:<[%?]|[%?]>)/], ["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"]);
784
629
  c(g([[F, /^[\s]+/, null, " \t\r\n"], [n, /^(?:\"[^\"]*\"?|\'[^\']*\'?)/, null, "\"'"]], [[m, /^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i], [P, /^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i], ["lang-uq.val", /^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/], [L, /^[=<>\/]+/], ["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"]);
@@ -840,10 +685,8 @@ window.PR_SHOULD_USE_CONTINUATION = true;
840
685
  regexLiterals: true
841
686
  }), ["coffee"]);
842
687
  c(g([], [[C, /^[\s\S]+/]]), ["regex"]);
843
-
844
688
  function d(V) {
845
689
  var U = V.langExtension;
846
-
847
690
  try {
848
691
  var S = a(V.sourceNode);
849
692
  var T = S.sourceCode;
@@ -858,15 +701,12 @@ window.PR_SHOULD_USE_CONTINUATION = true;
858
701
  }
859
702
  }
860
703
  }
861
-
862
704
  function y(W, V, U) {
863
705
  var S = document.createElement("PRE");
864
706
  S.innerHTML = W;
865
-
866
707
  if (U) {
867
708
  Q(S, U);
868
709
  }
869
-
870
710
  var T = {
871
711
  langExtension: V,
872
712
  numberLines: U,
@@ -875,24 +715,19 @@ window.PR_SHOULD_USE_CONTINUATION = true;
875
715
  d(T);
876
716
  return S.innerHTML;
877
717
  }
878
-
879
718
  function b(ad) {
880
719
  function Y(af) {
881
720
  return document.getElementsByTagName(af);
882
721
  }
883
-
884
722
  var ac = [Y("pre"), Y("code"), Y("xmp")];
885
723
  var T = [];
886
-
887
724
  for (var aa = 0; aa < ac.length; ++aa) {
888
725
  for (var Z = 0, V = ac[aa].length; Z < V; ++Z) {
889
726
  T.push(ac[aa][Z]);
890
727
  }
891
728
  }
892
-
893
729
  ac = null;
894
730
  var W = Date;
895
-
896
731
  if (!W.now) {
897
732
  W = {
898
733
  now: function () {
@@ -900,48 +735,37 @@ window.PR_SHOULD_USE_CONTINUATION = true;
900
735
  }
901
736
  };
902
737
  }
903
-
904
738
  var X = 0;
905
739
  var S;
906
740
  var ab = /\blang(?:uage)?-([\w.]+)(?!\S)/;
907
741
  var ae = /\bprettyprint\b/;
908
-
909
742
  function U() {
910
743
  var ag = window.PR_SHOULD_USE_CONTINUATION ? W.now() + 250 : Infinity;
911
-
912
744
  for (; X < T.length && W.now() < ag; X++) {
913
745
  var aj = T[X];
914
746
  var ai = aj.className;
915
-
916
747
  if (ai.indexOf("prettyprint") >= 0) {
917
748
  var ah = ai.match(ab);
918
749
  var am;
919
-
920
750
  if (!ah && (am = o(aj)) && "CODE" === am.tagName) {
921
751
  ah = am.className.match(ab);
922
752
  }
923
-
924
753
  if (ah) {
925
754
  ah = ah[1];
926
755
  }
927
-
928
756
  var al = false;
929
-
930
757
  for (var ak = aj.parentNode; ak; ak = ak.parentNode) {
931
758
  if ((ak.tagName === "pre" || ak.tagName === "code" || ak.tagName === "xmp") && ak.className && ak.className.indexOf("prettyprint") >= 0) {
932
759
  al = true;
933
760
  break;
934
761
  }
935
762
  }
936
-
937
763
  if (!al) {
938
764
  var af = aj.className.match(/\blinenums\b(?::(\d+))?/);
939
765
  af = af ? af[1] && af[1].length ? +af[1] : true : false;
940
-
941
766
  if (af) {
942
767
  Q(aj, af);
943
768
  }
944
-
945
769
  S = {
946
770
  langExtension: ah,
947
771
  sourceNode: aj,
@@ -951,7 +775,6 @@ window.PR_SHOULD_USE_CONTINUATION = true;
951
775
  }
952
776
  }
953
777
  }
954
-
955
778
  if (X < T.length) {
956
779
  setTimeout(U, 250);
957
780
  } else {
@@ -960,10 +783,8 @@ window.PR_SHOULD_USE_CONTINUATION = true;
960
783
  }
961
784
  }
962
785
  }
963
-
964
786
  U();
965
787
  }
966
-
967
788
  window.prettyPrintOne = y;
968
789
  window.prettyPrint = b;
969
790
  window.PR = {
@@ -985,7 +806,6 @@ window.PR_SHOULD_USE_CONTINUATION = true;
985
806
  PR_TYPE: O
986
807
  };
987
808
  })();
988
-
989
809
  PR.registerLangHandler(PR.createSimpleLexer([], [[PR.PR_DECLARATION, /^<!\w[^>]*(?:>|$)/], [PR.PR_COMMENT, /^<\!--[\s\S]*?(?:-\->|$)/], [PR.PR_PUNCTUATION, /^(?:<[%?]|[%?]>)/], ["lang-", /^<\?([\s\S]+?)(?:\?>|$)/], ["lang-", /^<%([\s\S]+?)(?:%>|$)/], ["lang-", /^<xmp\b[^>]*>([\s\S]+?)<\/xmp\b[^>]*>/i], ["lang-handlebars", /^<script\b[^>]*type\s*=\s*['"]?text\/x-handlebars-template['"]?\b[^>]*>([\s\S]*?)(<\/script\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], [PR.PR_DECLARATION, /^{{[#^>/]?\s*[\w.][^}]*}}/], [PR.PR_DECLARATION, /^{{&?\s*[\w.][^}]*}}/], [PR.PR_DECLARATION, /^{{{>?\s*[\w.][^}]*}}}/], [PR.PR_COMMENT, /^{{![^}]*}}/]]), ["handlebars", "hbs"]);
990
810
  PR.registerLangHandler(PR.createSimpleLexer([[PR.PR_PLAIN, /^[ \t\r\n\f]+/, null, " \t\r\n\f"]], [[PR.PR_STRING, /^\"(?:[^\n\r\f\\\"]|\\(?:\r\n?|\n|\f)|\\[\s\S])*\"/, null], [PR.PR_STRING, /^\'(?:[^\n\r\f\\\']|\\(?:\r\n?|\n|\f)|\\[\s\S])*\'/, null], ["lang-css-str", /^url\(([^\)\"\']*)\)/i], [PR.PR_KEYWORD, /^(?:url|rgb|\!important|@import|@page|@media|@charset|inherit)(?=[^\-\w]|$)/i, null], ["lang-css-kw", /^(-?(?:[_a-z]|(?:\\[0-9a-f]+ ?))(?:[_a-z0-9\-]|\\(?:\\[0-9a-f]+ ?))*)\s*:/i], [PR.PR_COMMENT, /^\/\*[^*]*\*+(?:[^\/*][^*]*\*+)*\//], [PR.PR_COMMENT, /^(?:<!--|-->)/], [PR.PR_LITERAL, /^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i], [PR.PR_LITERAL, /^#(?:[0-9a-f]{3}){1,2}/i], [PR.PR_PLAIN, /^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i], [PR.PR_PUNCTUATION, /^[^\s\w\'\"]+/]]), ["css"]);
991
811
  PR.registerLangHandler(PR.createSimpleLexer([], [[PR.PR_KEYWORD, /^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i]]), ["css-kw"]);