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

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