-
Notifications
You must be signed in to change notification settings - Fork 0
/
std.js
5211 lines (4486 loc) · 126 KB
/
std.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*
* 2.1.991.0
* COPYRIGHT (c) 2017 mScroll
*/
/* namespace */ var std = {};
(function (std){
"use strict";
var __u;
var __v;
var __w;
var __x;
var __s;
var __t;
var __r;
var _WINDOW = window;
var _DATE = _WINDOW.Date;
var _MATH = _WINDOW.Math;
var _UINT8ARRAY = _WINDOW.Uint8Array;
var _CEIL = _MATH.ceil;
var _FLOOR = _MATH.floor;
var _POW = _MATH.pow;
var _LOG = _MATH.log;
var _RANDOM = _MATH.random;
var _AUDIO = _WINDOW.Audio;
var _SETTIMEOUT = _WINDOW.setTimeout;
var _NAVIGATOR = _WINDOW.navigator;
var _DOCUMENT = _WINDOW.document;
var _DOCUMENTELEMENT = _DOCUMENT.documentElement;
var _BODY = _DOCUMENT.body;
var _CHARAT = "charAt";
var _INDEXOF = "indexOf";
var _SUBSTRING = "substring";
var _GETTIME = "getTime";
var _TOUTCSTRING = "toUTCString";
var _TOSTRING = "toString";
var _VALUEOF = "valueOf";
var _APPLY = "apply";
var _LENGTH = "length";
var _BUFFER = "buffer";
var _BYTEOFFSET = "byteOffset";
var _USERAGENT = "userAgent";
var _EVENT = "event";
var _KEYCODE = "keyCode";
var _LOCALSTORAGE = "localStorage";
var _GETITEM = "getItem";
var _SETITEM = "setItem";
var _REMOVEITEM = "removeItem";
var _COOKIE = "cookie";
var _GETELEMENTBYID = "getElementById";
var _ONRESIZE = "onresize";
var _ONKEYDOWN = "onkeydown";
var _ONKEYUP = "onkeyup";
var _ONCONTEXTMENU = "oncontextmenu";
var _ONSELECTSTART = "onselectstart";
var _ONDRAGSTART = "ondragstart";
var _ONDRAG = "ondrag";
var _ONDRAGENTER = "ondragenter";
var _ONDRAGOVER = "ondragover";
var _ONDROP = "ondrop";
var _CLIENTWIDTH = "clientWidth";
var _CLIENTHEIGHT = "clientHeight";
var _TITLE = "title";
var _STYLE = "style";
var _AUTOPLAY = "autoplay";
var _PRELOAD = "preload";
var _AUTO = "auto";
var _BODY_STYLE = _BODY[_STYLE];
var _TYPEOF_STRING = typeof "";
var _TYPEOF_ARRAY = typeof [];
var _UNDEFINED = _WINDOW.undefined;
var _NULL = null;
var _EOF;
var _EMPTY;
var _E0;
var _BITS_CHAR;
var _BYTES_WORD;
var _BASE_BIT;
var _BITS_NIBBLE;
var _BITSPERHEX;
var _DIGITS;
var _LOG2_MAX;
var _EXP2;
var _WORD_MAX;
var _LOG2E;
var _BASE_0X;
var _BASE_MAX;
var _BASE64;
var _BASE10;
var _LOG16_MAX;
var _EXP16;
var _LN16;
var _LOG64_MAX;
var _EXP64;
var _LN64;
var _SIZE_T_MAX;
var _MILLIS;
var _BASE_HOURS;
var _LOG60_MAX;
var _EXP60;
var _BASE_DECIMAL;
var _INITSHFT;
var _RB;
var _LOG2;
var _LOG16;
var _LOG64;
var _BASE_ENCODE;
var _BASE_DECODE;
var _REV;
var _Rand1;
var _Rand2;
var _Rand3;
var _Rand4;
var _Enum;
var _Milliseconds;
var _Seconds;
var _STD_ZLIB;
var _EOB;
var _EOB1;
var _FHFMN_L;
var _DIST_L;
var _FHFMN;
var _FHFMN2;
var _DIST;
var _DIST2;
var _LZMIN;
var _LZFWD;
var _LZMAX;
var _LIT77;
var _DIST77;
var _LZLIT;
var _ORDER;
var _BHDR;
var _BHDR_L;
var _CMFLG;
var _CMFLG_L;
var _ADLER32_HALF;
var _ADLER32_MOD;
var _ADLER32_LEN;
var _CRC32_POLYNOMIAL;
var _CRC;
var _LZDIST;
var _LZRPLC;
var _LZEXP;
var _DEFLATE;
var _DEFLATE0;
var _INFLATE;
var _STD_HTML;
var _WEBKIT;
var _MSIE;
var _TRIDENT;
var _EDGE;
var _EDG;
var _SEMICOLON;
var _MSIE_VERSION;
var _MS_EDGE;
var _MS_EDG;
var _SEMICOLON_SPACE;
var _EQUAL;
var _STORAGE_WORDS;
var _STORAGE_LENGTH;
var _LOG2_64;
var _WORD_LENGTH;
var _STORAGE_BITS;
var _EXPIRES;
var _TRUNCATE;
var _IDPREFIX;
var _IMG;
var _INPUT;
var _SPAN;
var _A;
var _LABEL;
var _CANVAS;
var _DIV;
var _TABLE;
var _WAV_AUDIO;
var _GENERIC_AUDIO;
var _SPAN_ID;
var _SPAN_STYLE;
var _BRACKET_SPAN;
var _SPAN_END;
var _IMG_ID;
var _IMG_STYLE;
var _SRC_QUOTES;
var _BGSOUND_ID;
var _A_ID;
var _LABEL_FOR;
var _ID_QUOTES;
var _INPUT_TEXT_ID;
var _INPUT_FILE_ID;
var _QUOTES_BRACKET;
var _BRACKET_A;
var _A_END;
var _BRACKET_LABEL;
var _LABEL_END;
var _CANVAS_ID;
var _BRACKET_CANVAS;
var _DIV_ID;
var _BRACKET_DIV;
var _DIV_END;
var _TABLE_ID;
var _BRACKET_TABLE;
var _TABLE_END;
var _COLON;
var _QUOTE;
var _SPACE;
var _COMMA;
var _ROUND_BRACKET;
var _QUOTE_ROUND_BRACKET;
var _PERCENT_ROUND_BRACKET;
var _RECT;
var _POLYGON;
var _URL;
var _URL_END;
var _CSS_FILTER;
var _MS_FILTER;
var _BASICIMAGE_GRAYSCALE;
var _BASICIMAGE_INVERT;
var _LIGHT;
var _ALPHA_BEGIN;
var _ALPHA_END;
var _GRAYSCALE;
var _INVERT;
var _BRIGHTNESS;
var _QUOTE_BRACKET_AUTO;
var _COMMA_AUTO;
var _0PX;
var _POSITION;
var _WIDTH;
var _HEIGHT;
var _TOP;
var _RIGHT;
var _BOTTOM;
var _LEFT;
var _FONT_SIZE;
var _FONT_FAMILY;
var _FONT_STYLE;
var _FONT_WEIGHT;
var _COLOR;
var _MARGIN_TOP;
var _MARGIN_RIGHT;
var _MARGIN_BOTTOM;
var _MARGIN_LEFT;
var _BORDER_TOP_WIDTH;
var _BORDER_TOP_STYLE;
var _BORDER_TOP_COLOR;
var _BORDER_RIGHT_WIDTH;
var _BORDER_RIGHT_STYLE;
var _BORDER_RIGHT_COLOR;
var _BORDER_BOTTOM_WIDTH;
var _BORDER_BOTTOM_STYLE;
var _BORDER_BOTTOM_COLOR;
var _BORDER_LEFT_WIDTH;
var _BORDER_LEFT_STYLE;
var _BORDER_LEFT_COLOR;
var _PADDING_TOP;
var _PADDING_RIGHT;
var _PADDING_BOTTOM;
var _PADDING_LEFT;
var _Z_INDEX;
var _VISIBILITY;
var _DISPLAY;
var _TEXT_ALIGN;
var _WHITE_SPACE;
var _LETTER_SPACING;
var _LINE_HEIGHT;
var _TEXT_DECORATION;
var _OVERFLOW;
var _BACKGROUND_REPEAT;
var _BACKGROUND_ATTACHMENT;
var _BACKGROUND_COLOR;
var _BACKGROUND_IMAGE;
var _BACKGROUND_POSITION;
var _CLIP;
var _CLIP_PATH;
var _OPACITY;
var _FILTER;
var _CURSOR;
var _SRC;
var _LOOP;
var _VOLUME;
var _INNERHTML;
var __STATIC;
var __ABSOLUTE;
var __SERIF;
var __SANS_SERIF;
var __CURSIVE;
var __MONOSPACE;
var __NORMAL;
var __ITALIC;
var __BOLD;
var __NONE;
var __SOLID;
var __REPEAT;
var __REPEAT_X;
var __REPEAT_Y;
var __NO_REPEAT;
var __SCROLL;
var __FIXED;
var __LEFT;
var __CENTER;
var __RIGHT;
var __JUSTIFY;
var __PRE;
var __NOWRAP;
var __OVERLINE;
var __UNDERLINE;
var __LINE_THROUGH;
var __INLINE;
var __BLOCK;
var __VISIBLE;
var __HIDDEN;
var __AUTO;
var __DEFAULT;
var __CROSSHAIR;
var __MOVE;
var __NS_RESIZE;
var __NWSE_RESIZE;
var __EW_RESIZE;
var __NESW_RESIZE;
var __USERFONTS;
var __P_GOTHIC;
var __BITMAP;
var __JIS;
var _OPACITY_MAX;
var _STRENGTH_MAX;
var _STRENGTH_MIN;
var _STRENGTH;
var _BRIGHTNESS_MAX;
var _IE_VOLUME_MIN;
var _VOLUME_MAX;
var _WAV_MAX;
var _BOOL_GRAYSCALE;
var _BOOL_INVERT;
var _INT_BRIGHTNESS;
var _INT_OPACITY;
var _STYLE_DECL;
var _VALUE_CACHE;
var _AP_LENGTH;
var _PROPERTY;
var _JS_PROPERTY;
var _VALUE;
var _VALUE2;
var _UNIT;
var _PARSE;
var _PARSE_A;
var _ARGS;
var _COMPARE_ARGS;
var _DEFAULT_VALUE;
var _FRMPROC;
var _SUBROUTINE;
var _KDOWN;
var _KUP;
var _CANCEL;
var _CSS;
var _RESIZE;
var _RESIZE2;
var _CREATE_AUDIO;
var _RESERVE;
var _AMBIENT;
var _Frmproc;
var _Exception;
var _Frmrate;
var _Timerid;
var _Time;
var _Pwr;
var _Subroutine;
var _Press;
var _Input;
var _Ku;
var _Key;
var _Prevent;
var _Default;
var _Temp;
var _Id;
var _Tagname;
var _Clip;
var _Width;
var _Height;
var _Resize;
var _Ap;
var _Reserve;
var _Ambients;
var _Length;
/* private: */
/* static const int */ _EOF = -1;
/* static const string */ _EMPTY = "";
/* static const string */ _E0 = "0";
/* static const size_t */ _BITS_CHAR = 8;
/* static const size_t */ _BYTES_WORD = 4;
/* static const double */ _BASE_BIT = 2;
/* static const size_t */ _BITS_NIBBLE = 4;
/* static const char[] */ _BITSPERHEX = [0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4];
/* static const size_t */ _DIGITS = _BYTES_WORD * _BITS_CHAR;
/* static const double */ _LOG2_MAX = 53;
/* static const double[] */ _EXP2 = [];
for (__s = 0; __s <= _LOG2_MAX; ++ __s)
{
_EXP2[__s] = _POW(_BASE_BIT, __s);
}
/* static const int */ _WORD_MAX = _EXP2[_DIGITS] - 1;
/* static const double */ _LOG2E = 1.442695040888963;
/* static const double */ _BASE_0X = 16;
/* static const double */ _BASE_MAX = 64;
/* static const string[] */ _BASE64 =
[
_E0, "1", "2", "3", "4", "5", "6", "7", "8", "9",
"A", "B", "C", "D", "E", "F", "G", "H", "I", "J",
"K", "L", "M", "N", "O", "P", "Q", "R", "S", "T",
"U", "V", "W", "X", "Y", "Z", "a", "b", "c", "d",
"e", "f", "g", "h", "i", "j", "k", "l", "m", "n",
"o", "p", "q", "r", "s", "t", "u", "v", "w", "x",
"y", "z", "-", "*"
];
/* static const char[] */ _BASE10 = {};
for (__s = 0; __s < _BASE_MAX; ++ __s)
{
_BASE10[_BASE64[__s]] = __s;
}
/* static const double */ _LOG16_MAX = 13;
/* static const double[] */ _EXP16 = [];
for (__s = 0; __s <= _LOG16_MAX; ++ __s)
{
_EXP16[__s] = _POW(_BASE_0X, __s);
}
/* static const double */ _LN16 = 2.772588722239782;
/* static const double */ _LOG64_MAX = 8;
/* static const double[] */ _EXP64 = [];
for (__s = 0; __s <= _LOG64_MAX; ++ __s)
{
_EXP64[__s] = _POW(_BASE_MAX, __s);
}
/* static const double */ _LN64 = 4.158883083359672;
/* static const size_t */ _SIZE_T_MAX = _EXP2[_DIGITS] - 1;
/* static const long */ _MILLIS = 1000;
/* static const double */ _BASE_HOURS = 60;
/* static const double */ _LOG60_MAX = 2;
/* static const double[] */ _EXP60 = [];
for (__s = 0; __s <= _LOG60_MAX; ++ __s)
{
_EXP60[__s] = _POW(_BASE_HOURS, __s);
}
/* static const double */ _BASE_DECIMAL = 10;
/* static const size_t */ _INITSHFT = _DIGITS - _BITS_CHAR;
/* static const char[] */ _RB = [];
for (__s = 0; __s <= 0xFF; ++ __s)
{
__v = 0;
__u = 0x80;
for (__t = __s; __t !== 0; __t >>>= 1)
{
if ((__t & 1) !== 0)
{
__v |= __u;
}
__u >>>= 1;
}
_RB[__s] = __v;
}
/* double */ _LOG2 = function (/* double */X_) /* const */
{
return (_LOG2E * _LOG(X_));
};
/* double */ _LOG16 = function (/* double */X_) /* const */
{
return (_LOG(X_) / _LN16);
};
/* double */ _LOG64 = function (/* double */X_) /* const */
{
return (_LOG(X_) / _LN64);
};
/* string */ _BASE_ENCODE = function (Log_, Exp_, Data_, Length_) /* const */
/*
* (double (*)(double) const Log_, const double[] Exp_, long Data_)
* (double (*)(double) const Log_, const double[] Exp_, long Data_, size_t Length_)
*/
{
var u;
var s = 1;
if (Length_ === _UNDEFINED)
{
Length_ = 0;
}
if (Data_ !== 0)
{
for (s = _FLOOR(Log_(Data_)); Data_ >= Exp_[s]; ++ s)
{
}
}
for (Length_ -= s , u = _EMPTY; u[_LENGTH] < Length_; u += _E0)
{
}
for (-- s; 0 < s; -- s)
{
u += _BASE64[_FLOOR(Data_ / Exp_[s])];
Data_ %= Exp_[s];
}
return (u += _BASE64[Data_]);
};
/* long */ _BASE_DECODE = function (/* double */Log_max_, /* const double[] */Exp_, /* string */Code_) /* const */
{
var u = Code_[_LENGTH] - 1;
var v;
var s = u - Log_max_;
if (s < 0)
{
s = 0;
}
for (v = 0; s <= u; ++ s)
{
v += _BASE10[Code_[_CHARAT](s)] * Exp_[u - s];
}
return (v);
};
/* size_t */ _REV = function (/* int */Data_, /* size_t */Len_) /* const */
{
var u = 0;
var s;
for (s = _INITSHFT; Data_ !== 0; s -= _BITS_CHAR)
{
u |= _RB[Data_ & 0xFF] << s;
Data_ >>>= _BITS_CHAR;
}
return (u >>> _DIGITS - Len_);
};
/* static int */ _Rand1 = _FLOOR(_RANDOM() * 0x3FFFFFFF);
/* static int */ _Rand2 = _FLOOR(_RANDOM() * 0x7FFFFFFF);
/* static int */ _Rand3 = _FLOOR(_RANDOM() * 0xFFFFFFFF);
/* static int */ _Rand4 = 0x34CFD051;
/* static int */ _Enum = 0;
/* static long */ _Milliseconds = new _DATE()[_GETTIME]();
/* static long */ _Seconds = 0;
/* namespace */ _STD_ZLIB = {};
/* static const size_t */ _EOB = 0x100;
/* static const size_t */ _EOB1 = _EOB + 1;
/* static const size_t */ _FHFMN_L = 9;
/* static const size_t */ _DIST_L = 5;
/* static const size_t[] */ _FHFMN = [];
for (__s = 0 , __t = 0; __s <= 287; ++ __s , __t += 2)
{
_FHFMN[__t] =
__s <= 255 ?
__s <= 143 ?
(__u = 8 , _REV(__s + 48, __u))
:
(__u = _FHFMN_L , _REV(__s + 256, __u))
: __s <= 279 ?
(__u = 7 , _REV(__s - 256, __u))
:
(__u = 8 , _REV(__s - 88, __u));
_FHFMN[__t + 1] = __u;
}
/* static const size_t[][] */ _FHFMN2 = [];
__u = [];
for (__s = 0; __s <= 287; ++ __s)
{
__w = __s <= 255 ?
__s <= 143 ?
8
:
_FHFMN_L
: __s <= 279 ?
7
:
8;
if (! (__w in __u))
{
__u[__w] = [];
}
__v = __u[__w];
__v[__v[_LENGTH]] = [__s, _FHFMN_L - __w];
}
__v = 0;
__w = 128;
for (__s = 7; __s <= _FHFMN_L; ++ __s)
{
__x = __u[__s];
for (__t = 0; __t < __x[_LENGTH]; ++ __t)
{
for (__r = _REV(__v, __s); __r < 512; __r += __w)
{
_FHFMN2[__r] = __x[__t];
}
++ __v;
}
__v <<= 1;
__w <<= 1;
}
/* static const char[] */ _DIST = [];
for (__s = 0; __s <= 31; ++ __s)
{
_DIST[__s] = _REV(__s, _DIST_L);
}
/* static const char[] */ _DIST2 = [];
for (__s = 0; __s <= 31; ++ __s)
{
_DIST2[_DIST[__s]] = __s;
}
/* static const size_t */ _LZMIN = 3;
/* static const size_t */ _LZFWD = _LZMIN - 1;
/* static const size_t */ _LZMAX = 258;
/* static const size_t[] */ _LIT77 =
[
_LZMIN, 0, 4, 0, 5, 0, 6, 0, 7, 0, 8, 0, 9, 0, 10, 0, 11, 1, 13, 1, 15, 1, 17, 1, 19, 2, 23, 2, 27, 2,
31, 2, 35, 3, 43, 3, 51, 3, 59, 3, 67, 4, 83, 4, 99, 4, 115, 4, 131, 5, 163, 5, 195, 5, 227, 5, _LZMAX, 0
];
/* static const size_t[] */ _DIST77 =
[
1, 0, 2, 0, 3, 0, 4, 0, 5, 1, 7, 1, 9, 2, 13, 2, 17, 3, 25, 3,
33, 4, 49, 4, 65, 5, 97, 5, 129, 6, 193, 6, 257, 7, 385, 7, 513, 8, 769, 8,
1025, 9, 1537, 9, 2049, 10, 3073, 10, 4097, 11, 6145, 11, 8193, 12, 12289, 12, 16385, 13, 24577, 13
];
/* static const size_t[] */ _LZLIT = [];
for (__s = 0; __s < _LZMIN; ++ __s)
{
_LZLIT[__s] = 0;
}
for (; __s <= _LZMAX; ++ __s)
{
_LZLIT[__s] =
__s <= 26 ?
__s <= 9 ?
__s <= 5 ?
__s === _LZMIN ?
__s - 3 << 12 | 257
:
__s === 4 ?
__s - 4 << 12 | 258
:
__s - 5 << 12 | 259
:
__s <= 7 ?
__s === 6 ?
__s - 6 << 12 | 260
:
__s - 7 << 12 | 261
:
__s === 8 ?
__s - 8 << 12 | 262
:
__s - 9 << 12 | 263
:
__s <= 14 ?
__s === 10 ?
__s - 10 << 12 | 264
:
__s <= 12 ?
__s - 11 << 12 | 777
:
__s - 13 << 12 | 778
:
__s <= 18 ?
__s <= 16 ?
__s - 15 << 12 | 779
:
__s - 17 << 12 | 780
:
__s <= 22 ?
__s - 19 << 12 | 1293
:
__s - 23 << 12 | 1294
:
__s <= 82 ?
__s <= 42 ?
__s <= 30 ?
__s - 27 << 12 | 1295
:
__s <= 34 ?
__s - 31 << 12 | 1296
:
__s - 35 << 12 | 1809
:
__s <= 58 ?
__s <= 50 ?
__s - 43 << 12 | 1810
:
__s - 51 << 12 | 1811
:
__s <= 66 ?
__s - 59 << 12 | 1812
:
__s - 67 << 12 | 2325
:
__s <= 162 ?
__s <= 114 ?
__s <= 98 ?
__s - 83 << 12 | 2326
:
__s - 99 << 12 | 2327
:
__s <= 130 ?
__s - 115 << 12 | 2328
:
__s - 131 << 12 | 2841
:
__s <= 226 ?
__s <= 194 ?
__s - 163 << 12 | 2842
:
__s - 195 << 12 | 2843
:
__s <= 257 ?
__s - 227 << 12 | 2844
:
__s - 258 << 12 | 285;
}
/* static const size_t[] */ _ORDER = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];
/* static const char */ _BHDR = 0x3;
/* static const size_t */ _BHDR_L = 3;
/* static const size_t */ _CMFLG = 0x9C78;
/* static const size_t */ _CMFLG_L = 16;
/* static const size_t */ _ADLER32_HALF = 16;
/* static const size_t */ _ADLER32_MOD = 65521;
/* static const size_t */ _ADLER32_LEN = 1024;
/* static const size_t */ _CRC32_POLYNOMIAL = 0xEDB88320;
/* static const int[] */ _CRC = [];
for (__s = 0; __s <= 0xFF; ++ __s)
{
__u = __s;
for (__t = 0; __t < _BITS_CHAR; ++ __t)
{
__u = (__u & 1) !== 0 ?
_CRC32_POLYNOMIAL ^ __u >>> 1
:
__u >>> 1;
}
_CRC[__s] = __u;
}
/* size_t */ _LZDIST = function (/* size_t */Dist_) /* const */
{
return (
Dist_ <= 192 ?
Dist_ <= 12 ?
Dist_ <= 3 ?
Dist_ === 1 ?
Dist_ - 1 << 9
:
Dist_ === 2 ?
Dist_ - 2 << 9 | 1
:
Dist_ - 3 << 9 | 2
:
Dist_ <= 6 ?
Dist_ === 4 ?
Dist_ - 4 << 9 | 3
:
Dist_ - 5 << 9 | 36
:
Dist_ <= 8 ?
Dist_ - 7 << 9 | 37
:
Dist_ - 9 << 9 | 70
:
Dist_ <= 48 ?
Dist_ <= 24 ?
Dist_ <= 16 ?
Dist_ - 13 << 9 | 71
:
Dist_ - 17 << 9 | 104
:
Dist_ <= 32 ?
Dist_ - 25 << 9 | 105
:
Dist_ - 33 << 9 | 138
:
Dist_ <= 96 ?
Dist_ <= 64 ?
Dist_ - 49 << 9 | 139
:
Dist_ - 65 << 9 | 172
:
Dist_ <= 128 ?
Dist_ - 97 << 9 | 173
:
Dist_ - 129 << 9 | 206
:
Dist_ <= 2048 ?
Dist_ <= 512 ?
Dist_ <= 256 ?
Dist_ - 193 << 9 | 207
:
Dist_ <= 384 ?
Dist_ - 257 << 9 | 240
:
Dist_ - 385 << 9 | 241
:
Dist_ <= 1024 ?
Dist_ <= 768 ?
Dist_ - 513 << 9 | 274
:
Dist_ - 769 << 9 | 275
:
Dist_ <= 1536 ?
Dist_ - 1025 << 9 | 308
:
Dist_ - 1537 << 9 | 309
:
Dist_ <= 8192 ?
Dist_ <= 4096 ?
Dist_ <= 3072 ?
Dist_ - 2049 << 9 | 342
:
Dist_ - 3073 << 9 | 343
:
Dist_ <= 6144 ?
Dist_ - 4097 << 9 | 376
:
Dist_ - 6145 << 9 | 377
:
Dist_ <= 16384 ?
Dist_ <= 12288 ?
Dist_ - 8193 << 9 | 410
:
Dist_ - 12289 << 9 | 411
:
Dist_ <= 24576 ?
Dist_ - 16385 << 9 | 444
:
Dist_ - 24577 << 9 | 445);
};
/* size_t */ _LZRPLC = function (/* const char[] */Data_, /* size_t */Ptr_, /* size_t */Len_,
/* size_t */Begin_, /* size_t */End_, /* const size_t[] */Wnd_,
/* std::vector */Lz_)
{
var u;
var v;
var w = 0;
var s;
-- Begin_;
if (Begin_ < 0)
{
Begin_ = 0x8000;
}
-- End_;
if (End_ < 0)
{
End_ = 0x8000;
}
for (; End_ !== Begin_; )
{
u = true;
if (w > _LZMIN)
{
for (s = w - 1; _LZMIN <= s; -- s)
{
if (Data_[Wnd_[End_] + s] !== Data_[Ptr_ + s])
{
u = false;
break;
}
}
if (u)
{
s = w;
}
}
else
{
s = _LZMIN;
}
if (u)
{
for (u = Ptr_ + s;
u < Len_
&& Data_[Wnd_[End_] + s] === Data_[u]
&& s < _LZMAX;
++ s , ++ u)
{
}
if (s > w)
{
w = s;
v = Wnd_[End_];
}
if (s === _LZMAX)
{
break;
}
}
-- End_;
if (End_ < 0)
{
End_ = 0x8000;
}
}
Lz_.ate(_LZLIT[w], 24);
Lz_.ate(_LZDIST(Ptr_ - v), 24);
return (w);
};
/* std::vector */ _LZEXP = function (/* const char[] */Data_) /* const */
{
var u = new std.vector();
var v;
var w;
var x;
var y;
var z;
var r;
var q = 0;
var s;
var t;
for (s = 0; s < Data_[_LENGTH]; )
{
v = 0;
w = {};
y = {};
z = {};
q += 0x60000;
if (q > Data_[_LENGTH])
{
q = Data_[_LENGTH];
}