Check-in [f85e9f06e9]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:merge with trunk
Timelines: family | ancestors | descendants | both | wtf-8-experiment
Files: files | file ages | folders
SHA1:f85e9f06e9110224caadbf7c4fce087969341afb
User & Date: chw 2019-03-15 19:25:00
Context
2019-03-15
20:00
merge with trunk check-in: 70bf3d2449 user: chw tags: wtf-8-experiment
19:25
merge with trunk check-in: f85e9f06e9 user: chw tags: wtf-8-experiment
19:23
improvements in jsmpeg video driver: fullscreen mode, mobile browsers check-in: a2520776bf user: chw tags: trunk
2019-03-14
04:57
merge with trunk check-in: b363d961f4 user: chw tags: wtf-8-experiment
Changes

Changes to jni/SDL2/src/video/jsmpeg/SDL_jsmpeg.c.

143
144
145
146
147
148
149






















150
151
152
153
154
155
156
...
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
...
646
647
648
649
650
651
652
653


654
655

656
657
658
659
660
661
662
663
664
665
666
667
...
859
860
861
862
863
864
865

866

867
868
869
870
871
872
873
....
1113
1114
1115
1116
1117
1118
1119



1120
1121
1122
1123
1124
1125
1126
....
1205
1206
1207
1208
1209
1210
1211







1212
1213
1214
1215
1216
1217
1218
....
1257
1258
1259
1260
1261
1262
1263

1264
1265
1266
1267
1268
1269
1270
....
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
static void JSMPEG_DestroyWindow(_THIS, SDL_Window *window);
static int JSMPEG_CreateWindowFramebuffer(_THIS, SDL_Window *window, Uint32 *format, void **pixels, int *pitch);
static int JSMPEG_UpdateWindowFramebuffer(_THIS, SDL_Window *window, const SDL_Rect *rects, int numrects);
static void JSMPEG_CleanupWindowData(SDL_WindowData *data);
static void JSMPEG_DestroyWindowFramebuffer(_THIS, SDL_Window *window);
static int JSMPEG_CallbackHTTP(struct lws *lws, enum lws_callback_reasons reason, void *user, void *in, size_t len);
static int JSMPEG_CallbackWS(struct lws *lws, enum lws_callback_reasons reason, void *user, void *in, size_t len);























static struct lws_protocols LWS_protos[] = {
    { "http", JSMPEG_CallbackHTTP, sizeof(int), 0 },
    { "ws", JSMPEG_CallbackWS, sizeof(Client), 1024 * 1024 },
    { NULL, NULL, 0, 0 }
};

................................................................................
        LIB_SWSCALE_5,
        LIB_SWSCALE_4
    };
#if defined(__WIN32__)
    HANDLE h;
    BOOL (WINAPI *setdlldir_proc)(char *);
    DWORD (WINAPI *getdlldir_proc)(DWORD, char *);

    DWORD dll_len;
    char dll_buf[1024];
#endif

    if (libavutil != NULL && libavcodec != NULL && libswscale != NULL) {
        return 0;
    }

#if defined(__WIN32__)

    dll_len = 0;
    h = GetModuleHandleA("KERNEL32");
    *((void **) &getdlldir_proc) = (void *) GetProcAddress(h, "GetDllDirectoryA");
    *((void **) &setdlldir_proc) = (void *) GetProcAddress(h, "SetDllDirectoryA");
    if (setdlldir_proc != NULL) {
        char *p, buf[1024];

        dll_len = getdlldir_proc(sizeof(dll_buf), dll_buf);
        p = getenv("PROGRAMFILES");
        if (p != NULL && p[0] != '\0' && strlen(p) < sizeof(buf) - 12) {
            strcpy(buf, p);
            strcat(buf, "\\ffmpeg\\bin");
            setdlldir_proc(buf);

        }
    }
#endif

    for (i = 0; i < SDL_arraysize(libavutil_names); i++) {
        libavutil = SDL_LoadObject(libavutil_names[i]);
        if (libavutil != NULL) {
................................................................................
        SDL_UnloadObject(libavcodec);
        libavcodec = NULL;
    }
    if (libavutil != NULL) {
        SDL_UnloadObject(libavutil);
        libavutil = NULL;
    }



#if defined(__WIN32__)
    if (setdlldir_proc != NULL) {

        setdlldir_proc(dll_len ? dll_buf : NULL);
    }
#endif

done:
    return ret;
}

/* avutil */
#define av_frame_alloc syms.av_frame_alloc
#define av_free syms.av_free
#define av_get_pix_fmt syms.av_get_pix_fmt
................................................................................
            fref->next = NULL;
            fref->frame = frame;
            frame->ref_count++;
            if (client->last != NULL) {
                client->last->next = fref;
            } else {
                client->last = client->first = fref;

                lws_callback_on_writable(client->socket);

            }
        }
        client = client->next;
    }
    if (frame != NULL && --frame->ref_count <= 0) {
        SDL_free(frame);
    }
................................................................................

    data->clients = NULL;
    memset(&info, 0, sizeof(struct lws_context_creation_info));
    info.gid = -1;
    info.uid = -1;
    info.user = (void *) data;
    info.protocols = LWS_protos;



    info.max_http_header_pool = 64;
    info.port = 8080;
    env = SDL_GetHint(SDL_HINT_VIDEO_JSMPEG_PORT);
    if (env != NULL) {
        info.port = SDL_atoi(env);
    }
    data->lws = lws_create_context(&info);
................................................................................

    JSMPEG_CleanupWindowData(data);
}

static int
JSMPEG_CallbackHTTP(struct lws *lws, enum lws_callback_reasons reason, void *user, void *in, size_t len)
{







    int index, ret, *udata = (int *) user;

    ret = 0;
    switch (reason) {
    case LWS_CALLBACK_HTTP: {
        int found = 0;
        char *p = (char *) in, *q;
................................................................................
        break;
    }
    default:
        break;
    }

    return ret;

}

static int
JSMPEG_CallbackWS(struct lws *lws, enum lws_callback_reasons reason, void *user, void *in, size_t len)
{
    SDL_WindowData *data = (SDL_WindowData *) lws_context_user(lws_get_context(lws));
    Client *client = (Client *) user;
................................................................................
            if (len >= 12 && (type & INPUT_MOUSE_ABSOLUTE)) {
                int x, y;

                x = getf32(p + 4);
                y = getf32(p + 8);
                if (x < 0) {
                    x = 0;
                } else if (x > data->surface->w) {
                    x = data->surface->w - 1;
                }
                if (y < 0) {
                    y = 0;
                } else if (y > data->surface->h) {
                    y = data->surface->h - 1;
                }
                SDL_SendMouseMotion(mouse->focus, mouse->mouseID, SDL_FALSE, x, y);
            }
            if (len >= 12 && (type & INPUT_MOUSE_RELATIVE)) {
                int x, y;








>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







 







>









>













>







 








>
>

<
>




<







 







>
|
>







 







>
>
>







 







>
>
>
>
>
>
>







 







>







 







|




|







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
...
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
...
671
672
673
674
675
676
677
678
679
680
681

682
683
684
685
686

687
688
689
690
691
692
693
...
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
....
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
....
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
....
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
....
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
static void JSMPEG_DestroyWindow(_THIS, SDL_Window *window);
static int JSMPEG_CreateWindowFramebuffer(_THIS, SDL_Window *window, Uint32 *format, void **pixels, int *pitch);
static int JSMPEG_UpdateWindowFramebuffer(_THIS, SDL_Window *window, const SDL_Rect *rects, int numrects);
static void JSMPEG_CleanupWindowData(SDL_WindowData *data);
static void JSMPEG_DestroyWindowFramebuffer(_THIS, SDL_Window *window);
static int JSMPEG_CallbackHTTP(struct lws *lws, enum lws_callback_reasons reason, void *user, void *in, size_t len);
static int JSMPEG_CallbackWS(struct lws *lws, enum lws_callback_reasons reason, void *user, void *in, size_t len);

#ifdef USE_LOCAL_FS

/* Useful for testing, serves local data directory. */

static const struct lws_http_mount local_fs = {
    .mount_next = NULL,
    .mountpoint = "/",
    .origin = "./data",
    .def = "index.html",
    .cgienv = NULL,
    .extra_mimetypes = NULL,
    .cgi_timeout = 0,
    .cache_max_age = 0,
    .cache_reusable = 0,
    .cache_revalidate = 0,
    .cache_intermediaries = 0,
    .origin_protocol = LWSMPRO_FILE,
    .mountpoint_len = 1,
};

#endif

static struct lws_protocols LWS_protos[] = {
    { "http", JSMPEG_CallbackHTTP, sizeof(int), 0 },
    { "ws", JSMPEG_CallbackWS, sizeof(Client), 1024 * 1024 },
    { NULL, NULL, 0, 0 }
};

................................................................................
        LIB_SWSCALE_5,
        LIB_SWSCALE_4
    };
#if defined(__WIN32__)
    HANDLE h;
    BOOL (WINAPI *setdlldir_proc)(char *);
    DWORD (WINAPI *getdlldir_proc)(DWORD, char *);
    int sdd_do;
    DWORD dll_len;
    char dll_buf[1024];
#endif

    if (libavutil != NULL && libavcodec != NULL && libswscale != NULL) {
        return 0;
    }

#if defined(__WIN32__)
    sdd_do = 0;
    dll_len = 0;
    h = GetModuleHandleA("KERNEL32");
    *((void **) &getdlldir_proc) = (void *) GetProcAddress(h, "GetDllDirectoryA");
    *((void **) &setdlldir_proc) = (void *) GetProcAddress(h, "SetDllDirectoryA");
    if (setdlldir_proc != NULL) {
        char *p, buf[1024];

        dll_len = getdlldir_proc(sizeof(dll_buf), dll_buf);
        p = getenv("PROGRAMFILES");
        if (p != NULL && p[0] != '\0' && strlen(p) < sizeof(buf) - 12) {
            strcpy(buf, p);
            strcat(buf, "\\ffmpeg\\bin");
            setdlldir_proc(buf);
	    sdd_do = 1;
        }
    }
#endif

    for (i = 0; i < SDL_arraysize(libavutil_names); i++) {
        libavutil = SDL_LoadObject(libavutil_names[i]);
        if (libavutil != NULL) {
................................................................................
        SDL_UnloadObject(libavcodec);
        libavcodec = NULL;
    }
    if (libavutil != NULL) {
        SDL_UnloadObject(libavutil);
        libavutil = NULL;
    }

done:

#if defined(__WIN32__)

    if (sdd_do) {
        setdlldir_proc(dll_len ? dll_buf : NULL);
    }
#endif


    return ret;
}

/* avutil */
#define av_frame_alloc syms.av_frame_alloc
#define av_free syms.av_free
#define av_get_pix_fmt syms.av_get_pix_fmt
................................................................................
            fref->next = NULL;
            fref->frame = frame;
            frame->ref_count++;
            if (client->last != NULL) {
                client->last->next = fref;
            } else {
                client->last = client->first = fref;
		if (client->socket != NULL) {
		    lws_callback_on_writable(client->socket);
		}
            }
        }
        client = client->next;
    }
    if (frame != NULL && --frame->ref_count <= 0) {
        SDL_free(frame);
    }
................................................................................

    data->clients = NULL;
    memset(&info, 0, sizeof(struct lws_context_creation_info));
    info.gid = -1;
    info.uid = -1;
    info.user = (void *) data;
    info.protocols = LWS_protos;
#ifdef USE_LOCAL_FS
    info.mounts = &local_fs;
#endif
    info.max_http_header_pool = 64;
    info.port = 8080;
    env = SDL_GetHint(SDL_HINT_VIDEO_JSMPEG_PORT);
    if (env != NULL) {
        info.port = SDL_atoi(env);
    }
    data->lws = lws_create_context(&info);
................................................................................

    JSMPEG_CleanupWindowData(data);
}

static int
JSMPEG_CallbackHTTP(struct lws *lws, enum lws_callback_reasons reason, void *user, void *in, size_t len)
{
#ifdef USE_LOCAL_FS
    if (reason == LWS_CALLBACK_HTTP) {
        lws_return_http_status(lws, HTTP_STATUS_NOT_FOUND, NULL);
	return 1;
    }
    return 0;
#else
    int index, ret, *udata = (int *) user;

    ret = 0;
    switch (reason) {
    case LWS_CALLBACK_HTTP: {
        int found = 0;
        char *p = (char *) in, *q;
................................................................................
        break;
    }
    default:
        break;
    }

    return ret;
#endif
}

static int
JSMPEG_CallbackWS(struct lws *lws, enum lws_callback_reasons reason, void *user, void *in, size_t len)
{
    SDL_WindowData *data = (SDL_WindowData *) lws_context_user(lws_get_context(lws));
    Client *client = (Client *) user;
................................................................................
            if (len >= 12 && (type & INPUT_MOUSE_ABSOLUTE)) {
                int x, y;

                x = getf32(p + 4);
                y = getf32(p + 8);
                if (x < 0) {
                    x = 0;
                } else if (x >= data->surface->w) {
                    x = data->surface->w - 1;
                }
                if (y < 0) {
                    y = 0;
                } else if (y >= data->surface->h) {
                    y = data->surface->h - 1;
                }
                SDL_SendMouseMotion(mouse->focus, mouse->mouseID, SDL_FALSE, x, y);
            }
            if (len >= 12 && (type & INPUT_MOUSE_RELATIVE)) {
                int x, y;

Changes to jni/SDL2/src/video/jsmpeg/SDL_jsmpeg_files.h.

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
....
6435
6436
6437
6438
6439
6440
6441








6442
6443
6444
6445
6446
6447
6448
6449
6450
6451
6452
6453
6454
6455
6456
6457



6458
6459
6460
6461
6462
6463
6464
6465
6466
6467
6468
6469
6470
6471
6472
6473
6474
6475
6476
6477
6478
6479
6480
6481
6482
6483
6484
6485
6486
6487
6488
6489
6490
6491
6492
6493
6494
6495
6496
6497
6498
6499
6500
6501
6502
6503
6504
6505
6506
6507
6508
6509
6510
6511
6512
6513
6514
6515
6516
6517
6518
6519
6520
6521
6522
6523
6524
6525
6526
6527
6528
6529
6530
6531
6532
6533
6534
6535
6536
6537
6538
6539
6540
6541
6542
6543
....
6589
6590
6591
6592
6593
6594
6595





































6596
6597
6598
6599
6600
6601
6602
....
6619
6620
6621
6622
6623
6624
6625
6626
6627
6628
6629
6630
6631
6632
6633
6634
6635
6636
6637
6638
6639
6640
6641
6642
6643
6644
6645
6646
6647
6648
6649
6650
6651
6652
6653
6654
6655
6656
6657
6658
6659
6660
6661
6662
6663
6664
6665
6666
6667
6668

6669
6670
6671
6672
6673
6674
6675
6676
6677
6678

6679
6680
6681
6682
6683
6684
6685
6686
6687
6688
6689
6690
6691
6692
6693

6694
6695
6696
6697
6698
6699
6700
6701
6702
6703
6704
6705
6706
6707
6708
6709
6710
6711
6712
6713
6714
6715
6716
6717
6718
6719
6720
6721
6722
6723
6724
6725
6726
6727
6728
6729
6730
6731
6732
6733
6734
6735
....
6746
6747
6748
6749
6750
6751
6752
6753
6754
6755
6756
6757
6758
6759
6760
6761
6762





6763
6764
6765

6766
6767
6768
6769
6770
6771
6772
6773
6774




6775
6776
6777

6778
6779
6780





6781




6782
6783
6784
6785
6786
6787
6788
....
6878
6879
6880
6881
6882
6883
6884
6885



































































































































































6886
6887
6888
6889
6890
6891
6892
6893
6894
6895
6896
6897
6898
6899
6900
  0x3d, 0x27, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
  0x70, 0x65, 0x27, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x3d,
  0x27, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3b, 0x20,
  0x63, 0x68, 0x61, 0x72, 0x73, 0x65, 0x74, 0x3d, 0x75, 0x74, 0x66, 0x2d,
  0x38, 0x27, 0x20, 0x2f, 0x3e, 0x0a, 0x20, 0x20, 0x3c, 0x6d, 0x65, 0x74,
  0x61, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x27, 0x76, 0x69, 0x65, 0x77,
  0x70, 0x6f, 0x72, 0x74, 0x27, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e,
  0x74, 0x3d, 0x27, 0x77, 0x69, 0x64, 0x74, 0x68, 0x3d, 0x33, 0x32, 0x30,

  0x2c, 0x20, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x2d, 0x73, 0x63,
  0x61, 0x6c, 0x65, 0x3d, 0x31, 0x27, 0x20, 0x2f, 0x3e, 0x0a, 0x20, 0x20,


  0x3c, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x3e, 0x75, 0x6e, 0x64, 0x72, 0x6f,
  0x69, 0x64, 0x77, 0x69, 0x73, 0x68, 0x3c, 0x2f, 0x74, 0x69, 0x74, 0x6c,
  0x65, 0x3e, 0x0a, 0x20, 0x20, 0x3c, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x20,
  0x74, 0x79, 0x70, 0x65, 0x3d, 0x27, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x63,
  0x73, 0x73, 0x27, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x62, 0x6f, 0x64,
  0x79, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x62, 0x61,
  0x63, 0x6b, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x3a, 0x20, 0x23, 0x41,
  0x41, 0x41, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x74, 0x65,
  0x78, 0x74, 0x2d, 0x61, 0x6c, 0x69, 0x67, 0x6e, 0x3a, 0x20, 0x63, 0x65,
  0x6e, 0x74, 0x65, 0x72, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
  0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x3a, 0x20, 0x30, 0x3b, 0x0a, 0x20,
  0x20, 0x20, 0x20, 0x20, 0x20, 0x70, 0x61, 0x64, 0x64, 0x69, 0x6e, 0x67,
  0x3a, 0x20, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x66,
  0x6f, 0x6e, 0x74, 0x2d, 0x66, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x3a, 0x20,
  0x73, 0x61, 0x6e, 0x73, 0x2d, 0x73, 0x65, 0x72, 0x69, 0x66, 0x3b, 0x0a,
  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x3a,
  0x20, 0x23, 0x35, 0x35, 0x35, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d,
  0x0a, 0x20, 0x20, 0x20, 0x20, 0x62, 0x6f, 0x64, 0x79, 0x2e, 0x64, 0x65,
  0x73, 0x6b, 0x74, 0x6f, 0x70, 0x20, 0x2e, 0x6d, 0x6f, 0x62, 0x69, 0x6c,
  0x65, 0x2d, 0x6f, 0x6e, 0x6c, 0x79, 0x20, 0x7b, 0x20, 0x64, 0x69, 0x73,
  0x70, 0x6c, 0x61, 0x79, 0x3a, 0x20, 0x6e, 0x6f, 0x6e, 0x65, 0x3b, 0x20,
  0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x62, 0x6f, 0x64, 0x79, 0x2e, 0x6d,
  0x6f, 0x62, 0x69, 0x6c, 0x65, 0x20, 0x2e, 0x64, 0x65, 0x73, 0x6b, 0x74,
  0x6f, 0x70, 0x2d, 0x6f, 0x6e, 0x6c, 0x79, 0x20, 0x7b, 0x20, 0x64, 0x69,
  0x73, 0x70, 0x6c, 0x61, 0x79, 0x3a, 0x20, 0x6e, 0x6f, 0x6e, 0x65, 0x3b,
  0x20, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x23, 0x76, 0x69, 0x64, 0x65,
  0x6f, 0x43, 0x61, 0x6e, 0x76, 0x61, 0x73, 0x20, 0x7b, 0x0a, 0x20, 0x20,
  0x20, 0x20, 0x20, 0x20, 0x2f, 0x2a, 0x20, 0x70, 0x6f, 0x73, 0x69, 0x74,
  0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x61, 0x62, 0x73, 0x6f, 0x6c, 0x75, 0x74,
  0x65, 0x3b, 0x20, 0x2a, 0x2f, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
  0x74, 0x6f, 0x70, 0x3a, 0x20, 0x35, 0x30, 0x25, 0x3b, 0x0a, 0x20, 0x20,
  0x20, 0x20, 0x20, 0x20, 0x6c, 0x65, 0x66, 0x74, 0x3a, 0x20, 0x35, 0x30,
  0x25, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2a, 0x20,
  0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x3a, 0x20, 0x74,
  0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x65, 0x28, 0x2d, 0x35, 0x30,
  0x25, 0x2c, 0x20, 0x2d, 0x35, 0x30, 0x25, 0x29, 0x3b, 0x20, 0x2a, 0x2f,
  0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x62, 0x6f, 0x72, 0x64, 0x65,
  0x72, 0x3a, 0x20, 0x35, 0x70, 0x78, 0x20, 0x73, 0x6f, 0x6c, 0x69, 0x64,
  0x20, 0x23, 0x37, 0x37, 0x37, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20,
  0x20, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x3a, 0x20, 0x31, 0x30, 0x70,



  0x78, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x63, 0x75, 0x72,
  0x73, 0x6f, 0x72, 0x3a, 0x20, 0x6e, 0x6f, 0x6e, 0x65, 0x3b, 0x0a, 0x20,
  0x20, 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2e, 0x6b, 0x65,
  0x79, 0x73, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x70,
  0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x72, 0x65, 0x6c,


  0x61, 0x74, 0x69, 0x76, 0x65, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d,

  0x0a, 0x20, 0x20, 0x20, 0x20, 0x2e, 0x6b, 0x65, 0x79, 0x20, 0x7b, 0x0a,
  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x3a,
  0x20, 0x23, 0x66, 0x66, 0x66, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20,
  0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x3a, 0x20, 0x6c, 0x65, 0x66, 0x74,
  0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x77, 0x69, 0x64, 0x74,
  0x68, 0x3a, 0x20, 0x37, 0x32, 0x70, 0x78, 0x3b, 0x0a, 0x20, 0x20, 0x20,

  0x20, 0x20, 0x20, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x3a, 0x20, 0x34,
  0x38, 0x70, 0x78, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x70,
  0x61, 0x64, 0x64, 0x69, 0x6e, 0x67, 0x2d, 0x74, 0x6f, 0x70, 0x3a, 0x20,
  0x32, 0x34, 0x70, 0x78, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
  0x62, 0x61, 0x63, 0x6b, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x2d, 0x63,
  0x6f, 0x6c, 0x6f, 0x72, 0x3a, 0x20, 0x23, 0x35, 0x62, 0x63, 0x62, 0x65,
  0x62, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6f, 0x70, 0x61,
  0x63, 0x69, 0x74, 0x79, 0x3a, 0x20, 0x30, 0x2e, 0x35, 0x3b, 0x0a, 0x20,
  0x20, 0x20, 0x20, 0x20, 0x20, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f,
  0x6e, 0x3a, 0x20, 0x61, 0x62, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x65, 0x3b,
  0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x62, 0x6f, 0x72, 0x64, 0x65,
  0x72, 0x2d, 0x72, 0x61, 0x64, 0x69, 0x75, 0x73, 0x3a, 0x20, 0x38, 0x70,
















  0x78, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x20,
  0x20, 0x2e, 0x6b, 0x65, 0x79, 0x2d, 0x73, 0x6d, 0x61, 0x6c, 0x6c, 0x20,






  0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x68, 0x65, 0x69, 0x67,
  0x68, 0x74, 0x3a, 0x20, 0x32, 0x38, 0x70, 0x78, 0x3b, 0x0a, 0x20, 0x20,


  0x20, 0x20, 0x20, 0x20, 0x70, 0x61, 0x64, 0x64, 0x69, 0x6e, 0x67, 0x2d,
  0x74, 0x6f, 0x70, 0x3a, 0x20, 0x38, 0x70, 0x78, 0x3b, 0x0a, 0x20, 0x20,








  0x20, 0x20, 0x20, 0x20, 0x6f, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x3a,
  0x20, 0x30, 0x2e, 0x35, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a,


















  0x20, 0x20, 0x20, 0x20, 0x23, 0x6b, 0x65, 0x79, 0x2d, 0x75, 0x70, 0x20,
  0x7b, 0x6c, 0x65, 0x66, 0x74, 0x3a, 0x20, 0x34, 0x30, 0x70, 0x78, 0x3b,
  0x20, 0x74, 0x6f, 0x70, 0x3a, 0x20, 0x30, 0x70, 0x78, 0x3b, 0x20, 0x7d,

  0x0a, 0x20, 0x20, 0x20, 0x20, 0x23, 0x6b, 0x65, 0x79, 0x2d, 0x64, 0x6f,




  0x77, 0x6e, 0x20, 0x7b, 0x6c, 0x65, 0x66, 0x74, 0x3a, 0x20, 0x34, 0x30,
  0x70, 0x78, 0x3b, 0x20, 0x74, 0x6f, 0x70, 0x3a, 0x20, 0x38, 0x38, 0x70,
  0x78, 0x3b, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x23, 0x6b, 0x65,
  0x79, 0x2d, 0x6c, 0x65, 0x66, 0x74, 0x20, 0x7b, 0x6c, 0x65, 0x66, 0x74,
  0x3a, 0x20, 0x31, 0x36, 0x30, 0x70, 0x78, 0x3b, 0x20, 0x74, 0x6f, 0x70,


  0x3a, 0x20, 0x30, 0x70, 0x78, 0x3b, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x20,
  0x20, 0x23, 0x6b, 0x65, 0x79, 0x2d, 0x72, 0x69, 0x67, 0x68, 0x74, 0x20,
  0x7b, 0x6c, 0x65, 0x66, 0x74, 0x3a, 0x20, 0x32, 0x34, 0x30, 0x70, 0x78,

  0x3b, 0x20, 0x74, 0x6f, 0x70, 0x3a, 0x20, 0x30, 0x70, 0x78, 0x3b, 0x20,
  0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x23, 0x6b, 0x65, 0x79, 0x2d, 0x65,
  0x73, 0x63, 0x20, 0x7b, 0x6c, 0x65, 0x66, 0x74, 0x3a, 0x20, 0x33, 0x36,

  0x30, 0x70, 0x78, 0x3b, 0x20, 0x74, 0x6f, 0x70, 0x3a, 0x20, 0x30, 0x70,
  0x78, 0x3b, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x23, 0x6b, 0x65,
  0x79, 0x2d, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x20, 0x7b, 0x6c, 0x65, 0x66,
  0x74, 0x3a, 0x20, 0x34, 0x34, 0x30, 0x70, 0x78, 0x3b, 0x20, 0x74, 0x6f,
  0x70, 0x3a, 0x20, 0x30, 0x70, 0x78, 0x3b, 0x20, 0x7d, 0x0a, 0x20, 0x20,
  0x3c, 0x2f, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x3e, 0x0a, 0x3c, 0x2f, 0x68,
  0x65, 0x61, 0x64, 0x3e, 0x0a, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x0a,


  0x20, 0x20, 0x3c, 0x63, 0x61, 0x6e, 0x76, 0x61, 0x73, 0x20, 0x69, 0x64,
  0x3d, 0x27, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x43, 0x61, 0x6e, 0x76, 0x61,
  0x73, 0x27, 0x20, 0x77, 0x69, 0x64, 0x74, 0x68, 0x3d, 0x27, 0x36, 0x34,
  0x30, 0x27, 0x20, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x3d, 0x27, 0x34,
  0x38, 0x30, 0x27, 0x3e, 0x3c, 0x2f, 0x63, 0x61, 0x6e, 0x76, 0x61, 0x73,
  0x3e, 0x0a, 0x20, 0x20, 0x3c, 0x64, 0x69, 0x76, 0x20, 0x63, 0x6c, 0x61,
  0x73, 0x73, 0x3d, 0x27, 0x6b, 0x65, 0x79, 0x73, 0x20, 0x6d, 0x6f, 0x62,
  0x69, 0x6c, 0x65, 0x2d, 0x6f, 0x6e, 0x6c, 0x79, 0x27, 0x3e, 0x0a, 0x20,
  0x20, 0x20, 0x20, 0x3c, 0x64, 0x69, 0x76, 0x20, 0x63, 0x6c, 0x61, 0x73,
  0x73, 0x3d, 0x27, 0x6b, 0x65, 0x79, 0x27, 0x20, 0x64, 0x61, 0x74, 0x61,
  0x2d, 0x63, 0x6f, 0x64, 0x65, 0x3d, 0x27, 0x33, 0x38, 0x27, 0x20, 0x69,
  0x64, 0x3d, 0x27, 0x6b, 0x65, 0x79, 0x2d, 0x75, 0x70, 0x27, 0x3e, 0x55,
  0x50, 0x3c, 0x2f, 0x64, 0x69, 0x76, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20,
  0x3c, 0x64, 0x69, 0x76, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x27,
  0x6b, 0x65, 0x79, 0x27, 0x20, 0x64, 0x61, 0x74, 0x61, 0x2d, 0x63, 0x6f,
  0x64, 0x65, 0x3d, 0x27, 0x34, 0x30, 0x27, 0x20, 0x69, 0x64, 0x3d, 0x27,
  0x6b, 0x65, 0x79, 0x2d, 0x64, 0x6f, 0x77, 0x6e, 0x27, 0x3e, 0x44, 0x4f,

  0x57, 0x4e, 0x3c, 0x2f, 0x64, 0x69, 0x76, 0x3e, 0x0a, 0x20, 0x20, 0x20,
  0x20, 0x3c, 0x64, 0x69, 0x76, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d,
  0x27, 0x6b, 0x65, 0x79, 0x27, 0x20, 0x64, 0x61, 0x74, 0x61, 0x2d, 0x63,

  0x6f, 0x64, 0x65, 0x3d, 0x27, 0x33, 0x39, 0x27, 0x20, 0x69, 0x64, 0x3d,
  0x27, 0x6b, 0x65, 0x79, 0x2d, 0x72, 0x69, 0x67, 0x68, 0x74, 0x27, 0x3e,
  0x52, 0x49, 0x47, 0x48, 0x54, 0x3c, 0x2f, 0x64, 0x69, 0x76, 0x3e, 0x0a,
  0x20, 0x20, 0x20, 0x20, 0x3c, 0x64, 0x69, 0x76, 0x20, 0x63, 0x6c, 0x61,
  0x73, 0x73, 0x3d, 0x27, 0x6b, 0x65, 0x79, 0x27, 0x20, 0x64, 0x61, 0x74,
  0x61, 0x2d, 0x63, 0x6f, 0x64, 0x65, 0x3d, 0x27, 0x33, 0x37, 0x27, 0x20,
  0x69, 0x64, 0x3d, 0x27, 0x6b, 0x65, 0x79, 0x2d, 0x6c, 0x65, 0x66, 0x74,
  0x27, 0x3e, 0x4c, 0x45, 0x46, 0x54, 0x3c, 0x2f, 0x64, 0x69, 0x76, 0x3e,




  0x0a, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x64, 0x69, 0x76, 0x20, 0x63, 0x6c,
  0x61, 0x73, 0x73, 0x3d, 0x27, 0x6b, 0x65, 0x79, 0x20, 0x6b, 0x65, 0x79,
  0x2d, 0x73, 0x6d, 0x61, 0x6c, 0x6c, 0x27, 0x20, 0x64, 0x61, 0x74, 0x61,
  0x2d, 0x63, 0x6f, 0x64, 0x65, 0x3d, 0x27, 0x32, 0x37, 0x27, 0x20, 0x69,
  0x64, 0x3d, 0x27, 0x6b, 0x65, 0x79, 0x2d, 0x65, 0x73, 0x63, 0x27, 0x3e,
  0x45, 0x53, 0x43, 0x3c, 0x2f, 0x64, 0x69, 0x76, 0x3e, 0x0a, 0x20, 0x20,
  0x20, 0x20, 0x3c, 0x64, 0x69, 0x76, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73,
  0x3d, 0x27, 0x6b, 0x65, 0x79, 0x20, 0x6b, 0x65, 0x79, 0x2d, 0x73, 0x6d,
  0x61, 0x6c, 0x6c, 0x27, 0x20, 0x64, 0x61, 0x74, 0x61, 0x2d, 0x63, 0x6f,


  0x64, 0x65, 0x3d, 0x27, 0x31, 0x33, 0x27, 0x20, 0x69, 0x64, 0x3d, 0x27,
  0x6b, 0x65, 0x79, 0x2d, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x27, 0x3e, 0x45,
  0x4e, 0x54, 0x45, 0x52, 0x3c, 0x2f, 0x64, 0x69, 0x76, 0x3e, 0x0a, 0x20,


  0x20, 0x3c, 0x2f, 0x64, 0x69, 0x76, 0x3e, 0x0a, 0x20, 0x20, 0x3c, 0x73,
  0x63, 0x72, 0x69, 0x70, 0x74, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x27,
  0x74, 0x65, 0x78, 0x74, 0x2f, 0x6a, 0x61, 0x76, 0x61, 0x73, 0x63, 0x72,
  0x69, 0x70, 0x74, 0x27, 0x20, 0x73, 0x72, 0x63, 0x3d, 0x27, 0x6a, 0x73,
  0x6d, 0x70, 0x67, 0x2e, 0x6a, 0x73, 0x27, 0x3e, 0x3c, 0x2f, 0x73, 0x63,
  0x72, 0x69, 0x70, 0x74, 0x3e, 0x0a, 0x20, 0x20, 0x3c, 0x73, 0x63, 0x72,
  0x69, 0x70, 0x74, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x27, 0x74, 0x65,
  0x78, 0x74, 0x2f, 0x6a, 0x61, 0x76, 0x61, 0x73, 0x63, 0x72, 0x69, 0x70,
  0x74, 0x27, 0x20, 0x73, 0x72, 0x63, 0x3d, 0x27, 0x6a, 0x73, 0x6d, 0x70,
  0x67, 0x2d, 0x76, 0x6e, 0x63, 0x2e, 0x6a, 0x73, 0x27, 0x3e, 0x3c, 0x2f,
  0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x3e, 0x0a, 0x3c, 0x2f, 0x62, 0x6f,
  0x64, 0x79, 0x3e, 0x0a, 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e, 0x0a

};

static const unsigned char JSMPEG_file_2[] = {
  0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x77, 0x69,
  0x6e, 0x64, 0x6f, 0x77, 0x29, 0x7b, 0x20, 0x22, 0x75, 0x73, 0x65, 0x20,
  0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x22, 0x3b, 0x0a, 0x0a, 0x2f, 0x2f,
  0x20, 0x6a, 0x73, 0x6d, 0x70, 0x65, 0x67, 0x20, 0x62, 0x79, 0x20, 0x44,
................................................................................
  0x65, 0x2f, 0x64, 0x65, 0x73, 0x6b, 0x74, 0x6f, 0x70, 0x0a, 0x64, 0x6f,
  0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x62, 0x6f, 0x64, 0x79, 0x2e,
  0x63, 0x6c, 0x61, 0x73, 0x73, 0x4e, 0x61, 0x6d, 0x65, 0x20, 0x3d, 0x20,
  0x28, 0x27, 0x6f, 0x6e, 0x74, 0x6f, 0x75, 0x63, 0x68, 0x73, 0x74, 0x61,
  0x72, 0x74, 0x27, 0x20, 0x69, 0x6e, 0x20, 0x77, 0x69, 0x6e, 0x64, 0x6f,
  0x77, 0x29, 0x20, 0x3f, 0x20, 0x27, 0x6d, 0x6f, 0x62, 0x69, 0x6c, 0x65,
  0x27, 0x20, 0x3a, 0x20, 0x27, 0x64, 0x65, 0x73, 0x6b, 0x74, 0x6f, 0x70,








  0x27, 0x3b, 0x0a, 0x0a, 0x0a, 0x2f, 0x2f, 0x20, 0x53, 0x65, 0x74, 0x75,
  0x70, 0x20, 0x74, 0x68, 0x65, 0x20, 0x57, 0x65, 0x62, 0x53, 0x6f, 0x63,
  0x6b, 0x65, 0x74, 0x20, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69,
  0x6f, 0x6e, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x73, 0x74, 0x61, 0x72, 0x74,
  0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x0a,
  0x76, 0x61, 0x72, 0x20, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x20, 0x3d,
  0x20, 0x6e, 0x65, 0x77, 0x20, 0x57, 0x65, 0x62, 0x53, 0x6f, 0x63, 0x6b,
  0x65, 0x74, 0x28, 0x20, 0x27, 0x77, 0x73, 0x3a, 0x2f, 0x2f, 0x27, 0x20,
  0x2b, 0x20, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x6c, 0x6f, 0x63,
  0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x68, 0x6f, 0x73, 0x74, 0x20, 0x2b,
  0x20, 0x27, 0x2f, 0x77, 0x73, 0x27, 0x2c, 0x20, 0x22, 0x77, 0x73, 0x22,
  0x20, 0x29, 0x3b, 0x0a, 0x0a, 0x76, 0x61, 0x72, 0x20, 0x63, 0x61, 0x6e,
  0x76, 0x61, 0x73, 0x20, 0x3d, 0x20, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65,
  0x6e, 0x74, 0x2e, 0x67, 0x65, 0x74, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e,
  0x74, 0x42, 0x79, 0x49, 0x64, 0x28, 0x27, 0x76, 0x69, 0x64, 0x65, 0x6f,
  0x43, 0x61, 0x6e, 0x76, 0x61, 0x73, 0x27, 0x29, 0x3b, 0x0a, 0x76, 0x61,



  0x72, 0x20, 0x75, 0x73, 0x65, 0x32, 0x64, 0x20, 0x20, 0x3d, 0x20, 0x21,
  0x21, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x6c, 0x6f,
  0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x68, 0x72, 0x65, 0x66, 0x2e,
  0x6d, 0x61, 0x74, 0x63, 0x68, 0x28, 0x27, 0x75, 0x73, 0x65, 0x32, 0x64,
  0x27, 0x29, 0x3b, 0x0a, 0x76, 0x61, 0x72, 0x20, 0x70, 0x6c, 0x61, 0x79,
  0x65, 0x72, 0x20, 0x3d, 0x20, 0x6e, 0x65, 0x77, 0x20, 0x6a, 0x73, 0x6d,
  0x70, 0x65, 0x67, 0x28, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2c, 0x20,
  0x7b, 0x63, 0x61, 0x6e, 0x76, 0x61, 0x73, 0x3a, 0x63, 0x61, 0x6e, 0x76,
  0x61, 0x73, 0x2c, 0x20, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x43, 0x61, 0x6e,
  0x76, 0x61, 0x73, 0x32, 0x44, 0x3a, 0x75, 0x73, 0x65, 0x32, 0x64, 0x7d,
  0x29, 0x3b, 0x0a, 0x0a, 0x0a, 0x2f, 0x2f, 0x20, 0x49, 0x6e, 0x70, 0x75,
  0x74, 0x0a, 0x0a, 0x76, 0x61, 0x72, 0x20, 0x6d, 0x6f, 0x75, 0x73, 0x65,
  0x4c, 0x6f, 0x63, 0x6b, 0x20, 0x3d, 0x20, 0x21, 0x21, 0x64, 0x6f, 0x63,
  0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69,
  0x6f, 0x6e, 0x2e, 0x68, 0x72, 0x65, 0x66, 0x2e, 0x6d, 0x61, 0x74, 0x63,
  0x68, 0x28, 0x27, 0x6d, 0x6f, 0x75, 0x73, 0x65, 0x6c, 0x6f, 0x63, 0x6b,
  0x27, 0x29, 0x3b, 0x0a, 0x76, 0x61, 0x72, 0x20, 0x6c, 0x61, 0x73, 0x74,
  0x4d, 0x6f, 0x75, 0x73, 0x65, 0x20, 0x3d, 0x20, 0x7b, 0x78, 0x3a, 0x20,
  0x30, 0x2c, 0x20, 0x79, 0x3a, 0x20, 0x30, 0x7d, 0x3b, 0x0a, 0x69, 0x66,
  0x28, 0x20, 0x6d, 0x6f, 0x75, 0x73, 0x65, 0x4c, 0x6f, 0x63, 0x6b, 0x20,
  0x29, 0x20, 0x7b, 0x0a, 0x09, 0x2f, 0x2f, 0x20, 0x46, 0x55, 0x43, 0x4b,
  0x20, 0x59, 0x45, 0x41, 0x48, 0x2c, 0x20, 0x56, 0x45, 0x4e, 0x44, 0x4f,
  0x52, 0x20, 0x50, 0x52, 0x45, 0x46, 0x49, 0x58, 0x45, 0x53, 0x2e, 0x20,
  0x4c, 0x4f, 0x56, 0x45, 0x20, 0x45, 0x4d, 0x21, 0x0a, 0x09, 0x63, 0x61,
  0x6e, 0x76, 0x61, 0x73, 0x2e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
  0x50, 0x6f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x4c, 0x6f, 0x63, 0x6b, 0x20,
  0x3d, 0x20, 0x63, 0x61, 0x6e, 0x76, 0x61, 0x73, 0x2e, 0x72, 0x65, 0x71,
  0x75, 0x65, 0x73, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x4c,
  0x6f, 0x63, 0x6b, 0x20, 0x7c, 0x7c, 0x0a, 0x09, 0x09, 0x63, 0x61, 0x6e,
  0x76, 0x61, 0x73, 0x2e, 0x6d, 0x6f, 0x7a, 0x52, 0x65, 0x71, 0x75, 0x65,
  0x73, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x4c, 0x6f, 0x63,
  0x6b, 0x20, 0x7c, 0x7c, 0x20, 0x0a, 0x09, 0x09, 0x63, 0x61, 0x6e, 0x76,
  0x61, 0x73, 0x2e, 0x77, 0x65, 0x62, 0x6b, 0x69, 0x74, 0x52, 0x65, 0x71,
  0x75, 0x65, 0x73, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x4c,
  0x6f, 0x63, 0x6b, 0x20, 0x7c, 0x7c, 0x20, 0x0a, 0x09, 0x09, 0x28, 0x66,
  0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x20, 0x7b, 0x7d,
  0x29, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x2f, 0x2f, 0x20, 0x65, 0x6e, 0x75,
  0x6d, 0x20, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65,
  0x5f, 0x74, 0x0a, 0x76, 0x61, 0x72, 0x20, 0x49, 0x4e, 0x50, 0x55, 0x54,
  0x5f, 0x4b, 0x45, 0x59, 0x20, 0x3d, 0x20, 0x30, 0x78, 0x30, 0x30, 0x30,
  0x31, 0x2c, 0x0a, 0x09, 0x49, 0x4e, 0x50, 0x55, 0x54, 0x5f, 0x4d, 0x4f,
  0x55, 0x53, 0x45, 0x5f, 0x42, 0x55, 0x54, 0x54, 0x4f, 0x4e, 0x20, 0x3d,
  0x20, 0x30, 0x78, 0x30, 0x30, 0x30, 0x32, 0x2c, 0x0a, 0x09, 0x49, 0x4e,
  0x50, 0x55, 0x54, 0x5f, 0x4d, 0x4f, 0x55, 0x53, 0x45, 0x5f, 0x41, 0x42,
  0x53, 0x4f, 0x4c, 0x55, 0x54, 0x45, 0x20, 0x3d, 0x20, 0x30, 0x78, 0x30,
  0x30, 0x30, 0x34, 0x2c, 0x0a, 0x09, 0x49, 0x4e, 0x50, 0x55, 0x54, 0x5f,
  0x4d, 0x4f, 0x55, 0x53, 0x45, 0x5f, 0x52, 0x45, 0x4c, 0x41, 0x54, 0x49,
  0x56, 0x45, 0x20, 0x3d, 0x20, 0x30, 0x78, 0x30, 0x30, 0x30, 0x38, 0x2c,
  0x0a, 0x09, 0x49, 0x4e, 0x50, 0x55, 0x54, 0x5f, 0x4d, 0x4f, 0x55, 0x53,
  0x45, 0x5f, 0x57, 0x48, 0x45, 0x45, 0x4c, 0x20, 0x3d, 0x20, 0x30, 0x78,
  0x30, 0x30, 0x31, 0x30, 0x3b, 0x0a, 0x0a, 0x76, 0x61, 0x72, 0x20, 0x4b,
  0x45, 0x59, 0x5f, 0x44, 0x4f, 0x57, 0x4e, 0x20, 0x3d, 0x20, 0x30, 0x78,
  0x30, 0x31, 0x2c, 0x0a, 0x09, 0x4b, 0x45, 0x59, 0x5f, 0x55, 0x50, 0x20,
  0x3d, 0x20, 0x30, 0x78, 0x30, 0x30, 0x2c, 0x0a, 0x09, 0x4b, 0x45, 0x59,
  0x5f, 0x50, 0x52, 0x45, 0x53, 0x53, 0x20, 0x3d, 0x20, 0x30, 0x78, 0x30,
  0x32, 0x2c, 0x0a, 0x09, 0x4b, 0x45, 0x59, 0x5f, 0x52, 0x49, 0x47, 0x48,
  0x54, 0x20, 0x3d, 0x20, 0x30, 0x78, 0x30, 0x34, 0x2c, 0x0a, 0x09, 0x4d,
  0x4f, 0x55, 0x53, 0x45, 0x5f, 0x31, 0x5f, 0x44, 0x4f, 0x57, 0x4e, 0x20,
  0x3d, 0x20, 0x30, 0x78, 0x30, 0x30, 0x30, 0x32, 0x2c, 0x0a, 0x09, 0x4d,
  0x4f, 0x55, 0x53, 0x45, 0x5f, 0x31, 0x5f, 0x55, 0x50, 0x20, 0x3d, 0x20,
  0x30, 0x78, 0x30, 0x30, 0x30, 0x34, 0x2c, 0x0a, 0x09, 0x4d, 0x4f, 0x55,
  0x53, 0x45, 0x5f, 0x32, 0x5f, 0x44, 0x4f, 0x57, 0x4e, 0x20, 0x3d, 0x20,
  0x30, 0x78, 0x30, 0x30, 0x30, 0x38, 0x2c, 0x0a, 0x09, 0x4d, 0x4f, 0x55,
  0x53, 0x45, 0x5f, 0x32, 0x5f, 0x55, 0x50, 0x20, 0x3d, 0x20, 0x30, 0x78,
  0x30, 0x30, 0x31, 0x30, 0x3b, 0x0a, 0x0a, 0x2f, 0x2f, 0x20, 0x73, 0x74,
  0x72, 0x75, 0x63, 0x74, 0x20, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x5f, 0x6b,
  0x65, 0x79, 0x5f, 0x74, 0x20, 0x7b, 0x20, 0x75, 0x69, 0x6e, 0x74, 0x31,
  0x36, 0x20, 0x74, 0x79, 0x70, 0x65, 0x2c, 0x20, 0x75, 0x69, 0x6e, 0x74,
  0x31, 0x36, 0x20, 0x73, 0x74, 0x61, 0x74, 0x65, 0x3b, 0x20, 0x75, 0x69,
  0x6e, 0x74, 0x31, 0x36, 0x20, 0x6b, 0x65, 0x79, 0x5f, 0x63, 0x6f, 0x64,
  0x65, 0x3b, 0x20, 0x7d, 0x0a, 0x76, 0x61, 0x72, 0x20, 0x73, 0x65, 0x6e,
  0x64, 0x4b, 0x65, 0x79, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74,
  0x69, 0x6f, 0x6e, 0x28, 0x65, 0x76, 0x2c, 0x20, 0x61, 0x63, 0x74, 0x69,
  0x6f, 0x6e, 0x2c, 0x20, 0x6b, 0x65, 0x79, 0x2c, 0x20, 0x72, 0x69, 0x67,
  0x68, 0x74, 0x29, 0x20, 0x7b, 0x0a, 0x09, 0x76, 0x61, 0x72, 0x20, 0x73,
  0x65, 0x6e, 0x64, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d,
  0x20, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x7c, 0x20, 0x28, 0x72,
  0x69, 0x67, 0x68, 0x74, 0x20, 0x3f, 0x20, 0x4b, 0x45, 0x59, 0x5f, 0x52,
  0x49, 0x47, 0x48, 0x54, 0x20, 0x3a, 0x20, 0x30, 0x29, 0x3b, 0x09, 0x0a,
  0x09, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x73, 0x65, 0x6e, 0x64,
  0x28, 0x6e, 0x65, 0x77, 0x20, 0x55, 0x69, 0x6e, 0x74, 0x31, 0x36, 0x41,
  0x72, 0x72, 0x61, 0x79, 0x28, 0x5b, 0x49, 0x4e, 0x50, 0x55, 0x54, 0x5f,
  0x4b, 0x45, 0x59, 0x2c, 0x20, 0x73, 0x65, 0x6e, 0x64, 0x5f, 0x61, 0x63,
  0x74, 0x69, 0x6f, 0x6e, 0x2c, 0x20, 0x6b, 0x65, 0x79, 0x5d, 0x29, 0x29,
  0x3b, 0x0a, 0x09, 0x69, 0x66, 0x20, 0x28, 0x20, 0x6b, 0x65, 0x79, 0x20,
  0x3d, 0x3d, 0x20, 0x38, 0x20, 0x7c, 0x7c, 0x09, 0x09, 0x2f, 0x2f, 0x20,
................................................................................
  0x75, 0x6c, 0x74, 0x28, 0x29, 0x3b, 0x0a, 0x09, 0x7d, 0x0a, 0x09, 0x69,
  0x66, 0x20, 0x28, 0x20, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d,
  0x3d, 0x20, 0x4b, 0x45, 0x59, 0x5f, 0x55, 0x50, 0x20, 0x29, 0x20, 0x7b,
  0x0a, 0x09, 0x09, 0x65, 0x76, 0x2e, 0x73, 0x74, 0x6f, 0x70, 0x50, 0x72,
  0x6f, 0x70, 0x61, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x3b,
  0x0a, 0x09, 0x7d, 0x0a, 0x09, 0x65, 0x76, 0x2e, 0x70, 0x72, 0x65, 0x76,
  0x65, 0x6e, 0x74, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x28, 0x29,





































  0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x0a, 0x2f, 0x2f, 0x20, 0x73, 0x74, 0x72,
  0x75, 0x63, 0x74, 0x20, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x5f, 0x6d, 0x6f,
  0x75, 0x73, 0x65, 0x5f, 0x74, 0x20, 0x7b, 0x20, 0x75, 0x69, 0x6e, 0x74,
  0x31, 0x36, 0x20, 0x74, 0x79, 0x70, 0x65, 0x2c, 0x20, 0x75, 0x69, 0x6e,
  0x74, 0x31, 0x36, 0x20, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x3b, 0x20, 0x66,
  0x6c, 0x6f, 0x61, 0x74, 0x33, 0x32, 0x20, 0x78, 0x3b, 0x20, 0x66, 0x6c,
  0x6f, 0x61, 0x74, 0x33, 0x32, 0x20, 0x79, 0x3b, 0x20, 0x7d, 0x0a, 0x76,
................................................................................
  0x2c, 0x20, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x29, 0x20, 0x7b, 0x0a,
  0x09, 0x76, 0x61, 0x72, 0x20, 0x74, 0x79, 0x70, 0x65, 0x20, 0x3d, 0x20,
  0x30, 0x3b, 0x0a, 0x09, 0x76, 0x61, 0x72, 0x20, 0x78, 0x2c, 0x20, 0x79,
  0x3b, 0x0a, 0x0a, 0x09, 0x69, 0x66, 0x28, 0x20, 0x61, 0x63, 0x74, 0x69,
  0x6f, 0x6e, 0x20, 0x29, 0x20, 0x7b, 0x0a, 0x09, 0x09, 0x74, 0x79, 0x70,
  0x65, 0x20, 0x7c, 0x3d, 0x20, 0x49, 0x4e, 0x50, 0x55, 0x54, 0x5f, 0x4d,
  0x4f, 0x55, 0x53, 0x45, 0x5f, 0x42, 0x55, 0x54, 0x54, 0x4f, 0x4e, 0x3b,
  0x0a, 0x09, 0x09, 0x0a, 0x09, 0x09, 0x2f, 0x2f, 0x20, 0x41, 0x74, 0x74,
  0x65, 0x6d, 0x70, 0x74, 0x20, 0x74, 0x6f, 0x20, 0x6c, 0x6f, 0x63, 0x6b,
  0x20, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x20, 0x61, 0x74, 0x20,
  0x6d, 0x6f, 0x75, 0x73, 0x65, 0x31, 0x20, 0x64, 0x6f, 0x77, 0x6e, 0x0a,
  0x09, 0x09, 0x69, 0x66, 0x28, 0x20, 0x6d, 0x6f, 0x75, 0x73, 0x65, 0x4c,
  0x6f, 0x63, 0x6b, 0x20, 0x26, 0x26, 0x20, 0x61, 0x63, 0x74, 0x69, 0x6f,
  0x6e, 0x20, 0x3d, 0x3d, 0x3d, 0x20, 0x4d, 0x4f, 0x55, 0x53, 0x45, 0x5f,
  0x31, 0x5f, 0x44, 0x4f, 0x57, 0x4e, 0x20, 0x29, 0x20, 0x7b, 0x0a, 0x09,
  0x09, 0x09, 0x63, 0x61, 0x6e, 0x76, 0x61, 0x73, 0x2e, 0x72, 0x65, 0x71,
  0x75, 0x65, 0x73, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x4c,
  0x6f, 0x63, 0x6b, 0x28, 0x29, 0x3b, 0x0a, 0x09, 0x09, 0x7d, 0x0a, 0x09,
  0x7d, 0x0a, 0x09, 0x0a, 0x09, 0x2f, 0x2f, 0x20, 0x4f, 0x6e, 0x6c, 0x79,
  0x20, 0x6d, 0x61, 0x6b, 0x65, 0x20, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69,
  0x76, 0x65, 0x20, 0x6d, 0x6f, 0x75, 0x73, 0x65, 0x20, 0x6d, 0x6f, 0x76,
  0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x20, 0x69, 0x66, 0x20, 0x6e, 0x6f,
  0x20, 0x62, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x20, 0x69, 0x73, 0x20, 0x70,
  0x72, 0x65, 0x73, 0x73, 0x65, 0x64, 0x0a, 0x09, 0x69, 0x66, 0x28, 0x20,
  0x21, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x26, 0x26, 0x20, 0x6d,
  0x6f, 0x75, 0x73, 0x65, 0x4c, 0x6f, 0x63, 0x6b, 0x20, 0x29, 0x20, 0x7b,
  0x0a, 0x09, 0x09, 0x74, 0x79, 0x70, 0x65, 0x20, 0x7c, 0x3d, 0x20, 0x49,
  0x4e, 0x50, 0x55, 0x54, 0x5f, 0x4d, 0x4f, 0x55, 0x53, 0x45, 0x5f, 0x52,
  0x45, 0x4c, 0x41, 0x54, 0x49, 0x56, 0x45, 0x3b, 0x0a, 0x09, 0x09, 0x0a,
  0x09, 0x09, 0x76, 0x61, 0x72, 0x20, 0x70, 0x20, 0x3d, 0x20, 0x65, 0x76,
  0x2e, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x54, 0x6f, 0x75, 0x63,
  0x68, 0x65, 0x73, 0x20, 0x3f, 0x20, 0x65, 0x76, 0x2e, 0x63, 0x68, 0x61,
  0x6e, 0x67, 0x65, 0x64, 0x54, 0x6f, 0x75, 0x63, 0x68, 0x65, 0x73, 0x5b,
  0x30, 0x5d, 0x20, 0x3a, 0x20, 0x65, 0x76, 0x3b, 0x0a, 0x09, 0x09, 0x0a,
  0x09, 0x09, 0x2f, 0x2f, 0x20, 0x46, 0x55, 0x43, 0x4b, 0x2c, 0x20, 0x44,
  0x49, 0x44, 0x20, 0x49, 0x20, 0x4d, 0x45, 0x4e, 0x54, 0x49, 0x4f, 0x4e,
  0x20, 0x49, 0x20, 0x4c, 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0x56, 0x45, 0x20,
  0x56, 0x45, 0x4e, 0x44, 0x4f, 0x52, 0x20, 0x50, 0x52, 0x45, 0x46, 0x49,
  0x58, 0x45, 0x53, 0x3f, 0x20, 0x53, 0x4f, 0x20, 0x55, 0x53, 0x45, 0x46,
  0x55, 0x4c, 0x21, 0x0a, 0x09, 0x09, 0x78, 0x20, 0x3d, 0x20, 0x70, 0x2e,
  0x6d, 0x6f, 0x76, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x58, 0x20, 0x7c, 0x7c,
  0x20, 0x70, 0x2e, 0x6d, 0x6f, 0x7a, 0x4d, 0x6f, 0x76, 0x65, 0x6d, 0x65,
  0x6e, 0x74, 0x58, 0x20, 0x7c, 0x7c, 0x20, 0x70, 0x2e, 0x77, 0x65, 0x62,
  0x6b, 0x69, 0x74, 0x4d, 0x6f, 0x76, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x58,
  0x3b, 0x0a, 0x09, 0x09, 0x79, 0x20, 0x3d, 0x20, 0x70, 0x2e, 0x6d, 0x6f,
  0x76, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x59, 0x20, 0x7c, 0x7c, 0x20, 0x70,
  0x2e, 0x6d, 0x6f, 0x7a, 0x4d, 0x6f, 0x76, 0x65, 0x6d, 0x65, 0x6e, 0x74,
  0x59, 0x20, 0x7c, 0x7c, 0x20, 0x70, 0x2e, 0x77, 0x65, 0x62, 0x6b, 0x69,
  0x74, 0x4d, 0x6f, 0x76, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x59, 0x3b, 0x0a,
  0x0a, 0x09, 0x09, 0x69, 0x66, 0x28, 0x20, 0x74, 0x79, 0x70, 0x65, 0x6f,

  0x66, 0x20, 0x78, 0x20, 0x3d, 0x3d, 0x3d, 0x20, 0x27, 0x75, 0x6e, 0x64,
  0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x27, 0x20, 0x29, 0x20, 0x7b, 0x0a,
  0x09, 0x09, 0x09, 0x78, 0x20, 0x3d, 0x20, 0x70, 0x2e, 0x63, 0x6c, 0x69,
  0x65, 0x6e, 0x74, 0x58, 0x20, 0x2d, 0x20, 0x6c, 0x61, 0x73, 0x74, 0x4d,
  0x6f, 0x75, 0x73, 0x65, 0x2e, 0x78, 0x3b, 0x0a, 0x09, 0x09, 0x09, 0x79,
  0x20, 0x3d, 0x20, 0x70, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x59,
  0x20, 0x2d, 0x20, 0x6c, 0x61, 0x73, 0x74, 0x4d, 0x6f, 0x75, 0x73, 0x65,
  0x2e, 0x79, 0x3b, 0x0a, 0x09, 0x09, 0x7d, 0x0a, 0x0a, 0x09, 0x09, 0x6c,
  0x61, 0x73, 0x74, 0x4d, 0x6f, 0x75, 0x73, 0x65, 0x2e, 0x78, 0x20, 0x3d,
  0x20, 0x70, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x58, 0x3b, 0x0a,

  0x09, 0x09, 0x6c, 0x61, 0x73, 0x74, 0x4d, 0x6f, 0x75, 0x73, 0x65, 0x2e,
  0x79, 0x20, 0x3d, 0x20, 0x70, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74,
  0x59, 0x3b, 0x0a, 0x09, 0x7d, 0x0a, 0x0a, 0x09, 0x2f, 0x2f, 0x20, 0x49,
  0x66, 0x20, 0x77, 0x65, 0x20, 0x73, 0x65, 0x6e, 0x64, 0x20, 0x61, 0x62,
  0x73, 0x6f, 0x6c, 0x75, 0x74, 0x65, 0x20, 0x6d, 0x6f, 0x75, 0x73, 0x65,
  0x20, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x73, 0x2c, 0x20, 0x77, 0x65, 0x20,
  0x63, 0x61, 0x6e, 0x20, 0x61, 0x6c, 0x77, 0x61, 0x79, 0x73, 0x20, 0x64,
  0x6f, 0x20, 0x73, 0x6f, 0x2c, 0x20, 0x65, 0x76, 0x65, 0x6e, 0x20, 0x66,
  0x6f, 0x72, 0x0a, 0x09, 0x2f, 0x2f, 0x20, 0x62, 0x75, 0x74, 0x74, 0x6f,
  0x6e, 0x20, 0x70, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x2e, 0x0a, 0x09,
  0x69, 0x66, 0x28, 0x20, 0x21, 0x6d, 0x6f, 0x75, 0x73, 0x65, 0x4c, 0x6f,
  0x63, 0x6b, 0x20, 0x29, 0x20, 0x7b, 0x0a, 0x09, 0x09, 0x74, 0x79, 0x70,
  0x65, 0x20, 0x7c, 0x3d, 0x20, 0x49, 0x4e, 0x50, 0x55, 0x54, 0x5f, 0x4d,
  0x4f, 0x55, 0x53, 0x45, 0x5f, 0x41, 0x42, 0x53, 0x4f, 0x4c, 0x55, 0x54,
  0x45, 0x3b, 0x0a, 0x09, 0x09, 0x0a, 0x09, 0x09, 0x76, 0x61, 0x72, 0x20,

  0x72, 0x65, 0x63, 0x74, 0x20, 0x3d, 0x20, 0x63, 0x61, 0x6e, 0x76, 0x61,
  0x73, 0x2e, 0x67, 0x65, 0x74, 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x69, 0x6e,
  0x67, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x63, 0x74, 0x28,
  0x29, 0x3b, 0x0a, 0x09, 0x09, 0x76, 0x61, 0x72, 0x20, 0x73, 0x63, 0x61,
  0x6c, 0x65, 0x58, 0x20, 0x3d, 0x20, 0x63, 0x61, 0x6e, 0x76, 0x61, 0x73,
  0x2e, 0x77, 0x69, 0x64, 0x74, 0x68, 0x20, 0x2f, 0x20, 0x28, 0x72, 0x65,
  0x63, 0x74, 0x2e, 0x72, 0x69, 0x67, 0x68, 0x74, 0x2d, 0x72, 0x65, 0x63,
  0x74, 0x2e, 0x6c, 0x65, 0x66, 0x74, 0x29, 0x2c, 0x0a, 0x09, 0x09, 0x09,
  0x73, 0x63, 0x61, 0x6c, 0x65, 0x59, 0x20, 0x3d, 0x20, 0x63, 0x61, 0x6e,
  0x76, 0x61, 0x73, 0x2e, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x20, 0x2f,
  0x20, 0x28, 0x72, 0x65, 0x63, 0x74, 0x2e, 0x62, 0x6f, 0x74, 0x74, 0x6f,
  0x6d, 0x2d, 0x72, 0x65, 0x63, 0x74, 0x2e, 0x74, 0x6f, 0x70, 0x29, 0x3b,
  0x0a, 0x09, 0x09, 0x0a, 0x09, 0x09, 0x76, 0x61, 0x72, 0x20, 0x70, 0x20,
  0x3d, 0x20, 0x65, 0x76, 0x2e, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64,
  0x54, 0x6f, 0x75, 0x63, 0x68, 0x65, 0x73, 0x20, 0x3f, 0x20, 0x65, 0x76,
  0x2e, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x54, 0x6f, 0x75, 0x63,
  0x68, 0x65, 0x73, 0x5b, 0x30, 0x5d, 0x20, 0x3a, 0x20, 0x65, 0x76, 0x3b,
  0x0a, 0x09, 0x09, 0x76, 0x61, 0x72, 0x20, 0x78, 0x20, 0x3d, 0x20, 0x28,
  0x70, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x58, 0x20, 0x2d, 0x20,
  0x72, 0x65, 0x63, 0x74, 0x2e, 0x6c, 0x65, 0x66, 0x74, 0x29, 0x20, 0x2a,
  0x20, 0x73, 0x63, 0x61, 0x6c, 0x65, 0x58, 0x2c, 0x0a, 0x09, 0x09, 0x09,
  0x79, 0x20, 0x3d, 0x20, 0x28, 0x70, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e,
  0x74, 0x59, 0x20, 0x2d, 0x20, 0x72, 0x65, 0x63, 0x74, 0x2e, 0x74, 0x6f,
  0x70, 0x29, 0x20, 0x2a, 0x20, 0x73, 0x63, 0x61, 0x6c, 0x65, 0x59, 0x3b,
  0x0a, 0x09, 0x7d, 0x0a, 0x0a, 0x09, 0x6d, 0x6f, 0x75, 0x73, 0x65, 0x44,
  0x61, 0x74, 0x61, 0x54, 0x79, 0x70, 0x65, 0x46, 0x6c, 0x61, 0x67, 0x73,
  0x5b, 0x30, 0x5d, 0x20, 0x3d, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3b, 0x0a,
  0x09, 0x6d, 0x6f, 0x75, 0x73, 0x65, 0x44, 0x61, 0x74, 0x61, 0x54, 0x79,
  0x70, 0x65, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x5b, 0x31, 0x5d, 0x20, 0x3d,
  0x20, 0x28, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x7c, 0x7c, 0x30, 0x29,
  0x3b, 0x0a, 0x09, 0x6d, 0x6f, 0x75, 0x73, 0x65, 0x44, 0x61, 0x74, 0x61,
  0x43, 0x6f, 0x6f, 0x72, 0x64, 0x73, 0x5b, 0x30, 0x5d, 0x20, 0x3d, 0x20,
  0x78, 0x3b, 0x0a, 0x09, 0x6d, 0x6f, 0x75, 0x73, 0x65, 0x44, 0x61, 0x74,
  0x61, 0x43, 0x6f, 0x6f, 0x72, 0x64, 0x73, 0x5b, 0x31, 0x5d, 0x20, 0x3d,
  0x20, 0x79, 0x3b, 0x0a, 0x09, 0x0a, 0x09, 0x63, 0x6c, 0x69, 0x65, 0x6e,
  0x74, 0x2e, 0x73, 0x65, 0x6e, 0x64, 0x28, 0x6d, 0x6f, 0x75, 0x73, 0x65,
  0x44, 0x61, 0x74, 0x61, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x29, 0x3b,
  0x0a, 0x09, 0x65, 0x76, 0x2e, 0x70, 0x72, 0x65, 0x76, 0x65, 0x6e, 0x74,
  0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x28, 0x29, 0x3b, 0x0a, 0x7d,
  0x3b, 0x0a, 0x0a, 0x76, 0x61, 0x72, 0x20, 0x73, 0x65, 0x6e, 0x64, 0x57,
  0x68, 0x65, 0x65, 0x6c, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74,
  0x69, 0x6f, 0x6e, 0x28, 0x65, 0x76, 0x29, 0x20, 0x7b, 0x0a, 0x09, 0x6d,
................................................................................
  0x44, 0x61, 0x74, 0x61, 0x43, 0x6f, 0x6f, 0x72, 0x64, 0x73, 0x5b, 0x31,
  0x5d, 0x20, 0x3d, 0x20, 0x65, 0x76, 0x2e, 0x64, 0x65, 0x6c, 0x74, 0x61,
  0x59, 0x3b, 0x0a, 0x09, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x73,
  0x65, 0x6e, 0x64, 0x28, 0x6d, 0x6f, 0x75, 0x73, 0x65, 0x44, 0x61, 0x74,
  0x61, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x29, 0x3b, 0x0a, 0x09, 0x65,
  0x76, 0x2e, 0x70, 0x72, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x44, 0x65, 0x66,
  0x61, 0x75, 0x6c, 0x74, 0x28, 0x29, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x0a,
  0x0a, 0x76, 0x61, 0x72, 0x20, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x43, 0x6c,
  0x69, 0x65, 0x6e, 0x74, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74,
  0x69, 0x6f, 0x6e, 0x28, 0x65, 0x76, 0x29, 0x20, 0x7b, 0x0a, 0x09, 0x70,
  0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x73, 0x74, 0x6f, 0x70, 0x28, 0x29,
  0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x0a, 0x0a, 0x2f, 0x2f, 0x20, 0x4b, 0x65,
  0x79, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x0a, 0x77, 0x69, 0x6e, 0x64, 0x6f,
  0x77, 0x2e, 0x61, 0x64, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x69,
  0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x28, 0x27, 0x6b, 0x65, 0x79, 0x64,
  0x6f, 0x77, 0x6e, 0x27, 0x2c, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69,
  0x6f, 0x6e, 0x28, 0x65, 0x76, 0x29, 0x20, 0x7b, 0x20, 0x73, 0x65, 0x6e,





  0x64, 0x4b, 0x65, 0x79, 0x28, 0x65, 0x76, 0x2c, 0x20, 0x4b, 0x45, 0x59,
  0x5f, 0x44, 0x4f, 0x57, 0x4e, 0x2c, 0x20, 0x65, 0x76, 0x2e, 0x6b, 0x65,
  0x79, 0x43, 0x6f, 0x64, 0x65, 0x2c, 0x20, 0x65, 0x76, 0x2e, 0x6c, 0x6f,

  0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x3d, 0x20, 0x32, 0x20,
  0x2f, 0x2a, 0x20, 0x44, 0x4f, 0x4d, 0x5f, 0x4b, 0x45, 0x59, 0x5f, 0x4c,
  0x4f, 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x52, 0x49, 0x47, 0x48,
  0x54, 0x20, 0x2a, 0x2f, 0x29, 0x3b, 0x20, 0x7d, 0x2c, 0x20, 0x66, 0x61,
  0x6c, 0x73, 0x65, 0x20, 0x29, 0x3b, 0x0a, 0x77, 0x69, 0x6e, 0x64, 0x6f,
  0x77, 0x2e, 0x61, 0x64, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x69,
  0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x28, 0x27, 0x6b, 0x65, 0x79, 0x75,
  0x70, 0x27, 0x2c, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e,
  0x28, 0x65, 0x76, 0x29, 0x20, 0x7b, 0x20, 0x73, 0x65, 0x6e, 0x64, 0x4b,




  0x65, 0x79, 0x28, 0x65, 0x76, 0x2c, 0x20, 0x4b, 0x45, 0x59, 0x5f, 0x55,
  0x50, 0x2c, 0x20, 0x65, 0x76, 0x2e, 0x6b, 0x65, 0x79, 0x43, 0x6f, 0x64,
  0x65, 0x2c, 0x20, 0x65, 0x76, 0x2e, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69,

  0x6f, 0x6e, 0x20, 0x3d, 0x3d, 0x20, 0x32, 0x20, 0x2f, 0x2a, 0x20, 0x44,
  0x4f, 0x4d, 0x5f, 0x4b, 0x45, 0x59, 0x5f, 0x4c, 0x4f, 0x43, 0x41, 0x54,
  0x49, 0x4f, 0x4e, 0x5f, 0x52, 0x49, 0x47, 0x48, 0x54, 0x20, 0x2a, 0x2f,





  0x29, 0x3b, 0x20, 0x7d, 0x2c, 0x20, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x20,




  0x29, 0x3b, 0x0a, 0x0a, 0x2f, 0x2f, 0x20, 0x4d, 0x6f, 0x75, 0x73, 0x65,
  0x0a, 0x63, 0x61, 0x6e, 0x76, 0x61, 0x73, 0x2e, 0x61, 0x64, 0x64, 0x45,
  0x76, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72,
  0x28, 0x27, 0x6d, 0x6f, 0x75, 0x73, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x27,
  0x2c, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x65,
  0x76, 0x29, 0x20, 0x7b, 0x20, 0x73, 0x65, 0x6e, 0x64, 0x4d, 0x6f, 0x75,
  0x73, 0x65, 0x28, 0x65, 0x76, 0x2c, 0x20, 0x6e, 0x75, 0x6c, 0x6c, 0x29,
................................................................................
  0x69, 0x20, 0x3c, 0x20, 0x74, 0x6f, 0x75, 0x63, 0x68, 0x4b, 0x65, 0x79,
  0x73, 0x2e, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3b, 0x20, 0x69, 0x2b,
  0x2b, 0x20, 0x29, 0x20, 0x7b, 0x0a, 0x09, 0x64, 0x65, 0x66, 0x69, 0x6e,
  0x65, 0x54, 0x6f, 0x75, 0x63, 0x68, 0x42, 0x75, 0x74, 0x74, 0x6f, 0x6e,
  0x28, 0x74, 0x6f, 0x75, 0x63, 0x68, 0x4b, 0x65, 0x79, 0x73, 0x5b, 0x69,
  0x5d, 0x2c, 0x20, 0x74, 0x6f, 0x75, 0x63, 0x68, 0x4b, 0x65, 0x79, 0x73,
  0x5b, 0x69, 0x5d, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x2e,
  0x63, 0x6f, 0x64, 0x65, 0x29, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x2f, 0x2f,



































































































































































  0x20, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x20, 0x63, 0x6c, 0x6f, 0x73,
  0x65, 0x64, 0x0a, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x61, 0x64,
  0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e,
  0x65, 0x72, 0x28, 0x27, 0x75, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x27, 0x2c,
  0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x65, 0x76,
  0x29, 0x20, 0x7b, 0x20, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x43, 0x6c, 0x69,
  0x65, 0x6e, 0x74, 0x28, 0x29, 0x3b, 0x20, 0x7d, 0x2c, 0x20, 0x66, 0x61,
  0x6c, 0x73, 0x65, 0x20, 0x29, 0x3b, 0x0a
};

static const struct {
    const char *name;
    int length;
    const unsigned char *data;
} JSMPEG_files[] = {







|
>
|
<
>
>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
>
>
>
|
|
|
|
|
>
>
|
>
|
|
|
|
|
<
>
|
|

|
|
|
|
|
|
|
|
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
<
>
>
>
>
>
>
|
|
>
>

<
>
>
>
>
>
>
>
>
|
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
<
<
>
|
>
>
>
>
|
<
|
<
<
>
>
|
|
<
>
|
|
<
>
|
<
<
<
<
|
|
>
>
|
|
|
|
|
|
<
<
|
<
<
<
|
|
|
<
<
>
|
|
<
>
|
<
|
<
<
<
<
|
>
>
>
>
|
<
<
<
<
<
|
<
<
>
>
|
<
<
>
>
|
|
|
|
|
|
|
|
|
|
|
|
>







 







>
>
>
>
>
>
>
>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
>
>
>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|







 







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







 







|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<
>
|
|
|
|
|
|
|
|
|
<
>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<
>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|







 







|
|
|
|
|
|
<
<
<
|
>
>
>
>
>
|
|
<
>
|
|
|
|
<
<
|
|
|
>
>
>
>
|
|
<
>
|
|
|
>
>
>
>
>
|
>
>
>
>







 







|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
|
|
|
|
|
|
|







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
....
6480
6481
6482
6483
6484
6485
6486
6487
6488
6489
6490
6491
6492
6493
6494
6495
6496
6497
6498
6499
6500
6501
6502
6503
6504
6505
6506
6507
6508
6509
6510
6511
6512
6513
6514
6515
6516
6517
6518
6519
6520
6521
6522
6523
6524
6525
6526
6527
6528
6529
6530
6531
6532
6533
6534
6535
6536
6537
6538
6539
6540
6541
6542
6543
6544
6545
6546
6547
6548
6549
6550
6551
6552
6553
6554
6555
6556
6557
6558
6559
6560
6561
6562
6563
6564
6565
6566
6567
6568
6569
6570
6571
6572
6573
6574
6575
6576
6577
6578
6579
6580
6581
6582
6583
6584
6585
6586
6587
6588
6589
6590
6591
6592
6593
6594
6595
6596
6597
6598
6599
....
6645
6646
6647
6648
6649
6650
6651
6652
6653
6654
6655
6656
6657
6658
6659
6660
6661
6662
6663
6664
6665
6666
6667
6668
6669
6670
6671
6672
6673
6674
6675
6676
6677
6678
6679
6680
6681
6682
6683
6684
6685
6686
6687
6688
6689
6690
6691
6692
6693
6694
6695
....
6712
6713
6714
6715
6716
6717
6718
6719
6720
6721
6722
6723
6724
6725
6726
6727
6728
6729
6730
6731
6732
6733
6734
6735
6736
6737
6738
6739
6740
6741
6742
6743
6744

6745
6746
6747
6748
6749
6750
6751
6752
6753
6754
6755
6756
6757
6758
6759

6760
6761
6762
6763
6764
6765
6766
6767
6768
6769

6770
6771
6772
6773
6774
6775
6776
6777
6778
6779
6780
6781
6782
6783
6784

6785
6786
6787
6788
6789
6790
6791
6792
6793
6794
6795
6796
6797
6798
6799
6800
6801
6802
6803
6804
6805
6806
6807
6808
6809
6810
6811
6812
6813
6814
6815
6816
6817
6818
6819
6820
6821
6822
6823
6824
6825
6826
6827
....
6838
6839
6840
6841
6842
6843
6844
6845
6846
6847
6848
6849
6850



6851
6852
6853
6854
6855
6856
6857
6858

6859
6860
6861
6862
6863


6864
6865
6866
6867
6868
6869
6870
6871
6872

6873
6874
6875
6876
6877
6878
6879
6880
6881
6882
6883
6884
6885
6886
6887
6888
6889
6890
6891
6892
6893
....
6983
6984
6985
6986
6987
6988
6989
6990
6991
6992
6993
6994
6995
6996
6997
6998
6999
7000
7001
7002
7003
7004
7005
7006
7007
7008
7009
7010
7011
7012
7013
7014
7015
7016
7017
7018
7019
7020
7021
7022
7023
7024
7025
7026
7027
7028
7029
7030
7031
7032
7033
7034
7035
7036
7037
7038
7039
7040
7041
7042
7043
7044
7045
7046
7047
7048
7049
7050
7051
7052
7053
7054
7055
7056
7057
7058
7059
7060
7061
7062
7063
7064
7065
7066
7067
7068
7069
7070
7071
7072
7073
7074
7075
7076
7077
7078
7079
7080
7081
7082
7083
7084
7085
7086
7087
7088
7089
7090
7091
7092
7093
7094
7095
7096
7097
7098
7099
7100
7101
7102
7103
7104
7105
7106
7107
7108
7109
7110
7111
7112
7113
7114
7115
7116
7117
7118
7119
7120
7121
7122
7123
7124
7125
7126
7127
7128
7129
7130
7131
7132
7133
7134
7135
7136
7137
7138
7139
7140
7141
7142
7143
7144
7145
7146
7147
7148
7149
7150
7151
7152
7153
7154
7155
7156
7157
7158
7159
7160
7161
7162
7163
7164
7165
7166
7167
7168
  0x3d, 0x27, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
  0x70, 0x65, 0x27, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x3d,
  0x27, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3b, 0x20,
  0x63, 0x68, 0x61, 0x72, 0x73, 0x65, 0x74, 0x3d, 0x75, 0x74, 0x66, 0x2d,
  0x38, 0x27, 0x20, 0x2f, 0x3e, 0x0a, 0x20, 0x20, 0x3c, 0x6d, 0x65, 0x74,
  0x61, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x27, 0x76, 0x69, 0x65, 0x77,
  0x70, 0x6f, 0x72, 0x74, 0x27, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e,
  0x74, 0x3d, 0x27, 0x77, 0x69, 0x64, 0x74, 0x68, 0x3d, 0x64, 0x65, 0x76,
  0x69, 0x63, 0x65, 0x2d, 0x77, 0x69, 0x64, 0x74, 0x68, 0x2c, 0x20, 0x69,
  0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x2d, 0x73, 0x63, 0x61, 0x6c, 0x65,

  0x3d, 0x31, 0x2e, 0x30, 0x20, 0x75, 0x73, 0x65, 0x72, 0x2d, 0x73, 0x63,
  0x61, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x3d, 0x6e, 0x6f, 0x27, 0x20, 0x2f,
  0x3e, 0x0a, 0x20, 0x20, 0x3c, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x3e, 0x75,
  0x6e, 0x64, 0x72, 0x6f, 0x69, 0x64, 0x77, 0x69, 0x73, 0x68, 0x3c, 0x2f,
  0x74, 0x69, 0x74, 0x6c, 0x65, 0x3e, 0x0a, 0x20, 0x20, 0x3c, 0x73, 0x74,
  0x79, 0x6c, 0x65, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x27, 0x74, 0x65,
  0x78, 0x74, 0x2f, 0x63, 0x73, 0x73, 0x27, 0x3e, 0x0a, 0x20, 0x20, 0x20,
  0x20, 0x62, 0x6f, 0x64, 0x79, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20,
  0x20, 0x20, 0x62, 0x61, 0x63, 0x6b, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64,
  0x3a, 0x20, 0x23, 0x41, 0x41, 0x41, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20,
  0x20, 0x20, 0x74, 0x65, 0x78, 0x74, 0x2d, 0x61, 0x6c, 0x69, 0x67, 0x6e,
  0x3a, 0x20, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x3b, 0x0a, 0x20, 0x20,
  0x20, 0x20, 0x20, 0x20, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x3a, 0x20,
  0x30, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x70, 0x61, 0x64,
  0x64, 0x69, 0x6e, 0x67, 0x3a, 0x20, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x20,
  0x20, 0x20, 0x20, 0x66, 0x6f, 0x6e, 0x74, 0x2d, 0x66, 0x61, 0x6d, 0x69,
  0x6c, 0x79, 0x3a, 0x20, 0x73, 0x61, 0x6e, 0x73, 0x2d, 0x73, 0x65, 0x72,
  0x69, 0x66, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x63, 0x6f,
  0x6c, 0x6f, 0x72, 0x3a, 0x20, 0x23, 0x35, 0x35, 0x35, 0x3b, 0x0a, 0x20,
  0x20, 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x62, 0x6f, 0x64,
  0x79, 0x2e, 0x64, 0x65, 0x73, 0x6b, 0x74, 0x6f, 0x70, 0x20, 0x2e, 0x6d,
  0x6f, 0x62, 0x69, 0x6c, 0x65, 0x2d, 0x6f, 0x6e, 0x6c, 0x79, 0x20, 0x7b,
  0x20, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x3a, 0x20, 0x6e, 0x6f,
  0x6e, 0x65, 0x3b, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x62, 0x6f,
  0x64, 0x79, 0x2e, 0x6d, 0x6f, 0x62, 0x69, 0x6c, 0x65, 0x20, 0x2e, 0x64,
  0x65, 0x73, 0x6b, 0x74, 0x6f, 0x70, 0x2d, 0x6f, 0x6e, 0x6c, 0x79, 0x20,
  0x7b, 0x20, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x3a, 0x20, 0x6e,
  0x6f, 0x6e, 0x65, 0x3b, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x23,
  0x76, 0x69, 0x64, 0x65, 0x6f, 0x43, 0x61, 0x6e, 0x76, 0x61, 0x73, 0x20,
  0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2a, 0x20, 0x70,
  0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x61, 0x62, 0x73,
  0x6f, 0x6c, 0x75, 0x74, 0x65, 0x3b, 0x20, 0x2a, 0x2f, 0x0a, 0x20, 0x20,
  0x20, 0x20, 0x20, 0x20, 0x74, 0x6f, 0x70, 0x3a, 0x20, 0x35, 0x30, 0x25,
  0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x65, 0x66, 0x74,
  0x3a, 0x20, 0x35, 0x30, 0x25, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20,
  0x20, 0x2f, 0x2a, 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72,
  0x6d, 0x3a, 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x65,
  0x28, 0x2d, 0x35, 0x30, 0x25, 0x2c, 0x20, 0x2d, 0x35, 0x30, 0x25, 0x29,
  0x3b, 0x20, 0x2a, 0x2f, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x62,
  0x6f, 0x72, 0x64, 0x65, 0x72, 0x3a, 0x20, 0x35, 0x70, 0x78, 0x20, 0x73,
  0x6f, 0x6c, 0x69, 0x64, 0x20, 0x23, 0x37, 0x37, 0x37, 0x3b, 0x0a, 0x20,
  0x20, 0x20, 0x20, 0x20, 0x20, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x3a,
  0x20, 0x31, 0x30, 0x70, 0x78, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20,
  0x20, 0x2f, 0x2a, 0x20, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x3a, 0x20,
  0x63, 0x72, 0x6f, 0x73, 0x73, 0x68, 0x61, 0x69, 0x72, 0x3b, 0x20, 0x2a,
  0x2f, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x63, 0x75, 0x72, 0x73,
  0x6f, 0x72, 0x3a, 0x20, 0x6e, 0x6f, 0x6e, 0x65, 0x3b, 0x0a, 0x20, 0x20,
  0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2e, 0x66, 0x6b, 0x65,
  0x79, 0x73, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2f,
  0x2a, 0x20, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20,
  0x61, 0x62, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x65, 0x3b, 0x20, 0x2a, 0x2f,
  0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x74, 0x6f, 0x70, 0x3a, 0x20,
  0x30, 0x25, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x65,
  0x66, 0x74, 0x3a, 0x20, 0x30, 0x25, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20,
  0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2e, 0x66, 0x6b, 0x65, 0x79, 0x20,
  0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x63, 0x6f, 0x6c, 0x6f,
  0x72, 0x3a, 0x20, 0x23, 0x66, 0x66, 0x66, 0x3b, 0x0a, 0x20, 0x20, 0x20,
  0x20, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x3a, 0x20, 0x6c, 0x65,
  0x66, 0x74, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x77, 0x69,

  0x64, 0x74, 0x68, 0x3a, 0x20, 0x33, 0x65, 0x6d, 0x3b, 0x0a, 0x20, 0x20,
  0x20, 0x20, 0x20, 0x20, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x3a, 0x20,
  0x32, 0x65, 0x6d, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x70,
  0x61, 0x64, 0x64, 0x69, 0x6e, 0x67, 0x2d, 0x74, 0x6f, 0x70, 0x3a, 0x20,
  0x31, 0x65, 0x6d, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x62,
  0x61, 0x63, 0x6b, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x2d, 0x63, 0x6f,
  0x6c, 0x6f, 0x72, 0x3a, 0x20, 0x23, 0x35, 0x35, 0x35, 0x3b, 0x0a, 0x20,
  0x20, 0x20, 0x20, 0x20, 0x20, 0x6f, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79,
  0x3a, 0x20, 0x30, 0x2e, 0x35, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20,
  0x20, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x61,
  0x62, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x65, 0x3b, 0x0a, 0x20, 0x20, 0x20,
  0x20, 0x20, 0x20, 0x62, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x2d, 0x72, 0x61,
  0x64, 0x69, 0x75, 0x73, 0x3a, 0x20, 0x31, 0x30, 0x70, 0x78, 0x3b, 0x0a,
  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x62, 0x6f, 0x72, 0x64, 0x65, 0x72,
  0x3a, 0x20, 0x35, 0x70, 0x78, 0x20, 0x73, 0x6f, 0x6c, 0x69, 0x64, 0x20,
  0x23, 0x37, 0x37, 0x37, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
  0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x3a, 0x20, 0x35, 0x70, 0x78, 0x3b,
  0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x6d, 0x6f, 0x7a, 0x2d,
  0x75, 0x73, 0x65, 0x72, 0x2d, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x3a,
  0x20, 0x6e, 0x6f, 0x6e, 0x65, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20,
  0x20, 0x2d, 0x77, 0x65, 0x62, 0x6b, 0x69, 0x74, 0x2d, 0x75, 0x73, 0x65,
  0x72, 0x2d, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x3a, 0x20, 0x6e, 0x6f,
  0x6e, 0x65, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x6d,
  0x73, 0x2d, 0x75, 0x73, 0x65, 0x72, 0x2d, 0x73, 0x65, 0x6c, 0x65, 0x63,
  0x74, 0x3a, 0x20, 0x6e, 0x6f, 0x6e, 0x65, 0x3b, 0x0a, 0x20, 0x20, 0x20,
  0x20, 0x20, 0x20, 0x75, 0x73, 0x65, 0x72, 0x2d, 0x73, 0x65, 0x6c, 0x65,
  0x63, 0x74, 0x3a, 0x20, 0x6e, 0x6f, 0x6e, 0x65, 0x3b, 0x0a, 0x20, 0x20,
  0x20, 0x20, 0x20, 0x20, 0x2d, 0x6f, 0x2d, 0x75, 0x73, 0x65, 0x72, 0x2d,
  0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x3a, 0x20, 0x6e, 0x6f, 0x6e, 0x65,
  0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20,

  0x23, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20,
  0x20, 0x20, 0x20, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x3a, 0x20, 0x23, 0x66,
  0x66, 0x66, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x70, 0x6f,
  0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x61, 0x62, 0x73, 0x6f,
  0x6c, 0x75, 0x74, 0x65, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
  0x77, 0x69, 0x64, 0x74, 0x68, 0x3a, 0x20, 0x36, 0x30, 0x65, 0x6d, 0x3b,
  0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x68, 0x65, 0x69, 0x67, 0x68,
  0x74, 0x3a, 0x20, 0x32, 0x65, 0x6d, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20,
  0x20, 0x20, 0x70, 0x61, 0x64, 0x64, 0x69, 0x6e, 0x67, 0x2d, 0x74, 0x6f,
  0x70, 0x3a, 0x20, 0x30, 0x2e, 0x35, 0x65, 0x6d, 0x3b, 0x0a, 0x20, 0x20,
  0x20, 0x20, 0x20, 0x20, 0x70, 0x61, 0x64, 0x64, 0x69, 0x6e, 0x67, 0x2d,

  0x62, 0x6f, 0x74, 0x74, 0x6f, 0x6d, 0x3a, 0x20, 0x30, 0x2e, 0x35, 0x65,
  0x6d, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x70, 0x61, 0x64,
  0x64, 0x69, 0x6e, 0x67, 0x2d, 0x6c, 0x65, 0x66, 0x74, 0x3a, 0x20, 0x31,
  0x65, 0x6d, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x70, 0x61,
  0x64, 0x64, 0x69, 0x6e, 0x67, 0x2d, 0x72, 0x69, 0x67, 0x68, 0x74, 0x3a,
  0x20, 0x31, 0x65, 0x6d, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
  0x62, 0x61, 0x63, 0x6b, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x2d, 0x63,
  0x6f, 0x6c, 0x6f, 0x72, 0x3a, 0x20, 0x23, 0x35, 0x35, 0x35, 0x3b, 0x0a,
  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6f, 0x70, 0x61, 0x63, 0x69, 0x74,
  0x79, 0x3a, 0x20, 0x30, 0x2e, 0x35, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20,
  0x20, 0x20, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x3a, 0x20, 0x61, 0x6c,
  0x70, 0x68, 0x61, 0x28, 0x6f, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x3d,
  0x30, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x70, 0x6f,
  0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x61, 0x62, 0x73, 0x6f,
  0x6c, 0x75, 0x74, 0x65, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
  0x2f, 0x2a, 0x20, 0x77, 0x69, 0x64, 0x74, 0x68, 0x3a, 0x20, 0x30, 0x3b,
  0x20, 0x2a, 0x2f, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x62, 0x6f,
  0x72, 0x64, 0x65, 0x72, 0x2d, 0x72, 0x61, 0x64, 0x69, 0x75, 0x73, 0x3a,
  0x20, 0x31, 0x30, 0x70, 0x78, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20,
  0x20, 0x62, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x3a, 0x20, 0x35, 0x70, 0x78,
  0x20, 0x73, 0x6f, 0x6c, 0x69, 0x64, 0x20, 0x23, 0x37, 0x37, 0x37, 0x3b,
  0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6d, 0x61, 0x72, 0x67, 0x69,
  0x6e, 0x3a, 0x20, 0x35, 0x70, 0x78, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20,
  0x20, 0x20, 0x2d, 0x6d, 0x6f, 0x7a, 0x2d, 0x75, 0x73, 0x65, 0x72, 0x2d,
  0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x3a, 0x20, 0x6e, 0x6f, 0x6e, 0x65,
  0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x77, 0x65, 0x62,
  0x6b, 0x69, 0x74, 0x2d, 0x75, 0x73, 0x65, 0x72, 0x2d, 0x73, 0x65, 0x6c,
  0x65, 0x63, 0x74, 0x3a, 0x20, 0x6e, 0x6f, 0x6e, 0x65, 0x3b, 0x0a, 0x20,
  0x20, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x6d, 0x73, 0x2d, 0x75, 0x73, 0x65,


  0x72, 0x2d, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x3a, 0x20, 0x6e, 0x6f,
  0x6e, 0x65, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x75, 0x73,
  0x65, 0x72, 0x2d, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x3a, 0x20, 0x6e,
  0x6f, 0x6e, 0x65, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2d,
  0x6f, 0x2d, 0x75, 0x73, 0x65, 0x72, 0x2d, 0x73, 0x65, 0x6c, 0x65, 0x63,
  0x74, 0x3a, 0x20, 0x6e, 0x6f, 0x6e, 0x65, 0x3b, 0x0a, 0x20, 0x20, 0x20,
  0x20, 0x20, 0x20, 0x6c, 0x65, 0x66, 0x74, 0x3a, 0x20, 0x34, 0x70, 0x78,

  0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x74, 0x6f, 0x70, 0x3a,


  0x20, 0x34, 0x70, 0x78, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
  0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x3a, 0x20, 0x6e, 0x6f, 0x6e,
  0x65, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x20,
  0x20, 0x23, 0x6b, 0x65, 0x79, 0x2d, 0x7a, 0x6f, 0x6f, 0x6d, 0x20, 0x7b,

  0x72, 0x69, 0x67, 0x68, 0x74, 0x3a, 0x20, 0x34, 0x70, 0x78, 0x3b, 0x20,
  0x74, 0x6f, 0x70, 0x3a, 0x20, 0x34, 0x70, 0x78, 0x3b, 0x20, 0x7d, 0x0a,
  0x20, 0x20, 0x20, 0x20, 0x23, 0x6b, 0x65, 0x79, 0x2d, 0x6b, 0x62, 0x64,

  0x20, 0x7b, 0x72, 0x69, 0x67, 0x68, 0x74, 0x3a, 0x20, 0x34, 0x70, 0x78,
  0x3b, 0x20, 0x74, 0x6f, 0x70, 0x3a, 0x20, 0x35, 0x65, 0x6d, 0x3b, 0x20,




  0x7d, 0x0a, 0x20, 0x20, 0x3c, 0x2f, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x3e,
  0x0a, 0x3c, 0x2f, 0x68, 0x65, 0x61, 0x64, 0x3e, 0x0a, 0x3c, 0x62, 0x6f,
  0x64, 0x79, 0x3e, 0x0a, 0x20, 0x20, 0x3c, 0x64, 0x69, 0x76, 0x20, 0x69,
  0x64, 0x3d, 0x27, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x27, 0x3e,
  0x0a, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x63, 0x61, 0x6e, 0x76, 0x61, 0x73,
  0x20, 0x69, 0x64, 0x3d, 0x27, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x43, 0x61,
  0x6e, 0x76, 0x61, 0x73, 0x27, 0x20, 0x77, 0x69, 0x64, 0x74, 0x68, 0x3d,
  0x27, 0x36, 0x34, 0x30, 0x27, 0x20, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74,
  0x3d, 0x27, 0x34, 0x38, 0x30, 0x27, 0x3e, 0x3c, 0x2f, 0x63, 0x61, 0x6e,
  0x76, 0x61, 0x73, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x64, 0x69,


  0x76, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x27, 0x66, 0x6b, 0x65,



  0x79, 0x73, 0x27, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3c,
  0x64, 0x69, 0x76, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x27, 0x66,
  0x6b, 0x65, 0x79, 0x27, 0x20, 0x69, 0x64, 0x3d, 0x27, 0x6b, 0x65, 0x79,


  0x2d, 0x7a, 0x6f, 0x6f, 0x6d, 0x27, 0x3e, 0x5a, 0x3c, 0x2f, 0x64, 0x69,
  0x76, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x64, 0x69,
  0x76, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x27, 0x66, 0x6b, 0x65,

  0x79, 0x20, 0x6d, 0x6f, 0x62, 0x69, 0x6c, 0x65, 0x2d, 0x6f, 0x6e, 0x6c,
  0x79, 0x27, 0x20, 0x69, 0x64, 0x3d, 0x27, 0x6b, 0x65, 0x79, 0x2d, 0x6b,

  0x62, 0x64, 0x27, 0x3e, 0x4b, 0x3c, 0x2f, 0x64, 0x69, 0x76, 0x3e, 0x0a,




  0x20, 0x20, 0x20, 0x20, 0x3c, 0x2f, 0x64, 0x69, 0x76, 0x3e, 0x0a, 0x20,
  0x20, 0x20, 0x20, 0x3c, 0x21, 0x2d, 0x2d, 0x20, 0x69, 0x6e, 0x70, 0x75,
  0x74, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x61,
  0x6c, 0x6c, 0x6f, 0x77, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x6f, 0x6e, 0x73,
  0x63, 0x72, 0x65, 0x65, 0x6e, 0x20, 0x6b, 0x65, 0x79, 0x62, 0x6f, 0x61,
  0x72, 0x64, 0x20, 0x2d, 0x2d, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x3c,





  0x69, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d,


  0x27, 0x6d, 0x6f, 0x62, 0x69, 0x6c, 0x65, 0x2d, 0x6f, 0x6e, 0x6c, 0x79,
  0x27, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x27, 0x74, 0x65, 0x78, 0x74,
  0x27, 0x20, 0x69, 0x64, 0x3d, 0x27, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x27,


  0x20, 0x73, 0x69, 0x7a, 0x65, 0x3d, 0x27, 0x31, 0x27, 0x20, 0x74, 0x61,
  0x62, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x3d, 0x27, 0x2d, 0x31, 0x27, 0x3e,
  0x0a, 0x20, 0x20, 0x3c, 0x2f, 0x64, 0x69, 0x76, 0x3e, 0x0a, 0x20, 0x20,
  0x3c, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x20, 0x74, 0x79, 0x70, 0x65,
  0x3d, 0x27, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x6a, 0x61, 0x76, 0x61, 0x73,
  0x63, 0x72, 0x69, 0x70, 0x74, 0x27, 0x20, 0x73, 0x72, 0x63, 0x3d, 0x27,
  0x6a, 0x73, 0x6d, 0x70, 0x67, 0x2e, 0x6a, 0x73, 0x27, 0x3e, 0x3c, 0x2f,
  0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x3e, 0x0a, 0x20, 0x20, 0x3c, 0x73,
  0x63, 0x72, 0x69, 0x70, 0x74, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x27,
  0x74, 0x65, 0x78, 0x74, 0x2f, 0x6a, 0x61, 0x76, 0x61, 0x73, 0x63, 0x72,
  0x69, 0x70, 0x74, 0x27, 0x20, 0x73, 0x72, 0x63, 0x3d, 0x27, 0x6a, 0x73,
  0x6d, 0x70, 0x67, 0x2d, 0x76, 0x6e, 0x63, 0x2e, 0x6a, 0x73, 0x27, 0x3e,
  0x3c, 0x2f, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x3e, 0x0a, 0x3c, 0x2f,
  0x62, 0x6f, 0x64, 0x79, 0x3e, 0x0a, 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c,
  0x3e, 0x0a
};

static const unsigned char JSMPEG_file_2[] = {
  0x28, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x77, 0x69,
  0x6e, 0x64, 0x6f, 0x77, 0x29, 0x7b, 0x20, 0x22, 0x75, 0x73, 0x65, 0x20,
  0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x22, 0x3b, 0x0a, 0x0a, 0x2f, 0x2f,
  0x20, 0x6a, 0x73, 0x6d, 0x70, 0x65, 0x67, 0x20, 0x62, 0x79, 0x20, 0x44,
................................................................................
  0x65, 0x2f, 0x64, 0x65, 0x73, 0x6b, 0x74, 0x6f, 0x70, 0x0a, 0x64, 0x6f,
  0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x62, 0x6f, 0x64, 0x79, 0x2e,
  0x63, 0x6c, 0x61, 0x73, 0x73, 0x4e, 0x61, 0x6d, 0x65, 0x20, 0x3d, 0x20,
  0x28, 0x27, 0x6f, 0x6e, 0x74, 0x6f, 0x75, 0x63, 0x68, 0x73, 0x74, 0x61,
  0x72, 0x74, 0x27, 0x20, 0x69, 0x6e, 0x20, 0x77, 0x69, 0x6e, 0x64, 0x6f,
  0x77, 0x29, 0x20, 0x3f, 0x20, 0x27, 0x6d, 0x6f, 0x62, 0x69, 0x6c, 0x65,
  0x27, 0x20, 0x3a, 0x20, 0x27, 0x64, 0x65, 0x73, 0x6b, 0x74, 0x6f, 0x70,
  0x27, 0x3b, 0x0a, 0x0a, 0x76, 0x61, 0x72, 0x20, 0x67, 0x75, 0x69, 0x20,
  0x3d, 0x20, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x67,
  0x65, 0x74, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x79, 0x49,
  0x64, 0x28, 0x27, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x27, 0x29,
  0x3b, 0x0a, 0x76, 0x61, 0x72, 0x20, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x20,
  0x3d, 0x20, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x67,
  0x65, 0x74, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x79, 0x49,
  0x64, 0x28, 0x27, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x27, 0x29, 0x3b, 0x0a,
  0x0a, 0x2f, 0x2f, 0x20, 0x53, 0x65, 0x74, 0x75, 0x70, 0x20, 0x74, 0x68,
  0x65, 0x20, 0x57, 0x65, 0x62, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x20,
  0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x61,
  0x6e, 0x64, 0x20, 0x73, 0x74, 0x61, 0x72, 0x74, 0x20, 0x74, 0x68, 0x65,
  0x20, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x0a, 0x76, 0x61, 0x72, 0x20,
  0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x20, 0x3d, 0x20, 0x6e, 0x65, 0x77,
  0x20, 0x57, 0x65, 0x62, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x28, 0x20,
  0x27, 0x77, 0x73, 0x3a, 0x2f, 0x2f, 0x27, 0x20, 0x2b, 0x20, 0x77, 0x69,
  0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f,
  0x6e, 0x2e, 0x68, 0x6f, 0x73, 0x74, 0x20, 0x2b, 0x20, 0x27, 0x2f, 0x77,
  0x73, 0x27, 0x2c, 0x20, 0x22, 0x77, 0x73, 0x22, 0x20, 0x29, 0x3b, 0x0a,
  0x0a, 0x76, 0x61, 0x72, 0x20, 0x63, 0x61, 0x6e, 0x76, 0x61, 0x73, 0x20,
  0x3d, 0x20, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x67,
  0x65, 0x74, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x79, 0x49,
  0x64, 0x28, 0x27, 0x76, 0x69, 0x64, 0x65, 0x6f, 0x43, 0x61, 0x6e, 0x76,
  0x61, 0x73, 0x27, 0x29, 0x3b, 0x0a, 0x63, 0x61, 0x6e, 0x76, 0x61, 0x73,
  0x2e, 0x73, 0x61, 0x76, 0x65, 0x64, 0x42, 0x6f, 0x72, 0x64, 0x65, 0x72,
  0x20, 0x3d, 0x20, 0x63, 0x61, 0x6e, 0x76, 0x61, 0x73, 0x2e, 0x73, 0x74,
  0x79, 0x6c, 0x65, 0x2e, 0x62, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x3b, 0x0a,
  0x0a, 0x76, 0x61, 0x72, 0x20, 0x75, 0x73, 0x65, 0x32, 0x64, 0x20, 0x20,
  0x3d, 0x20, 0x21, 0x21, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74,
  0x2e, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x68, 0x72,
  0x65, 0x66, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x28, 0x27, 0x75, 0x73,
  0x65, 0x32, 0x64, 0x27, 0x29, 0x3b, 0x0a, 0x76, 0x61, 0x72, 0x20, 0x70,
  0x6c, 0x61, 0x79, 0x65, 0x72, 0x20, 0x3d, 0x20, 0x6e, 0x65, 0x77, 0x20,
  0x6a, 0x73, 0x6d, 0x70, 0x65, 0x67, 0x28, 0x63, 0x6c, 0x69, 0x65, 0x6e,
  0x74, 0x2c, 0x20, 0x7b, 0x63, 0x61, 0x6e, 0x76, 0x61, 0x73, 0x3a, 0x63,
  0x61, 0x6e, 0x76, 0x61, 0x73, 0x2c, 0x20, 0x66, 0x6f, 0x72, 0x63, 0x65,
  0x43, 0x61, 0x6e, 0x76, 0x61, 0x73, 0x32, 0x44, 0x3a, 0x75, 0x73, 0x65,
  0x32, 0x64, 0x7d, 0x29, 0x3b, 0x0a, 0x0a, 0x0a, 0x2f, 0x2f, 0x20, 0x49,
  0x6e, 0x70, 0x75, 0x74, 0x0a, 0x0a, 0x76, 0x61, 0x72, 0x20, 0x6d, 0x6f,
  0x75, 0x73, 0x65, 0x4c, 0x6f, 0x63, 0x6b, 0x20, 0x3d, 0x20, 0x21, 0x21,
  0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x6c, 0x6f, 0x63,
  0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x68, 0x72, 0x65, 0x66, 0x2e, 0x6d,
  0x61, 0x74, 0x63, 0x68, 0x28, 0x27, 0x6d, 0x6f, 0x75, 0x73, 0x65, 0x6c,
  0x6f, 0x63, 0x6b, 0x27, 0x29, 0x3b, 0x0a, 0x76, 0x61, 0x72, 0x20, 0x6c,
  0x61, 0x73, 0x74, 0x4d, 0x6f, 0x75, 0x73, 0x65, 0x20, 0x3d, 0x20, 0x7b,
  0x78, 0x3a, 0x20, 0x30, 0x2c, 0x20, 0x79, 0x3a, 0x20, 0x30, 0x7d, 0x3b,
  0x0a, 0x69, 0x66, 0x28, 0x20, 0x6d, 0x6f, 0x75, 0x73, 0x65, 0x4c, 0x6f,
  0x63, 0x6b, 0x20, 0x29, 0x20, 0x7b, 0x0a, 0x09, 0x2f, 0x2f, 0x20, 0x46,
  0x55, 0x43, 0x4b, 0x20, 0x59, 0x45, 0x41, 0x48, 0x2c, 0x20, 0x56, 0x45,
  0x4e, 0x44, 0x4f, 0x52, 0x20, 0x50, 0x52, 0x45, 0x46, 0x49, 0x58, 0x45,
  0x53, 0x2e, 0x20, 0x4c, 0x4f, 0x56, 0x45, 0x20, 0x45, 0x4d, 0x21, 0x0a,
  0x09, 0x63, 0x61, 0x6e, 0x76, 0x61, 0x73, 0x2e, 0x72, 0x65, 0x71, 0x75,
  0x65, 0x73, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x4c, 0x6f,
  0x63, 0x6b, 0x20, 0x3d, 0x20, 0x63, 0x61, 0x6e, 0x76, 0x61, 0x73, 0x2e,
  0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74,
  0x65, 0x72, 0x4c, 0x6f, 0x63, 0x6b, 0x20, 0x7c, 0x7c, 0x0a, 0x09, 0x09,
  0x63, 0x61, 0x6e, 0x76, 0x61, 0x73, 0x2e, 0x6d, 0x6f, 0x7a, 0x52, 0x65,
  0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x65, 0x72,
  0x4c, 0x6f, 0x63, 0x6b, 0x20, 0x7c, 0x7c, 0x0a, 0x09, 0x09, 0x63, 0x61,
  0x6e, 0x76, 0x61, 0x73, 0x2e, 0x77, 0x65, 0x62, 0x6b, 0x69, 0x74, 0x52,
  0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x65,
  0x72, 0x4c, 0x6f, 0x63, 0x6b, 0x20, 0x7c, 0x7c, 0x0a, 0x09, 0x09, 0x28,
  0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x20, 0x7b,
  0x7d, 0x29, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x2f, 0x2f, 0x20, 0x65, 0x6e,
  0x75, 0x6d, 0x20, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x5f, 0x74, 0x79, 0x70,
  0x65, 0x5f, 0x74, 0x0a, 0x76, 0x61, 0x72, 0x20, 0x49, 0x4e, 0x50, 0x55,
  0x54, 0x5f, 0x4b, 0x45, 0x59, 0x20, 0x3d, 0x20, 0x30, 0x78, 0x30, 0x30,
  0x30, 0x31, 0x2c, 0x0a, 0x09, 0x49, 0x4e, 0x50, 0x55, 0x54, 0x5f, 0x4d,
  0x4f, 0x55, 0x53, 0x45, 0x5f, 0x42, 0x55, 0x54, 0x54, 0x4f, 0x4e, 0x20,
  0x3d, 0x20, 0x30, 0x78, 0x30, 0x30, 0x30, 0x32, 0x2c, 0x0a, 0x09, 0x49,
  0x4e, 0x50, 0x55, 0x54, 0x5f, 0x4d, 0x4f, 0x55, 0x53, 0x45, 0x5f, 0x41,
  0x42, 0x53, 0x4f, 0x4c, 0x55, 0x54, 0x45, 0x20, 0x3d, 0x20, 0x30, 0x78,
  0x30, 0x30, 0x30, 0x34, 0x2c, 0x0a, 0x09, 0x49, 0x4e, 0x50, 0x55, 0x54,
  0x5f, 0x4d, 0x4f, 0x55, 0x53, 0x45, 0x5f, 0x52, 0x45, 0x4c, 0x41, 0x54,
  0x49, 0x56, 0x45, 0x20, 0x3d, 0x20, 0x30, 0x78, 0x30, 0x30, 0x30, 0x38,
  0x2c, 0x0a, 0x09, 0x49, 0x4e, 0x50, 0x55, 0x54, 0x5f, 0x4d, 0x4f, 0x55,
  0x53, 0x45, 0x5f, 0x57, 0x48, 0x45, 0x45, 0x4c, 0x20, 0x3d, 0x20, 0x30,
  0x78, 0x30, 0x30, 0x31, 0x30, 0x3b, 0x0a, 0x0a, 0x76, 0x61, 0x72, 0x20,
  0x4b, 0x45, 0x59, 0x5f, 0x44, 0x4f, 0x57, 0x4e, 0x20, 0x3d, 0x20, 0x30,
  0x78, 0x30, 0x31, 0x2c, 0x0a, 0x09, 0x4b, 0x45, 0x59, 0x5f, 0x55, 0x50,
  0x20, 0x3d, 0x20, 0x30, 0x78, 0x30, 0x30, 0x2c, 0x0a, 0x09, 0x4b, 0x45,
  0x59, 0x5f, 0x50, 0x52, 0x45, 0x53, 0x53, 0x20, 0x3d, 0x20, 0x30, 0x78,
  0x30, 0x32, 0x2c, 0x0a, 0x09, 0x4b, 0x45, 0x59, 0x5f, 0x52, 0x49, 0x47,
  0x48, 0x54, 0x20, 0x3d, 0x20, 0x30, 0x78, 0x30, 0x34, 0x2c, 0x0a, 0x09,
  0x4d, 0x4f, 0x55, 0x53, 0x45, 0x5f, 0x31, 0x5f, 0x44, 0x4f, 0x57, 0x4e,
  0x20, 0x3d, 0x20, 0x30, 0x78, 0x30, 0x30, 0x30, 0x32, 0x2c, 0x0a, 0x09,
  0x4d, 0x4f, 0x55, 0x53, 0x45, 0x5f, 0x31, 0x5f, 0x55, 0x50, 0x20, 0x3d,
  0x20, 0x30, 0x78, 0x30, 0x30, 0x30, 0x34, 0x2c, 0x0a, 0x09, 0x4d, 0x4f,
  0x55, 0x53, 0x45, 0x5f, 0x32, 0x5f, 0x44, 0x4f, 0x57, 0x4e, 0x20, 0x3d,
  0x20, 0x30, 0x78, 0x30, 0x30, 0x30, 0x38, 0x2c, 0x0a, 0x09, 0x4d, 0x4f,
  0x55, 0x53, 0x45, 0x5f, 0x32, 0x5f, 0x55, 0x50, 0x20, 0x3d, 0x20, 0x30,
  0x78, 0x30, 0x30, 0x31, 0x30, 0x3b, 0x0a, 0x0a, 0x2f, 0x2f, 0x20, 0x73,
  0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x5f,
  0x6b, 0x65, 0x79, 0x5f, 0x74, 0x20, 0x7b, 0x20, 0x75, 0x69, 0x6e, 0x74,
  0x31, 0x36, 0x20, 0x74, 0x79, 0x70, 0x65, 0x2c, 0x20, 0x75, 0x69, 0x6e,
  0x74, 0x31, 0x36, 0x20, 0x73, 0x74, 0x61, 0x74, 0x65, 0x3b, 0x20, 0x75,
  0x69, 0x6e, 0x74, 0x31, 0x36, 0x20, 0x6b, 0x65, 0x79, 0x5f, 0x63, 0x6f,
  0x64, 0x65, 0x3b, 0x20, 0x7d, 0x0a, 0x76, 0x61, 0x72, 0x20, 0x73, 0x65,
  0x6e, 0x64, 0x4b, 0x65, 0x79, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63,
  0x74, 0x69, 0x6f, 0x6e, 0x28, 0x65, 0x76, 0x2c, 0x20, 0x61, 0x63, 0x74,
  0x69, 0x6f, 0x6e, 0x2c, 0x20, 0x6b, 0x65, 0x79, 0x2c, 0x20, 0x72, 0x69,
  0x67, 0x68, 0x74, 0x29, 0x20, 0x7b, 0x0a, 0x09, 0x76, 0x61, 0x72, 0x20,
  0x73, 0x65, 0x6e, 0x64, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20,
  0x3d, 0x20, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x7c, 0x20, 0x28,
  0x72, 0x69, 0x67, 0x68, 0x74, 0x20, 0x3f, 0x20, 0x4b, 0x45, 0x59, 0x5f,
  0x52, 0x49, 0x47, 0x48, 0x54, 0x20, 0x3a, 0x20, 0x30, 0x29, 0x3b, 0x0a,
  0x09, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x73, 0x65, 0x6e, 0x64,
  0x28, 0x6e, 0x65, 0x77, 0x20, 0x55, 0x69, 0x6e, 0x74, 0x31, 0x36, 0x41,
  0x72, 0x72, 0x61, 0x79, 0x28, 0x5b, 0x49, 0x4e, 0x50, 0x55, 0x54, 0x5f,
  0x4b, 0x45, 0x59, 0x2c, 0x20, 0x73, 0x65, 0x6e, 0x64, 0x5f, 0x61, 0x63,
  0x74, 0x69, 0x6f, 0x6e, 0x2c, 0x20, 0x6b, 0x65, 0x79, 0x5d, 0x29, 0x29,
  0x3b, 0x0a, 0x09, 0x69, 0x66, 0x20, 0x28, 0x20, 0x6b, 0x65, 0x79, 0x20,
  0x3d, 0x3d, 0x20, 0x38, 0x20, 0x7c, 0x7c, 0x09, 0x09, 0x2f, 0x2f, 0x20,
................................................................................
  0x75, 0x6c, 0x74, 0x28, 0x29, 0x3b, 0x0a, 0x09, 0x7d, 0x0a, 0x09, 0x69,
  0x66, 0x20, 0x28, 0x20, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d,
  0x3d, 0x20, 0x4b, 0x45, 0x59, 0x5f, 0x55, 0x50, 0x20, 0x29, 0x20, 0x7b,
  0x0a, 0x09, 0x09, 0x65, 0x76, 0x2e, 0x73, 0x74, 0x6f, 0x70, 0x50, 0x72,
  0x6f, 0x70, 0x61, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x3b,
  0x0a, 0x09, 0x7d, 0x0a, 0x09, 0x65, 0x76, 0x2e, 0x70, 0x72, 0x65, 0x76,
  0x65, 0x6e, 0x74, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x28, 0x29,
  0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x0a, 0x76, 0x61, 0x72, 0x20, 0x73, 0x65,
  0x6e, 0x64, 0x4b, 0x65, 0x79, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20,
  0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x73,
  0x74, 0x72, 0x29, 0x20, 0x7b, 0x0a, 0x09, 0x76, 0x61, 0x72, 0x20, 0x69,
  0x3b, 0x0a, 0x09, 0x66, 0x6f, 0x72, 0x20, 0x28, 0x69, 0x20, 0x3d, 0x20,
  0x30, 0x3b, 0x20, 0x69, 0x20, 0x3c, 0x20, 0x73, 0x74, 0x72, 0x2e, 0x6c,
  0x65, 0x6e, 0x67, 0x74, 0x68, 0x3b, 0x20, 0x69, 0x2b, 0x2b, 0x29, 0x20,
  0x7b, 0x0a, 0x09, 0x09, 0x76, 0x61, 0x72, 0x20, 0x68, 0x69, 0x20, 0x3d,
  0x20, 0x73, 0x74, 0x72, 0x2e, 0x63, 0x68, 0x61, 0x72, 0x43, 0x6f, 0x64,
  0x65, 0x41, 0x74, 0x28, 0x69, 0x29, 0x3b, 0x0a, 0x09, 0x09, 0x76, 0x61,
  0x72, 0x20, 0x6c, 0x6f, 0x20, 0x3d, 0x20, 0x30, 0x3b, 0x0a, 0x09, 0x09,
  0x69, 0x66, 0x20, 0x28, 0x20, 0x68, 0x69, 0x20, 0x3e, 0x3d, 0x20, 0x30,
  0x78, 0x44, 0x38, 0x30, 0x30, 0x20, 0x26, 0x26, 0x20, 0x68, 0x69, 0x20,
  0x3c, 0x20, 0x30, 0x78, 0x44, 0x43, 0x30, 0x30, 0x20, 0x29, 0x20, 0x7b,
  0x0a, 0x09, 0x09, 0x09, 0x69, 0x66, 0x20, 0x28, 0x20, 0x65, 0x76, 0x2e,
  0x6b, 0x65, 0x79, 0x2e, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x20, 0x3e,
  0x20, 0x31, 0x20, 0x29, 0x20, 0x7b, 0x0a, 0x09, 0x09, 0x09, 0x09, 0x6c,
  0x6f, 0x20, 0x3d, 0x20, 0x65, 0x76, 0x2e, 0x6b, 0x65, 0x79, 0x2e, 0x63,
  0x68, 0x61, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x41, 0x74, 0x28, 0x31, 0x29,
  0x3b, 0x0a, 0x09, 0x09, 0x09, 0x7d, 0x0a, 0x09, 0x09, 0x7d, 0x0a, 0x09,
  0x09, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x73, 0x65, 0x6e, 0x64,
  0x28, 0x6e, 0x65, 0x77, 0x20, 0x55, 0x69, 0x6e, 0x74, 0x31, 0x36, 0x41,
  0x72, 0x72, 0x61, 0x79, 0x28, 0x5b, 0x49, 0x4e, 0x50, 0x55, 0x54, 0x5f,
  0x4b, 0x45, 0x59, 0x2c, 0x20, 0x4b, 0x45, 0x59, 0x5f, 0x50, 0x52, 0x45,
  0x53, 0x53, 0x2c, 0x20, 0x68, 0x69, 0x2c, 0x20, 0x6c, 0x6f, 0x5d, 0x29,
  0x29, 0x3b, 0x0a, 0x09, 0x7d, 0x0a, 0x09, 0x2f, 0x2f, 0x20, 0x73, 0x65,
  0x6e, 0x64, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6b, 0x65,
  0x79, 0x0a, 0x09, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x73, 0x65,
  0x6e, 0x64, 0x28, 0x6e, 0x65, 0x77, 0x20, 0x55, 0x69, 0x6e, 0x74, 0x31,
  0x36, 0x41, 0x72, 0x72, 0x61, 0x79, 0x28, 0x5b, 0x49, 0x4e, 0x50, 0x55,
  0x54, 0x5f, 0x4b, 0x45, 0x59, 0x2c, 0x20, 0x4b, 0x45, 0x59, 0x5f, 0x44,
  0x4f, 0x57, 0x4e, 0x2c, 0x20, 0x31, 0x33, 0x2c, 0x20, 0x30, 0x5d, 0x29,
  0x29, 0x3b, 0x0a, 0x09, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x73,
  0x65, 0x6e, 0x64, 0x28, 0x6e, 0x65, 0x77, 0x20, 0x55, 0x69, 0x6e, 0x74,
  0x31, 0x36, 0x41, 0x72, 0x72, 0x61, 0x79, 0x28, 0x5b, 0x49, 0x4e, 0x50,
  0x55, 0x54, 0x5f, 0x4b, 0x45, 0x59, 0x2c, 0x20, 0x4b, 0x45, 0x59, 0x5f,
  0x55, 0x50, 0x2c, 0x20, 0x31, 0x33, 0x2c, 0x20, 0x30, 0x5d, 0x29, 0x29,
  0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x0a, 0x2f, 0x2f, 0x20, 0x73, 0x74, 0x72,
  0x75, 0x63, 0x74, 0x20, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x5f, 0x6d, 0x6f,
  0x75, 0x73, 0x65, 0x5f, 0x74, 0x20, 0x7b, 0x20, 0x75, 0x69, 0x6e, 0x74,
  0x31, 0x36, 0x20, 0x74, 0x79, 0x70, 0x65, 0x2c, 0x20, 0x75, 0x69, 0x6e,
  0x74, 0x31, 0x36, 0x20, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x3b, 0x20, 0x66,
  0x6c, 0x6f, 0x61, 0x74, 0x33, 0x32, 0x20, 0x78, 0x3b, 0x20, 0x66, 0x6c,
  0x6f, 0x61, 0x74, 0x33, 0x32, 0x20, 0x79, 0x3b, 0x20, 0x7d, 0x0a, 0x76,
................................................................................
  0x2c, 0x20, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x29, 0x20, 0x7b, 0x0a,
  0x09, 0x76, 0x61, 0x72, 0x20, 0x74, 0x79, 0x70, 0x65, 0x20, 0x3d, 0x20,
  0x30, 0x3b, 0x0a, 0x09, 0x76, 0x61, 0x72, 0x20, 0x78, 0x2c, 0x20, 0x79,
  0x3b, 0x0a, 0x0a, 0x09, 0x69, 0x66, 0x28, 0x20, 0x61, 0x63, 0x74, 0x69,
  0x6f, 0x6e, 0x20, 0x29, 0x20, 0x7b, 0x0a, 0x09, 0x09, 0x74, 0x79, 0x70,
  0x65, 0x20, 0x7c, 0x3d, 0x20, 0x49, 0x4e, 0x50, 0x55, 0x54, 0x5f, 0x4d,
  0x4f, 0x55, 0x53, 0x45, 0x5f, 0x42, 0x55, 0x54, 0x54, 0x4f, 0x4e, 0x3b,
  0x0a, 0x0a, 0x09, 0x09, 0x2f, 0x2f, 0x20, 0x41, 0x74, 0x74, 0x65, 0x6d,
  0x70, 0x74, 0x20, 0x74, 0x6f, 0x20, 0x6c, 0x6f, 0x63, 0x6b, 0x20, 0x70,
  0x6f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x20, 0x61, 0x74, 0x20, 0x6d, 0x6f,
  0x75, 0x73, 0x65, 0x31, 0x20, 0x64, 0x6f, 0x77, 0x6e, 0x0a, 0x09, 0x09,
  0x69, 0x66, 0x28, 0x20, 0x6d, 0x6f, 0x75, 0x73, 0x65, 0x4c, 0x6f, 0x63,
  0x6b, 0x20, 0x26, 0x26, 0x20, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20,
  0x3d, 0x3d, 0x3d, 0x20, 0x4d, 0x4f, 0x55, 0x53, 0x45, 0x5f, 0x31, 0x5f,
  0x44, 0x4f, 0x57, 0x4e, 0x20, 0x29, 0x20, 0x7b, 0x0a, 0x09, 0x09, 0x09,
  0x63, 0x61, 0x6e, 0x76, 0x61, 0x73, 0x2e, 0x72, 0x65, 0x71, 0x75, 0x65,
  0x73, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x4c, 0x6f, 0x63,
  0x6b, 0x28, 0x29, 0x3b, 0x0a, 0x09, 0x09, 0x7d, 0x0a, 0x09, 0x7d, 0x0a,
  0x0a, 0x09, 0x2f, 0x2f, 0x20, 0x4f, 0x6e, 0x6c, 0x79, 0x20, 0x6d, 0x61,
  0x6b, 0x65, 0x20, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x76, 0x65, 0x20,
  0x6d, 0x6f, 0x75, 0x73, 0x65, 0x20, 0x6d, 0x6f, 0x76, 0x65, 0x6d, 0x65,
  0x6e, 0x74, 0x73, 0x20, 0x69, 0x66, 0x20, 0x6e, 0x6f, 0x20, 0x62, 0x75,
  0x74, 0x74, 0x6f, 0x6e, 0x20, 0x69, 0x73, 0x20, 0x70, 0x72, 0x65, 0x73,
  0x73, 0x65, 0x64, 0x0a, 0x09, 0x69, 0x66, 0x28, 0x20, 0x21, 0x61, 0x63,
  0x74, 0x69, 0x6f, 0x6e, 0x20, 0x26, 0x26, 0x20, 0x6d, 0x6f, 0x75, 0x73,
  0x65, 0x4c, 0x6f, 0x63, 0x6b, 0x20, 0x29, 0x20, 0x7b, 0x0a, 0x09, 0x09,
  0x74, 0x79, 0x70, 0x65, 0x20, 0x7c, 0x3d, 0x20, 0x49, 0x4e, 0x50, 0x55,
  0x54, 0x5f, 0x4d, 0x4f, 0x55, 0x53, 0x45, 0x5f, 0x52, 0x45, 0x4c, 0x41,
  0x54, 0x49, 0x56, 0x45, 0x3b, 0x0a, 0x0a, 0x09, 0x09, 0x76, 0x61, 0x72,
  0x20, 0x70, 0x20, 0x3d, 0x20, 0x65, 0x76, 0x2e, 0x63, 0x68, 0x61, 0x6e,
  0x67, 0x65, 0x64, 0x54, 0x6f, 0x75, 0x63, 0x68, 0x65, 0x73, 0x20, 0x3f,
  0x20, 0x65, 0x76, 0x2e, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x54,
  0x6f, 0x75, 0x63, 0x68, 0x65, 0x73, 0x5b, 0x30, 0x5d, 0x20, 0x3a, 0x20,

  0x65, 0x76, 0x3b, 0x0a, 0x0a, 0x09, 0x09, 0x2f, 0x2f, 0x20, 0x46, 0x55,
  0x43, 0x4b, 0x2c, 0x20, 0x44, 0x49, 0x44, 0x20, 0x49, 0x20, 0x4d, 0x45,
  0x4e, 0x54, 0x49, 0x4f, 0x4e, 0x20, 0x49, 0x20, 0x4c, 0x4f, 0x4f, 0x4f,
  0x4f, 0x4f, 0x56, 0x45, 0x20, 0x56, 0x45, 0x4e, 0x44, 0x4f, 0x52, 0x20,
  0x50, 0x52, 0x45, 0x46, 0x49, 0x58, 0x45, 0x53, 0x3f, 0x20, 0x53, 0x4f,
  0x20, 0x55, 0x53, 0x45, 0x46, 0x55, 0x4c, 0x21, 0x0a, 0x09, 0x09, 0x78,
  0x20, 0x3d, 0x20, 0x70, 0x2e, 0x6d, 0x6f, 0x76, 0x65, 0x6d, 0x65, 0x6e,
  0x74, 0x58, 0x20, 0x7c, 0x7c, 0x20, 0x70, 0x2e, 0x6d, 0x6f, 0x7a, 0x4d,
  0x6f, 0x76, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x58, 0x20, 0x7c, 0x7c, 0x20,
  0x70, 0x2e, 0x77, 0x65, 0x62, 0x6b, 0x69, 0x74, 0x4d, 0x6f, 0x76, 0x65,
  0x6d, 0x65, 0x6e, 0x74, 0x58, 0x3b, 0x0a, 0x09, 0x09, 0x79, 0x20, 0x3d,
  0x20, 0x70, 0x2e, 0x6d, 0x6f, 0x76, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x59,
  0x20, 0x7c, 0x7c, 0x20, 0x70, 0x2e, 0x6d, 0x6f, 0x7a, 0x4d, 0x6f, 0x76,
  0x65, 0x6d, 0x65, 0x6e, 0x74, 0x59, 0x20, 0x7c, 0x7c, 0x20, 0x70, 0x2e,
  0x77, 0x65, 0x62, 0x6b, 0x69, 0x74, 0x4d, 0x6f, 0x76, 0x65, 0x6d, 0x65,

  0x6e, 0x74, 0x59, 0x3b, 0x0a, 0x0a, 0x09, 0x09, 0x69, 0x66, 0x28, 0x20,
  0x74, 0x79, 0x70, 0x65, 0x6f, 0x66, 0x20, 0x78, 0x20, 0x3d, 0x3d, 0x3d,
  0x20, 0x27, 0x75, 0x6e, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x27,
  0x20, 0x29, 0x20, 0x7b, 0x0a, 0x09, 0x09, 0x09, 0x78, 0x20, 0x3d, 0x20,
  0x70, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x58, 0x20, 0x2d, 0x20,
  0x6c, 0x61, 0x73, 0x74, 0x4d, 0x6f, 0x75, 0x73, 0x65, 0x2e, 0x78, 0x3b,
  0x0a, 0x09, 0x09, 0x09, 0x79, 0x20, 0x3d, 0x20, 0x70, 0x2e, 0x63, 0x6c,
  0x69, 0x65, 0x6e, 0x74, 0x59, 0x20, 0x2d, 0x20, 0x6c, 0x61, 0x73, 0x74,
  0x4d, 0x6f, 0x75, 0x73, 0x65, 0x2e, 0x79, 0x3b, 0x0a, 0x09, 0x09, 0x7d,
  0x0a, 0x0a, 0x09, 0x09, 0x6c, 0x61, 0x73, 0x74, 0x4d, 0x6f, 0x75, 0x73,

  0x65, 0x2e, 0x78, 0x20, 0x3d, 0x20, 0x70, 0x2e, 0x63, 0x6c, 0x69, 0x65,
  0x6e, 0x74, 0x58, 0x3b, 0x0a, 0x09, 0x09, 0x6c, 0x61, 0x73, 0x74, 0x4d,
  0x6f, 0x75, 0x73, 0x65, 0x2e, 0x79, 0x20, 0x3d, 0x20, 0x70, 0x2e, 0x63,
  0x6c, 0x69, 0x65, 0x6e, 0x74, 0x59, 0x3b, 0x0a, 0x09, 0x7d, 0x0a, 0x0a,
  0x09, 0x2f, 0x2f, 0x20, 0x49, 0x66, 0x20, 0x77, 0x65, 0x20, 0x73, 0x65,
  0x6e, 0x64, 0x20, 0x61, 0x62, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x65, 0x20,
  0x6d, 0x6f, 0x75, 0x73, 0x65, 0x20, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x73,
  0x2c, 0x20, 0x77, 0x65, 0x20, 0x63, 0x61, 0x6e, 0x20, 0x61, 0x6c, 0x77,
  0x61, 0x79, 0x73, 0x20, 0x64, 0x6f, 0x20, 0x73, 0x6f, 0x2c, 0x20, 0x65,
  0x76, 0x65, 0x6e, 0x20, 0x66, 0x6f, 0x72, 0x0a, 0x09, 0x2f, 0x2f, 0x20,
  0x62, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x20, 0x70, 0x72, 0x65, 0x73, 0x73,
  0x65, 0x73, 0x2e, 0x0a, 0x09, 0x69, 0x66, 0x28, 0x20, 0x21, 0x6d, 0x6f,
  0x75, 0x73, 0x65, 0x4c, 0x6f, 0x63, 0x6b, 0x20, 0x29, 0x20, 0x7b, 0x0a,
  0x09, 0x09, 0x74, 0x79, 0x70, 0x65, 0x20, 0x7c, 0x3d, 0x20, 0x49, 0x4e,
  0x50, 0x55, 0x54, 0x5f, 0x4d, 0x4f, 0x55, 0x53, 0x45, 0x5f, 0x41, 0x42,

  0x53, 0x4f, 0x4c, 0x55, 0x54, 0x45, 0x3b, 0x0a, 0x0a, 0x09, 0x09, 0x76,
  0x61, 0x72, 0x20, 0x72, 0x65, 0x63, 0x74, 0x20, 0x3d, 0x20, 0x63, 0x61,
  0x6e, 0x76, 0x61, 0x73, 0x2e, 0x67, 0x65, 0x74, 0x42, 0x6f, 0x75, 0x6e,
  0x64, 0x69, 0x6e, 0x67, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x65,
  0x63, 0x74, 0x28, 0x29, 0x3b, 0x0a, 0x09, 0x09, 0x76, 0x61, 0x72, 0x20,
  0x73, 0x63, 0x61, 0x6c, 0x65, 0x58, 0x20, 0x3d, 0x20, 0x63, 0x61, 0x6e,
  0x76, 0x61, 0x73, 0x2e, 0x77, 0x69, 0x64, 0x74, 0x68, 0x20, 0x2f, 0x20,
  0x28, 0x72, 0x65, 0x63, 0x74, 0x2e, 0x72, 0x69, 0x67, 0x68, 0x74, 0x2d,
  0x72, 0x65, 0x63, 0x74, 0x2e, 0x6c, 0x65, 0x66, 0x74, 0x29, 0x2c, 0x0a,
  0x09, 0x09, 0x09, 0x73, 0x63, 0x61, 0x6c, 0x65, 0x59, 0x20, 0x3d, 0x20,
  0x63, 0x61, 0x6e, 0x76, 0x61, 0x73, 0x2e, 0x68, 0x65, 0x69, 0x67, 0x68,
  0x74, 0x20, 0x2f, 0x20, 0x28, 0x72, 0x65, 0x63, 0x74, 0x2e, 0x62, 0x6f,
  0x74, 0x74, 0x6f, 0x6d, 0x2d, 0x72, 0x65, 0x63, 0x74, 0x2e, 0x74, 0x6f,
  0x70, 0x29, 0x3b, 0x0a, 0x0a, 0x09, 0x09, 0x76, 0x61, 0x72, 0x20, 0x70,
  0x20, 0x3d, 0x20, 0x65, 0x76, 0x2e, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65,
  0x64, 0x54, 0x6f, 0x75, 0x63, 0x68, 0x65, 0x73, 0x20, 0x3f, 0x20, 0x65,
  0x76, 0x2e, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x54, 0x6f, 0x75,
  0x63, 0x68, 0x65, 0x73, 0x5b, 0x30, 0x5d, 0x20, 0x3a, 0x20, 0x65, 0x76,
  0x3b, 0x0a, 0x09, 0x09, 0x76, 0x61, 0x72, 0x20, 0x78, 0x20, 0x3d, 0x20,
  0x28, 0x70, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x58, 0x20, 0x2d,
  0x20, 0x72, 0x65, 0x63, 0x74, 0x2e, 0x6c, 0x65, 0x66, 0x74, 0x29, 0x20,
  0x2a, 0x20, 0x73, 0x63, 0x61, 0x6c, 0x65, 0x58, 0x2c, 0x0a, 0x09, 0x09,
  0x09, 0x79, 0x20, 0x3d, 0x20, 0x28, 0x70, 0x2e, 0x63, 0x6c, 0x69, 0x65,
  0x6e, 0x74, 0x59, 0x20, 0x2d, 0x20, 0x72, 0x65, 0x63, 0x74, 0x2e, 0x74,
  0x6f, 0x70, 0x29, 0x20, 0x2a, 0x20, 0x73, 0x63, 0x61, 0x6c, 0x65, 0x59,
  0x3b, 0x0a, 0x09, 0x7d, 0x0a, 0x0a, 0x09, 0x6d, 0x6f, 0x75, 0x73, 0x65,
  0x44, 0x61, 0x74, 0x61, 0x54, 0x79, 0x70, 0x65, 0x46, 0x6c, 0x61, 0x67,
  0x73, 0x5b, 0x30, 0x5d, 0x20, 0x3d, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3b,
  0x0a, 0x09, 0x6d, 0x6f, 0x75, 0x73, 0x65, 0x44, 0x61, 0x74, 0x61, 0x54,
  0x79, 0x70, 0x65, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x5b, 0x31, 0x5d, 0x20,
  0x3d, 0x20, 0x28, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x7c, 0x7c, 0x30,
  0x29, 0x3b, 0x0a, 0x09, 0x6d, 0x6f, 0x75, 0x73, 0x65, 0x44, 0x61, 0x74,
  0x61, 0x43, 0x6f, 0x6f, 0x72, 0x64, 0x73, 0x5b, 0x30, 0x5d, 0x20, 0x3d,
  0x20, 0x78, 0x3b, 0x0a, 0x09, 0x6d, 0x6f, 0x75, 0x73, 0x65, 0x44, 0x61,
  0x74, 0x61, 0x43, 0x6f, 0x6f, 0x72, 0x64, 0x73, 0x5b, 0x31, 0x5d, 0x20,
  0x3d, 0x20, 0x79, 0x3b, 0x0a, 0x0a, 0x09, 0x63, 0x6c, 0x69, 0x65, 0x6e,
  0x74, 0x2e, 0x73, 0x65, 0x6e, 0x64, 0x28, 0x6d, 0x6f, 0x75, 0x73, 0x65,
  0x44, 0x61, 0x74, 0x61, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x29, 0x3b,
  0x0a, 0x09, 0x65, 0x76, 0x2e, 0x70, 0x72, 0x65, 0x76, 0x65, 0x6e, 0x74,
  0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x28, 0x29, 0x3b, 0x0a, 0x7d,
  0x3b, 0x0a, 0x0a, 0x76, 0x61, 0x72, 0x20, 0x73, 0x65, 0x6e, 0x64, 0x57,
  0x68, 0x65, 0x65, 0x6c, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74,
  0x69, 0x6f, 0x6e, 0x28, 0x65, 0x76, 0x29, 0x20, 0x7b, 0x0a, 0x09, 0x6d,
................................................................................
  0x44, 0x61, 0x74, 0x61, 0x43, 0x6f, 0x6f, 0x72, 0x64, 0x73, 0x5b, 0x31,
  0x5d, 0x20, 0x3d, 0x20, 0x65, 0x76, 0x2e, 0x64, 0x65, 0x6c, 0x74, 0x61,
  0x59, 0x3b, 0x0a, 0x09, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x73,
  0x65, 0x6e, 0x64, 0x28, 0x6d, 0x6f, 0x75, 0x73, 0x65, 0x44, 0x61, 0x74,
  0x61, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x29, 0x3b, 0x0a, 0x09, 0x65,
  0x76, 0x2e, 0x70, 0x72, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x44, 0x65, 0x66,
  0x61, 0x75, 0x6c, 0x74, 0x28, 0x29, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x0a,
  0x76, 0x61, 0x72, 0x20, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x43, 0x6c, 0x69,
  0x65, 0x6e, 0x74, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69,
  0x6f, 0x6e, 0x28, 0x65, 0x76, 0x29, 0x20, 0x7b, 0x0a, 0x09, 0x70, 0x6c,
  0x61, 0x79, 0x65, 0x72, 0x2e, 0x73, 0x74, 0x6f, 0x70, 0x28, 0x29, 0x3b,
  0x0a, 0x7d, 0x3b, 0x0a, 0x0a, 0x76, 0x61, 0x72, 0x20, 0x6b, 0x65, 0x79,
  0x44, 0x6f, 0x77, 0x6e, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74,



  0x69, 0x6f, 0x6e, 0x28, 0x65, 0x76, 0x29, 0x20, 0x7b, 0x0a, 0x09, 0x69,
  0x66, 0x20, 0x28, 0x20, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74,
  0x2e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x45, 0x6c, 0x65, 0x6d, 0x65,
  0x6e, 0x74, 0x20, 0x3d, 0x3d, 0x20, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x20,
  0x29, 0x20, 0x7b, 0x0a, 0x09, 0x09, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e,
  0x3b, 0x0a, 0x09, 0x7d, 0x0a, 0x09, 0x73, 0x65, 0x6e, 0x64, 0x4b, 0x65,
  0x79, 0x28, 0x65, 0x76, 0x2c, 0x20, 0x4b, 0x45, 0x59, 0x5f, 0x44, 0x4f,
  0x57, 0x4e, 0x2c, 0x20, 0x65, 0x76, 0x2e, 0x6b, 0x65, 0x79, 0x43, 0x6f,

  0x64, 0x65, 0x2c, 0x0a, 0x09, 0x09, 0x65, 0x76, 0x2e, 0x6c, 0x6f, 0x63,
  0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x3d, 0x20, 0x32, 0x20, 0x2f,
  0x2a, 0x20, 0x44, 0x4f, 0x4d, 0x5f, 0x4b, 0x45, 0x59, 0x5f, 0x4c, 0x4f,
  0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x52, 0x49, 0x47, 0x48, 0x54,
  0x20, 0x2a, 0x2f, 0x29, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x0a, 0x76, 0x61,


  0x72, 0x20, 0x6b, 0x65, 0x79, 0x55, 0x70, 0x20, 0x3d, 0x20, 0x66, 0x75,
  0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x65, 0x76, 0x29, 0x20, 0x7b,
  0x0a, 0x09, 0x69, 0x66, 0x20, 0x28, 0x20, 0x64, 0x6f, 0x63, 0x75, 0x6d,
  0x65, 0x6e, 0x74, 0x2e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x45, 0x6c,
  0x65, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x3d, 0x3d, 0x20, 0x69, 0x6e, 0x70,
  0x75, 0x74, 0x20, 0x29, 0x20, 0x7b, 0x0a, 0x09, 0x09, 0x72, 0x65, 0x74,
  0x75, 0x72, 0x6e, 0x3b, 0x0a, 0x09, 0x7d, 0x0a, 0x09, 0x73, 0x65, 0x6e,
  0x64, 0x4b, 0x65, 0x79, 0x28, 0x65, 0x76, 0x2c, 0x20, 0x4b, 0x45, 0x59,
  0x5f, 0x55, 0x50, 0x2c, 0x20, 0x65, 0x76, 0x2e, 0x6b, 0x65, 0x79, 0x43,

  0x6f, 0x64, 0x65, 0x2c, 0x0a, 0x09, 0x09, 0x65, 0x76, 0x2e, 0x6c, 0x6f,
  0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x3d, 0x20, 0x32, 0x20,
  0x2f, 0x2a, 0x20, 0x44, 0x4f, 0x4d, 0x5f, 0x4b, 0x45, 0x59, 0x5f, 0x4c,
  0x4f, 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x52, 0x49, 0x47, 0x48,
  0x54, 0x20, 0x2a, 0x2f, 0x29, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x0a, 0x2f,
  0x2f, 0x20, 0x4b, 0x65, 0x79, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x0a, 0x77,
  0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x61, 0x64, 0x64, 0x45, 0x76, 0x65,
  0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x28, 0x27,
  0x6b, 0x65, 0x79, 0x64, 0x6f, 0x77, 0x6e, 0x27, 0x2c, 0x20, 0x6b, 0x65,
  0x79, 0x44, 0x6f, 0x77, 0x6e, 0x2c, 0x20, 0x66, 0x61, 0x6c, 0x73, 0x65,
  0x29, 0x3b, 0x0a, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x61, 0x64,
  0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e,
  0x65, 0x72, 0x28, 0x27, 0x6b, 0x65, 0x79, 0x75, 0x70, 0x27, 0x2c, 0x20,
  0x6b, 0x65, 0x79, 0x55, 0x70, 0x2c, 0x20, 0x66, 0x61, 0x6c, 0x73, 0x65,
  0x29, 0x3b, 0x0a, 0x0a, 0x2f, 0x2f, 0x20, 0x4d, 0x6f, 0x75, 0x73, 0x65,
  0x0a, 0x63, 0x61, 0x6e, 0x76, 0x61, 0x73, 0x2e, 0x61, 0x64, 0x64, 0x45,
  0x76, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72,
  0x28, 0x27, 0x6d, 0x6f, 0x75, 0x73, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x27,
  0x2c, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x65,
  0x76, 0x29, 0x20, 0x7b, 0x20, 0x73, 0x65, 0x6e, 0x64, 0x4d, 0x6f, 0x75,
  0x73, 0x65, 0x28, 0x65, 0x76, 0x2c, 0x20, 0x6e, 0x75, 0x6c, 0x6c, 0x29,
................................................................................
  0x69, 0x20, 0x3c, 0x20, 0x74, 0x6f, 0x75, 0x63, 0x68, 0x4b, 0x65, 0x79,
  0x73, 0x2e, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3b, 0x20, 0x69, 0x2b,
  0x2b, 0x20, 0x29, 0x20, 0x7b, 0x0a, 0x09, 0x64, 0x65, 0x66, 0x69, 0x6e,
  0x65, 0x54, 0x6f, 0x75, 0x63, 0x68, 0x42, 0x75, 0x74, 0x74, 0x6f, 0x6e,
  0x28, 0x74, 0x6f, 0x75, 0x63, 0x68, 0x4b, 0x65, 0x79, 0x73, 0x5b, 0x69,
  0x5d, 0x2c, 0x20, 0x74, 0x6f, 0x75, 0x63, 0x68, 0x4b, 0x65, 0x79, 0x73,
  0x5b, 0x69, 0x5d, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x73, 0x65, 0x74, 0x2e,
  0x63, 0x6f, 0x64, 0x65, 0x29, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x76, 0x61,
  0x72, 0x20, 0x7a, 0x6f, 0x6f, 0x6d, 0x46, 0x75, 0x6e, 0x63, 0x20, 0x3d,
  0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x65, 0x76,
  0x29, 0x20, 0x7b, 0x0a, 0x09, 0x76, 0x61, 0x72, 0x20, 0x6e, 0x6f, 0x74,
  0x66, 0x75, 0x6c, 0x6c, 0x20, 0x3d, 0x20, 0x66, 0x61, 0x6c, 0x73, 0x65,
  0x3b, 0x0a, 0x09, 0x69, 0x66, 0x20, 0x28, 0x20, 0x64, 0x6f, 0x63, 0x75,
  0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x77, 0x65, 0x62, 0x6b, 0x69, 0x74, 0x46,
  0x75, 0x6c, 0x6c, 0x73, 0x63, 0x72, 0x65, 0x65, 0x6e, 0x45, 0x6c, 0x65,
  0x6d, 0x65, 0x6e, 0x74, 0x20, 0x29, 0x20, 0x7b, 0x0a, 0x09, 0x09, 0x64,
  0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x77, 0x65, 0x62, 0x6b,
  0x69, 0x74, 0x45, 0x78, 0x69, 0x74, 0x46, 0x75, 0x6c, 0x6c, 0x73, 0x63,
  0x72, 0x65, 0x65, 0x6e, 0x28, 0x29, 0x3b, 0x0a, 0x09, 0x09, 0x6e, 0x6f,
  0x74, 0x66, 0x75, 0x6c, 0x6c, 0x20, 0x3d, 0x20, 0x74, 0x72, 0x75, 0x65,
  0x3b, 0x0a, 0x09, 0x7d, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x20, 0x69, 0x66,
  0x20, 0x28, 0x20, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e,
  0x6d, 0x6f, 0x7a, 0x46, 0x75, 0x6c, 0x6c, 0x53, 0x63, 0x72, 0x65, 0x65,
  0x6e, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x29, 0x20, 0x7b,
  0x0a, 0x09, 0x09, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e,
  0x6d, 0x6f, 0x7a, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x46, 0x75, 0x6c,
  0x6c, 0x53, 0x63, 0x72, 0x65, 0x65, 0x6e, 0x28, 0x29, 0x3b, 0x0a, 0x09,
  0x09, 0x6e, 0x6f, 0x74, 0x66, 0x75, 0x6c, 0x6c, 0x20, 0x3d, 0x20, 0x74,
  0x72, 0x75, 0x65, 0x3b, 0x0a, 0x09, 0x7d, 0x20, 0x65, 0x6c, 0x73, 0x65,
  0x20, 0x69, 0x66, 0x20, 0x28, 0x20, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65,
  0x6e, 0x74, 0x2e, 0x6d, 0x73, 0x46, 0x75, 0x6c, 0x6c, 0x73, 0x63, 0x72,
  0x65, 0x65, 0x6e, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x29,
  0x20, 0x7b, 0x0a, 0x09, 0x09, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e,
  0x74, 0x2e, 0x6d, 0x73, 0x45, 0x78, 0x69, 0x74, 0x46, 0x75, 0x6c, 0x6c,
  0x73, 0x63, 0x72, 0x65, 0x65, 0x6e, 0x28, 0x29, 0x3b, 0x0a, 0x09, 0x09,
  0x6e, 0x6f, 0x74, 0x66, 0x75, 0x6c, 0x6c, 0x20, 0x3d, 0x20, 0x74, 0x72,
  0x75, 0x65, 0x3b, 0x0a, 0x09, 0x7d, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x20,
  0x69, 0x66, 0x20, 0x28, 0x20, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e,
  0x74, 0x2e, 0x66, 0x75, 0x6c, 0x6c, 0x73, 0x63, 0x72, 0x65, 0x65, 0x6e,
  0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x29, 0x20, 0x7b, 0x0a,
  0x09, 0x09, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x65,
  0x78, 0x69, 0x74, 0x46, 0x75, 0x6c, 0x6c, 0x73, 0x63, 0x72, 0x65, 0x65,
  0x6e, 0x28, 0x29, 0x3b, 0x0a, 0x09, 0x09, 0x6e, 0x6f, 0x74, 0x66, 0x75,
  0x6c, 0x6c, 0x20, 0x3d, 0x20, 0x74, 0x72, 0x75, 0x65, 0x3b, 0x0a, 0x09,
  0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66,
  0x20, 0x28, 0x20, 0x6e, 0x6f, 0x74, 0x66, 0x75, 0x6c, 0x6c, 0x20, 0x29,
  0x20, 0x7b, 0x0a, 0x09, 0x09, 0x63, 0x61, 0x6e, 0x76, 0x61, 0x73, 0x2e,
  0x73, 0x74, 0x79, 0x6c, 0x65, 0x2e, 0x77, 0x69, 0x64, 0x74, 0x68, 0x20,
  0x3d, 0x20, 0x6e, 0x75, 0x6c, 0x6c, 0x3b, 0x0a, 0x09, 0x09, 0x63, 0x61,
  0x6e, 0x76, 0x61, 0x73, 0x2e, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x2e, 0x68,
  0x65, 0x69, 0x67, 0x68, 0x74, 0x20, 0x3d, 0x20, 0x6e, 0x75, 0x6c, 0x6c,
  0x3b, 0x0a, 0x09, 0x09, 0x63, 0x61, 0x6e, 0x76, 0x61, 0x73, 0x2e, 0x73,
  0x74, 0x79, 0x6c, 0x65, 0x2e, 0x62, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x20,
  0x3d, 0x20, 0x63, 0x61, 0x6e, 0x76, 0x61, 0x73, 0x2e, 0x73, 0x61, 0x76,
  0x65, 0x64, 0x42, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x3b, 0x0a, 0x09, 0x09,
  0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x3b, 0x0a, 0x09, 0x7d, 0x0a, 0x09,
  0x76, 0x61, 0x72, 0x20, 0x77, 0x20, 0x3d, 0x20, 0x31, 0x2e, 0x30, 0x20,
  0x2a, 0x20, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x73, 0x63, 0x72,
  0x65, 0x65, 0x6e, 0x2e, 0x77, 0x69, 0x64, 0x74, 0x68, 0x20, 0x2f, 0x20,
  0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x73, 0x63, 0x72, 0x65, 0x65,
  0x6e, 0x2e, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x3b, 0x0a, 0x09, 0x76,
  0x61, 0x72, 0x20, 0x63, 0x20, 0x3d, 0x20, 0x31, 0x2e, 0x30, 0x20, 0x2a,
  0x20, 0x63, 0x61, 0x6e, 0x76, 0x61, 0x73, 0x2e, 0x77, 0x69, 0x64, 0x74,
  0x68, 0x20, 0x2f, 0x20, 0x63, 0x61, 0x6e, 0x76, 0x61, 0x73, 0x2e, 0x68,
  0x65, 0x69, 0x67, 0x68, 0x74, 0x3b, 0x0a, 0x09, 0x69, 0x66, 0x20, 0x28,
  0x77, 0x20, 0x3e, 0x20, 0x63, 0x29, 0x20, 0x7b, 0x0a, 0x09, 0x09, 0x73,
  0x77, 0x20, 0x3d, 0x20, 0x4d, 0x61, 0x74, 0x68, 0x2e, 0x72, 0x6f, 0x75,
  0x6e, 0x64, 0x28, 0x31, 0x30, 0x30, 0x20, 0x2a, 0x20, 0x63, 0x20, 0x2f,
  0x20, 0x77, 0x29, 0x3b, 0x0a, 0x09, 0x09, 0x73, 0x77, 0x20, 0x3d, 0x20,
  0x27, 0x27, 0x20, 0x2b, 0x20, 0x73, 0x77, 0x20, 0x2b, 0x20, 0x27, 0x25,
  0x27, 0x3b, 0x0a, 0x09, 0x09, 0x73, 0x68, 0x20, 0x3d, 0x20, 0x27, 0x31,
  0x30, 0x30, 0x25, 0x27, 0x3b, 0x0a, 0x09, 0x7d, 0x20, 0x65, 0x6c, 0x73,
  0x65, 0x20, 0x7b, 0x0a, 0x09, 0x09, 0x73, 0x77, 0x20, 0x3d, 0x20, 0x27,
  0x31, 0x30, 0x30, 0x25, 0x27, 0x3b, 0x0a, 0x09, 0x09, 0x73, 0x68, 0x20,
  0x3d, 0x20, 0x4d, 0x61, 0x74, 0x68, 0x2e, 0x72, 0x6f, 0x75, 0x6e, 0x64,
  0x28, 0x31, 0x30, 0x30, 0x20, 0x2a, 0x20, 0x77, 0x20, 0x2f, 0x20, 0x63,
  0x29, 0x3b, 0x0a, 0x09, 0x09, 0x73, 0x68, 0x20, 0x3d, 0x20, 0x27, 0x27,
  0x20, 0x2b, 0x20, 0x73, 0x68, 0x20, 0x2b, 0x20, 0x27, 0x25, 0x27, 0x3b,
  0x0a, 0x09, 0x7d, 0x0a, 0x09, 0x63, 0x61, 0x6e, 0x76, 0x61, 0x73, 0x2e,
  0x73, 0x74, 0x79, 0x6c, 0x65, 0x2e, 0x77, 0x69, 0x64, 0x74, 0x68, 0x20,
  0x3d, 0x20, 0x73, 0x77, 0x3b, 0x0a, 0x09, 0x63, 0x61, 0x6e, 0x76, 0x61,
  0x73, 0x2e, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x2e, 0x68, 0x65, 0x69, 0x67,
  0x68, 0x74, 0x20, 0x3d, 0x20, 0x73, 0x68, 0x3b, 0x0a, 0x09, 0x63, 0x61,
  0x6e, 0x76, 0x61, 0x73, 0x2e, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x2e, 0x62,
  0x6f, 0x72, 0x64, 0x65, 0x72, 0x20, 0x3d, 0x20, 0x27, 0x30, 0x70, 0x78,
  0x27, 0x3b, 0x0a, 0x09, 0x69, 0x66, 0x20, 0x28, 0x20, 0x67, 0x75, 0x69,
  0x2e, 0x77, 0x65, 0x62, 0x6b, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65,
  0x73, 0x74, 0x46, 0x75, 0x6c, 0x6c, 0x73, 0x63, 0x72, 0x65, 0x65, 0x6e,
  0x20, 0x29, 0x20, 0x7b, 0x0a, 0x09, 0x09, 0x67, 0x75, 0x69, 0x2e, 0x77,
  0x65, 0x62, 0x6b, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
  0x46, 0x75, 0x6c, 0x6c, 0x73, 0x63, 0x72, 0x65, 0x65, 0x6e, 0x28, 0x45,
  0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x41, 0x4c, 0x4c, 0x4f, 0x57,
  0x5f, 0x4b, 0x45, 0x59, 0x42, 0x4f, 0x41, 0x52, 0x44, 0x5f, 0x49, 0x4e,
  0x50, 0x55, 0x54, 0x29, 0x3b, 0x0a, 0x09, 0x7d, 0x20, 0x65, 0x6c, 0x73,
  0x65, 0x20, 0x69, 0x66, 0x20, 0x28, 0x20, 0x67, 0x75, 0x69, 0x2e, 0x6d,
  0x6f, 0x7a, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x46, 0x75, 0x6c,
  0x6c, 0x53, 0x63, 0x72, 0x65, 0x65, 0x6e, 0x20, 0x29, 0x20, 0x7b, 0x0a,
  0x09, 0x09, 0x67, 0x75, 0x69, 0x2e, 0x6d, 0x6f, 0x7a, 0x52, 0x65, 0x71,
  0x75, 0x65, 0x73, 0x74, 0x46, 0x75, 0x6c, 0x6c, 0x53, 0x63, 0x72, 0x65,
  0x65, 0x6e, 0x28, 0x29, 0x3b, 0x0a, 0x09, 0x7d, 0x20, 0x65, 0x6c, 0x73,
  0x65, 0x20, 0x69, 0x66, 0x20, 0x28, 0x20, 0x67, 0x75, 0x69, 0x2e, 0x6d,
  0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x46, 0x75, 0x6c, 0x6c,
  0x73, 0x63, 0x72, 0x65, 0x65, 0x6e, 0x20, 0x29, 0x20, 0x7b, 0x0a, 0x09,
  0x09, 0x67, 0x75, 0x69, 0x2e, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65,
  0x73, 0x74, 0x46, 0x75, 0x6c, 0x6c, 0x73, 0x63, 0x72, 0x65, 0x65, 0x6e,
  0x28, 0x29, 0x3b, 0x0a, 0x09, 0x7d, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x20,
  0x7b, 0x0a, 0x09, 0x09, 0x67, 0x75, 0x69, 0x2e, 0x72, 0x65, 0x71, 0x75,
  0x65, 0x73, 0x74, 0x46, 0x75, 0x6c, 0x6c, 0x73, 0x63, 0x72, 0x65, 0x65,
  0x6e, 0x28, 0x29, 0x3b, 0x0a, 0x09, 0x7d, 0x0a, 0x7d, 0x3b, 0x0a, 0x0a,
  0x76, 0x61, 0x72, 0x20, 0x7a, 0x6f, 0x6f, 0x6d, 0x4b, 0x65, 0x79, 0x20,
  0x3d, 0x20, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x71,
  0x75, 0x65, 0x72, 0x79, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72,
  0x28, 0x27, 0x23, 0x6b, 0x65, 0x79, 0x2d, 0x7a, 0x6f, 0x6f, 0x6d, 0x27,
  0x29, 0x3b, 0x0a, 0x7a, 0x6f, 0x6f, 0x6d, 0x4b, 0x65, 0x79, 0x2e, 0x61,
  0x64, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x65,
  0x6e, 0x65, 0x72, 0x28, 0x27, 0x74, 0x6f, 0x75, 0x63, 0x68, 0x73, 0x74,
  0x61, 0x72, 0x74, 0x27, 0x2c, 0x20, 0x7a, 0x6f, 0x6f, 0x6d, 0x46, 0x75,
  0x6e, 0x63, 0x2c, 0x20, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x29, 0x3b, 0x0a,
  0x7a, 0x6f, 0x6f, 0x6d, 0x4b, 0x65, 0x79, 0x2e, 0x61, 0x64, 0x64, 0x45,
  0x76, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72,
  0x28, 0x27, 0x6d, 0x6f, 0x75, 0x73, 0x65, 0x64, 0x6f, 0x77, 0x6e, 0x27,
  0x2c, 0x20, 0x7a, 0x6f, 0x6f, 0x6d, 0x46, 0x75, 0x6e, 0x63, 0x2c, 0x20,
  0x66, 0x61, 0x6c, 0x73, 0x65, 0x29, 0x3b, 0x0a, 0x0a, 0x76, 0x61, 0x72,
  0x20, 0x6b, 0x62, 0x64, 0x46, 0x75, 0x6e, 0x63, 0x20, 0x3d, 0x20, 0x66,
  0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x65, 0x76, 0x29, 0x20,
  0x7b, 0x0a, 0x09, 0x69, 0x66, 0x20, 0x28, 0x20, 0x64, 0x6f, 0x63, 0x75,
  0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x45,
  0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x21, 0x3d, 0x20, 0x69, 0x6e,
  0x70, 0x75, 0x74, 0x20, 0x29, 0x20, 0x7b, 0x0a, 0x09, 0x09, 0x69, 0x6e,
  0x70, 0x75, 0x74, 0x2e, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x2e, 0x64, 0x69,
  0x73, 0x70, 0x6c, 0x61, 0x79, 0x20, 0x3d, 0x20, 0x27, 0x69, 0x6e, 0x6c,
  0x69, 0x6e, 0x65, 0x27, 0x3b, 0x0a, 0x09, 0x09, 0x69, 0x6e, 0x70, 0x75,
  0x74, 0x2e, 0x66, 0x6f, 0x63, 0x75, 0x73, 0x28, 0x29, 0x3b, 0x0a, 0x09,
  0x09, 0x65, 0x76, 0x2e, 0x70, 0x72, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x44,
  0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x28, 0x29, 0x3b, 0x0a, 0x09, 0x7d,
  0x20, 0x65, 0x6c, 0x73, 0x65, 0x20, 0x7b, 0x0a, 0x09, 0x09, 0x69, 0x6e,
  0x70, 0x75, 0x74, 0x2e, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x2e, 0x64, 0x69,
  0x73, 0x70, 0x6c, 0x61, 0x79, 0x20, 0x3d, 0x20, 0x27, 0x6e, 0x6f, 0x6e,
  0x65, 0x27, 0x3b, 0x0a, 0x09, 0x09, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77,
  0x2e, 0x66, 0x6f, 0x63, 0x75, 0x73, 0x28, 0x29, 0x3b, 0x0a, 0x09, 0x7d,
  0x0a, 0x7d, 0x3b, 0x0a, 0x0a, 0x76, 0x61, 0x72, 0x20, 0x6b, 0x62, 0x64,
  0x4b, 0x65, 0x79, 0x20, 0x3d, 0x20, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65,
  0x6e, 0x74, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x53, 0x65, 0x6c, 0x65,
  0x63, 0x74, 0x6f, 0x72, 0x28, 0x27, 0x23, 0x6b, 0x65, 0x79, 0x2d, 0x6b,
  0x62, 0x64, 0x27, 0x29, 0x3b, 0x0a, 0x6b, 0x62, 0x64, 0x4b, 0x65, 0x79,
  0x2e, 0x61, 0x64, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x73,
  0x74, 0x65, 0x6e, 0x65, 0x72, 0x28, 0x27, 0x74, 0x6f, 0x75, 0x63, 0x68,
  0x73, 0x74, 0x61, 0x72, 0x74, 0x27, 0x2c, 0x20, 0x6b, 0x62, 0x64, 0x46,
  0x75, 0x6e, 0x63, 0x2c, 0x20, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x29, 0x3b,
  0x0a, 0x6b, 0x62, 0x64, 0x4b, 0x65, 0x79, 0x2e, 0x61, 0x64, 0x64, 0x45,
  0x76, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72,
  0x28, 0x27, 0x6d, 0x6f, 0x75, 0x73, 0x65, 0x64, 0x6f, 0x77, 0x6e, 0x27,
  0x2c, 0x20, 0x6b, 0x62, 0x64, 0x46, 0x75, 0x6e, 0x63, 0x2c, 0x20, 0x66,
  0x61, 0x6c, 0x73, 0x65, 0x29, 0x3b, 0x0a, 0x0a, 0x76, 0x61, 0x72, 0x20,
  0x69, 0x6e, 0x70, 0x75, 0x74, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72,
  0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28,
  0x65, 0x76, 0x29, 0x20, 0x7b, 0x0a, 0x09, 0x73, 0x65, 0x6e, 0x64, 0x4b,
  0x65, 0x79, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x28, 0x69, 0x6e, 0x70,
  0x75, 0x74, 0x2e, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x29, 0x3b, 0x0a, 0x09,
  0x69, 0x6e, 0x70, 0x75, 0x74, 0x2e, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20,
  0x3d, 0x20, 0x22, 0x22, 0x3b, 0x0a, 0x09, 0x69, 0x6e, 0x70, 0x75, 0x74,
  0x2e, 0x62, 0x6c, 0x75, 0x72, 0x28, 0x29, 0x3b, 0x0a, 0x09, 0x69, 0x6e,
  0x70, 0x75, 0x74, 0x2e, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x2e, 0x64, 0x69,
  0x73, 0x70, 0x6c, 0x61, 0x79, 0x20, 0x3d, 0x20, 0x27, 0x6e, 0x6f, 0x6e,
  0x65, 0x27, 0x3b, 0x0a, 0x09, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2e,
  0x66, 0x6f, 0x63, 0x75, 0x73, 0x28, 0x29, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a,
  0x0a, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x2e, 0x61, 0x64, 0x64, 0x45, 0x76,
  0x65, 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x28,
  0x27, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x27, 0x2c, 0x20, 0x69, 0x6e,
  0x70, 0x75, 0x74, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x2c, 0x20,
  0x66, 0x61, 0x6c, 0x73, 0x65, 0x29, 0x3b, 0x0a, 0x0a, 0x2f, 0x2f, 0x20,
  0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x20, 0x63, 0x6c, 0x6f, 0x73, 0x65,
  0x64, 0x0a, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x61, 0x64, 0x64,
  0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65,
  0x72, 0x28, 0x27, 0x75, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x27, 0x2c, 0x20,
  0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x65, 0x76, 0x29,
  0x20, 0x7b, 0x20, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x43, 0x6c, 0x69, 0x65,
  0x6e, 0x74, 0x28, 0x29, 0x3b, 0x20, 0x7d, 0x2c, 0x20, 0x66, 0x61, 0x6c,
  0x73, 0x65, 0x20, 0x29, 0x3b, 0x0a
};

static const struct {
    const char *name;
    int length;
    const unsigned char *data;
} JSMPEG_files[] = {

Changes to jni/SDL2/src/video/jsmpeg/data/index.html.

1
2
3
4
5
6
7
8
9
10
11
12
..
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
<!DOCTYPE html>
<html>
<head>
  <meta http-equiv='Content-Type' content='text/html; charset=utf-8' />
  <meta name='viewport' content='width=320, initial-scale=1' />
  <title>undroidwish</title>
  <style type='text/css'>
    body {
      background: #AAA;
      text-align: center;
      margin: 0;
      padding: 0;
................................................................................
    #videoCanvas {
      /* position: absolute; */
      top: 50%;
      left: 50%;
      /* transform: translate(-50%, -50%); */
      border: 5px solid #777;
      margin: 10px;

      cursor: none;
    }
    .keys {
      position: relative;


    }
    .key {
      color: #fff;
      float: left;
      width: 72px;
      height: 48px;
      padding-top: 24px;
      background-color: #5bcbeb;
      opacity: 0.5;
      position: absolute;
      border-radius: 8px;







    }
    .key-small {




      height: 28px;
      padding-top: 8px;




      opacity: 0.5;














    }
    #key-up {left: 40px; top: 0px; }
    #key-down {left: 40px; top: 88px; }
    #key-left {left: 160px; top: 0px; }
    #key-right {left: 240px; top: 0px; }
    #key-esc {left: 360px; top: 0px; }
    #key-enter {left: 440px; top: 0px; }


  </style>
</head>
<body>

  <canvas id='videoCanvas' width='640' height='480'></canvas>
  <div class='keys mobile-only'>
    <div class='key' data-code='38' id='key-up'>UP</div>
    <div class='key' data-code='40' id='key-down'>DOWN</div>
    <div class='key' data-code='39' id='key-right'>RIGHT</div>
    <div class='key' data-code='37' id='key-left'>LEFT</div>
    <div class='key key-small' data-code='27' id='key-esc'>ESC</div>
    <div class='key key-small' data-code='13' id='key-enter'>ENTER</div>





  </div>
  <script type='text/javascript' src='jsmpg.js'></script>
  <script type='text/javascript' src='jsmpg-vnc.js'></script>
</body>
</html>




|







 







>


|
|
>
>

|


|
|
|
|


|
>
>
>
>
>
>
>

<
>
>
>
>
|
|
>
>
>
>

>
>
>
>
>
>
>
>
>
>
>
>
>
>

<
<
<
<
<
<
>
>



>
|
|
<
<
<
<
<
<
>
>
>
>
>





1
2
3
4
5
6
7
8
9
10
11
12
..
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
<!DOCTYPE html>
<html>
<head>
  <meta http-equiv='Content-Type' content='text/html; charset=utf-8' />
  <meta name='viewport' content='width=device-width, initial-scale=1.0 user-scalable=no' />
  <title>undroidwish</title>
  <style type='text/css'>
    body {
      background: #AAA;
      text-align: center;
      margin: 0;
      padding: 0;
................................................................................
    #videoCanvas {
      /* position: absolute; */
      top: 50%;
      left: 50%;
      /* transform: translate(-50%, -50%); */
      border: 5px solid #777;
      margin: 10px;
      /* cursor: crosshair; */
      cursor: none;
    }
    .fkeys {
      /* position: absolute; */
      top: 0%;
      left: 0%;
    }
    .fkey {
      color: #fff;
      float: left;
      width: 3em;
      height: 2em;
      padding-top: 1em;
      background-color: #555;
      opacity: 0.5;
      position: absolute;
      border-radius: 10px;
      border: 5px solid #777;
      margin: 5px;
      -moz-user-select: none;
      -webkit-user-select: none;
      -ms-user-select: none;
      user-select: none;
      -o-user-select: none;
    }

    #input {
      color: #fff;
      position: absolute;
      width: 60em;
      height: 2em;
      padding-top: 0.5em;
      padding-bottom: 0.5em;
      padding-left: 1em;
      padding-right: 1em;
      background-color: #555;
      opacity: 0.5;
      filter: alpha(opacity=0);
      position: absolute;
      /* width: 0; */
      border-radius: 10px;
      border: 5px solid #777;
      margin: 5px;
      -moz-user-select: none;
      -webkit-user-select: none;
      -ms-user-select: none;
      user-select: none;
      -o-user-select: none;
      left: 4px;
      top: 4px;
      display: none;
    }






    #key-zoom {right: 4px; top: 4px; }
    #key-kbd {right: 4px; top: 5em; }
  </style>
</head>
<body>
  <div id='content'>
    <canvas id='videoCanvas' width='640' height='480'></canvas>
    <div class='fkeys'>






      <div class='fkey' id='key-zoom'>Z</div>
      <div class='fkey mobile-only' id='key-kbd'>K</div>
    </div>
    <!-- input field to allow for onscreen keyboard -->
    <input class='mobile-only' type='text' id='input' size='1' tabindex='-1'>
  </div>
  <script type='text/javascript' src='jsmpg.js'></script>
  <script type='text/javascript' src='jsmpg-vnc.js'></script>
</body>
</html>

Changes to jni/SDL2/src/video/jsmpeg/data/jsmpg-vnc.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
..
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
..
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
...
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
...
171
172
173
174
175
176
177











































































178
179
// Set the body class to show/hide certain elements on mobile/desktop
document.body.className = ('ontouchstart' in window) ? 'mobile' : 'desktop';




// Setup the WebSocket connection and start the player
var client = new WebSocket( 'ws://' + window.location.host + '/ws', "ws" );

var canvas = document.getElementById('videoCanvas');


var use2d  = !!document.location.href.match('use2d');
var player = new jsmpeg(client, {canvas:canvas, forceCanvas2D:use2d});


// Input

var mouseLock = !!document.location.href.match('mouselock');
var lastMouse = {x: 0, y: 0};
if( mouseLock ) {
	// FUCK YEAH, VENDOR PREFIXES. LOVE EM!
	canvas.requestPointerLock = canvas.requestPointerLock ||
		canvas.mozRequestPointerLock || 
		canvas.webkitRequestPointerLock || 
		(function() {});
}

// enum input_type_t
var INPUT_KEY = 0x0001,
	INPUT_MOUSE_BUTTON = 0x0002,
	INPUT_MOUSE_ABSOLUTE = 0x0004,
................................................................................
	MOUSE_1_DOWN = 0x0002,
	MOUSE_1_UP = 0x0004,
	MOUSE_2_DOWN = 0x0008,
	MOUSE_2_UP = 0x0010;

// struct input_key_t { uint16 type, uint16 state; uint16 key_code; }
var sendKey = function(ev, action, key, right) {
	var send_action = action | (right ? KEY_RIGHT : 0);	
	client.send(new Uint16Array([INPUT_KEY, send_action, key]));
	if ( key == 8 ||		// backspace
	     key == 9 ||		// tab
	     key == 37 ||		// left
	     key == 38 ||		// up
	     key == 39 ||		// right
	     key == 40 ) {		// down
................................................................................
		ev.preventDefault();
	}
	if ( action == KEY_UP ) {
		ev.stopPropagation();
	}
	ev.preventDefault();
};


















// struct input_mouse_t { uint16 type, uint16 flags; float32 x; float32 y; }
var mouseDataBuffer = new ArrayBuffer(12);
var mouseDataTypeFlags = new Uint16Array(mouseDataBuffer, 0);
var mouseDataCoords = new Float32Array(mouseDataBuffer, 4);

var sendMouse = function(ev, action) {
	var type = 0;
	var x, y;

	if( action ) {
		type |= INPUT_MOUSE_BUTTON;
		
		// Attempt to lock pointer at mouse1 down
		if( mouseLock && action === MOUSE_1_DOWN ) {
			canvas.requestPointerLock();
		}
	}
	
	// Only make relative mouse movements if no button is pressed
	if( !action && mouseLock ) {
		type |= INPUT_MOUSE_RELATIVE;
		
		var p = ev.changedTouches ? ev.changedTouches[0] : ev;
		
		// FUCK, DID I MENTION I LOOOOOVE VENDOR PREFIXES? SO USEFUL!
		x = p.movementX || p.mozMovementX || p.webkitMovementX;
		y = p.movementY || p.mozMovementY || p.webkitMovementY;

		if( typeof x === 'undefined' ) {
			x = p.clientX - lastMouse.x;
			y = p.clientY - lastMouse.y;
................................................................................
		lastMouse.y = p.clientY;
	}

	// If we send absolute mouse coords, we can always do so, even for
	// button presses.
	if( !mouseLock ) {
		type |= INPUT_MOUSE_ABSOLUTE;
		
		var rect = canvas.getBoundingClientRect();
		var scaleX = canvas.width / (rect.right-rect.left),
			scaleY = canvas.height / (rect.bottom-rect.top);
		
		var p = ev.changedTouches ? ev.changedTouches[0] : ev;
		var x = (p.clientX - rect.left) * scaleX,
			y = (p.clientY - rect.top) * scaleY;
	}

	mouseDataTypeFlags[0] = type;
	mouseDataTypeFlags[1] = (action||0);
	mouseDataCoords[0] = x;
	mouseDataCoords[1] = y;
	
	client.send(mouseDataBuffer);
	ev.preventDefault();
};

var sendWheel = function(ev) {
	mouseDataTypeFlags[0] = INPUT_MOUSE_WHEEL;
	mouseDataTypeFlags[1] = ev.deltaMode;
	mouseDataCoords[0] = ev.deltaX;
	mouseDataCoords[1] = ev.deltaY;
	client.send(mouseDataBuffer);
	ev.preventDefault();
};


var closeClient = function(ev) {
	player.stop();
};

















// Keyboard
window.addEventListener('keydown', function(ev) { sendKey(ev, KEY_DOWN, ev.keyCode, ev.location == 2 /* DOM_KEY_LOCATION_RIGHT */); }, false );
window.addEventListener('keyup', function(ev) { sendKey(ev, KEY_UP, ev.keyCode, ev.location == 2 /* DOM_KEY_LOCATION_RIGHT */); }, false );


// Mouse
canvas.addEventListener('mousemove', function(ev) { sendMouse(ev, null); }, false);
canvas.addEventListener('mousedown', function(ev) { sendMouse(ev, ev.button == 2 ? MOUSE_2_DOWN : MOUSE_1_DOWN); }, false);
canvas.addEventListener('mouseup', function(ev) { sendMouse(ev, ev.button == 2 ? MOUSE_2_UP : MOUSE_1_UP); }, false);
canvas.addEventListener('wheel', function(ev) { sendWheel(ev); }, false);

................................................................................
};

var touchKeys = document.querySelectorAll('.key');
for( var i = 0; i < touchKeys.length; i++ ) {
	defineTouchButton(touchKeys[i], touchKeys[i].dataset.code);
}












































































// Window closed
window.addEventListener('unload', function(ev) { closeClient(); }, false );



>
>





>
>











|
|







 







|







 







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>












|





|



|

|







 







|



|









|













<




>
>
>
|
>
>
>
>
>
>
>
>
>
>
>
>

|
<
>







 







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>


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
..
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
..
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
...
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
...
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
// Set the body class to show/hide certain elements on mobile/desktop
document.body.className = ('ontouchstart' in window) ? 'mobile' : 'desktop';

var gui = document.getElementById('content');
var input = document.getElementById('input');

// Setup the WebSocket connection and start the player
var client = new WebSocket( 'ws://' + window.location.host + '/ws', "ws" );

var canvas = document.getElementById('videoCanvas');
canvas.savedBorder = canvas.style.border;

var use2d  = !!document.location.href.match('use2d');
var player = new jsmpeg(client, {canvas:canvas, forceCanvas2D:use2d});


// Input

var mouseLock = !!document.location.href.match('mouselock');
var lastMouse = {x: 0, y: 0};
if( mouseLock ) {
	// FUCK YEAH, VENDOR PREFIXES. LOVE EM!
	canvas.requestPointerLock = canvas.requestPointerLock ||
		canvas.mozRequestPointerLock ||
		canvas.webkitRequestPointerLock ||
		(function() {});
}

// enum input_type_t
var INPUT_KEY = 0x0001,
	INPUT_MOUSE_BUTTON = 0x0002,
	INPUT_MOUSE_ABSOLUTE = 0x0004,
................................................................................
	MOUSE_1_DOWN = 0x0002,
	MOUSE_1_UP = 0x0004,
	MOUSE_2_DOWN = 0x0008,
	MOUSE_2_UP = 0x0010;

// struct input_key_t { uint16 type, uint16 state; uint16 key_code; }
var sendKey = function(ev, action, key, right) {
	var send_action = action | (right ? KEY_RIGHT : 0);
	client.send(new Uint16Array([INPUT_KEY, send_action, key]));
	if ( key == 8 ||		// backspace
	     key == 9 ||		// tab
	     key == 37 ||		// left
	     key == 38 ||		// up
	     key == 39 ||		// right
	     key == 40 ) {		// down
................................................................................
		ev.preventDefault();
	}
	if ( action == KEY_UP ) {
		ev.stopPropagation();
	}
	ev.preventDefault();
};

var sendKeyString = function(str) {
	var i;
	for (i = 0; i < str.length; i++) {
		var hi = str.charCodeAt(i);
		var lo = 0;
		if ( hi >= 0xD800 && hi < 0xDC00 ) {
			if ( ev.key.length > 1 ) {
				lo = ev.key.charCodeAt(1);
			}
		}
		client.send(new Uint16Array([INPUT_KEY, KEY_PRESS, hi, lo]));
	}
	// send return key
	client.send(new Uint16Array([INPUT_KEY, KEY_DOWN, 13, 0]));
	client.send(new Uint16Array([INPUT_KEY, KEY_UP, 13, 0]));
};

// struct input_mouse_t { uint16 type, uint16 flags; float32 x; float32 y; }
var mouseDataBuffer = new ArrayBuffer(12);
var mouseDataTypeFlags = new Uint16Array(mouseDataBuffer, 0);
var mouseDataCoords = new Float32Array(mouseDataBuffer, 4);

var sendMouse = function(ev, action) {
	var type = 0;
	var x, y;

	if( action ) {
		type |= INPUT_MOUSE_BUTTON;

		// Attempt to lock pointer at mouse1 down
		if( mouseLock && action === MOUSE_1_DOWN ) {
			canvas.requestPointerLock();
		}
	}

	// Only make relative mouse movements if no button is pressed
	if( !action && mouseLock ) {
		type |= INPUT_MOUSE_RELATIVE;

		var p = ev.changedTouches ? ev.changedTouches[0] : ev;

		// FUCK, DID I MENTION I LOOOOOVE VENDOR PREFIXES? SO USEFUL!
		x = p.movementX || p.mozMovementX || p.webkitMovementX;
		y = p.movementY || p.mozMovementY || p.webkitMovementY;

		if( typeof x === 'undefined' ) {
			x = p.clientX - lastMouse.x;
			y = p.clientY - lastMouse.y;
................................................................................
		lastMouse.y = p.clientY;
	}

	// If we send absolute mouse coords, we can always do so, even for
	// button presses.
	if( !mouseLock ) {
		type |= INPUT_MOUSE_ABSOLUTE;

		var rect = canvas.getBoundingClientRect();
		var scaleX = canvas.width / (rect.right-rect.left),
			scaleY = canvas.height / (rect.bottom-rect.top);

		var p = ev.changedTouches ? ev.changedTouches[0] : ev;
		var x = (p.clientX - rect.left) * scaleX,
			y = (p.clientY - rect.top) * scaleY;
	}

	mouseDataTypeFlags[0] = type;
	mouseDataTypeFlags[1] = (action||0);
	mouseDataCoords[0] = x;
	mouseDataCoords[1] = y;

	client.send(mouseDataBuffer);
	ev.preventDefault();
};

var sendWheel = function(ev) {
	mouseDataTypeFlags[0] = INPUT_MOUSE_WHEEL;
	mouseDataTypeFlags[1] = ev.deltaMode;
	mouseDataCoords[0] = ev.deltaX;
	mouseDataCoords[1] = ev.deltaY;
	client.send(mouseDataBuffer);
	ev.preventDefault();
};


var closeClient = function(ev) {
	player.stop();
};

var keyDown = function(ev) {
	if ( document.activeElement == input ) {
		return;
	}
	sendKey(ev, KEY_DOWN, ev.keyCode,
		ev.location == 2 /* DOM_KEY_LOCATION_RIGHT */);
};

var keyUp = function(ev) {
	if ( document.activeElement == input ) {
		return;
	}
	sendKey(ev, KEY_UP, ev.keyCode,
		ev.location == 2 /* DOM_KEY_LOCATION_RIGHT */);
};

// Keyboard
window.addEventListener('keydown', keyDown, false);

window.addEventListener('keyup', keyUp, false);

// Mouse
canvas.addEventListener('mousemove', function(ev) { sendMouse(ev, null); }, false);
canvas.addEventListener('mousedown', function(ev) { sendMouse(ev, ev.button == 2 ? MOUSE_2_DOWN : MOUSE_1_DOWN); }, false);
canvas.addEventListener('mouseup', function(ev) { sendMouse(ev, ev.button == 2 ? MOUSE_2_UP : MOUSE_1_UP); }, false);
canvas.addEventListener('wheel', function(ev) { sendWheel(ev); }, false);

................................................................................
};

var touchKeys = document.querySelectorAll('.key');
for( var i = 0; i < touchKeys.length; i++ ) {
	defineTouchButton(touchKeys[i], touchKeys[i].dataset.code);
}

var zoomFunc = function(ev) {
	var notfull = false;
	if ( document.webkitFullscreenElement ) {
		document.webkitExitFullscreen();
		notfull = true;
	} else if ( document.mozFullScreenElement ) {
		document.mozCancelFullScreen();
		notfull = true;
	} else if ( document.msFullscreenElement ) {
		document.msExitFullscreen();
		notfull = true;
	} else if ( document.fullscreenElement ) {
		document.exitFullscreen();
		notfull = true;
	}
        if ( notfull ) {
		canvas.style.width = null;
		canvas.style.height = null;
		canvas.style.border = canvas.savedBorder;
		return;
	}
	var w = 1.0 * window.screen.width / window.screen.height;
	var c = 1.0 * canvas.width / canvas.height;
	if (w > c) {
		sw = Math.round(100 * c / w);
		sw = '' + sw + '%';
		sh = '100%';
	} else {
		sw = '100%';
		sh = Math.round(100 * w / c);
		sh = '' + sh + '%';
	}
	canvas.style.width = sw;
	canvas.style.height = sh;
	canvas.style.border = '0px';
	if ( gui.webkitRequestFullscreen ) {
		gui.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT);
	} else if ( gui.mozRequestFullScreen ) {
		gui.mozRequestFullScreen();
	} else if ( gui.msRequestFullscreen ) {
		gui.msRequestFullscreen();
	} else {
		gui.requestFullscreen();
	}
};

var zoomKey = document.querySelector('#key-zoom');
zoomKey.addEventListener('touchstart', zoomFunc, false);
zoomKey.addEventListener('mousedown', zoomFunc, false);

var kbdFunc = function(ev) {
	if ( document.activeElement != input ) {
		input.style.display = 'inline';
		input.focus();
		ev.preventDefault();
	} else {
		input.style.display = 'none';
		window.focus();
	}
};

var kbdKey = document.querySelector('#key-kbd');
kbdKey.addEventListener('touchstart', kbdFunc, false);
kbdKey.addEventListener('mousedown', kbdFunc, false);

var inputHandler = function(ev) {
	sendKeyString(input.value);
	input.value = "";
	input.blur();
	input.style.display = 'none';
	window.focus();
};

input.addEventListener('change', inputHandler, false);

// Window closed
window.addEventListener('unload', function(ev) { closeClient(); }, false );