北京经济技术开发区经开区虚拟城市项目-【前端】-移动端Web
lixuliang
2024-08-07 a916fc2df00bac9f8210b09fd7ee79f8b291e345
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
5799
5800
5801
5802
5803
5804
5805
5806
5807
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
5860
5861
5862
5863
5864
5865
5866
5867
5868
5869
5870
5871
5872
5873
5874
5875
5876
5877
5878
5879
5880
5881
5882
5883
5884
5885
5886
5887
5888
5889
5890
5891
5892
5893
5894
5895
5896
5897
5898
5899
5900
5901
5902
5903
5904
5905
5906
5907
5908
5909
5910
5911
5912
5913
5914
5915
5916
5917
5918
5919
5920
5921
5922
5923
5924
5925
5926
5927
5928
5929
5930
5931
5932
5933
5934
5935
5936
5937
5938
5939
5940
5941
5942
5943
5944
5945
5946
5947
5948
5949
5950
5951
5952
5953
5954
5955
5956
5957
5958
5959
5960
5961
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
5988
5989
5990
5991
5992
5993
5994
5995
5996
5997
5998
5999
6000
6001
6002
6003
6004
6005
6006
6007
6008
6009
6010
6011
6012
6013
6014
6015
6016
6017
6018
6019
6020
6021
6022
6023
6024
6025
6026
6027
6028
6029
6030
6031
6032
6033
6034
6035
6036
6037
6038
6039
6040
6041
6042
6043
6044
6045
6046
6047
6048
6049
6050
6051
6052
6053
6054
6055
6056
6057
6058
6059
6060
6061
6062
6063
6064
6065
6066
6067
6068
6069
6070
6071
6072
6073
6074
6075
6076
6077
6078
6079
6080
6081
6082
6083
6084
6085
6086
6087
6088
6089
6090
6091
6092
6093
6094
6095
6096
6097
6098
6099
6100
6101
6102
6103
6104
6105
6106
6107
6108
6109
6110
6111
6112
6113
6114
6115
6116
6117
6118
6119
6120
6121
6122
6123
6124
6125
6126
6127
6128
6129
6130
6131
6132
6133
6134
6135
6136
6137
6138
6139
6140
6141
6142
6143
6144
6145
6146
6147
6148
6149
6150
6151
6152
6153
6154
6155
6156
6157
6158
6159
6160
6161
6162
6163
6164
6165
6166
6167
6168
6169
6170
6171
6172
6173
6174
6175
6176
6177
6178
6179
6180
6181
6182
6183
6184
6185
6186
6187
6188
6189
6190
6191
6192
6193
6194
6195
6196
6197
6198
6199
6200
6201
6202
6203
6204
6205
6206
6207
6208
6209
6210
6211
6212
6213
6214
6215
6216
6217
6218
6219
6220
6221
6222
6223
6224
6225
6226
6227
6228
6229
6230
6231
6232
6233
6234
6235
6236
6237
6238
6239
6240
6241
6242
6243
6244
6245
6246
6247
6248
6249
6250
6251
6252
6253
6254
6255
6256
6257
6258
6259
6260
6261
6262
6263
6264
6265
6266
6267
6268
6269
6270
6271
6272
6273
6274
6275
6276
6277
6278
6279
6280
6281
6282
6283
6284
6285
6286
6287
6288
6289
6290
6291
6292
6293
6294
6295
6296
6297
6298
6299
6300
6301
6302
6303
6304
6305
6306
6307
6308
6309
6310
6311
6312
6313
6314
6315
6316
6317
6318
6319
6320
6321
6322
6323
6324
6325
6326
6327
6328
6329
6330
6331
6332
6333
6334
6335
6336
6337
6338
6339
6340
6341
6342
6343
6344
6345
6346
6347
6348
6349
6350
6351
6352
6353
6354
6355
6356
6357
6358
6359
6360
6361
6362
6363
6364
6365
6366
6367
6368
6369
6370
6371
6372
6373
6374
6375
6376
6377
6378
6379
6380
6381
6382
6383
6384
6385
6386
6387
6388
6389
6390
6391
6392
6393
6394
6395
6396
6397
6398
6399
6400
6401
6402
6403
6404
6405
6406
6407
6408
6409
6410
6411
6412
6413
6414
6415
6416
6417
6418
6419
6420
6421
6422
6423
6424
6425
6426
6427
6428
6429
6430
6431
6432
6433
6434
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
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
6600
6601
6602
6603
6604
6605
6606
6607
6608
6609
6610
6611
6612
6613
6614
6615
6616
6617
6618
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
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
6828
6829
6830
6831
6832
6833
6834
6835
6836
6837
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
6894
6895
6896
6897
6898
6899
6900
6901
6902
6903
6904
6905
6906
6907
6908
6909
6910
6911
6912
6913
6914
6915
6916
6917
6918
6919
6920
6921
6922
6923
6924
6925
6926
6927
6928
6929
6930
6931
6932
6933
6934
6935
6936
6937
6938
6939
6940
6941
6942
6943
6944
6945
6946
6947
6948
6949
6950
6951
6952
6953
6954
6955
6956
6957
6958
6959
6960
6961
6962
6963
6964
6965
6966
6967
6968
6969
6970
6971
6972
6973
6974
6975
6976
6977
6978
6979
6980
6981
6982
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
7169
7170
7171
7172
7173
7174
7175
7176
7177
7178
7179
7180
7181
7182
7183
7184
7185
7186
7187
7188
7189
7190
7191
7192
7193
7194
7195
7196
7197
7198
7199
7200
7201
7202
7203
7204
7205
7206
7207
7208
7209
7210
7211
7212
7213
7214
7215
7216
7217
7218
7219
7220
7221
7222
7223
7224
7225
7226
7227
7228
7229
7230
7231
7232
7233
7234
7235
7236
7237
7238
7239
7240
7241
7242
7243
7244
7245
7246
7247
7248
7249
7250
7251
7252
7253
7254
7255
7256
7257
7258
7259
7260
7261
7262
7263
7264
7265
7266
7267
7268
7269
7270
7271
7272
7273
7274
7275
7276
7277
7278
7279
7280
7281
7282
7283
7284
7285
7286
7287
7288
7289
7290
7291
7292
7293
7294
7295
7296
7297
7298
7299
7300
7301
7302
7303
7304
7305
7306
7307
7308
7309
7310
7311
7312
7313
7314
7315
7316
7317
7318
7319
7320
7321
7322
7323
7324
7325
7326
7327
7328
7329
7330
7331
7332
7333
7334
7335
7336
7337
7338
7339
7340
7341
7342
7343
7344
7345
7346
7347
7348
7349
7350
7351
7352
7353
7354
7355
7356
7357
7358
7359
7360
7361
7362
7363
7364
7365
7366
7367
7368
7369
7370
7371
7372
7373
7374
7375
7376
7377
7378
7379
7380
7381
7382
7383
7384
7385
7386
7387
7388
7389
7390
7391
7392
7393
7394
7395
7396
7397
7398
7399
7400
7401
7402
7403
7404
7405
7406
7407
7408
7409
7410
7411
7412
7413
7414
7415
7416
7417
7418
7419
7420
7421
7422
7423
7424
7425
7426
7427
7428
7429
7430
7431
7432
7433
7434
7435
7436
7437
7438
7439
7440
7441
7442
7443
7444
7445
7446
7447
7448
7449
7450
7451
7452
7453
7454
7455
7456
7457
7458
7459
7460
7461
7462
7463
7464
7465
7466
7467
7468
7469
7470
7471
7472
7473
7474
7475
7476
7477
7478
7479
7480
7481
7482
7483
7484
7485
7486
7487
7488
7489
7490
7491
7492
7493
7494
7495
7496
7497
7498
7499
7500
7501
7502
7503
7504
7505
7506
7507
7508
7509
7510
7511
7512
7513
7514
7515
7516
7517
7518
7519
7520
7521
7522
7523
7524
7525
7526
7527
7528
7529
7530
7531
7532
7533
7534
7535
7536
7537
7538
7539
7540
7541
7542
7543
7544
7545
7546
7547
7548
7549
7550
7551
7552
7553
7554
7555
7556
7557
7558
7559
7560
7561
7562
7563
7564
7565
7566
7567
7568
7569
7570
7571
7572
7573
7574
7575
7576
7577
7578
7579
7580
7581
7582
7583
7584
7585
7586
7587
7588
7589
7590
7591
7592
7593
7594
7595
7596
7597
7598
7599
7600
7601
7602
7603
7604
7605
7606
7607
7608
7609
7610
7611
7612
7613
7614
7615
7616
7617
7618
7619
7620
7621
7622
7623
7624
7625
7626
7627
7628
7629
7630
7631
7632
7633
7634
7635
7636
7637
7638
7639
7640
7641
7642
7643
7644
7645
7646
7647
7648
7649
7650
7651
7652
7653
7654
7655
7656
7657
7658
7659
7660
7661
7662
7663
7664
7665
7666
7667
7668
7669
7670
7671
7672
7673
7674
7675
7676
7677
7678
7679
7680
7681
7682
7683
7684
7685
7686
7687
7688
7689
7690
7691
7692
7693
7694
7695
7696
7697
7698
7699
7700
7701
7702
7703
7704
7705
7706
7707
7708
7709
7710
7711
7712
7713
7714
7715
7716
7717
7718
7719
7720
7721
7722
7723
7724
7725
7726
7727
7728
7729
7730
7731
7732
7733
7734
7735
7736
7737
7738
7739
7740
7741
7742
7743
7744
7745
7746
7747
7748
7749
7750
7751
7752
7753
7754
7755
7756
7757
7758
7759
7760
7761
7762
7763
7764
7765
7766
7767
7768
7769
7770
7771
7772
7773
7774
7775
7776
7777
7778
7779
7780
7781
7782
7783
7784
7785
7786
7787
7788
7789
7790
7791
7792
7793
7794
7795
7796
7797
7798
7799
7800
7801
7802
7803
7804
7805
7806
7807
7808
7809
7810
7811
7812
7813
7814
7815
7816
7817
7818
7819
7820
7821
7822
7823
7824
7825
7826
7827
7828
7829
7830
7831
7832
7833
7834
7835
7836
7837
7838
7839
7840
7841
7842
7843
7844
7845
7846
7847
7848
7849
7850
7851
7852
7853
7854
7855
7856
7857
7858
7859
7860
7861
7862
7863
7864
7865
7866
7867
7868
7869
7870
7871
7872
7873
7874
7875
7876
7877
7878
7879
7880
7881
7882
7883
7884
7885
7886
7887
7888
7889
7890
7891
7892
7893
7894
7895
7896
7897
7898
7899
7900
7901
7902
7903
7904
7905
7906
7907
7908
7909
7910
7911
7912
7913
7914
7915
7916
7917
7918
7919
7920
7921
7922
7923
7924
7925
7926
7927
7928
7929
7930
7931
7932
7933
7934
7935
7936
7937
7938
7939
7940
7941
7942
7943
7944
7945
7946
7947
7948
7949
7950
7951
7952
7953
7954
7955
7956
7957
7958
7959
7960
7961
7962
7963
7964
7965
7966
7967
7968
7969
7970
7971
7972
7973
7974
7975
7976
7977
7978
7979
7980
7981
7982
7983
7984
7985
7986
7987
7988
7989
7990
7991
7992
7993
7994
7995
7996
7997
7998
7999
8000
8001
8002
8003
8004
8005
8006
8007
8008
8009
8010
8011
8012
8013
8014
8015
8016
8017
8018
8019
8020
8021
8022
8023
8024
8025
8026
8027
8028
8029
8030
8031
8032
8033
8034
8035
8036
8037
8038
8039
8040
8041
8042
8043
8044
8045
8046
8047
8048
8049
8050
8051
8052
8053
8054
8055
8056
8057
8058
8059
8060
8061
8062
8063
8064
8065
8066
8067
8068
8069
8070
8071
8072
8073
8074
8075
8076
8077
8078
8079
8080
8081
8082
8083
8084
8085
8086
8087
8088
8089
8090
8091
8092
8093
8094
8095
8096
8097
8098
8099
8100
8101
8102
8103
8104
8105
8106
8107
8108
8109
8110
8111
8112
8113
8114
8115
8116
8117
8118
8119
8120
8121
8122
8123
8124
8125
8126
8127
8128
8129
8130
8131
8132
8133
8134
8135
8136
8137
8138
8139
8140
8141
8142
8143
8144
8145
8146
8147
8148
8149
8150
8151
8152
8153
8154
8155
8156
8157
8158
8159
8160
8161
8162
8163
8164
8165
8166
8167
8168
8169
8170
8171
8172
8173
8174
8175
8176
8177
8178
8179
8180
8181
8182
8183
8184
8185
8186
8187
8188
8189
8190
8191
8192
8193
8194
8195
8196
8197
8198
8199
8200
8201
8202
8203
8204
8205
8206
8207
8208
8209
8210
8211
8212
8213
8214
8215
8216
8217
8218
8219
8220
8221
8222
8223
8224
8225
8226
8227
8228
8229
8230
8231
8232
8233
8234
8235
8236
8237
8238
8239
8240
8241
8242
8243
8244
8245
8246
8247
8248
8249
8250
8251
8252
8253
8254
8255
8256
8257
8258
8259
8260
8261
8262
8263
8264
8265
8266
8267
8268
8269
8270
8271
8272
8273
8274
8275
8276
8277
8278
8279
8280
8281
8282
8283
8284
8285
8286
8287
8288
8289
8290
8291
8292
8293
8294
8295
8296
8297
8298
8299
8300
8301
8302
8303
8304
8305
8306
8307
8308
8309
8310
8311
8312
8313
8314
8315
8316
8317
8318
8319
8320
8321
8322
8323
8324
8325
8326
8327
8328
8329
8330
8331
8332
8333
8334
8335
8336
8337
8338
8339
8340
8341
8342
8343
8344
8345
8346
8347
8348
8349
8350
8351
8352
8353
8354
8355
8356
8357
8358
8359
8360
8361
8362
8363
8364
8365
8366
8367
8368
8369
8370
8371
8372
8373
8374
8375
8376
8377
8378
8379
8380
8381
8382
8383
8384
8385
8386
8387
8388
8389
8390
8391
8392
8393
8394
8395
8396
8397
8398
8399
8400
8401
8402
8403
8404
8405
8406
8407
8408
8409
8410
8411
8412
8413
8414
8415
8416
8417
8418
8419
8420
8421
8422
8423
8424
8425
8426
8427
8428
8429
8430
8431
8432
8433
8434
8435
8436
8437
8438
8439
8440
8441
8442
8443
8444
8445
8446
8447
8448
8449
8450
8451
8452
8453
8454
8455
8456
8457
8458
8459
8460
8461
8462
8463
8464
8465
8466
8467
8468
8469
8470
8471
8472
8473
8474
8475
8476
8477
8478
8479
8480
8481
8482
8483
8484
8485
8486
8487
8488
8489
8490
8491
8492
8493
8494
8495
8496
8497
8498
8499
8500
8501
8502
8503
8504
8505
8506
8507
8508
8509
8510
8511
8512
8513
8514
8515
8516
8517
8518
8519
8520
8521
8522
8523
8524
8525
8526
8527
8528
8529
8530
8531
8532
8533
8534
8535
8536
8537
8538
8539
8540
8541
8542
8543
8544
8545
8546
8547
8548
8549
8550
8551
8552
8553
8554
8555
8556
8557
8558
8559
8560
8561
8562
8563
8564
8565
8566
8567
8568
8569
8570
8571
8572
8573
8574
8575
8576
8577
8578
8579
8580
8581
8582
8583
8584
8585
8586
8587
8588
8589
8590
8591
8592
8593
8594
8595
8596
8597
8598
8599
8600
8601
8602
8603
8604
8605
8606
8607
8608
8609
8610
8611
8612
8613
8614
8615
8616
8617
8618
8619
8620
8621
8622
8623
8624
8625
8626
8627
8628
8629
8630
8631
8632
8633
8634
8635
8636
8637
8638
8639
8640
8641
8642
8643
8644
8645
8646
8647
8648
8649
8650
8651
8652
8653
8654
8655
8656
8657
8658
8659
8660
8661
8662
8663
8664
8665
8666
8667
8668
8669
8670
8671
8672
8673
8674
8675
8676
8677
8678
8679
8680
8681
8682
8683
8684
8685
8686
8687
8688
8689
8690
8691
8692
8693
8694
8695
8696
8697
8698
8699
8700
8701
8702
8703
8704
8705
8706
8707
8708
8709
8710
8711
8712
8713
8714
8715
8716
8717
8718
8719
8720
8721
8722
8723
8724
8725
8726
8727
8728
8729
8730
8731
8732
8733
8734
8735
8736
8737
8738
8739
8740
8741
8742
8743
8744
8745
8746
8747
8748
8749
8750
8751
8752
8753
8754
8755
8756
8757
8758
8759
8760
8761
8762
8763
8764
8765
8766
8767
8768
8769
8770
8771
8772
8773
8774
8775
8776
8777
8778
8779
8780
8781
8782
8783
8784
8785
8786
8787
8788
8789
8790
8791
8792
8793
8794
8795
8796
8797
8798
8799
8800
8801
8802
8803
8804
8805
8806
8807
8808
8809
8810
8811
8812
8813
8814
8815
8816
8817
8818
8819
8820
8821
8822
8823
8824
8825
8826
8827
8828
8829
8830
8831
8832
8833
8834
8835
8836
8837
8838
8839
8840
8841
8842
8843
8844
8845
8846
8847
8848
8849
8850
8851
8852
8853
8854
8855
8856
8857
8858
8859
8860
8861
8862
8863
8864
8865
8866
8867
8868
8869
8870
8871
8872
8873
8874
8875
8876
8877
8878
8879
8880
8881
8882
8883
8884
8885
8886
8887
8888
8889
8890
8891
8892
8893
8894
8895
8896
8897
8898
8899
8900
8901
8902
8903
8904
8905
8906
8907
8908
8909
8910
8911
8912
8913
8914
8915
8916
8917
8918
8919
8920
8921
8922
8923
8924
8925
8926
8927
8928
8929
8930
8931
8932
8933
8934
8935
8936
8937
8938
8939
8940
8941
8942
8943
8944
8945
8946
8947
8948
8949
8950
8951
8952
8953
8954
8955
8956
8957
8958
8959
8960
8961
8962
8963
8964
8965
8966
8967
8968
8969
8970
8971
8972
8973
8974
8975
8976
8977
8978
8979
8980
8981
8982
8983
8984
8985
8986
8987
8988
8989
8990
8991
8992
8993
8994
8995
8996
8997
8998
8999
9000
9001
9002
9003
9004
9005
9006
9007
9008
9009
9010
9011
9012
9013
9014
9015
9016
9017
9018
9019
9020
9021
9022
9023
9024
9025
9026
9027
9028
9029
9030
9031
9032
9033
9034
9035
9036
9037
9038
9039
9040
9041
9042
9043
9044
9045
9046
9047
9048
9049
9050
9051
9052
9053
9054
9055
9056
9057
9058
9059
9060
9061
9062
9063
9064
9065
9066
9067
9068
9069
9070
9071
9072
9073
9074
9075
9076
9077
9078
9079
9080
9081
9082
9083
9084
9085
9086
9087
9088
9089
9090
9091
9092
9093
9094
9095
9096
9097
9098
9099
9100
9101
9102
9103
9104
9105
9106
9107
9108
9109
9110
9111
9112
9113
9114
9115
9116
9117
9118
9119
9120
9121
9122
9123
9124
9125
9126
9127
9128
9129
9130
9131
9132
9133
9134
9135
9136
9137
9138
9139
9140
9141
9142
9143
9144
9145
9146
9147
9148
9149
9150
9151
9152
9153
9154
9155
9156
9157
9158
9159
9160
9161
9162
9163
9164
9165
9166
9167
9168
9169
9170
9171
9172
9173
9174
9175
9176
9177
9178
9179
9180
9181
9182
9183
9184
9185
9186
9187
9188
9189
9190
9191
9192
9193
9194
9195
9196
9197
9198
9199
9200
9201
9202
9203
9204
9205
9206
9207
9208
9209
9210
9211
9212
9213
9214
9215
9216
9217
9218
9219
9220
9221
9222
9223
9224
9225
9226
9227
9228
9229
9230
9231
9232
9233
9234
9235
9236
9237
9238
9239
9240
9241
9242
9243
9244
9245
9246
9247
9248
9249
9250
9251
9252
9253
9254
9255
9256
9257
9258
9259
9260
9261
9262
9263
9264
9265
9266
9267
9268
9269
9270
9271
9272
9273
9274
9275
9276
9277
9278
9279
9280
9281
9282
9283
9284
9285
9286
9287
9288
9289
9290
9291
9292
9293
9294
9295
9296
9297
9298
9299
9300
9301
9302
9303
9304
9305
9306
9307
9308
9309
9310
9311
9312
9313
9314
9315
9316
9317
9318
9319
9320
9321
9322
9323
9324
9325
9326
9327
9328
9329
9330
9331
9332
9333
9334
9335
9336
9337
9338
9339
9340
9341
9342
9343
9344
9345
9346
9347
9348
9349
9350
9351
9352
9353
9354
9355
9356
9357
9358
9359
9360
9361
9362
9363
9364
9365
9366
9367
9368
9369
9370
9371
9372
9373
9374
9375
9376
9377
9378
9379
9380
9381
9382
9383
9384
9385
9386
9387
9388
9389
9390
9391
9392
9393
9394
9395
9396
9397
9398
9399
9400
9401
9402
9403
9404
9405
9406
9407
9408
9409
9410
9411
9412
9413
9414
9415
9416
9417
9418
9419
9420
9421
9422
9423
9424
9425
9426
9427
9428
9429
9430
9431
9432
9433
9434
9435
9436
9437
9438
9439
9440
9441
9442
9443
9444
9445
9446
9447
9448
9449
9450
9451
9452
9453
9454
9455
9456
9457
9458
9459
9460
9461
9462
9463
9464
9465
9466
9467
9468
9469
9470
9471
9472
9473
9474
9475
9476
9477
9478
9479
9480
9481
9482
9483
9484
9485
9486
9487
9488
9489
9490
9491
9492
9493
9494
9495
9496
9497
9498
9499
9500
9501
9502
9503
9504
9505
9506
9507
9508
9509
9510
9511
9512
9513
9514
9515
9516
9517
9518
9519
9520
9521
9522
9523
9524
9525
9526
9527
9528
9529
9530
9531
9532
9533
9534
9535
9536
9537
9538
9539
9540
9541
9542
9543
9544
9545
9546
9547
9548
9549
9550
9551
9552
9553
9554
9555
9556
9557
9558
9559
9560
9561
9562
9563
9564
9565
9566
9567
9568
9569
9570
9571
9572
9573
9574
9575
9576
9577
9578
9579
9580
9581
9582
9583
9584
9585
9586
9587
9588
9589
9590
9591
9592
9593
9594
9595
9596
9597
9598
9599
9600
9601
9602
9603
9604
9605
9606
9607
9608
9609
9610
9611
9612
9613
9614
9615
9616
9617
9618
9619
9620
9621
9622
9623
9624
9625
9626
9627
9628
9629
9630
9631
9632
9633
9634
9635
9636
9637
9638
9639
9640
9641
9642
9643
9644
9645
9646
9647
9648
9649
9650
9651
9652
9653
9654
9655
9656
9657
9658
9659
9660
9661
9662
9663
9664
9665
9666
9667
9668
9669
9670
9671
9672
9673
9674
9675
9676
9677
9678
9679
9680
9681
9682
9683
9684
9685
9686
9687
9688
9689
9690
9691
9692
9693
9694
9695
9696
9697
9698
9699
9700
9701
9702
9703
9704
9705
9706
9707
9708
9709
9710
9711
9712
9713
9714
9715
9716
9717
9718
9719
9720
9721
9722
9723
9724
9725
9726
9727
9728
9729
9730
9731
9732
9733
9734
9735
9736
9737
9738
9739
9740
9741
9742
9743
9744
9745
9746
9747
9748
9749
9750
9751
9752
9753
9754
9755
9756
9757
9758
9759
9760
9761
9762
9763
9764
9765
9766
9767
9768
9769
9770
9771
9772
9773
9774
9775
9776
9777
9778
9779
9780
9781
9782
9783
9784
9785
9786
9787
9788
9789
9790
9791
9792
9793
9794
9795
9796
9797
9798
9799
9800
9801
9802
9803
9804
9805
9806
9807
9808
9809
9810
9811
9812
9813
9814
9815
9816
9817
9818
9819
9820
9821
9822
9823
9824
9825
9826
9827
9828
9829
9830
9831
9832
9833
9834
9835
9836
9837
9838
9839
9840
9841
9842
9843
9844
9845
9846
9847
9848
9849
9850
9851
9852
9853
9854
9855
9856
9857
9858
9859
9860
9861
9862
9863
9864
9865
9866
9867
9868
9869
9870
9871
9872
9873
9874
9875
9876
9877
9878
9879
9880
9881
9882
9883
9884
9885
9886
9887
9888
9889
9890
9891
9892
9893
9894
9895
9896
9897
9898
9899
9900
9901
9902
9903
9904
9905
9906
9907
9908
9909
9910
9911
9912
9913
9914
9915
9916
9917
9918
9919
9920
9921
9922
9923
9924
9925
9926
9927
9928
9929
9930
9931
9932
9933
9934
9935
9936
9937
9938
9939
9940
9941
9942
9943
9944
9945
9946
9947
9948
9949
9950
9951
9952
9953
9954
9955
9956
9957
9958
9959
9960
9961
9962
9963
9964
9965
9966
9967
9968
9969
9970
9971
9972
9973
9974
9975
9976
9977
9978
9979
9980
9981
9982
9983
9984
9985
9986
9987
9988
9989
9990
9991
9992
9993
9994
9995
9996
9997
9998
9999
10000
10001
10002
10003
10004
10005
10006
10007
10008
10009
10010
10011
10012
10013
10014
10015
10016
10017
10018
10019
10020
10021
10022
10023
10024
10025
10026
10027
10028
10029
10030
10031
10032
10033
10034
10035
10036
10037
10038
10039
10040
10041
10042
10043
10044
10045
10046
10047
10048
10049
10050
10051
10052
10053
10054
10055
10056
10057
10058
10059
10060
10061
10062
10063
10064
10065
10066
10067
10068
10069
10070
10071
10072
10073
10074
10075
10076
10077
10078
10079
10080
10081
10082
10083
10084
10085
10086
10087
10088
10089
10090
10091
10092
10093
10094
10095
10096
10097
10098
10099
10100
10101
10102
10103
10104
10105
10106
10107
10108
10109
10110
10111
10112
10113
10114
10115
10116
10117
10118
10119
10120
10121
10122
10123
10124
10125
10126
10127
10128
10129
10130
10131
10132
10133
10134
10135
10136
10137
10138
10139
10140
10141
10142
10143
10144
10145
10146
10147
10148
10149
10150
10151
10152
10153
10154
10155
10156
10157
10158
10159
10160
10161
10162
10163
10164
10165
10166
10167
10168
10169
10170
10171
10172
10173
10174
10175
10176
10177
10178
10179
10180
10181
10182
10183
10184
10185
10186
10187
10188
10189
10190
10191
10192
10193
10194
10195
10196
10197
10198
10199
10200
10201
10202
10203
10204
10205
10206
10207
10208
10209
10210
10211
10212
10213
10214
10215
10216
10217
10218
10219
10220
10221
10222
10223
10224
10225
10226
10227
10228
10229
10230
10231
10232
10233
10234
10235
10236
10237
10238
10239
10240
10241
10242
10243
10244
10245
10246
10247
10248
10249
10250
10251
10252
10253
10254
10255
10256
10257
10258
10259
10260
10261
10262
10263
10264
10265
10266
10267
10268
10269
10270
10271
10272
10273
10274
10275
10276
10277
10278
10279
10280
10281
10282
10283
10284
10285
10286
10287
10288
10289
10290
10291
10292
10293
10294
10295
10296
10297
10298
10299
10300
10301
10302
10303
10304
10305
10306
10307
10308
10309
10310
10311
10312
10313
10314
10315
10316
10317
10318
10319
10320
10321
10322
10323
10324
10325
10326
10327
10328
10329
10330
10331
10332
10333
10334
10335
10336
10337
10338
10339
10340
10341
10342
10343
10344
10345
10346
10347
10348
10349
10350
10351
10352
10353
10354
10355
10356
10357
10358
10359
10360
10361
10362
10363
10364
10365
10366
10367
10368
10369
10370
10371
10372
10373
10374
10375
10376
10377
10378
10379
10380
10381
10382
10383
10384
10385
10386
10387
10388
10389
10390
10391
10392
10393
10394
10395
10396
10397
10398
10399
10400
10401
10402
10403
10404
10405
10406
10407
10408
10409
10410
10411
10412
10413
10414
10415
10416
10417
10418
10419
10420
10421
10422
10423
10424
10425
10426
10427
10428
10429
10430
10431
10432
10433
10434
10435
10436
10437
10438
10439
10440
10441
10442
10443
10444
10445
10446
10447
10448
10449
10450
10451
10452
10453
10454
10455
10456
10457
10458
10459
10460
10461
10462
10463
10464
10465
10466
10467
10468
10469
10470
10471
10472
10473
10474
10475
10476
10477
10478
10479
10480
10481
10482
10483
10484
10485
10486
10487
10488
10489
10490
10491
10492
10493
10494
10495
10496
10497
10498
10499
10500
10501
10502
10503
10504
10505
10506
10507
10508
10509
10510
10511
10512
10513
10514
10515
10516
10517
10518
10519
10520
10521
10522
10523
10524
10525
10526
10527
10528
10529
10530
10531
10532
10533
10534
10535
10536
10537
10538
10539
10540
10541
10542
10543
10544
10545
10546
10547
10548
10549
10550
10551
10552
10553
10554
10555
10556
10557
10558
10559
10560
10561
10562
10563
10564
10565
10566
10567
10568
10569
10570
10571
10572
10573
10574
10575
10576
10577
10578
10579
10580
10581
10582
10583
10584
10585
10586
10587
10588
10589
10590
10591
10592
10593
10594
10595
10596
10597
10598
10599
10600
10601
10602
10603
10604
10605
10606
10607
10608
10609
10610
10611
10612
10613
10614
10615
10616
10617
10618
10619
10620
10621
10622
10623
10624
10625
10626
10627
10628
10629
10630
10631
10632
10633
10634
10635
10636
10637
10638
10639
10640
10641
10642
10643
10644
10645
10646
10647
10648
10649
10650
10651
10652
10653
10654
10655
10656
10657
10658
10659
10660
10661
10662
10663
10664
10665
10666
10667
10668
10669
10670
10671
10672
10673
10674
10675
10676
10677
10678
10679
10680
10681
10682
10683
10684
10685
10686
10687
10688
10689
10690
10691
10692
10693
10694
10695
10696
10697
10698
10699
10700
10701
10702
10703
10704
10705
10706
10707
10708
10709
10710
10711
10712
10713
10714
10715
10716
10717
10718
10719
10720
10721
10722
10723
10724
10725
10726
10727
10728
10729
10730
10731
10732
10733
10734
10735
10736
10737
10738
10739
10740
10741
10742
10743
10744
10745
10746
10747
10748
10749
10750
10751
10752
10753
10754
10755
10756
10757
10758
10759
10760
10761
10762
10763
10764
10765
10766
10767
10768
10769
10770
10771
10772
10773
10774
10775
10776
10777
10778
10779
10780
10781
10782
10783
10784
10785
10786
10787
10788
10789
10790
10791
10792
10793
10794
10795
10796
10797
10798
10799
10800
10801
10802
10803
10804
10805
10806
10807
10808
10809
10810
10811
10812
10813
10814
10815
10816
10817
10818
10819
10820
10821
10822
10823
10824
10825
10826
10827
10828
10829
10830
10831
10832
10833
10834
10835
10836
10837
10838
10839
10840
10841
10842
10843
10844
10845
10846
10847
10848
10849
10850
10851
10852
10853
10854
10855
10856
10857
10858
10859
10860
10861
10862
10863
10864
10865
10866
10867
10868
10869
10870
10871
10872
10873
10874
10875
10876
10877
10878
10879
10880
10881
10882
10883
10884
10885
10886
10887
10888
10889
10890
10891
10892
10893
10894
10895
10896
10897
10898
10899
10900
10901
10902
10903
10904
10905
10906
10907
10908
10909
10910
10911
10912
10913
10914
10915
10916
10917
10918
10919
10920
10921
10922
10923
10924
10925
10926
10927
10928
10929
10930
10931
10932
10933
10934
10935
10936
10937
10938
10939
10940
10941
10942
10943
10944
10945
10946
10947
10948
10949
10950
10951
10952
10953
10954
10955
10956
10957
10958
10959
10960
10961
10962
10963
10964
10965
10966
10967
10968
10969
10970
10971
10972
10973
10974
10975
10976
10977
10978
10979
10980
10981
10982
10983
10984
10985
10986
10987
10988
10989
10990
10991
10992
10993
10994
10995
10996
10997
10998
10999
11000
11001
11002
11003
11004
11005
11006
11007
11008
11009
11010
11011
11012
11013
11014
11015
11016
11017
11018
11019
11020
11021
11022
11023
11024
11025
11026
11027
11028
11029
11030
11031
11032
11033
11034
11035
11036
11037
11038
11039
11040
11041
11042
11043
11044
11045
11046
11047
11048
11049
11050
11051
11052
11053
11054
11055
11056
11057
11058
11059
11060
11061
11062
11063
11064
11065
11066
11067
11068
11069
11070
11071
11072
11073
11074
11075
11076
11077
11078
11079
11080
11081
11082
11083
11084
11085
11086
11087
11088
11089
11090
11091
11092
11093
11094
11095
11096
11097
11098
11099
11100
11101
11102
11103
11104
11105
11106
11107
11108
11109
11110
11111
11112
11113
11114
11115
11116
11117
11118
11119
11120
11121
11122
11123
11124
11125
11126
11127
11128
11129
11130
11131
11132
11133
11134
11135
11136
11137
11138
11139
11140
11141
11142
11143
11144
11145
11146
11147
11148
11149
11150
11151
11152
11153
11154
11155
11156
11157
11158
11159
11160
11161
11162
11163
11164
11165
11166
11167
11168
11169
11170
11171
11172
11173
11174
11175
11176
11177
11178
11179
11180
11181
11182
11183
11184
11185
11186
11187
11188
11189
11190
11191
11192
11193
11194
11195
11196
11197
11198
11199
11200
11201
11202
11203
11204
11205
11206
11207
11208
11209
11210
11211
11212
11213
11214
11215
11216
11217
11218
11219
11220
11221
11222
11223
11224
11225
11226
11227
11228
11229
11230
11231
11232
11233
11234
11235
11236
11237
11238
11239
11240
11241
11242
11243
11244
11245
11246
11247
11248
11249
11250
11251
11252
11253
11254
11255
11256
11257
11258
11259
11260
11261
11262
11263
11264
11265
11266
11267
11268
11269
11270
11271
11272
11273
11274
11275
11276
11277
11278
11279
11280
11281
11282
11283
11284
11285
11286
11287
11288
11289
11290
11291
11292
11293
11294
11295
11296
11297
11298
11299
11300
11301
11302
11303
11304
11305
11306
11307
11308
11309
11310
11311
11312
11313
11314
11315
11316
11317
11318
11319
11320
11321
11322
11323
11324
11325
11326
11327
11328
11329
11330
11331
11332
11333
11334
11335
11336
11337
11338
11339
11340
11341
11342
11343
11344
11345
11346
11347
11348
11349
11350
11351
11352
11353
11354
11355
11356
11357
11358
11359
11360
11361
11362
11363
11364
11365
11366
11367
11368
11369
11370
11371
11372
11373
11374
11375
11376
11377
11378
11379
11380
11381
11382
11383
11384
11385
11386
11387
11388
11389
11390
11391
11392
11393
11394
11395
11396
11397
11398
11399
11400
11401
11402
11403
11404
11405
11406
11407
11408
11409
11410
11411
11412
11413
11414
11415
11416
11417
11418
11419
11420
11421
11422
11423
11424
11425
11426
11427
11428
11429
11430
11431
11432
11433
11434
11435
11436
11437
11438
11439
11440
11441
11442
11443
11444
11445
11446
11447
11448
11449
11450
11451
11452
11453
11454
11455
11456
11457
11458
11459
11460
11461
11462
11463
11464
11465
11466
11467
11468
11469
11470
11471
11472
11473
11474
11475
11476
11477
11478
11479
11480
11481
11482
11483
11484
11485
11486
11487
11488
11489
11490
11491
11492
11493
11494
11495
11496
11497
11498
11499
11500
11501
11502
11503
11504
11505
11506
11507
11508
11509
11510
11511
11512
11513
11514
11515
11516
11517
11518
11519
11520
11521
11522
11523
11524
11525
11526
11527
11528
11529
11530
11531
11532
11533
11534
11535
11536
11537
11538
11539
11540
11541
11542
11543
11544
11545
11546
11547
11548
11549
11550
11551
11552
11553
11554
11555
11556
11557
11558
11559
11560
11561
11562
11563
11564
11565
11566
11567
11568
11569
11570
11571
11572
11573
11574
11575
11576
11577
11578
11579
11580
11581
11582
11583
11584
11585
11586
11587
11588
11589
11590
11591
11592
11593
11594
11595
11596
11597
11598
11599
11600
11601
11602
11603
11604
11605
11606
11607
11608
11609
11610
11611
11612
11613
11614
11615
11616
11617
11618
11619
11620
11621
11622
11623
11624
11625
11626
11627
11628
11629
11630
11631
11632
11633
11634
11635
11636
11637
11638
11639
11640
11641
11642
11643
11644
11645
11646
11647
11648
11649
11650
11651
11652
11653
11654
11655
11656
11657
11658
11659
11660
11661
11662
11663
11664
11665
11666
11667
11668
11669
11670
11671
11672
11673
11674
11675
11676
11677
11678
11679
11680
11681
11682
11683
11684
11685
11686
11687
11688
11689
11690
11691
11692
11693
11694
11695
11696
11697
11698
11699
11700
11701
11702
11703
11704
11705
11706
11707
11708
11709
11710
11711
11712
11713
11714
11715
11716
11717
11718
11719
11720
11721
11722
11723
11724
11725
11726
11727
11728
11729
11730
11731
11732
11733
11734
11735
11736
11737
11738
11739
11740
11741
11742
11743
11744
11745
11746
11747
11748
11749
11750
11751
11752
11753
11754
11755
11756
11757
11758
11759
11760
11761
11762
11763
11764
11765
11766
11767
11768
11769
11770
11771
11772
11773
11774
11775
11776
11777
11778
11779
11780
11781
11782
11783
11784
11785
11786
11787
11788
11789
11790
11791
11792
11793
11794
11795
11796
11797
11798
11799
11800
11801
11802
11803
11804
11805
11806
11807
11808
11809
11810
11811
11812
11813
11814
11815
11816
11817
11818
11819
11820
11821
11822
11823
11824
11825
11826
11827
11828
11829
11830
11831
11832
11833
11834
11835
11836
11837
11838
11839
11840
11841
11842
11843
11844
11845
11846
11847
11848
11849
11850
11851
11852
11853
11854
11855
11856
11857
11858
11859
11860
11861
11862
11863
11864
11865
11866
11867
11868
11869
11870
11871
11872
11873
11874
11875
11876
11877
11878
11879
11880
11881
11882
11883
11884
11885
11886
11887
11888
11889
11890
11891
11892
11893
11894
11895
11896
11897
11898
11899
11900
11901
11902
11903
11904
11905
11906
11907
11908
11909
11910
11911
11912
11913
11914
11915
11916
11917
11918
11919
11920
11921
11922
11923
11924
11925
11926
11927
11928
11929
11930
11931
11932
11933
11934
11935
11936
11937
11938
11939
11940
11941
11942
11943
11944
11945
11946
11947
11948
11949
11950
11951
11952
11953
11954
11955
11956
11957
11958
11959
11960
11961
11962
11963
11964
11965
11966
11967
11968
11969
11970
11971
11972
11973
11974
11975
11976
11977
11978
11979
11980
11981
11982
11983
11984
11985
11986
11987
11988
11989
11990
11991
11992
11993
11994
11995
11996
11997
11998
11999
12000
12001
12002
12003
12004
12005
12006
12007
12008
12009
12010
12011
12012
12013
12014
12015
12016
12017
12018
12019
12020
12021
12022
12023
12024
12025
12026
12027
12028
12029
12030
12031
12032
12033
12034
12035
12036
12037
12038
12039
12040
12041
12042
12043
12044
12045
12046
12047
12048
12049
12050
12051
12052
12053
12054
12055
12056
12057
12058
12059
12060
12061
12062
12063
12064
12065
12066
12067
12068
12069
12070
12071
12072
12073
12074
12075
12076
12077
12078
12079
12080
12081
12082
12083
12084
12085
12086
12087
12088
12089
12090
12091
12092
12093
12094
12095
12096
12097
12098
12099
12100
12101
12102
12103
12104
12105
12106
12107
12108
12109
12110
12111
12112
12113
12114
12115
12116
12117
12118
12119
12120
12121
12122
12123
12124
12125
12126
12127
12128
12129
12130
12131
12132
12133
12134
12135
12136
12137
12138
12139
12140
12141
12142
12143
12144
12145
12146
12147
12148
12149
12150
12151
12152
12153
12154
12155
12156
12157
12158
12159
12160
12161
12162
12163
12164
12165
12166
12167
12168
12169
12170
12171
12172
12173
12174
12175
12176
12177
12178
12179
12180
12181
12182
12183
12184
12185
12186
12187
12188
12189
12190
12191
12192
12193
12194
12195
12196
12197
12198
12199
12200
12201
12202
12203
12204
12205
12206
12207
12208
12209
12210
12211
12212
12213
12214
12215
12216
12217
12218
12219
12220
12221
12222
12223
12224
12225
12226
12227
12228
12229
12230
12231
12232
12233
12234
12235
12236
12237
12238
12239
12240
12241
12242
12243
12244
12245
12246
12247
12248
12249
12250
12251
12252
12253
12254
12255
12256
12257
12258
12259
12260
12261
12262
12263
12264
12265
12266
12267
12268
12269
12270
12271
12272
12273
12274
12275
12276
12277
12278
12279
12280
12281
12282
12283
12284
12285
12286
12287
12288
12289
12290
12291
12292
12293
12294
12295
12296
12297
12298
12299
12300
12301
12302
12303
12304
12305
12306
12307
12308
12309
12310
12311
12312
12313
12314
12315
12316
12317
12318
12319
12320
12321
12322
12323
12324
12325
12326
12327
12328
12329
12330
12331
12332
12333
12334
12335
12336
12337
12338
12339
12340
12341
12342
12343
12344
12345
12346
12347
12348
12349
12350
12351
12352
12353
12354
12355
12356
12357
12358
12359
12360
12361
12362
12363
12364
12365
12366
12367
12368
12369
12370
12371
12372
12373
12374
12375
12376
12377
12378
12379
12380
12381
12382
12383
12384
12385
12386
12387
12388
12389
12390
12391
12392
12393
12394
12395
12396
12397
12398
12399
12400
12401
12402
12403
12404
12405
12406
12407
12408
12409
12410
12411
12412
12413
12414
12415
12416
12417
12418
12419
12420
12421
12422
12423
12424
12425
12426
12427
12428
12429
12430
12431
12432
12433
12434
12435
12436
12437
12438
12439
12440
12441
12442
12443
12444
12445
12446
12447
12448
12449
12450
12451
12452
12453
12454
12455
12456
12457
12458
12459
12460
12461
12462
12463
12464
12465
12466
12467
12468
12469
12470
12471
12472
12473
12474
12475
12476
12477
12478
12479
12480
12481
12482
12483
12484
12485
12486
12487
12488
12489
12490
12491
12492
12493
12494
12495
12496
12497
12498
12499
12500
12501
12502
12503
12504
12505
12506
12507
12508
12509
12510
12511
12512
12513
12514
12515
12516
12517
12518
12519
12520
12521
12522
12523
12524
12525
12526
12527
12528
12529
12530
12531
12532
12533
12534
12535
12536
12537
12538
12539
12540
12541
12542
12543
12544
12545
12546
12547
12548
12549
12550
12551
12552
12553
12554
12555
12556
12557
12558
12559
12560
12561
12562
12563
12564
12565
12566
12567
12568
12569
12570
12571
12572
12573
12574
12575
12576
12577
12578
12579
12580
12581
12582
12583
12584
12585
12586
12587
12588
12589
12590
12591
12592
12593
12594
12595
12596
12597
12598
12599
12600
12601
12602
12603
12604
12605
12606
12607
12608
12609
12610
12611
12612
12613
12614
12615
12616
12617
12618
12619
12620
12621
12622
12623
12624
12625
12626
12627
12628
12629
12630
12631
12632
12633
12634
12635
12636
12637
12638
12639
12640
12641
12642
12643
12644
12645
12646
12647
12648
12649
12650
12651
12652
12653
12654
12655
12656
12657
12658
12659
12660
12661
12662
12663
12664
12665
12666
12667
12668
12669
12670
12671
12672
12673
12674
12675
12676
12677
12678
12679
12680
12681
12682
12683
12684
12685
12686
12687
12688
12689
12690
12691
12692
12693
12694
12695
12696
12697
12698
12699
12700
12701
12702
12703
12704
12705
12706
12707
12708
12709
12710
12711
12712
12713
12714
12715
12716
12717
12718
12719
12720
12721
12722
12723
12724
12725
12726
12727
12728
12729
12730
12731
12732
12733
12734
12735
12736
12737
12738
12739
12740
12741
12742
12743
12744
12745
12746
12747
12748
12749
12750
12751
12752
12753
12754
12755
12756
12757
12758
12759
12760
12761
12762
12763
12764
12765
12766
12767
12768
12769
12770
12771
12772
12773
12774
12775
12776
12777
12778
12779
12780
12781
12782
12783
12784
12785
12786
12787
12788
12789
12790
12791
12792
12793
12794
12795
12796
12797
12798
12799
12800
12801
12802
12803
12804
12805
12806
12807
12808
12809
12810
12811
12812
12813
12814
12815
12816
12817
12818
12819
12820
12821
12822
12823
12824
12825
12826
12827
12828
12829
12830
12831
12832
12833
12834
12835
12836
12837
12838
12839
12840
12841
12842
12843
12844
12845
12846
12847
12848
12849
12850
12851
12852
12853
12854
12855
12856
12857
12858
12859
12860
12861
12862
12863
12864
12865
12866
12867
12868
12869
12870
12871
12872
12873
12874
12875
12876
12877
12878
12879
12880
12881
12882
12883
12884
12885
12886
12887
12888
12889
12890
12891
12892
12893
12894
12895
12896
12897
12898
12899
12900
12901
12902
12903
12904
12905
12906
12907
12908
12909
12910
12911
12912
12913
12914
12915
12916
12917
12918
12919
12920
12921
12922
12923
12924
12925
12926
12927
12928
12929
12930
12931
12932
12933
12934
12935
12936
12937
12938
12939
12940
12941
12942
12943
12944
12945
12946
12947
12948
12949
12950
12951
12952
12953
12954
12955
12956
12957
12958
12959
12960
12961
12962
12963
12964
12965
12966
12967
12968
12969
12970
12971
12972
12973
12974
12975
12976
12977
12978
12979
12980
12981
12982
12983
12984
12985
12986
12987
12988
12989
12990
12991
12992
12993
12994
12995
12996
12997
12998
12999
13000
13001
13002
13003
13004
13005
13006
13007
13008
13009
13010
13011
13012
13013
13014
13015
13016
13017
13018
13019
13020
13021
13022
13023
13024
13025
13026
13027
13028
13029
13030
13031
13032
13033
13034
13035
13036
13037
13038
13039
13040
13041
13042
13043
13044
13045
13046
13047
13048
13049
13050
13051
13052
13053
13054
13055
13056
13057
13058
13059
13060
13061
13062
13063
13064
13065
13066
13067
13068
13069
13070
13071
13072
13073
13074
13075
13076
13077
13078
13079
13080
13081
13082
13083
13084
13085
13086
13087
13088
13089
13090
13091
13092
13093
13094
13095
13096
13097
13098
13099
13100
13101
13102
13103
13104
13105
13106
13107
13108
13109
13110
13111
13112
13113
13114
13115
13116
13117
13118
13119
13120
13121
13122
13123
13124
13125
13126
13127
13128
13129
13130
13131
13132
13133
13134
13135
13136
13137
13138
13139
13140
13141
13142
13143
13144
13145
13146
13147
13148
13149
13150
13151
13152
13153
13154
13155
13156
13157
13158
13159
13160
13161
13162
13163
13164
13165
13166
13167
13168
13169
13170
13171
13172
13173
13174
13175
13176
13177
13178
13179
13180
13181
13182
13183
13184
13185
13186
13187
13188
13189
13190
13191
13192
13193
13194
13195
13196
13197
13198
13199
13200
13201
13202
13203
13204
13205
13206
13207
13208
13209
13210
13211
13212
13213
13214
13215
13216
13217
13218
13219
13220
13221
13222
13223
13224
13225
13226
13227
13228
13229
13230
13231
13232
13233
13234
13235
13236
13237
13238
13239
13240
13241
13242
13243
13244
13245
13246
13247
13248
13249
13250
13251
13252
13253
13254
13255
13256
13257
13258
13259
13260
13261
13262
13263
13264
13265
13266
13267
13268
13269
13270
13271
13272
13273
13274
13275
13276
13277
13278
13279
13280
13281
13282
13283
13284
13285
13286
13287
13288
13289
13290
13291
13292
13293
13294
13295
13296
13297
13298
13299
13300
13301
13302
13303
13304
13305
13306
13307
13308
13309
13310
13311
13312
13313
13314
13315
13316
13317
13318
13319
13320
13321
13322
13323
13324
13325
13326
13327
13328
13329
13330
13331
13332
13333
13334
13335
13336
13337
13338
13339
13340
13341
13342
13343
13344
13345
13346
13347
13348
13349
13350
13351
13352
13353
13354
13355
13356
13357
13358
13359
13360
13361
13362
13363
13364
13365
13366
13367
13368
13369
13370
13371
13372
13373
13374
13375
13376
13377
13378
13379
13380
13381
13382
13383
13384
13385
13386
13387
13388
13389
13390
13391
13392
13393
13394
13395
13396
13397
13398
13399
13400
13401
13402
13403
13404
13405
13406
13407
13408
13409
13410
13411
13412
13413
13414
13415
13416
13417
13418
13419
13420
13421
13422
13423
13424
13425
13426
13427
13428
13429
13430
13431
13432
13433
13434
13435
13436
13437
13438
13439
13440
13441
13442
13443
13444
13445
13446
13447
13448
13449
13450
13451
13452
13453
13454
13455
13456
13457
13458
13459
13460
13461
13462
13463
13464
13465
13466
13467
13468
13469
13470
13471
13472
13473
13474
13475
13476
13477
13478
13479
13480
13481
13482
13483
13484
13485
13486
13487
13488
13489
13490
13491
13492
13493
13494
13495
13496
13497
13498
13499
13500
13501
13502
13503
13504
13505
13506
13507
13508
13509
13510
13511
13512
13513
13514
13515
13516
13517
13518
13519
13520
13521
13522
13523
13524
13525
13526
13527
13528
13529
13530
13531
13532
13533
13534
13535
13536
13537
13538
13539
13540
13541
13542
13543
13544
13545
13546
13547
13548
13549
13550
13551
13552
13553
13554
13555
13556
13557
13558
13559
13560
13561
13562
13563
13564
13565
13566
13567
13568
13569
13570
13571
13572
13573
13574
13575
13576
13577
13578
13579
13580
13581
13582
13583
13584
13585
13586
13587
13588
13589
13590
13591
13592
13593
13594
13595
13596
13597
13598
13599
13600
13601
13602
13603
13604
13605
13606
13607
13608
13609
13610
13611
13612
13613
13614
13615
13616
13617
13618
13619
13620
13621
13622
13623
13624
13625
13626
13627
13628
13629
13630
13631
13632
13633
13634
13635
13636
13637
13638
13639
13640
13641
13642
13643
13644
13645
13646
13647
13648
13649
13650
13651
13652
13653
13654
13655
13656
13657
13658
13659
13660
13661
13662
13663
13664
13665
13666
13667
13668
13669
13670
13671
13672
13673
13674
13675
13676
13677
13678
13679
13680
13681
13682
13683
13684
13685
13686
13687
13688
13689
13690
13691
13692
13693
13694
13695
13696
13697
13698
13699
13700
13701
13702
13703
13704
13705
13706
13707
13708
13709
13710
13711
13712
13713
13714
13715
13716
13717
13718
13719
13720
13721
13722
13723
13724
13725
13726
13727
13728
13729
13730
13731
13732
13733
13734
13735
13736
13737
13738
13739
13740
13741
13742
13743
13744
13745
13746
13747
13748
13749
13750
13751
13752
13753
13754
13755
13756
13757
13758
13759
13760
13761
13762
13763
13764
13765
13766
13767
13768
13769
13770
13771
13772
13773
13774
13775
13776
13777
13778
13779
13780
13781
13782
13783
13784
13785
13786
13787
13788
13789
13790
13791
13792
13793
13794
13795
13796
13797
13798
13799
13800
13801
13802
13803
13804
13805
13806
13807
13808
13809
13810
13811
13812
13813
13814
13815
13816
13817
13818
13819
13820
13821
13822
13823
13824
13825
13826
13827
13828
13829
13830
13831
13832
13833
13834
13835
13836
13837
13838
13839
13840
13841
13842
13843
13844
13845
13846
13847
13848
13849
13850
13851
13852
13853
13854
13855
13856
13857
13858
13859
13860
13861
13862
13863
13864
13865
13866
13867
13868
13869
13870
13871
13872
13873
13874
13875
13876
13877
13878
13879
13880
13881
13882
13883
13884
13885
13886
13887
13888
13889
13890
13891
13892
13893
13894
13895
13896
13897
13898
13899
13900
13901
13902
13903
13904
13905
13906
13907
13908
13909
13910
13911
13912
13913
13914
13915
13916
13917
13918
13919
13920
13921
13922
13923
13924
13925
13926
13927
13928
13929
13930
13931
13932
13933
13934
13935
13936
13937
13938
13939
13940
13941
13942
13943
13944
13945
13946
13947
13948
13949
13950
13951
13952
13953
13954
13955
13956
13957
13958
13959
13960
13961
13962
13963
13964
13965
13966
13967
13968
13969
13970
13971
13972
13973
13974
13975
13976
13977
13978
13979
13980
13981
13982
13983
13984
13985
13986
13987
13988
13989
13990
13991
13992
13993
13994
13995
13996
13997
13998
13999
14000
14001
14002
14003
14004
14005
14006
14007
14008
14009
14010
14011
14012
14013
14014
14015
14016
14017
14018
14019
14020
14021
14022
14023
14024
14025
14026
14027
14028
14029
14030
14031
14032
14033
14034
14035
14036
14037
14038
14039
14040
14041
14042
14043
14044
14045
14046
14047
14048
14049
14050
14051
14052
14053
14054
14055
14056
14057
14058
14059
14060
14061
14062
14063
14064
14065
14066
14067
14068
14069
14070
14071
14072
14073
14074
14075
14076
14077
14078
14079
14080
14081
14082
14083
14084
14085
14086
14087
14088
14089
14090
14091
14092
14093
14094
14095
14096
14097
14098
14099
14100
14101
14102
14103
14104
14105
14106
14107
14108
14109
14110
14111
14112
14113
14114
14115
14116
14117
14118
14119
14120
14121
14122
14123
14124
14125
14126
14127
14128
14129
14130
14131
14132
14133
14134
14135
14136
14137
14138
14139
14140
14141
14142
14143
14144
14145
14146
14147
14148
14149
14150
14151
14152
14153
14154
14155
14156
14157
14158
14159
14160
14161
14162
14163
14164
14165
14166
14167
14168
14169
14170
14171
14172
14173
14174
14175
14176
14177
14178
14179
14180
14181
14182
14183
14184
14185
14186
14187
14188
14189
14190
14191
14192
14193
14194
14195
14196
14197
14198
14199
14200
14201
14202
14203
14204
14205
14206
14207
14208
14209
14210
14211
14212
14213
14214
14215
14216
14217
14218
14219
14220
14221
14222
14223
14224
14225
14226
14227
14228
14229
14230
14231
14232
14233
14234
14235
14236
14237
14238
14239
14240
14241
14242
14243
14244
14245
14246
14247
14248
14249
14250
14251
14252
14253
14254
14255
14256
14257
14258
14259
14260
14261
14262
14263
14264
14265
14266
14267
14268
14269
14270
14271
14272
14273
14274
14275
14276
14277
14278
14279
14280
14281
14282
14283
14284
14285
14286
14287
14288
14289
14290
14291
14292
14293
14294
14295
14296
14297
14298
14299
14300
14301
14302
14303
14304
14305
14306
14307
14308
14309
14310
14311
14312
14313
14314
14315
14316
14317
14318
14319
14320
14321
14322
14323
14324
14325
14326
14327
14328
14329
14330
14331
14332
14333
14334
14335
14336
14337
14338
14339
14340
14341
14342
14343
14344
14345
14346
14347
14348
14349
14350
14351
14352
14353
14354
14355
14356
14357
14358
14359
14360
14361
14362
14363
14364
14365
14366
14367
14368
14369
14370
14371
14372
14373
14374
14375
14376
14377
14378
14379
14380
14381
14382
14383
14384
14385
14386
14387
14388
14389
14390
14391
14392
14393
14394
14395
14396
14397
14398
14399
14400
14401
14402
14403
14404
14405
14406
14407
14408
14409
14410
14411
14412
14413
14414
14415
14416
14417
14418
14419
14420
14421
14422
14423
14424
14425
14426
14427
14428
14429
14430
14431
14432
14433
14434
14435
14436
14437
14438
14439
14440
14441
14442
14443
14444
14445
14446
14447
14448
14449
14450
14451
14452
14453
14454
14455
14456
14457
14458
14459
14460
14461
14462
14463
14464
14465
14466
14467
14468
14469
14470
14471
14472
14473
14474
14475
14476
14477
14478
14479
14480
14481
14482
14483
14484
14485
14486
14487
14488
14489
14490
14491
14492
14493
14494
14495
14496
14497
14498
14499
14500
14501
14502
14503
14504
14505
14506
14507
14508
14509
14510
14511
14512
14513
14514
14515
14516
14517
14518
14519
14520
14521
14522
14523
14524
14525
14526
14527
14528
14529
14530
14531
14532
14533
14534
14535
14536
14537
14538
14539
14540
14541
14542
14543
14544
14545
14546
14547
14548
14549
14550
14551
14552
14553
14554
14555
14556
14557
14558
14559
14560
14561
14562
14563
14564
14565
14566
14567
14568
14569
14570
14571
14572
14573
14574
14575
14576
14577
14578
14579
14580
14581
14582
14583
14584
14585
14586
14587
14588
14589
14590
14591
14592
14593
14594
14595
14596
14597
14598
14599
14600
14601
14602
14603
14604
14605
14606
14607
14608
14609
14610
14611
14612
14613
14614
14615
14616
14617
14618
14619
14620
14621
14622
14623
14624
14625
14626
14627
14628
14629
14630
14631
14632
14633
14634
14635
14636
14637
14638
14639
14640
14641
14642
14643
14644
14645
14646
14647
14648
14649
14650
14651
14652
14653
14654
14655
14656
14657
14658
14659
14660
14661
14662
14663
14664
14665
14666
14667
14668
14669
14670
14671
14672
14673
14674
14675
14676
14677
14678
14679
14680
14681
14682
14683
14684
14685
14686
14687
14688
14689
14690
14691
14692
14693
14694
14695
14696
14697
14698
14699
14700
14701
14702
14703
14704
14705
14706
14707
14708
14709
14710
14711
14712
14713
14714
14715
14716
14717
14718
14719
14720
14721
14722
14723
14724
14725
14726
14727
14728
14729
14730
14731
14732
14733
14734
14735
14736
14737
14738
14739
14740
14741
14742
14743
14744
14745
14746
14747
14748
14749
14750
14751
14752
14753
14754
14755
14756
14757
14758
14759
14760
14761
14762
14763
14764
14765
14766
14767
14768
14769
14770
14771
14772
14773
14774
14775
14776
14777
14778
14779
14780
14781
14782
14783
14784
14785
14786
14787
14788
14789
14790
14791
14792
14793
14794
14795
14796
14797
14798
14799
14800
14801
14802
14803
14804
14805
14806
14807
14808
14809
14810
14811
14812
14813
14814
14815
14816
14817
14818
14819
14820
14821
14822
14823
14824
14825
14826
14827
14828
14829
14830
14831
14832
14833
14834
14835
14836
14837
14838
14839
14840
14841
14842
14843
14844
14845
14846
14847
14848
14849
14850
14851
14852
14853
14854
14855
14856
14857
14858
14859
14860
14861
14862
14863
14864
14865
14866
14867
14868
14869
14870
14871
14872
14873
14874
14875
14876
14877
14878
14879
14880
14881
14882
14883
14884
14885
14886
14887
14888
14889
14890
14891
14892
14893
14894
14895
14896
14897
14898
14899
14900
14901
14902
14903
14904
14905
14906
14907
14908
14909
14910
14911
14912
14913
14914
14915
14916
14917
14918
14919
14920
14921
14922
14923
14924
14925
14926
14927
14928
14929
14930
14931
14932
14933
14934
14935
14936
14937
14938
14939
14940
14941
14942
14943
14944
14945
14946
14947
14948
14949
14950
14951
14952
14953
14954
14955
14956
14957
14958
14959
14960
14961
14962
14963
14964
14965
14966
14967
14968
14969
14970
14971
14972
14973
14974
14975
14976
14977
14978
14979
14980
14981
14982
14983
14984
14985
14986
14987
14988
14989
14990
14991
14992
14993
14994
14995
14996
14997
14998
14999
15000
15001
15002
15003
15004
15005
15006
15007
15008
15009
15010
15011
15012
15013
15014
15015
15016
15017
15018
15019
15020
15021
15022
15023
15024
15025
15026
15027
15028
15029
15030
15031
15032
15033
15034
15035
15036
15037
15038
15039
15040
15041
15042
15043
15044
15045
15046
15047
15048
15049
15050
15051
15052
15053
15054
15055
15056
15057
15058
15059
15060
15061
15062
15063
15064
15065
15066
15067
15068
15069
15070
15071
15072
15073
15074
15075
15076
15077
15078
15079
15080
15081
15082
15083
15084
15085
15086
15087
15088
15089
15090
15091
15092
15093
15094
15095
15096
15097
15098
15099
15100
15101
15102
15103
15104
15105
15106
15107
15108
15109
15110
15111
15112
15113
15114
15115
15116
15117
15118
15119
15120
15121
15122
15123
15124
15125
15126
15127
15128
15129
15130
15131
15132
15133
15134
15135
15136
15137
15138
15139
15140
15141
15142
15143
15144
15145
15146
15147
15148
15149
15150
15151
15152
15153
15154
15155
15156
15157
15158
15159
15160
15161
15162
15163
15164
15165
15166
15167
15168
15169
15170
15171
15172
15173
15174
15175
15176
15177
15178
15179
15180
15181
15182
15183
15184
15185
15186
15187
15188
15189
15190
15191
15192
15193
15194
15195
15196
15197
15198
15199
15200
15201
15202
15203
15204
15205
15206
15207
15208
15209
15210
15211
15212
15213
15214
15215
15216
15217
15218
15219
15220
15221
15222
15223
15224
15225
15226
15227
15228
15229
15230
15231
15232
15233
15234
15235
15236
15237
15238
15239
15240
15241
15242
15243
15244
15245
15246
15247
15248
15249
15250
15251
15252
15253
15254
15255
15256
15257
15258
15259
15260
15261
15262
15263
15264
15265
15266
15267
15268
15269
15270
15271
15272
15273
15274
15275
15276
15277
15278
15279
15280
15281
15282
15283
15284
15285
15286
15287
15288
15289
15290
15291
15292
15293
15294
15295
15296
15297
15298
15299
15300
15301
15302
15303
15304
15305
15306
15307
15308
15309
15310
15311
15312
15313
15314
15315
15316
15317
15318
15319
15320
15321
15322
15323
15324
15325
15326
15327
15328
15329
15330
15331
15332
15333
15334
15335
15336
15337
15338
15339
15340
15341
15342
15343
15344
15345
15346
15347
15348
15349
15350
15351
15352
15353
15354
15355
15356
15357
15358
15359
15360
15361
15362
15363
15364
15365
15366
15367
15368
15369
15370
15371
15372
15373
15374
15375
15376
15377
15378
15379
15380
15381
15382
15383
15384
15385
15386
15387
15388
15389
15390
15391
15392
15393
15394
15395
15396
15397
15398
15399
15400
15401
15402
15403
15404
15405
15406
15407
15408
15409
15410
15411
15412
15413
15414
15415
15416
15417
15418
15419
15420
15421
15422
15423
15424
15425
15426
15427
15428
15429
15430
15431
15432
15433
15434
15435
15436
15437
15438
15439
15440
15441
15442
15443
15444
15445
15446
15447
15448
15449
15450
15451
15452
15453
15454
15455
15456
15457
15458
15459
15460
15461
15462
15463
15464
15465
15466
15467
15468
15469
15470
15471
15472
15473
15474
15475
15476
15477
15478
15479
15480
15481
15482
15483
15484
15485
15486
15487
15488
15489
15490
15491
15492
15493
15494
15495
15496
15497
15498
15499
15500
15501
15502
15503
15504
15505
15506
15507
15508
15509
15510
15511
15512
15513
15514
15515
15516
15517
15518
15519
15520
15521
15522
15523
15524
15525
15526
15527
15528
15529
15530
15531
15532
15533
15534
15535
15536
15537
15538
15539
15540
15541
15542
15543
15544
15545
15546
15547
15548
15549
15550
15551
15552
15553
15554
15555
15556
15557
15558
15559
15560
15561
15562
15563
15564
15565
15566
15567
15568
15569
15570
15571
15572
15573
15574
15575
15576
15577
15578
15579
15580
15581
15582
15583
15584
15585
15586
15587
15588
15589
15590
15591
15592
15593
15594
15595
15596
15597
15598
15599
15600
15601
15602
15603
15604
15605
15606
15607
15608
15609
15610
15611
15612
15613
15614
15615
15616
15617
15618
15619
15620
15621
15622
15623
15624
15625
15626
15627
15628
15629
15630
15631
15632
15633
15634
15635
15636
15637
15638
15639
15640
15641
15642
15643
15644
15645
15646
15647
15648
15649
15650
15651
15652
15653
15654
15655
15656
15657
15658
15659
15660
15661
15662
15663
15664
15665
15666
15667
15668
15669
15670
15671
15672
15673
15674
15675
15676
15677
15678
15679
15680
15681
15682
15683
15684
15685
15686
15687
15688
15689
15690
15691
15692
15693
15694
15695
15696
15697
15698
15699
15700
15701
15702
15703
15704
15705
15706
15707
15708
15709
15710
15711
15712
15713
15714
15715
15716
15717
15718
15719
15720
15721
15722
15723
15724
15725
15726
15727
15728
15729
15730
15731
15732
15733
15734
15735
15736
15737
15738
15739
15740
15741
15742
15743
15744
15745
15746
15747
15748
15749
15750
15751
15752
15753
15754
15755
15756
15757
15758
15759
15760
15761
15762
15763
15764
15765
15766
15767
15768
15769
15770
15771
15772
15773
15774
15775
15776
15777
15778
15779
15780
15781
15782
15783
15784
15785
15786
15787
15788
15789
15790
15791
15792
15793
15794
15795
15796
15797
15798
15799
15800
15801
15802
15803
15804
15805
15806
15807
15808
15809
15810
15811
15812
15813
15814
15815
15816
15817
15818
15819
15820
15821
15822
15823
15824
15825
15826
15827
15828
15829
15830
15831
15832
15833
15834
15835
15836
15837
15838
15839
15840
15841
15842
15843
15844
15845
15846
15847
15848
15849
15850
15851
15852
15853
15854
15855
15856
15857
15858
15859
15860
15861
15862
15863
15864
15865
15866
15867
15868
15869
15870
15871
15872
15873
15874
15875
15876
15877
15878
15879
15880
15881
15882
15883
15884
15885
15886
15887
15888
15889
15890
15891
15892
15893
15894
15895
15896
15897
15898
15899
15900
15901
15902
15903
15904
15905
15906
15907
15908
15909
15910
15911
15912
15913
15914
15915
15916
15917
15918
15919
15920
15921
15922
15923
15924
15925
15926
15927
15928
15929
15930
15931
15932
15933
15934
15935
15936
15937
15938
15939
15940
15941
15942
15943
15944
15945
15946
15947
15948
15949
15950
15951
15952
15953
15954
15955
15956
15957
15958
15959
15960
15961
15962
15963
15964
15965
15966
15967
15968
15969
15970
15971
15972
15973
15974
15975
15976
15977
15978
15979
15980
15981
15982
15983
15984
15985
15986
15987
15988
15989
15990
15991
15992
15993
15994
15995
15996
15997
15998
15999
16000
16001
16002
16003
16004
16005
16006
16007
16008
16009
16010
16011
16012
16013
16014
16015
16016
16017
16018
16019
16020
16021
16022
16023
16024
16025
16026
16027
16028
16029
16030
16031
16032
16033
16034
16035
16036
16037
16038
16039
16040
16041
16042
16043
16044
16045
16046
16047
16048
16049
16050
16051
16052
16053
16054
16055
16056
16057
16058
16059
16060
16061
16062
16063
16064
16065
16066
16067
16068
16069
16070
16071
16072
16073
16074
16075
16076
16077
16078
16079
16080
16081
16082
16083
16084
16085
16086
16087
16088
16089
16090
16091
16092
16093
16094
16095
16096
16097
16098
16099
16100
16101
16102
16103
16104
16105
16106
16107
16108
16109
16110
16111
16112
16113
16114
16115
16116
16117
16118
16119
16120
16121
16122
16123
16124
16125
16126
16127
16128
16129
16130
16131
16132
16133
16134
16135
16136
16137
16138
16139
16140
16141
16142
16143
16144
16145
16146
16147
16148
16149
16150
16151
16152
16153
16154
16155
16156
16157
16158
16159
16160
16161
16162
16163
16164
16165
16166
16167
16168
16169
16170
16171
16172
16173
16174
16175
16176
16177
16178
16179
16180
16181
16182
16183
16184
16185
16186
16187
16188
16189
16190
16191
16192
16193
16194
16195
16196
16197
16198
16199
16200
16201
16202
16203
16204
16205
16206
16207
16208
16209
16210
16211
16212
16213
16214
16215
16216
16217
16218
16219
16220
16221
16222
16223
16224
16225
16226
16227
16228
16229
16230
16231
16232
16233
16234
16235
16236
16237
16238
16239
16240
16241
16242
16243
16244
16245
16246
16247
16248
16249
16250
16251
16252
16253
16254
16255
16256
16257
16258
16259
16260
16261
16262
16263
16264
16265
16266
16267
16268
16269
16270
16271
16272
16273
16274
16275
16276
16277
16278
16279
16280
16281
16282
16283
16284
16285
16286
16287
16288
16289
16290
16291
16292
16293
16294
16295
16296
16297
16298
16299
16300
16301
16302
16303
16304
16305
16306
16307
16308
16309
16310
16311
16312
16313
16314
16315
16316
16317
16318
16319
16320
16321
16322
16323
16324
16325
16326
16327
16328
16329
16330
16331
16332
16333
16334
16335
16336
16337
16338
16339
16340
16341
16342
16343
16344
16345
16346
16347
16348
16349
16350
16351
16352
16353
16354
16355
16356
16357
16358
16359
16360
16361
16362
16363
16364
16365
16366
16367
16368
16369
16370
16371
16372
16373
16374
16375
16376
16377
16378
16379
16380
16381
16382
16383
16384
16385
16386
16387
16388
16389
16390
16391
16392
16393
16394
16395
16396
16397
16398
16399
16400
16401
16402
16403
16404
16405
16406
16407
16408
16409
16410
16411
16412
16413
16414
16415
16416
16417
16418
16419
16420
16421
16422
16423
16424
16425
16426
16427
16428
16429
16430
16431
16432
16433
16434
16435
16436
16437
16438
16439
16440
16441
16442
16443
16444
16445
16446
16447
16448
16449
16450
16451
16452
16453
16454
16455
16456
16457
16458
16459
16460
16461
16462
16463
16464
16465
16466
16467
16468
16469
16470
16471
16472
16473
16474
16475
16476
16477
16478
16479
16480
16481
16482
16483
16484
16485
16486
16487
16488
16489
16490
16491
16492
16493
16494
16495
16496
16497
16498
16499
16500
16501
16502
16503
16504
16505
16506
16507
16508
16509
16510
16511
16512
16513
16514
16515
16516
16517
16518
16519
16520
16521
16522
16523
16524
16525
16526
16527
16528
16529
16530
16531
16532
16533
16534
16535
16536
16537
16538
16539
16540
16541
16542
16543
16544
16545
16546
16547
16548
16549
16550
16551
16552
16553
16554
16555
16556
16557
16558
16559
16560
16561
16562
16563
16564
16565
16566
16567
16568
16569
16570
16571
16572
16573
16574
16575
16576
16577
16578
16579
16580
16581
16582
16583
16584
16585
16586
16587
16588
16589
16590
16591
16592
16593
16594
16595
16596
16597
16598
16599
16600
16601
16602
16603
16604
16605
16606
16607
16608
16609
16610
16611
16612
16613
16614
16615
16616
16617
16618
16619
16620
16621
16622
16623
16624
16625
16626
16627
16628
16629
16630
16631
16632
16633
16634
16635
16636
16637
16638
16639
16640
16641
16642
16643
16644
16645
16646
16647
16648
16649
16650
16651
16652
16653
16654
16655
16656
16657
16658
16659
16660
16661
16662
16663
16664
16665
16666
16667
16668
16669
16670
16671
16672
16673
16674
16675
16676
16677
16678
16679
16680
16681
16682
16683
16684
16685
16686
16687
16688
16689
16690
16691
16692
16693
16694
16695
16696
16697
16698
16699
16700
16701
16702
16703
16704
16705
16706
16707
16708
16709
16710
16711
16712
16713
16714
16715
16716
16717
16718
16719
16720
16721
16722
16723
16724
16725
16726
16727
16728
16729
16730
16731
16732
16733
16734
16735
16736
16737
16738
16739
16740
16741
16742
16743
16744
16745
16746
16747
16748
16749
16750
16751
16752
16753
16754
16755
16756
16757
16758
16759
16760
16761
16762
16763
16764
16765
16766
16767
16768
16769
16770
16771
16772
16773
16774
16775
16776
16777
16778
16779
16780
16781
16782
16783
16784
16785
16786
16787
16788
16789
16790
16791
16792
16793
16794
16795
16796
16797
16798
16799
16800
16801
16802
16803
16804
16805
16806
16807
16808
16809
16810
16811
16812
16813
16814
16815
16816
16817
16818
16819
16820
16821
16822
16823
16824
16825
16826
16827
16828
16829
16830
16831
16832
16833
16834
16835
16836
16837
16838
16839
16840
16841
16842
16843
16844
16845
16846
16847
16848
16849
16850
16851
16852
16853
16854
16855
16856
16857
16858
16859
16860
16861
16862
16863
16864
16865
16866
16867
16868
16869
16870
16871
16872
16873
16874
16875
16876
16877
16878
16879
16880
16881
16882
16883
16884
16885
16886
16887
16888
16889
16890
16891
16892
16893
16894
16895
16896
16897
16898
16899
16900
16901
16902
16903
16904
16905
16906
16907
16908
16909
16910
16911
16912
16913
16914
16915
16916
16917
16918
16919
16920
16921
16922
16923
16924
16925
16926
16927
16928
16929
16930
16931
16932
16933
16934
16935
16936
16937
16938
16939
16940
16941
16942
16943
16944
16945
16946
16947
16948
16949
16950
16951
16952
16953
16954
16955
16956
16957
16958
16959
16960
16961
16962
16963
16964
16965
16966
16967
16968
16969
16970
16971
16972
16973
16974
16975
16976
16977
16978
16979
16980
16981
16982
16983
16984
16985
16986
16987
16988
16989
16990
16991
16992
16993
16994
16995
16996
16997
16998
16999
17000
17001
17002
17003
17004
17005
17006
17007
17008
17009
17010
17011
17012
17013
17014
17015
17016
17017
17018
17019
17020
17021
17022
17023
17024
17025
17026
17027
17028
17029
17030
17031
17032
17033
17034
17035
17036
17037
17038
17039
17040
17041
17042
17043
17044
17045
17046
17047
17048
17049
17050
17051
17052
17053
17054
17055
17056
17057
17058
17059
17060
17061
17062
17063
17064
17065
17066
17067
17068
17069
17070
17071
17072
17073
17074
17075
17076
17077
17078
17079
17080
17081
17082
17083
17084
17085
17086
17087
17088
17089
17090
17091
17092
17093
17094
17095
17096
17097
17098
17099
17100
17101
17102
17103
17104
17105
17106
17107
17108
17109
17110
17111
17112
17113
17114
17115
17116
17117
17118
17119
17120
17121
17122
17123
17124
17125
17126
17127
17128
17129
17130
17131
17132
17133
17134
17135
17136
17137
17138
17139
17140
17141
17142
17143
17144
17145
17146
17147
17148
17149
17150
17151
17152
17153
17154
17155
17156
17157
17158
17159
17160
17161
17162
17163
17164
17165
17166
17167
17168
17169
17170
17171
17172
17173
17174
17175
17176
17177
17178
17179
17180
17181
17182
17183
17184
17185
17186
17187
17188
17189
17190
17191
17192
17193
17194
17195
17196
17197
17198
17199
17200
17201
17202
17203
17204
17205
17206
17207
17208
17209
17210
17211
17212
17213
17214
17215
17216
17217
17218
17219
17220
17221
17222
17223
17224
17225
17226
17227
17228
17229
17230
17231
17232
17233
17234
17235
17236
17237
17238
17239
17240
17241
17242
17243
17244
17245
17246
17247
17248
17249
17250
17251
17252
17253
17254
17255
17256
17257
17258
17259
17260
17261
17262
17263
17264
17265
17266
17267
17268
17269
17270
17271
17272
17273
17274
17275
17276
17277
17278
17279
17280
17281
17282
17283
17284
17285
17286
17287
17288
17289
17290
17291
17292
17293
17294
17295
17296
17297
17298
17299
17300
17301
17302
17303
17304
17305
17306
17307
17308
17309
17310
17311
17312
17313
17314
17315
17316
17317
17318
17319
17320
17321
17322
17323
17324
17325
17326
17327
17328
17329
17330
17331
17332
17333
17334
17335
17336
17337
17338
17339
17340
17341
17342
17343
17344
17345
17346
17347
17348
17349
17350
17351
17352
17353
17354
17355
17356
17357
17358
17359
17360
17361
17362
17363
17364
17365
17366
17367
17368
17369
17370
17371
17372
17373
17374
17375
17376
17377
17378
17379
17380
17381
17382
17383
17384
17385
17386
17387
17388
17389
17390
17391
17392
17393
17394
17395
17396
17397
17398
17399
17400
17401
17402
17403
17404
17405
17406
17407
17408
17409
17410
17411
17412
17413
17414
17415
17416
17417
17418
17419
17420
17421
17422
17423
17424
17425
17426
17427
17428
17429
17430
17431
17432
17433
17434
17435
17436
17437
17438
17439
17440
17441
17442
17443
17444
17445
17446
17447
17448
17449
17450
17451
17452
17453
17454
17455
17456
17457
17458
17459
17460
17461
17462
17463
17464
17465
17466
17467
17468
17469
17470
17471
17472
17473
17474
17475
17476
17477
17478
17479
17480
17481
17482
17483
17484
17485
17486
17487
17488
17489
17490
17491
17492
17493
17494
17495
17496
17497
17498
17499
17500
17501
17502
17503
17504
17505
17506
17507
17508
17509
17510
17511
17512
17513
17514
17515
17516
17517
17518
17519
17520
17521
17522
17523
17524
17525
17526
17527
17528
17529
17530
17531
17532
17533
17534
17535
17536
17537
17538
17539
17540
17541
17542
17543
17544
17545
17546
17547
17548
17549
17550
17551
17552
17553
17554
17555
17556
17557
17558
17559
17560
17561
17562
17563
17564
17565
17566
17567
17568
17569
17570
17571
17572
17573
17574
17575
17576
17577
17578
17579
17580
17581
17582
17583
17584
17585
17586
17587
17588
17589
17590
17591
17592
17593
17594
17595
17596
17597
17598
17599
17600
17601
17602
17603
17604
17605
17606
17607
17608
17609
17610
17611
17612
17613
17614
17615
17616
17617
17618
17619
17620
17621
17622
17623
17624
17625
17626
17627
17628
17629
17630
17631
17632
17633
17634
17635
17636
17637
17638
17639
17640
17641
17642
17643
17644
17645
17646
17647
17648
17649
17650
17651
17652
17653
17654
17655
17656
17657
17658
17659
17660
17661
17662
17663
17664
17665
17666
17667
17668
17669
17670
17671
17672
17673
17674
17675
17676
17677
17678
17679
17680
17681
17682
17683
17684
17685
17686
17687
17688
17689
17690
17691
17692
17693
17694
17695
17696
17697
17698
17699
17700
17701
17702
17703
17704
17705
17706
17707
17708
17709
17710
17711
17712
17713
17714
17715
17716
17717
17718
17719
17720
17721
17722
17723
17724
17725
17726
17727
17728
17729
17730
17731
17732
17733
17734
17735
17736
17737
17738
17739
17740
17741
17742
17743
17744
17745
17746
17747
17748
17749
17750
17751
17752
17753
17754
17755
17756
17757
17758
17759
17760
17761
17762
17763
17764
17765
17766
17767
17768
17769
17770
17771
17772
17773
17774
17775
17776
17777
17778
17779
17780
17781
17782
17783
17784
17785
17786
17787
17788
17789
17790
17791
17792
17793
17794
17795
17796
17797
17798
17799
17800
17801
17802
17803
17804
17805
17806
17807
17808
17809
17810
17811
17812
17813
17814
17815
17816
17817
17818
17819
17820
17821
17822
17823
17824
17825
17826
17827
17828
17829
17830
17831
17832
17833
17834
17835
17836
17837
17838
17839
17840
17841
17842
17843
17844
17845
17846
17847
17848
17849
17850
17851
17852
17853
17854
17855
17856
17857
17858
17859
17860
17861
17862
17863
17864
17865
17866
17867
17868
17869
17870
17871
17872
17873
17874
17875
17876
17877
17878
17879
17880
17881
17882
17883
17884
17885
17886
17887
17888
17889
17890
17891
17892
17893
17894
17895
17896
17897
17898
17899
17900
17901
17902
17903
17904
17905
17906
17907
17908
17909
17910
17911
17912
17913
17914
17915
17916
17917
17918
17919
17920
17921
17922
17923
17924
17925
17926
17927
17928
17929
17930
17931
17932
17933
17934
17935
17936
17937
17938
17939
17940
17941
17942
17943
17944
17945
17946
17947
17948
17949
17950
17951
17952
17953
17954
17955
17956
17957
17958
17959
17960
17961
17962
17963
17964
17965
17966
17967
17968
17969
17970
17971
17972
17973
17974
17975
17976
17977
17978
17979
17980
17981
17982
17983
17984
17985
17986
17987
17988
17989
17990
17991
17992
17993
17994
17995
17996
17997
17998
17999
18000
18001
18002
18003
18004
18005
18006
18007
18008
18009
18010
18011
18012
18013
18014
18015
18016
18017
18018
18019
18020
18021
18022
18023
18024
18025
18026
18027
18028
18029
18030
18031
18032
18033
18034
18035
18036
18037
18038
18039
18040
18041
18042
18043
18044
18045
18046
18047
18048
18049
18050
18051
18052
18053
18054
18055
18056
18057
18058
18059
18060
18061
18062
18063
18064
18065
18066
18067
18068
18069
18070
18071
18072
18073
18074
18075
18076
18077
18078
18079
18080
18081
18082
18083
18084
18085
18086
18087
18088
18089
18090
18091
18092
18093
18094
18095
18096
18097
18098
18099
18100
18101
18102
18103
18104
18105
18106
18107
18108
18109
18110
18111
18112
18113
18114
18115
18116
18117
18118
18119
18120
18121
18122
18123
18124
18125
18126
18127
18128
18129
18130
18131
18132
18133
18134
18135
18136
18137
18138
18139
18140
18141
18142
18143
18144
18145
18146
18147
18148
18149
18150
18151
18152
18153
18154
18155
18156
18157
18158
18159
18160
18161
18162
18163
18164
18165
18166
18167
18168
18169
18170
18171
18172
18173
18174
18175
18176
18177
18178
18179
18180
18181
18182
18183
18184
18185
18186
18187
18188
18189
18190
18191
18192
18193
18194
18195
18196
18197
18198
18199
18200
18201
18202
18203
18204
18205
18206
18207
18208
18209
18210
18211
18212
18213
18214
18215
18216
18217
18218
18219
18220
18221
18222
18223
18224
18225
18226
18227
18228
18229
18230
18231
18232
18233
18234
18235
18236
18237
18238
18239
18240
18241
18242
18243
18244
18245
18246
18247
18248
18249
18250
18251
18252
18253
18254
18255
18256
18257
18258
18259
18260
18261
18262
18263
18264
18265
18266
18267
18268
18269
18270
18271
18272
18273
18274
18275
18276
18277
18278
18279
18280
18281
18282
18283
18284
18285
18286
18287
18288
18289
18290
18291
18292
18293
18294
18295
18296
18297
18298
18299
18300
18301
18302
18303
18304
18305
18306
18307
18308
18309
18310
18311
18312
18313
18314
18315
18316
18317
18318
18319
18320
18321
18322
18323
18324
18325
18326
18327
18328
18329
18330
18331
18332
18333
18334
18335
18336
18337
18338
18339
18340
18341
18342
18343
18344
18345
18346
18347
18348
18349
18350
18351
18352
18353
18354
18355
18356
18357
18358
18359
18360
18361
18362
18363
18364
18365
18366
18367
18368
18369
18370
18371
18372
18373
18374
18375
18376
18377
18378
18379
18380
18381
18382
18383
18384
18385
18386
18387
18388
18389
18390
18391
18392
18393
18394
18395
18396
18397
18398
18399
18400
18401
18402
18403
18404
18405
18406
18407
18408
18409
18410
18411
18412
18413
18414
18415
18416
18417
18418
18419
18420
18421
18422
18423
18424
18425
18426
18427
18428
18429
18430
18431
18432
18433
18434
18435
18436
18437
18438
18439
18440
18441
18442
18443
18444
18445
18446
18447
18448
18449
18450
18451
18452
18453
18454
18455
18456
18457
18458
18459
18460
18461
18462
18463
18464
18465
18466
18467
18468
18469
18470
18471
18472
18473
18474
18475
18476
18477
18478
18479
18480
18481
18482
18483
18484
18485
18486
18487
18488
18489
18490
18491
18492
18493
18494
18495
18496
18497
18498
18499
18500
18501
18502
18503
18504
18505
18506
18507
18508
18509
18510
18511
18512
18513
18514
18515
18516
18517
18518
18519
18520
18521
18522
18523
18524
18525
18526
18527
18528
18529
18530
18531
18532
18533
18534
18535
18536
18537
18538
18539
18540
18541
18542
18543
18544
18545
18546
18547
18548
18549
18550
18551
18552
18553
18554
18555
18556
18557
18558
18559
18560
18561
18562
18563
18564
18565
18566
18567
18568
18569
18570
18571
18572
18573
18574
18575
18576
18577
18578
18579
18580
18581
18582
18583
18584
18585
18586
18587
18588
18589
18590
18591
18592
18593
18594
18595
18596
18597
18598
18599
18600
18601
18602
18603
18604
18605
18606
18607
18608
18609
18610
18611
18612
18613
18614
18615
18616
18617
18618
18619
18620
18621
18622
18623
18624
18625
18626
18627
18628
18629
18630
18631
18632
18633
18634
18635
18636
18637
18638
18639
18640
18641
18642
18643
18644
18645
18646
18647
18648
18649
18650
18651
18652
18653
18654
18655
18656
18657
18658
18659
18660
18661
18662
18663
18664
18665
18666
18667
18668
18669
18670
18671
18672
18673
18674
18675
18676
18677
18678
18679
18680
18681
18682
18683
18684
18685
18686
18687
18688
18689
18690
18691
18692
18693
18694
18695
18696
18697
18698
18699
18700
18701
18702
18703
18704
18705
18706
18707
18708
18709
18710
18711
18712
18713
18714
18715
18716
18717
18718
18719
18720
18721
18722
18723
18724
18725
18726
18727
18728
18729
18730
18731
18732
18733
18734
18735
18736
18737
18738
18739
18740
18741
18742
18743
18744
18745
18746
18747
18748
18749
18750
18751
18752
18753
18754
18755
18756
18757
18758
18759
18760
18761
18762
18763
18764
18765
18766
18767
18768
18769
18770
18771
18772
18773
18774
18775
18776
18777
18778
18779
18780
18781
18782
18783
18784
18785
18786
18787
18788
18789
18790
18791
18792
18793
18794
18795
18796
18797
18798
18799
18800
18801
18802
18803
18804
18805
18806
18807
18808
18809
18810
18811
18812
18813
18814
18815
18816
18817
18818
18819
18820
18821
18822
18823
18824
18825
18826
18827
18828
18829
18830
18831
18832
18833
18834
18835
18836
18837
18838
18839
18840
18841
18842
18843
18844
18845
18846
18847
18848
18849
18850
18851
18852
18853
18854
18855
18856
18857
18858
18859
18860
18861
18862
18863
18864
18865
18866
18867
18868
18869
18870
18871
18872
18873
18874
18875
18876
18877
18878
18879
18880
18881
18882
18883
18884
18885
18886
18887
18888
18889
18890
18891
18892
18893
18894
18895
18896
18897
18898
18899
18900
18901
18902
18903
18904
18905
18906
18907
18908
18909
18910
18911
18912
18913
18914
18915
18916
18917
18918
18919
18920
18921
18922
18923
18924
18925
18926
18927
18928
18929
18930
18931
18932
18933
18934
18935
18936
18937
18938
18939
18940
18941
18942
18943
18944
18945
18946
18947
18948
18949
18950
18951
18952
18953
18954
18955
18956
18957
18958
18959
18960
18961
18962
18963
18964
18965
18966
18967
18968
18969
18970
18971
18972
18973
18974
18975
18976
18977
18978
18979
18980
18981
18982
18983
18984
18985
18986
18987
18988
18989
18990
18991
18992
18993
18994
18995
18996
18997
18998
18999
19000
19001
19002
19003
19004
19005
19006
19007
19008
19009
19010
19011
19012
19013
19014
19015
19016
19017
19018
19019
19020
19021
19022
19023
19024
19025
19026
19027
19028
19029
19030
19031
19032
19033
19034
19035
19036
19037
19038
19039
19040
19041
19042
19043
19044
19045
19046
19047
19048
19049
19050
19051
19052
19053
19054
19055
19056
19057
19058
19059
19060
19061
19062
19063
19064
19065
19066
19067
19068
19069
19070
19071
19072
19073
19074
19075
19076
19077
19078
19079
19080
19081
19082
19083
19084
19085
19086
19087
19088
19089
19090
19091
19092
19093
19094
19095
19096
19097
19098
19099
19100
19101
19102
19103
19104
19105
19106
19107
19108
19109
19110
19111
19112
19113
19114
19115
19116
19117
19118
19119
19120
19121
19122
19123
19124
19125
19126
19127
19128
19129
19130
19131
19132
19133
19134
19135
19136
19137
19138
19139
19140
19141
19142
19143
19144
19145
19146
19147
19148
19149
19150
19151
19152
19153
19154
19155
19156
19157
19158
19159
19160
19161
19162
19163
19164
19165
19166
19167
19168
19169
19170
19171
19172
19173
19174
19175
19176
19177
19178
19179
19180
19181
19182
19183
19184
19185
19186
19187
19188
19189
19190
19191
19192
19193
19194
19195
19196
19197
19198
19199
19200
19201
19202
19203
19204
19205
19206
19207
19208
19209
19210
19211
19212
19213
19214
19215
19216
19217
19218
19219
19220
19221
19222
19223
19224
19225
19226
19227
19228
19229
19230
19231
19232
19233
19234
19235
19236
19237
19238
19239
19240
19241
19242
19243
19244
19245
19246
19247
19248
19249
19250
19251
19252
19253
19254
19255
19256
19257
19258
19259
19260
19261
19262
19263
19264
19265
19266
19267
19268
19269
19270
19271
19272
19273
19274
19275
19276
19277
19278
19279
19280
19281
19282
19283
19284
19285
19286
19287
19288
19289
19290
19291
19292
19293
19294
19295
19296
19297
19298
19299
19300
19301
19302
19303
19304
19305
19306
19307
19308
19309
19310
19311
19312
19313
19314
19315
19316
19317
19318
19319
19320
19321
19322
19323
19324
19325
19326
19327
19328
19329
19330
19331
19332
19333
19334
19335
19336
19337
19338
19339
19340
19341
19342
19343
19344
19345
19346
19347
19348
19349
19350
19351
19352
19353
19354
19355
19356
19357
19358
19359
19360
19361
19362
19363
19364
19365
19366
19367
19368
19369
19370
19371
19372
19373
19374
19375
19376
19377
19378
19379
19380
19381
19382
19383
19384
19385
19386
19387
19388
19389
19390
19391
19392
19393
19394
19395
19396
19397
19398
19399
19400
19401
19402
19403
19404
19405
19406
19407
19408
19409
19410
19411
19412
19413
19414
19415
19416
19417
19418
19419
19420
19421
19422
19423
19424
19425
19426
19427
19428
19429
19430
19431
19432
19433
19434
19435
19436
19437
19438
19439
19440
19441
19442
19443
19444
19445
19446
19447
19448
19449
19450
19451
19452
19453
19454
19455
19456
19457
19458
19459
19460
19461
19462
19463
19464
19465
19466
19467
19468
19469
19470
19471
19472
19473
19474
19475
19476
19477
19478
19479
19480
19481
19482
19483
19484
19485
19486
19487
19488
19489
19490
19491
19492
19493
19494
19495
19496
19497
19498
19499
19500
19501
19502
19503
19504
19505
19506
19507
19508
19509
19510
19511
19512
19513
19514
19515
19516
19517
19518
19519
19520
19521
19522
19523
19524
19525
19526
19527
19528
19529
19530
19531
19532
19533
19534
19535
19536
19537
19538
19539
19540
19541
19542
19543
19544
19545
19546
19547
19548
19549
19550
19551
19552
19553
19554
19555
19556
19557
19558
19559
19560
19561
19562
19563
19564
19565
19566
19567
19568
19569
19570
19571
19572
19573
19574
19575
19576
19577
19578
19579
19580
19581
19582
19583
19584
19585
19586
19587
19588
19589
19590
19591
19592
19593
19594
19595
19596
19597
19598
19599
19600
19601
19602
19603
19604
19605
19606
19607
19608
19609
19610
19611
19612
19613
19614
19615
19616
19617
19618
19619
19620
19621
19622
19623
19624
19625
19626
19627
19628
19629
19630
19631
19632
19633
19634
19635
19636
19637
19638
19639
19640
19641
19642
19643
19644
19645
19646
19647
19648
19649
19650
19651
19652
19653
19654
19655
19656
19657
19658
19659
19660
19661
19662
19663
19664
19665
19666
19667
19668
19669
19670
19671
19672
19673
19674
19675
19676
19677
19678
19679
19680
19681
19682
19683
19684
19685
19686
19687
19688
19689
19690
19691
19692
19693
19694
19695
19696
19697
19698
19699
19700
19701
19702
19703
19704
19705
19706
19707
19708
19709
19710
19711
19712
19713
19714
19715
19716
19717
19718
19719
19720
19721
19722
19723
19724
19725
19726
19727
19728
19729
19730
19731
19732
19733
19734
19735
19736
19737
19738
19739
19740
19741
19742
19743
19744
19745
19746
19747
19748
19749
19750
19751
19752
19753
19754
19755
19756
19757
19758
19759
19760
19761
19762
19763
19764
19765
19766
19767
19768
19769
19770
19771
19772
19773
19774
19775
19776
19777
19778
19779
19780
19781
19782
19783
19784
19785
19786
19787
19788
19789
19790
19791
19792
19793
19794
19795
19796
19797
19798
19799
19800
19801
19802
19803
19804
19805
19806
19807
19808
19809
19810
19811
19812
19813
19814
19815
19816
19817
19818
19819
19820
19821
19822
19823
19824
19825
19826
19827
19828
19829
19830
19831
19832
19833
19834
19835
19836
19837
19838
19839
19840
19841
19842
19843
19844
19845
19846
19847
19848
19849
19850
19851
19852
19853
19854
19855
19856
19857
19858
19859
19860
19861
19862
19863
19864
19865
19866
19867
19868
19869
19870
19871
19872
19873
19874
19875
19876
19877
19878
19879
19880
19881
19882
19883
19884
19885
19886
19887
19888
19889
19890
19891
19892
19893
19894
19895
19896
19897
19898
19899
19900
19901
19902
19903
19904
19905
19906
19907
19908
19909
19910
19911
19912
19913
19914
19915
19916
19917
19918
19919
19920
19921
19922
19923
19924
19925
19926
19927
19928
19929
19930
19931
19932
19933
19934
19935
19936
19937
19938
19939
19940
19941
19942
19943
19944
19945
19946
19947
19948
19949
19950
19951
19952
19953
19954
19955
19956
19957
19958
19959
19960
19961
19962
19963
19964
19965
19966
19967
19968
19969
19970
19971
19972
19973
19974
19975
19976
19977
19978
19979
19980
19981
19982
19983
19984
19985
19986
19987
19988
19989
19990
19991
19992
19993
19994
19995
19996
19997
19998
19999
20000
20001
20002
20003
20004
20005
20006
20007
20008
20009
20010
20011
20012
20013
20014
20015
20016
20017
20018
20019
20020
20021
20022
20023
20024
20025
20026
20027
20028
20029
20030
20031
20032
20033
20034
20035
20036
20037
20038
20039
20040
20041
20042
20043
20044
20045
20046
20047
20048
20049
20050
20051
20052
20053
20054
20055
20056
20057
20058
20059
20060
20061
20062
20063
20064
20065
20066
20067
20068
20069
20070
20071
20072
20073
20074
20075
20076
20077
20078
20079
20080
20081
20082
20083
20084
20085
20086
20087
20088
20089
20090
20091
20092
20093
20094
20095
20096
20097
20098
20099
20100
20101
20102
20103
20104
20105
20106
20107
20108
20109
20110
20111
20112
20113
20114
20115
20116
20117
20118
20119
20120
20121
20122
20123
20124
20125
20126
20127
20128
20129
20130
20131
20132
20133
20134
20135
20136
20137
20138
20139
20140
20141
20142
20143
20144
20145
20146
20147
20148
20149
20150
20151
20152
20153
20154
20155
20156
20157
20158
20159
20160
20161
20162
20163
20164
20165
20166
20167
20168
20169
20170
20171
20172
20173
20174
20175
20176
20177
20178
20179
20180
20181
20182
20183
20184
20185
20186
20187
20188
20189
20190
20191
20192
20193
20194
20195
20196
20197
20198
20199
20200
20201
20202
20203
20204
20205
20206
20207
20208
20209
20210
20211
20212
20213
20214
20215
20216
20217
20218
20219
20220
20221
20222
20223
20224
20225
20226
20227
20228
20229
20230
20231
20232
20233
20234
20235
20236
20237
20238
20239
20240
20241
20242
20243
20244
20245
20246
20247
20248
20249
20250
20251
20252
20253
20254
20255
20256
20257
20258
20259
20260
20261
20262
20263
20264
20265
20266
20267
20268
20269
20270
20271
20272
20273
20274
20275
20276
20277
20278
20279
20280
20281
20282
20283
20284
20285
20286
20287
20288
20289
20290
20291
20292
20293
20294
20295
20296
20297
20298
20299
20300
20301
20302
20303
20304
20305
20306
20307
20308
20309
20310
20311
20312
20313
20314
20315
20316
20317
20318
20319
20320
20321
20322
20323
20324
20325
20326
20327
20328
20329
20330
20331
20332
20333
20334
20335
20336
20337
20338
20339
20340
20341
20342
20343
20344
20345
20346
20347
20348
20349
20350
20351
20352
20353
20354
20355
20356
20357
20358
20359
20360
20361
20362
20363
20364
20365
20366
20367
20368
20369
20370
20371
20372
20373
20374
20375
20376
20377
20378
20379
20380
20381
20382
20383
20384
20385
20386
20387
20388
20389
20390
20391
20392
20393
20394
20395
20396
20397
20398
20399
20400
20401
20402
20403
20404
20405
20406
20407
20408
20409
20410
20411
20412
20413
20414
20415
20416
20417
20418
20419
20420
20421
20422
20423
20424
20425
20426
20427
20428
20429
20430
20431
20432
20433
20434
20435
20436
20437
20438
20439
20440
20441
20442
20443
20444
20445
20446
20447
20448
20449
20450
20451
20452
20453
20454
20455
20456
20457
20458
20459
20460
20461
20462
20463
20464
20465
20466
20467
20468
20469
20470
20471
20472
20473
20474
20475
20476
20477
20478
20479
20480
20481
20482
20483
20484
20485
20486
20487
20488
20489
20490
20491
20492
20493
20494
20495
20496
20497
20498
20499
20500
20501
20502
20503
20504
20505
20506
20507
20508
20509
20510
20511
20512
20513
20514
20515
20516
20517
20518
20519
20520
20521
20522
20523
20524
20525
20526
20527
20528
20529
20530
20531
20532
20533
20534
20535
20536
20537
20538
20539
20540
20541
20542
20543
20544
20545
20546
20547
20548
20549
20550
20551
20552
20553
20554
20555
20556
20557
20558
20559
20560
20561
20562
20563
20564
20565
20566
20567
20568
20569
20570
20571
20572
20573
20574
20575
20576
20577
20578
20579
20580
20581
20582
20583
20584
20585
20586
20587
20588
20589
20590
20591
20592
20593
20594
20595
20596
20597
20598
20599
20600
20601
20602
20603
20604
20605
20606
20607
20608
20609
20610
20611
20612
20613
20614
20615
20616
20617
20618
20619
20620
20621
20622
20623
20624
20625
20626
20627
20628
20629
20630
20631
20632
20633
20634
20635
20636
20637
20638
20639
20640
20641
20642
20643
20644
20645
20646
20647
20648
20649
20650
20651
20652
20653
20654
20655
20656
20657
20658
20659
20660
20661
20662
20663
20664
20665
20666
20667
20668
20669
20670
20671
20672
20673
20674
20675
20676
20677
20678
20679
20680
20681
20682
20683
20684
20685
20686
20687
20688
20689
20690
20691
20692
20693
20694
20695
20696
20697
20698
20699
20700
20701
20702
20703
20704
20705
20706
20707
20708
20709
20710
20711
20712
20713
20714
20715
20716
20717
20718
20719
20720
20721
20722
20723
20724
20725
20726
20727
20728
20729
20730
20731
20732
20733
20734
20735
20736
20737
20738
20739
20740
20741
20742
20743
20744
20745
20746
20747
20748
20749
20750
20751
20752
20753
20754
20755
20756
20757
20758
20759
20760
20761
20762
20763
20764
20765
20766
20767
20768
20769
20770
20771
20772
20773
20774
20775
20776
20777
20778
20779
20780
20781
20782
20783
20784
20785
20786
20787
20788
20789
20790
20791
20792
20793
20794
20795
20796
20797
20798
20799
20800
20801
20802
20803
20804
20805
20806
20807
20808
20809
20810
20811
20812
20813
20814
20815
20816
20817
20818
20819
20820
20821
20822
20823
20824
20825
20826
20827
20828
20829
20830
20831
20832
20833
20834
20835
20836
20837
20838
20839
20840
20841
20842
20843
20844
20845
20846
20847
20848
20849
20850
20851
20852
20853
20854
20855
20856
20857
20858
20859
20860
20861
20862
20863
20864
20865
20866
20867
20868
20869
20870
20871
20872
20873
20874
20875
20876
20877
20878
20879
20880
20881
20882
20883
20884
20885
20886
20887
20888
20889
20890
20891
20892
20893
20894
20895
20896
20897
20898
20899
20900
20901
20902
20903
20904
20905
20906
20907
20908
20909
20910
20911
20912
20913
20914
20915
20916
20917
20918
20919
20920
20921
20922
20923
20924
20925
20926
20927
20928
20929
20930
20931
20932
20933
20934
20935
20936
20937
20938
20939
20940
20941
20942
20943
20944
20945
20946
20947
20948
20949
20950
20951
20952
20953
20954
20955
20956
20957
20958
20959
20960
20961
20962
20963
20964
20965
20966
20967
20968
20969
20970
20971
20972
20973
20974
20975
20976
20977
20978
20979
20980
20981
20982
20983
20984
20985
20986
20987
20988
20989
20990
20991
20992
20993
20994
20995
20996
20997
20998
20999
21000
21001
21002
21003
21004
21005
21006
21007
21008
21009
21010
21011
21012
21013
21014
21015
21016
21017
21018
21019
21020
21021
21022
21023
21024
21025
21026
21027
21028
21029
21030
21031
21032
21033
21034
21035
21036
21037
21038
21039
21040
21041
21042
21043
21044
21045
21046
21047
21048
21049
21050
21051
21052
21053
21054
21055
21056
21057
21058
21059
21060
21061
21062
21063
21064
21065
21066
21067
21068
21069
21070
21071
21072
21073
21074
21075
21076
21077
21078
21079
21080
21081
21082
21083
21084
21085
21086
21087
21088
21089
21090
21091
21092
21093
21094
21095
21096
21097
21098
21099
21100
21101
21102
21103
21104
21105
21106
21107
21108
21109
21110
21111
21112
21113
21114
21115
21116
21117
21118
21119
21120
21121
21122
21123
21124
21125
21126
21127
21128
21129
21130
21131
21132
21133
21134
21135
21136
21137
21138
21139
21140
21141
21142
21143
21144
21145
21146
21147
21148
21149
21150
21151
21152
21153
21154
21155
21156
21157
21158
21159
21160
21161
21162
21163
21164
21165
21166
21167
21168
21169
21170
21171
21172
21173
21174
21175
21176
21177
21178
21179
21180
21181
21182
21183
21184
21185
21186
21187
21188
21189
21190
21191
21192
21193
21194
21195
21196
21197
21198
21199
21200
21201
21202
21203
21204
21205
21206
21207
21208
21209
21210
21211
21212
21213
21214
21215
21216
21217
21218
21219
21220
21221
21222
21223
21224
21225
21226
21227
21228
21229
21230
21231
21232
21233
21234
21235
21236
21237
21238
21239
21240
21241
21242
21243
21244
21245
21246
21247
21248
21249
21250
21251
21252
21253
21254
21255
21256
21257
21258
21259
21260
21261
21262
21263
21264
21265
21266
21267
21268
21269
21270
21271
21272
21273
21274
21275
21276
21277
21278
21279
21280
21281
21282
21283
21284
21285
21286
21287
21288
21289
21290
21291
21292
21293
21294
21295
21296
21297
21298
21299
21300
21301
21302
21303
21304
21305
21306
21307
21308
21309
21310
21311
21312
21313
21314
21315
21316
21317
21318
21319
21320
21321
21322
21323
21324
21325
21326
21327
21328
21329
21330
21331
21332
21333
21334
21335
21336
21337
21338
21339
21340
21341
21342
21343
21344
21345
21346
21347
21348
21349
21350
21351
21352
21353
21354
21355
21356
21357
21358
21359
21360
21361
21362
21363
21364
21365
21366
21367
21368
21369
21370
21371
21372
21373
21374
21375
21376
21377
21378
21379
21380
21381
21382
21383
21384
21385
21386
21387
21388
21389
21390
21391
21392
21393
21394
21395
21396
21397
21398
21399
21400
21401
21402
21403
21404
21405
21406
21407
21408
21409
21410
21411
21412
21413
21414
21415
21416
21417
21418
21419
21420
21421
21422
21423
21424
21425
21426
21427
21428
21429
21430
21431
21432
21433
21434
21435
21436
21437
21438
21439
21440
21441
21442
21443
21444
21445
21446
21447
21448
21449
21450
21451
21452
21453
21454
21455
21456
21457
21458
21459
21460
21461
21462
21463
21464
21465
21466
21467
21468
21469
21470
21471
21472
21473
21474
21475
21476
21477
21478
21479
21480
21481
21482
21483
21484
21485
21486
21487
21488
21489
21490
21491
21492
21493
21494
21495
21496
21497
21498
21499
21500
21501
21502
21503
21504
21505
21506
21507
21508
21509
21510
21511
21512
21513
21514
21515
21516
21517
21518
21519
21520
21521
21522
21523
21524
21525
21526
21527
21528
21529
21530
21531
21532
21533
21534
21535
21536
21537
21538
21539
21540
21541
21542
21543
21544
21545
21546
21547
21548
21549
21550
21551
21552
21553
21554
21555
21556
21557
21558
21559
21560
21561
21562
21563
21564
21565
21566
21567
21568
21569
21570
21571
21572
21573
21574
21575
21576
21577
21578
21579
21580
21581
21582
21583
21584
21585
21586
21587
21588
21589
21590
21591
21592
21593
21594
21595
21596
21597
21598
21599
21600
21601
21602
21603
21604
21605
21606
21607
21608
21609
21610
21611
21612
21613
21614
21615
21616
21617
21618
21619
21620
21621
21622
21623
21624
21625
21626
21627
21628
21629
21630
21631
21632
21633
21634
21635
21636
21637
21638
21639
21640
21641
21642
21643
21644
21645
21646
21647
21648
21649
21650
21651
21652
21653
21654
21655
21656
21657
21658
21659
21660
21661
21662
21663
21664
21665
21666
21667
21668
21669
21670
21671
21672
21673
21674
21675
21676
21677
21678
21679
21680
21681
21682
21683
21684
21685
21686
21687
21688
21689
21690
21691
21692
21693
21694
21695
21696
21697
21698
21699
21700
21701
21702
21703
21704
21705
21706
21707
21708
21709
21710
21711
21712
21713
21714
21715
21716
21717
21718
21719
21720
21721
21722
21723
21724
21725
21726
21727
21728
21729
21730
21731
21732
21733
21734
21735
21736
21737
21738
21739
21740
21741
21742
21743
21744
21745
21746
21747
21748
21749
21750
21751
21752
21753
21754
21755
21756
21757
21758
21759
21760
21761
21762
21763
21764
21765
21766
21767
21768
21769
21770
21771
21772
21773
21774
21775
21776
21777
21778
21779
21780
21781
21782
21783
21784
21785
21786
21787
21788
21789
21790
21791
21792
21793
21794
21795
21796
21797
21798
21799
21800
21801
21802
21803
21804
21805
21806
21807
21808
21809
21810
21811
21812
21813
21814
21815
21816
21817
21818
21819
21820
21821
21822
21823
21824
21825
21826
21827
21828
21829
21830
21831
21832
21833
21834
21835
21836
21837
21838
21839
21840
21841
21842
21843
21844
21845
21846
21847
21848
21849
21850
21851
21852
21853
21854
21855
21856
21857
21858
21859
21860
21861
21862
21863
21864
21865
21866
21867
21868
21869
21870
21871
21872
21873
21874
21875
21876
21877
21878
21879
21880
21881
21882
21883
21884
21885
21886
21887
21888
21889
21890
21891
21892
21893
21894
21895
21896
21897
21898
21899
21900
21901
21902
21903
21904
21905
21906
21907
21908
21909
21910
21911
21912
21913
21914
21915
21916
21917
21918
21919
21920
21921
21922
21923
21924
21925
21926
21927
21928
21929
21930
21931
21932
21933
21934
21935
21936
21937
21938
21939
21940
21941
21942
21943
21944
21945
21946
21947
21948
21949
21950
21951
21952
21953
21954
21955
21956
21957
21958
21959
21960
21961
21962
21963
21964
21965
21966
21967
21968
21969
21970
21971
21972
21973
21974
21975
21976
21977
21978
21979
21980
21981
21982
21983
21984
21985
21986
21987
21988
21989
21990
21991
21992
21993
21994
21995
21996
21997
21998
21999
22000
22001
22002
22003
22004
22005
22006
22007
22008
22009
22010
22011
22012
22013
22014
22015
22016
22017
22018
22019
22020
22021
22022
22023
22024
22025
22026
22027
22028
22029
22030
22031
22032
22033
22034
22035
22036
22037
22038
22039
22040
22041
22042
22043
22044
22045
22046
22047
22048
22049
22050
22051
22052
22053
22054
22055
22056
22057
22058
22059
22060
22061
22062
22063
22064
22065
22066
22067
22068
22069
22070
22071
22072
22073
22074
22075
22076
22077
22078
22079
22080
22081
22082
22083
22084
22085
22086
22087
22088
22089
22090
22091
22092
22093
22094
22095
22096
22097
22098
22099
22100
22101
22102
22103
22104
22105
22106
22107
22108
22109
22110
22111
22112
22113
22114
22115
22116
22117
22118
22119
22120
22121
22122
22123
22124
22125
22126
22127
22128
22129
22130
22131
22132
22133
22134
22135
22136
22137
22138
22139
22140
22141
22142
22143
22144
22145
22146
22147
22148
22149
22150
22151
22152
22153
22154
22155
22156
22157
22158
22159
22160
22161
22162
22163
22164
22165
22166
22167
22168
22169
22170
22171
22172
22173
22174
22175
22176
22177
22178
22179
22180
22181
22182
22183
22184
22185
22186
22187
22188
22189
22190
22191
22192
22193
22194
22195
22196
22197
22198
22199
22200
22201
22202
22203
22204
22205
22206
22207
22208
22209
22210
22211
22212
22213
22214
22215
22216
22217
22218
22219
22220
22221
22222
22223
22224
22225
22226
22227
22228
22229
22230
22231
22232
22233
22234
22235
22236
22237
22238
22239
22240
22241
22242
22243
22244
22245
22246
22247
22248
22249
22250
22251
22252
22253
22254
22255
22256
22257
22258
22259
22260
22261
22262
22263
22264
22265
22266
22267
22268
22269
22270
22271
22272
22273
22274
22275
22276
22277
22278
22279
22280
22281
22282
22283
22284
22285
22286
22287
22288
22289
22290
22291
22292
22293
22294
22295
22296
22297
22298
22299
22300
22301
22302
22303
22304
22305
22306
22307
22308
22309
22310
22311
22312
22313
22314
22315
22316
22317
22318
22319
22320
22321
22322
22323
22324
22325
22326
22327
22328
22329
22330
22331
22332
22333
22334
22335
22336
22337
22338
22339
22340
22341
22342
22343
22344
22345
22346
22347
22348
22349
22350
22351
22352
22353
22354
22355
22356
22357
22358
22359
22360
22361
22362
22363
22364
22365
22366
22367
22368
22369
22370
22371
22372
22373
22374
22375
22376
22377
22378
22379
22380
22381
22382
22383
22384
22385
22386
22387
22388
22389
22390
22391
22392
22393
22394
22395
22396
22397
22398
22399
22400
22401
22402
22403
22404
22405
22406
22407
22408
22409
22410
22411
22412
22413
22414
22415
22416
22417
22418
22419
22420
22421
22422
22423
22424
22425
22426
22427
22428
22429
22430
22431
22432
22433
22434
22435
22436
22437
22438
22439
22440
22441
22442
22443
22444
22445
22446
22447
22448
22449
22450
22451
22452
22453
22454
22455
22456
22457
22458
22459
22460
22461
22462
22463
22464
22465
22466
22467
22468
22469
22470
22471
22472
22473
22474
22475
22476
22477
22478
22479
22480
22481
22482
22483
22484
22485
22486
22487
22488
22489
22490
22491
22492
22493
22494
22495
22496
22497
22498
22499
22500
22501
22502
22503
22504
22505
22506
22507
22508
22509
22510
22511
22512
22513
22514
22515
22516
22517
22518
22519
22520
22521
22522
22523
22524
22525
22526
22527
22528
22529
22530
22531
22532
22533
22534
22535
22536
22537
22538
22539
22540
22541
22542
22543
22544
22545
22546
22547
22548
22549
22550
22551
22552
22553
22554
22555
22556
22557
22558
22559
22560
22561
22562
22563
22564
22565
22566
22567
22568
22569
22570
22571
22572
22573
22574
22575
22576
22577
22578
22579
22580
22581
22582
22583
22584
22585
22586
22587
22588
22589
22590
22591
22592
22593
22594
22595
22596
22597
22598
22599
22600
22601
22602
22603
22604
22605
22606
22607
22608
22609
22610
22611
22612
22613
22614
22615
22616
22617
22618
22619
22620
22621
22622
22623
22624
22625
22626
22627
22628
22629
22630
22631
22632
22633
22634
22635
22636
22637
22638
22639
22640
22641
22642
22643
22644
22645
22646
22647
22648
22649
22650
22651
22652
22653
22654
22655
22656
22657
22658
22659
22660
22661
22662
22663
22664
22665
22666
22667
22668
22669
22670
22671
22672
22673
22674
22675
22676
22677
22678
22679
22680
22681
22682
22683
22684
22685
22686
22687
22688
22689
22690
22691
22692
22693
22694
22695
22696
22697
22698
22699
22700
22701
22702
22703
22704
22705
22706
22707
22708
22709
22710
22711
22712
22713
22714
22715
22716
22717
22718
22719
22720
22721
22722
22723
22724
22725
22726
22727
22728
22729
22730
22731
22732
22733
22734
22735
22736
22737
22738
22739
22740
22741
22742
22743
22744
22745
22746
22747
22748
22749
22750
22751
22752
22753
22754
22755
22756
22757
22758
22759
22760
22761
22762
22763
22764
22765
22766
22767
22768
22769
22770
22771
22772
22773
22774
22775
22776
22777
22778
22779
22780
22781
22782
22783
22784
22785
22786
22787
22788
22789
22790
22791
22792
22793
22794
22795
22796
22797
22798
22799
22800
22801
22802
22803
22804
22805
22806
22807
22808
22809
22810
22811
22812
22813
22814
22815
22816
22817
22818
22819
22820
22821
22822
22823
22824
22825
22826
22827
22828
22829
22830
22831
22832
22833
22834
22835
22836
22837
22838
22839
22840
22841
22842
22843
22844
22845
22846
22847
22848
22849
22850
22851
22852
22853
22854
22855
22856
22857
22858
22859
22860
22861
22862
22863
22864
22865
22866
22867
22868
22869
22870
22871
22872
22873
22874
22875
22876
22877
22878
22879
22880
22881
22882
22883
22884
22885
22886
22887
22888
22889
22890
22891
22892
22893
22894
22895
22896
22897
22898
22899
22900
22901
22902
22903
22904
22905
22906
22907
22908
22909
22910
22911
22912
22913
22914
22915
22916
22917
22918
22919
22920
22921
22922
22923
22924
22925
22926
22927
22928
22929
22930
22931
22932
22933
22934
22935
22936
22937
22938
22939
22940
22941
22942
22943
22944
22945
22946
22947
22948
22949
22950
22951
22952
22953
22954
22955
22956
22957
22958
22959
22960
22961
22962
22963
22964
22965
22966
22967
22968
22969
22970
22971
22972
22973
22974
22975
22976
22977
22978
22979
22980
22981
22982
22983
22984
22985
22986
22987
22988
22989
22990
22991
22992
22993
22994
22995
22996
22997
22998
22999
23000
23001
23002
23003
23004
23005
23006
23007
23008
23009
23010
23011
23012
23013
23014
23015
23016
23017
23018
23019
23020
23021
23022
23023
23024
23025
23026
23027
23028
23029
23030
23031
23032
23033
23034
23035
23036
23037
23038
23039
23040
23041
23042
23043
23044
23045
23046
23047
23048
23049
23050
23051
23052
23053
23054
23055
23056
23057
23058
23059
23060
23061
23062
23063
23064
23065
23066
23067
23068
23069
23070
23071
23072
23073
23074
23075
23076
23077
23078
23079
23080
23081
23082
23083
23084
23085
23086
23087
23088
23089
23090
23091
23092
23093
23094
23095
23096
23097
23098
23099
23100
23101
23102
23103
23104
23105
23106
23107
23108
23109
23110
23111
23112
23113
23114
23115
23116
23117
23118
23119
23120
23121
23122
23123
23124
23125
23126
23127
23128
23129
23130
23131
23132
23133
23134
23135
23136
23137
23138
23139
23140
23141
23142
23143
23144
23145
23146
23147
23148
23149
23150
23151
23152
23153
23154
23155
23156
23157
23158
23159
23160
23161
23162
23163
23164
23165
23166
23167
23168
23169
23170
23171
23172
23173
23174
23175
23176
23177
23178
23179
23180
23181
23182
23183
23184
23185
23186
23187
23188
23189
23190
23191
23192
23193
23194
23195
23196
23197
23198
23199
23200
23201
23202
23203
23204
23205
23206
23207
23208
23209
23210
23211
23212
23213
23214
23215
23216
23217
23218
23219
23220
23221
23222
23223
23224
23225
23226
23227
23228
23229
23230
23231
23232
23233
23234
23235
23236
23237
23238
23239
23240
23241
23242
23243
23244
23245
23246
23247
23248
23249
23250
23251
23252
23253
23254
23255
23256
23257
23258
23259
23260
23261
23262
23263
23264
23265
23266
23267
23268
23269
23270
23271
23272
23273
23274
23275
23276
23277
23278
23279
23280
23281
23282
23283
23284
23285
23286
23287
23288
23289
23290
23291
23292
23293
23294
23295
23296
23297
23298
23299
23300
23301
23302
23303
23304
23305
23306
23307
23308
23309
23310
23311
23312
23313
23314
23315
23316
23317
23318
23319
23320
23321
23322
23323
23324
23325
23326
23327
23328
23329
23330
23331
23332
23333
23334
23335
23336
23337
23338
23339
23340
23341
23342
23343
23344
23345
23346
23347
23348
23349
23350
23351
23352
23353
23354
23355
23356
23357
23358
23359
23360
23361
23362
23363
23364
23365
23366
23367
23368
23369
23370
23371
23372
23373
23374
23375
23376
23377
23378
23379
23380
23381
23382
23383
23384
23385
23386
23387
23388
23389
23390
23391
23392
23393
23394
23395
23396
23397
23398
23399
23400
23401
23402
23403
23404
23405
23406
23407
23408
23409
23410
23411
23412
23413
23414
23415
23416
23417
23418
23419
23420
23421
23422
23423
23424
23425
23426
23427
23428
23429
23430
23431
23432
23433
23434
23435
23436
23437
23438
23439
23440
23441
23442
23443
23444
23445
23446
23447
23448
23449
23450
23451
23452
23453
23454
23455
23456
23457
23458
23459
23460
23461
23462
23463
23464
23465
23466
23467
23468
23469
23470
23471
23472
23473
23474
23475
23476
23477
23478
23479
23480
23481
23482
23483
23484
23485
23486
23487
23488
23489
23490
23491
23492
23493
23494
23495
23496
23497
23498
23499
23500
23501
23502
23503
23504
23505
23506
23507
23508
23509
23510
23511
23512
23513
23514
23515
23516
23517
23518
23519
23520
23521
23522
23523
23524
23525
23526
23527
23528
23529
23530
23531
23532
23533
23534
23535
23536
23537
23538
23539
23540
23541
23542
23543
23544
23545
23546
23547
23548
23549
23550
23551
23552
23553
23554
23555
23556
23557
23558
23559
23560
23561
23562
23563
23564
23565
23566
23567
23568
23569
23570
23571
23572
23573
23574
23575
23576
23577
23578
23579
23580
23581
23582
23583
23584
23585
23586
23587
23588
23589
23590
23591
23592
23593
23594
23595
23596
23597
23598
23599
23600
23601
23602
23603
23604
23605
23606
23607
23608
23609
23610
23611
23612
23613
23614
23615
23616
23617
23618
23619
23620
23621
23622
23623
23624
23625
23626
23627
23628
23629
23630
23631
23632
23633
23634
23635
23636
23637
23638
23639
23640
23641
23642
23643
23644
23645
23646
23647
23648
23649
23650
23651
23652
23653
23654
23655
23656
23657
23658
23659
23660
23661
23662
23663
23664
23665
23666
23667
23668
23669
23670
23671
23672
23673
23674
23675
23676
23677
23678
23679
23680
23681
23682
23683
23684
23685
23686
23687
23688
23689
23690
23691
23692
23693
23694
23695
23696
23697
23698
23699
23700
23701
23702
23703
23704
23705
23706
23707
23708
23709
23710
23711
23712
23713
23714
23715
23716
23717
23718
23719
23720
23721
23722
23723
23724
23725
23726
23727
23728
23729
23730
23731
23732
23733
23734
23735
23736
23737
23738
23739
23740
23741
23742
23743
23744
23745
23746
23747
23748
23749
23750
23751
23752
23753
23754
23755
23756
23757
23758
23759
23760
23761
23762
23763
23764
23765
23766
23767
23768
23769
23770
23771
23772
23773
23774
23775
23776
23777
23778
23779
23780
23781
23782
23783
23784
23785
23786
23787
23788
23789
23790
23791
23792
23793
23794
23795
23796
23797
23798
23799
23800
23801
23802
23803
23804
23805
23806
23807
23808
23809
23810
23811
23812
23813
23814
23815
23816
23817
23818
23819
23820
23821
23822
23823
23824
23825
23826
23827
23828
23829
23830
23831
23832
23833
23834
23835
23836
23837
23838
23839
23840
23841
23842
23843
23844
23845
23846
23847
23848
23849
23850
23851
23852
23853
23854
23855
23856
23857
23858
23859
23860
23861
23862
23863
23864
23865
23866
23867
23868
23869
23870
23871
23872
23873
23874
23875
23876
23877
23878
23879
23880
23881
23882
23883
23884
23885
23886
23887
23888
23889
23890
23891
23892
23893
23894
23895
23896
23897
23898
23899
23900
23901
23902
23903
23904
23905
23906
23907
23908
23909
23910
23911
23912
23913
23914
23915
23916
23917
23918
23919
23920
23921
23922
23923
23924
23925
23926
23927
23928
23929
23930
23931
23932
23933
23934
23935
23936
23937
23938
23939
23940
23941
23942
23943
23944
23945
23946
23947
23948
23949
23950
23951
23952
23953
23954
23955
23956
23957
23958
23959
23960
23961
23962
23963
23964
23965
23966
23967
23968
23969
23970
23971
23972
23973
23974
23975
23976
23977
23978
23979
23980
23981
23982
23983
23984
23985
23986
23987
23988
23989
23990
23991
23992
23993
23994
23995
23996
23997
23998
23999
24000
24001
24002
24003
24004
24005
24006
24007
24008
24009
24010
24011
24012
24013
24014
24015
24016
24017
24018
24019
24020
24021
24022
24023
24024
24025
24026
24027
24028
24029
24030
24031
24032
24033
24034
24035
24036
24037
24038
24039
24040
24041
24042
24043
24044
24045
24046
24047
24048
24049
24050
24051
24052
24053
24054
24055
24056
24057
24058
24059
24060
24061
24062
24063
24064
24065
24066
24067
24068
24069
24070
24071
24072
24073
24074
24075
24076
24077
24078
24079
24080
24081
24082
24083
24084
24085
24086
24087
24088
24089
24090
24091
24092
24093
24094
24095
24096
24097
24098
24099
24100
24101
24102
24103
24104
24105
24106
24107
24108
24109
24110
24111
24112
24113
24114
24115
24116
24117
24118
24119
24120
24121
24122
24123
24124
24125
24126
24127
24128
24129
24130
24131
24132
24133
24134
24135
24136
24137
24138
24139
24140
24141
24142
24143
24144
24145
24146
24147
24148
24149
24150
24151
24152
24153
24154
24155
24156
24157
24158
24159
24160
24161
24162
24163
24164
24165
24166
24167
24168
24169
24170
24171
24172
24173
24174
24175
24176
24177
24178
24179
24180
24181
24182
24183
24184
24185
24186
24187
24188
24189
24190
24191
24192
24193
24194
24195
24196
24197
24198
24199
24200
24201
24202
24203
24204
24205
24206
24207
24208
24209
24210
24211
24212
24213
24214
24215
24216
24217
24218
24219
24220
24221
24222
24223
24224
24225
24226
24227
24228
24229
24230
24231
24232
24233
24234
24235
24236
24237
24238
24239
24240
24241
24242
24243
24244
24245
24246
24247
24248
24249
24250
24251
24252
24253
24254
24255
24256
24257
24258
24259
24260
24261
24262
24263
24264
24265
24266
24267
24268
24269
24270
24271
24272
24273
24274
24275
24276
24277
24278
24279
24280
24281
24282
24283
24284
24285
24286
24287
24288
24289
24290
24291
24292
24293
24294
24295
24296
24297
24298
24299
24300
24301
24302
24303
24304
24305
24306
24307
24308
24309
24310
24311
24312
24313
24314
24315
24316
24317
24318
24319
24320
24321
24322
24323
24324
24325
24326
24327
24328
24329
24330
24331
24332
24333
24334
24335
24336
24337
24338
24339
24340
24341
24342
24343
24344
24345
24346
24347
24348
24349
24350
24351
24352
24353
24354
24355
24356
24357
24358
24359
24360
24361
24362
24363
24364
24365
24366
24367
24368
24369
24370
24371
24372
24373
24374
24375
24376
24377
24378
24379
24380
24381
24382
24383
24384
24385
24386
24387
24388
24389
24390
24391
24392
24393
24394
24395
24396
24397
24398
24399
24400
24401
24402
24403
24404
24405
24406
24407
24408
24409
24410
24411
24412
24413
24414
24415
24416
24417
24418
24419
24420
24421
24422
24423
24424
24425
24426
24427
24428
24429
24430
24431
24432
24433
24434
24435
24436
24437
24438
24439
24440
24441
24442
24443
24444
24445
24446
24447
24448
24449
24450
24451
24452
24453
24454
24455
24456
24457
24458
24459
24460
24461
24462
24463
24464
24465
24466
24467
24468
24469
24470
24471
24472
24473
24474
24475
24476
24477
24478
24479
24480
24481
24482
24483
24484
24485
24486
24487
24488
24489
24490
24491
24492
24493
24494
24495
24496
24497
24498
24499
24500
24501
24502
24503
24504
24505
24506
24507
24508
24509
24510
24511
24512
24513
24514
24515
24516
24517
24518
24519
24520
24521
24522
24523
24524
24525
24526
24527
24528
24529
24530
24531
24532
24533
24534
24535
24536
24537
24538
24539
24540
24541
24542
24543
24544
24545
24546
24547
24548
24549
24550
24551
24552
24553
24554
24555
24556
24557
24558
24559
24560
24561
24562
24563
24564
24565
24566
24567
24568
24569
24570
24571
24572
24573
24574
24575
24576
24577
24578
24579
24580
24581
24582
24583
24584
24585
24586
24587
24588
24589
24590
24591
24592
24593
24594
24595
24596
24597
24598
24599
24600
24601
24602
24603
24604
24605
24606
24607
24608
24609
24610
24611
24612
24613
24614
24615
24616
24617
24618
24619
24620
24621
24622
24623
24624
24625
24626
24627
24628
24629
24630
24631
24632
24633
24634
24635
24636
24637
24638
24639
24640
24641
24642
24643
24644
24645
24646
24647
24648
24649
24650
24651
24652
24653
24654
24655
24656
24657
24658
24659
24660
24661
24662
24663
24664
24665
24666
24667
24668
24669
24670
24671
24672
24673
24674
24675
24676
24677
24678
24679
24680
24681
24682
24683
24684
24685
24686
24687
24688
24689
24690
24691
24692
24693
24694
24695
24696
24697
24698
24699
24700
24701
24702
24703
24704
24705
24706
24707
24708
24709
24710
24711
24712
24713
24714
24715
24716
24717
24718
24719
24720
24721
24722
24723
24724
24725
24726
24727
24728
24729
24730
24731
24732
24733
24734
24735
24736
24737
24738
24739
24740
24741
24742
24743
24744
24745
24746
24747
24748
24749
24750
24751
24752
24753
24754
24755
24756
24757
24758
24759
24760
24761
24762
24763
24764
24765
24766
24767
24768
24769
24770
24771
24772
24773
24774
24775
24776
24777
24778
24779
24780
24781
24782
24783
24784
24785
24786
24787
24788
24789
24790
24791
24792
24793
24794
24795
24796
24797
24798
24799
24800
24801
24802
24803
24804
24805
24806
24807
24808
24809
24810
24811
24812
24813
24814
24815
24816
24817
24818
24819
24820
24821
24822
24823
24824
24825
24826
24827
24828
24829
24830
24831
24832
24833
24834
24835
24836
24837
24838
24839
24840
24841
24842
24843
24844
24845
24846
24847
24848
24849
24850
24851
24852
24853
24854
24855
24856
24857
24858
24859
24860
24861
24862
24863
24864
24865
24866
24867
24868
24869
24870
24871
24872
24873
24874
24875
24876
24877
24878
24879
24880
24881
24882
24883
24884
24885
24886
24887
24888
24889
24890
24891
24892
24893
24894
24895
24896
24897
24898
24899
24900
24901
24902
24903
24904
24905
24906
24907
24908
24909
24910
24911
24912
24913
24914
24915
24916
24917
24918
24919
24920
24921
24922
24923
24924
24925
24926
24927
24928
24929
24930
24931
24932
24933
24934
24935
24936
24937
24938
24939
24940
24941
24942
24943
24944
24945
24946
24947
24948
24949
24950
24951
24952
24953
24954
24955
24956
24957
24958
24959
24960
24961
24962
24963
24964
24965
24966
24967
24968
24969
24970
24971
24972
24973
24974
24975
24976
24977
24978
24979
24980
24981
24982
24983
24984
24985
24986
24987
24988
24989
24990
24991
24992
24993
24994
24995
24996
24997
24998
24999
25000
25001
25002
25003
25004
25005
25006
25007
25008
25009
25010
25011
25012
25013
25014
25015
25016
25017
25018
25019
25020
25021
25022
25023
25024
25025
25026
25027
25028
25029
25030
25031
25032
25033
25034
25035
25036
25037
25038
25039
25040
25041
25042
25043
25044
25045
25046
25047
25048
25049
25050
25051
25052
25053
25054
25055
25056
25057
25058
25059
25060
25061
25062
25063
25064
25065
25066
25067
25068
25069
25070
25071
25072
25073
25074
25075
25076
25077
25078
25079
25080
25081
25082
25083
25084
25085
25086
25087
25088
25089
25090
25091
25092
25093
25094
25095
25096
25097
25098
25099
25100
25101
25102
25103
25104
25105
25106
25107
25108
25109
25110
25111
25112
25113
25114
25115
25116
25117
25118
25119
25120
25121
25122
25123
25124
25125
25126
25127
25128
25129
25130
25131
25132
25133
25134
25135
25136
25137
25138
25139
25140
25141
25142
25143
25144
25145
25146
25147
25148
25149
25150
25151
25152
25153
25154
25155
25156
25157
25158
25159
25160
25161
25162
25163
25164
25165
25166
25167
25168
25169
25170
25171
25172
25173
25174
25175
25176
25177
25178
25179
25180
25181
25182
25183
25184
25185
25186
25187
25188
25189
25190
25191
25192
25193
25194
25195
25196
25197
25198
25199
25200
25201
25202
25203
25204
25205
25206
25207
25208
25209
25210
25211
25212
25213
25214
25215
25216
25217
25218
25219
25220
25221
25222
25223
25224
25225
25226
25227
25228
25229
25230
25231
25232
25233
25234
25235
25236
25237
25238
25239
25240
25241
25242
25243
25244
25245
25246
25247
25248
25249
25250
25251
25252
25253
25254
25255
25256
25257
25258
25259
25260
25261
25262
25263
25264
25265
25266
25267
25268
25269
25270
25271
25272
25273
25274
25275
25276
25277
25278
25279
25280
25281
25282
25283
25284
25285
25286
25287
25288
25289
25290
25291
25292
25293
25294
25295
25296
25297
25298
25299
25300
25301
25302
25303
25304
25305
25306
25307
25308
25309
25310
25311
25312
25313
25314
25315
25316
25317
25318
25319
25320
25321
25322
25323
25324
25325
25326
25327
25328
25329
25330
25331
25332
25333
25334
25335
25336
25337
25338
25339
25340
25341
25342
25343
25344
25345
25346
25347
25348
25349
25350
25351
25352
25353
25354
25355
25356
25357
25358
25359
25360
25361
25362
25363
25364
25365
25366
25367
25368
25369
25370
25371
25372
25373
25374
25375
25376
25377
25378
25379
25380
25381
25382
25383
25384
25385
25386
25387
25388
25389
25390
25391
25392
25393
25394
25395
25396
25397
25398
25399
25400
25401
25402
25403
25404
25405
25406
25407
25408
25409
25410
25411
25412
25413
25414
25415
25416
25417
25418
25419
25420
25421
25422
25423
25424
25425
25426
25427
25428
25429
25430
25431
25432
25433
25434
25435
25436
25437
25438
25439
25440
25441
25442
25443
25444
25445
25446
25447
25448
25449
25450
25451
25452
25453
25454
25455
25456
25457
25458
25459
25460
25461
25462
25463
25464
25465
25466
25467
25468
25469
25470
25471
25472
25473
25474
25475
25476
25477
25478
25479
25480
25481
25482
25483
25484
25485
25486
25487
25488
25489
25490
25491
25492
25493
25494
25495
25496
25497
25498
25499
25500
25501
25502
25503
25504
25505
25506
25507
25508
25509
25510
25511
25512
25513
25514
25515
25516
25517
25518
25519
25520
25521
25522
25523
25524
25525
25526
25527
25528
25529
25530
25531
25532
25533
25534
25535
25536
25537
25538
25539
25540
25541
25542
25543
25544
25545
25546
25547
25548
25549
25550
25551
25552
25553
25554
25555
25556
25557
25558
25559
25560
25561
25562
25563
25564
25565
25566
25567
25568
25569
25570
25571
25572
25573
25574
25575
25576
25577
25578
25579
25580
25581
25582
25583
25584
25585
25586
25587
25588
25589
25590
25591
25592
25593
25594
25595
25596
25597
25598
25599
25600
25601
25602
25603
25604
25605
25606
25607
25608
25609
25610
25611
25612
25613
25614
25615
25616
25617
25618
25619
25620
25621
25622
25623
25624
25625
25626
25627
25628
25629
25630
25631
25632
25633
25634
25635
25636
25637
25638
25639
25640
25641
25642
25643
25644
25645
25646
25647
25648
25649
25650
25651
25652
25653
25654
25655
25656
25657
25658
25659
25660
25661
25662
25663
25664
25665
25666
25667
25668
25669
25670
25671
25672
25673
25674
25675
25676
25677
25678
25679
25680
25681
25682
25683
25684
25685
25686
25687
25688
25689
25690
25691
25692
25693
25694
25695
25696
25697
25698
25699
25700
25701
25702
25703
25704
25705
25706
25707
25708
25709
25710
25711
25712
25713
25714
25715
25716
25717
25718
25719
25720
25721
25722
25723
25724
25725
25726
25727
25728
25729
25730
25731
25732
25733
25734
25735
25736
25737
25738
25739
25740
25741
25742
25743
25744
25745
25746
25747
25748
25749
25750
25751
25752
25753
25754
25755
25756
25757
25758
25759
25760
25761
25762
25763
25764
25765
25766
25767
25768
25769
25770
25771
25772
25773
25774
25775
25776
25777
25778
25779
25780
25781
25782
25783
25784
25785
25786
25787
25788
25789
25790
25791
25792
25793
25794
25795
25796
25797
25798
25799
25800
25801
25802
25803
25804
25805
25806
25807
25808
25809
25810
25811
25812
25813
25814
25815
25816
25817
25818
25819
25820
25821
25822
25823
25824
25825
25826
25827
25828
25829
25830
25831
25832
25833
25834
25835
25836
25837
25838
25839
25840
25841
25842
25843
25844
25845
25846
25847
25848
25849
25850
25851
25852
25853
25854
25855
25856
25857
25858
25859
25860
25861
25862
25863
25864
25865
25866
25867
25868
25869
25870
25871
25872
25873
25874
25875
25876
25877
25878
25879
25880
25881
25882
25883
25884
25885
25886
25887
25888
25889
25890
25891
25892
25893
25894
25895
25896
25897
25898
25899
25900
25901
25902
25903
25904
25905
25906
25907
25908
25909
25910
25911
25912
25913
25914
25915
25916
25917
25918
25919
25920
25921
25922
25923
25924
25925
25926
25927
25928
25929
25930
25931
25932
25933
25934
25935
25936
25937
25938
25939
25940
25941
25942
25943
25944
25945
25946
25947
25948
25949
25950
25951
25952
25953
25954
25955
25956
25957
25958
25959
25960
25961
25962
25963
25964
25965
25966
25967
25968
25969
25970
25971
25972
25973
25974
25975
25976
25977
25978
25979
25980
25981
25982
25983
25984
25985
25986
25987
25988
25989
25990
25991
25992
25993
25994
25995
25996
25997
25998
25999
26000
26001
26002
26003
26004
26005
26006
26007
26008
26009
26010
26011
26012
26013
26014
26015
26016
26017
26018
26019
26020
26021
26022
26023
26024
26025
26026
26027
26028
26029
26030
26031
26032
26033
26034
26035
26036
26037
26038
26039
26040
26041
26042
26043
26044
26045
26046
26047
26048
26049
26050
26051
26052
26053
26054
26055
26056
26057
26058
26059
26060
26061
26062
26063
26064
26065
26066
26067
26068
26069
26070
26071
26072
26073
26074
26075
26076
26077
26078
26079
26080
26081
26082
26083
26084
26085
26086
26087
26088
26089
26090
26091
26092
26093
26094
26095
26096
26097
26098
26099
26100
26101
26102
26103
26104
26105
26106
26107
26108
26109
26110
26111
26112
26113
26114
26115
26116
26117
26118
26119
26120
26121
26122
26123
26124
26125
26126
26127
26128
26129
26130
26131
26132
26133
26134
26135
26136
26137
26138
26139
26140
26141
26142
26143
26144
26145
26146
26147
26148
26149
26150
26151
26152
26153
26154
26155
26156
26157
26158
26159
26160
26161
26162
26163
26164
26165
26166
26167
26168
26169
26170
26171
26172
26173
26174
26175
26176
26177
26178
26179
26180
26181
26182
26183
26184
26185
26186
26187
26188
26189
26190
26191
26192
26193
26194
26195
26196
26197
26198
26199
26200
26201
26202
26203
26204
26205
26206
26207
26208
26209
26210
26211
26212
26213
26214
26215
26216
26217
26218
26219
26220
26221
26222
26223
26224
26225
26226
26227
26228
26229
26230
26231
26232
26233
26234
26235
26236
26237
26238
26239
26240
26241
26242
26243
26244
26245
26246
26247
26248
26249
26250
26251
26252
26253
26254
26255
26256
26257
26258
26259
26260
26261
26262
26263
26264
26265
26266
26267
26268
26269
26270
26271
26272
26273
26274
26275
26276
26277
26278
26279
26280
26281
26282
26283
26284
26285
26286
26287
26288
26289
26290
26291
26292
26293
26294
26295
26296
26297
26298
26299
26300
26301
26302
26303
26304
26305
26306
26307
26308
26309
26310
26311
26312
26313
26314
26315
26316
26317
26318
26319
26320
26321
26322
26323
26324
26325
26326
26327
26328
26329
26330
26331
26332
26333
26334
26335
26336
26337
26338
26339
26340
26341
26342
26343
26344
26345
26346
26347
26348
26349
26350
26351
26352
26353
26354
26355
26356
26357
26358
26359
26360
26361
26362
26363
26364
26365
26366
26367
26368
26369
26370
26371
26372
26373
26374
26375
26376
26377
26378
26379
26380
26381
26382
26383
26384
26385
26386
26387
26388
26389
26390
26391
26392
26393
26394
26395
26396
26397
26398
26399
26400
26401
26402
26403
26404
26405
26406
26407
26408
26409
26410
26411
26412
26413
26414
26415
26416
26417
26418
26419
26420
26421
26422
26423
26424
26425
26426
26427
26428
26429
26430
26431
26432
26433
26434
26435
26436
26437
26438
26439
26440
26441
26442
26443
26444
26445
26446
26447
26448
26449
26450
26451
26452
26453
26454
26455
26456
26457
26458
26459
26460
26461
26462
26463
26464
26465
26466
26467
26468
26469
26470
26471
26472
26473
26474
26475
26476
26477
26478
26479
26480
26481
26482
26483
26484
26485
26486
26487
26488
26489
26490
26491
26492
26493
26494
26495
26496
26497
26498
26499
26500
26501
26502
26503
26504
26505
26506
26507
26508
26509
26510
26511
26512
26513
26514
26515
26516
26517
26518
26519
26520
26521
26522
26523
26524
26525
26526
26527
26528
26529
26530
26531
26532
26533
26534
26535
26536
26537
26538
26539
26540
26541
26542
26543
26544
26545
26546
26547
26548
26549
26550
26551
26552
26553
26554
26555
26556
26557
26558
26559
26560
26561
26562
26563
26564
26565
26566
26567
26568
26569
26570
26571
26572
26573
26574
26575
26576
26577
26578
26579
26580
26581
26582
26583
26584
26585
26586
26587
26588
26589
26590
26591
26592
26593
26594
26595
26596
26597
26598
26599
26600
26601
26602
26603
26604
26605
26606
26607
26608
26609
26610
26611
26612
26613
26614
26615
26616
26617
26618
26619
26620
26621
26622
26623
26624
26625
26626
26627
26628
26629
26630
26631
26632
26633
26634
26635
26636
26637
26638
26639
26640
26641
26642
26643
26644
26645
26646
26647
26648
26649
26650
26651
26652
26653
26654
26655
26656
26657
26658
26659
26660
26661
26662
26663
26664
26665
26666
26667
26668
26669
26670
26671
26672
26673
26674
26675
26676
26677
26678
26679
26680
26681
26682
26683
26684
26685
26686
26687
26688
26689
26690
26691
26692
26693
26694
26695
26696
26697
26698
26699
26700
26701
26702
26703
26704
26705
26706
26707
26708
26709
26710
26711
26712
26713
26714
26715
26716
26717
26718
26719
26720
26721
26722
26723
26724
26725
26726
26727
26728
26729
26730
26731
26732
26733
26734
26735
26736
26737
26738
26739
26740
26741
26742
26743
26744
26745
26746
26747
26748
26749
26750
26751
26752
26753
26754
26755
26756
26757
26758
26759
26760
26761
26762
26763
26764
26765
26766
26767
26768
26769
26770
26771
26772
26773
26774
26775
26776
26777
26778
26779
26780
26781
26782
26783
26784
26785
26786
26787
26788
26789
26790
26791
26792
26793
26794
26795
26796
26797
26798
26799
26800
26801
26802
26803
26804
26805
26806
26807
26808
26809
26810
26811
26812
26813
26814
26815
26816
26817
26818
26819
26820
26821
26822
26823
26824
26825
26826
26827
26828
26829
26830
26831
26832
26833
26834
26835
26836
26837
26838
26839
26840
26841
26842
26843
26844
26845
26846
26847
26848
26849
26850
26851
26852
26853
26854
26855
26856
26857
26858
26859
26860
26861
26862
26863
26864
26865
26866
26867
26868
26869
26870
26871
26872
26873
26874
26875
26876
26877
26878
26879
26880
26881
26882
26883
26884
26885
26886
26887
26888
26889
26890
26891
26892
26893
26894
26895
26896
26897
26898
26899
26900
26901
26902
26903
26904
26905
26906
26907
26908
26909
26910
26911
26912
26913
26914
26915
26916
26917
26918
26919
26920
26921
26922
26923
26924
26925
26926
26927
26928
26929
26930
26931
26932
26933
26934
26935
26936
26937
26938
26939
26940
26941
26942
26943
26944
26945
26946
26947
26948
26949
26950
26951
26952
26953
26954
26955
26956
26957
26958
26959
26960
26961
26962
26963
26964
26965
26966
26967
26968
26969
26970
26971
26972
26973
26974
26975
26976
26977
26978
26979
26980
26981
26982
26983
26984
26985
26986
26987
26988
26989
26990
26991
26992
26993
26994
26995
26996
26997
26998
26999
27000
27001
27002
27003
27004
27005
27006
27007
27008
27009
27010
27011
27012
27013
27014
27015
27016
27017
27018
27019
27020
27021
27022
27023
27024
27025
27026
27027
27028
27029
27030
27031
27032
27033
27034
27035
27036
27037
27038
27039
27040
27041
27042
27043
27044
27045
27046
27047
27048
27049
27050
27051
27052
27053
27054
27055
27056
27057
27058
27059
27060
27061
27062
27063
27064
27065
27066
27067
27068
27069
27070
27071
27072
27073
27074
27075
27076
27077
27078
27079
27080
27081
27082
27083
27084
27085
27086
27087
27088
27089
27090
27091
27092
27093
27094
27095
27096
27097
27098
27099
27100
27101
27102
27103
27104
27105
27106
27107
27108
27109
27110
27111
27112
27113
27114
27115
27116
27117
27118
27119
27120
27121
27122
27123
27124
27125
27126
27127
27128
27129
27130
27131
27132
27133
27134
27135
27136
27137
27138
27139
27140
27141
27142
27143
27144
27145
27146
27147
27148
27149
27150
27151
27152
27153
27154
27155
27156
27157
27158
27159
27160
27161
27162
27163
27164
27165
27166
27167
27168
27169
27170
27171
27172
27173
27174
27175
27176
27177
27178
27179
27180
27181
27182
27183
27184
27185
27186
27187
27188
27189
27190
27191
27192
27193
27194
27195
27196
27197
27198
27199
27200
27201
27202
27203
27204
27205
27206
27207
27208
27209
27210
27211
27212
27213
27214
27215
27216
27217
27218
27219
27220
27221
27222
27223
27224
27225
27226
27227
27228
27229
27230
27231
27232
27233
27234
27235
27236
27237
27238
27239
27240
27241
27242
27243
27244
27245
27246
27247
27248
27249
27250
27251
27252
27253
27254
27255
27256
27257
27258
27259
27260
27261
27262
27263
27264
27265
27266
27267
27268
27269
27270
27271
27272
27273
27274
27275
27276
27277
27278
27279
27280
27281
27282
27283
27284
27285
27286
27287
27288
27289
27290
27291
27292
27293
27294
27295
27296
27297
27298
27299
27300
27301
27302
27303
27304
27305
27306
27307
27308
27309
27310
27311
27312
27313
27314
27315
27316
27317
27318
27319
27320
27321
27322
27323
27324
27325
27326
27327
27328
27329
27330
27331
27332
27333
27334
27335
27336
27337
27338
27339
27340
27341
27342
27343
27344
27345
27346
27347
27348
27349
27350
27351
27352
27353
27354
27355
27356
27357
27358
27359
27360
27361
27362
27363
27364
27365
27366
27367
27368
27369
27370
27371
27372
27373
27374
27375
27376
27377
27378
27379
27380
27381
27382
27383
27384
27385
27386
27387
27388
27389
27390
27391
27392
27393
27394
27395
27396
27397
27398
27399
27400
27401
27402
27403
27404
27405
27406
27407
27408
27409
27410
27411
27412
27413
27414
27415
27416
27417
27418
27419
27420
27421
27422
27423
27424
27425
27426
27427
27428
27429
27430
27431
27432
27433
27434
27435
27436
27437
27438
27439
27440
27441
27442
27443
27444
27445
27446
27447
27448
27449
27450
27451
27452
27453
27454
27455
27456
27457
27458
27459
27460
27461
27462
27463
27464
27465
27466
27467
27468
27469
27470
27471
27472
27473
27474
27475
27476
27477
27478
27479
27480
27481
27482
27483
27484
27485
27486
27487
27488
27489
27490
27491
27492
27493
27494
27495
27496
27497
27498
27499
27500
27501
27502
27503
27504
27505
27506
27507
27508
27509
27510
27511
27512
27513
27514
27515
27516
27517
27518
27519
27520
27521
27522
27523
27524
27525
27526
27527
27528
27529
27530
27531
27532
27533
27534
27535
27536
27537
27538
27539
27540
27541
27542
27543
27544
27545
27546
27547
27548
27549
27550
27551
27552
27553
27554
27555
27556
27557
27558
27559
27560
27561
27562
27563
27564
27565
27566
27567
27568
27569
27570
27571
27572
27573
27574
27575
27576
27577
27578
27579
27580
27581
27582
27583
27584
27585
27586
27587
27588
27589
27590
27591
27592
27593
27594
27595
27596
27597
27598
27599
27600
27601
27602
27603
27604
27605
27606
27607
27608
27609
27610
27611
27612
27613
27614
27615
27616
27617
27618
27619
27620
27621
27622
27623
27624
27625
27626
27627
27628
27629
27630
27631
27632
27633
27634
27635
27636
27637
27638
27639
27640
27641
27642
27643
27644
27645
27646
27647
27648
27649
27650
27651
27652
27653
27654
27655
27656
27657
27658
27659
27660
27661
27662
27663
27664
27665
27666
27667
27668
27669
27670
27671
27672
27673
27674
27675
27676
27677
27678
27679
27680
27681
27682
27683
27684
27685
27686
27687
27688
27689
27690
27691
27692
27693
27694
27695
27696
27697
27698
27699
27700
27701
27702
27703
27704
27705
27706
27707
27708
27709
27710
27711
27712
27713
27714
27715
27716
27717
27718
27719
27720
27721
27722
27723
27724
27725
27726
27727
27728
27729
27730
27731
27732
27733
27734
27735
27736
27737
27738
27739
27740
27741
27742
27743
27744
27745
27746
27747
27748
27749
27750
27751
27752
27753
27754
27755
27756
27757
27758
27759
27760
27761
27762
27763
27764
27765
27766
27767
27768
27769
27770
27771
27772
27773
27774
27775
27776
27777
27778
27779
27780
27781
27782
27783
27784
27785
27786
27787
27788
27789
27790
27791
27792
27793
27794
27795
27796
27797
27798
27799
27800
27801
27802
27803
27804
27805
27806
27807
27808
27809
27810
27811
27812
27813
27814
27815
27816
27817
27818
27819
27820
27821
27822
27823
27824
27825
27826
27827
27828
27829
27830
27831
27832
27833
27834
27835
27836
27837
27838
27839
27840
27841
27842
27843
27844
27845
27846
27847
27848
27849
27850
27851
27852
27853
27854
27855
27856
27857
27858
27859
27860
27861
27862
27863
27864
27865
27866
27867
27868
27869
27870
27871
27872
27873
27874
27875
27876
27877
27878
27879
27880
27881
27882
27883
27884
27885
27886
27887
27888
27889
27890
27891
27892
27893
27894
27895
27896
27897
27898
27899
27900
27901
27902
27903
27904
27905
27906
27907
27908
27909
27910
27911
27912
27913
27914
27915
27916
27917
27918
27919
27920
27921
27922
27923
27924
27925
27926
27927
27928
27929
27930
27931
27932
27933
27934
27935
27936
27937
27938
27939
27940
27941
27942
27943
27944
27945
27946
27947
27948
27949
27950
27951
27952
27953
27954
27955
27956
27957
27958
27959
27960
27961
27962
27963
27964
27965
27966
27967
27968
27969
27970
27971
27972
27973
27974
27975
27976
27977
27978
27979
27980
27981
27982
27983
27984
27985
27986
27987
27988
27989
27990
27991
27992
27993
27994
27995
27996
27997
27998
27999
28000
28001
28002
28003
28004
28005
28006
28007
28008
28009
28010
28011
28012
28013
28014
28015
28016
28017
28018
28019
28020
28021
28022
28023
28024
28025
28026
28027
28028
28029
28030
28031
28032
28033
28034
28035
28036
28037
28038
28039
28040
28041
28042
28043
28044
28045
28046
28047
28048
28049
28050
28051
28052
28053
28054
28055
28056
28057
28058
28059
28060
28061
28062
28063
28064
28065
28066
28067
28068
28069
28070
28071
28072
28073
28074
28075
28076
28077
28078
28079
28080
28081
28082
28083
28084
28085
28086
28087
28088
28089
28090
28091
28092
28093
28094
28095
28096
28097
28098
28099
28100
28101
28102
28103
28104
28105
28106
28107
28108
28109
28110
28111
28112
28113
28114
28115
28116
28117
28118
28119
28120
28121
28122
28123
28124
28125
28126
28127
28128
28129
28130
28131
28132
28133
28134
28135
28136
28137
28138
28139
28140
28141
28142
28143
28144
28145
28146
28147
28148
28149
28150
28151
28152
28153
28154
28155
28156
28157
28158
28159
28160
28161
28162
28163
28164
28165
28166
28167
28168
28169
28170
28171
28172
28173
28174
28175
28176
28177
28178
28179
28180
28181
28182
28183
28184
28185
28186
28187
28188
28189
28190
28191
28192
28193
28194
28195
28196
28197
28198
28199
28200
28201
28202
28203
28204
28205
28206
28207
28208
28209
28210
28211
28212
28213
28214
28215
28216
28217
28218
28219
28220
28221
28222
28223
28224
28225
28226
28227
28228
28229
28230
28231
28232
28233
28234
28235
28236
28237
28238
28239
28240
28241
28242
28243
28244
28245
28246
28247
28248
28249
28250
28251
28252
28253
28254
28255
28256
28257
28258
28259
28260
28261
28262
28263
28264
28265
28266
28267
28268
28269
28270
28271
28272
28273
28274
28275
28276
28277
28278
28279
28280
28281
28282
28283
28284
28285
28286
28287
28288
28289
28290
28291
28292
28293
28294
28295
28296
28297
28298
28299
28300
28301
28302
28303
28304
28305
28306
28307
28308
28309
28310
28311
28312
28313
28314
28315
28316
28317
28318
28319
28320
28321
28322
28323
28324
28325
28326
28327
28328
28329
28330
28331
28332
28333
28334
28335
28336
28337
28338
28339
28340
28341
28342
28343
28344
28345
28346
28347
28348
28349
28350
28351
28352
28353
28354
28355
28356
28357
28358
28359
28360
28361
28362
28363
28364
28365
28366
28367
28368
28369
28370
28371
28372
28373
28374
28375
28376
28377
28378
28379
28380
28381
28382
28383
28384
28385
28386
28387
28388
28389
28390
28391
28392
28393
28394
28395
28396
28397
28398
28399
28400
28401
28402
28403
28404
28405
28406
28407
28408
28409
28410
28411
28412
28413
28414
28415
28416
28417
28418
28419
28420
28421
28422
28423
28424
28425
28426
28427
28428
28429
28430
28431
28432
28433
28434
28435
28436
28437
28438
28439
28440
28441
28442
28443
28444
28445
28446
28447
28448
28449
28450
28451
28452
28453
28454
28455
28456
28457
28458
28459
28460
28461
28462
28463
28464
28465
28466
28467
28468
28469
28470
28471
28472
28473
28474
28475
28476
28477
28478
28479
28480
28481
28482
28483
28484
28485
28486
28487
28488
28489
28490
28491
28492
28493
28494
28495
28496
28497
28498
28499
28500
28501
28502
28503
28504
28505
28506
28507
28508
28509
28510
28511
28512
28513
28514
28515
28516
28517
28518
28519
28520
28521
28522
28523
28524
28525
28526
28527
28528
28529
28530
28531
28532
28533
28534
28535
28536
28537
28538
28539
28540
28541
28542
28543
28544
28545
28546
28547
28548
28549
28550
28551
28552
28553
28554
28555
28556
28557
28558
28559
28560
28561
28562
28563
28564
28565
28566
28567
28568
28569
28570
28571
28572
28573
28574
28575
28576
28577
28578
28579
28580
28581
28582
28583
28584
28585
28586
28587
28588
28589
28590
28591
28592
28593
28594
28595
28596
28597
28598
28599
28600
28601
28602
28603
28604
28605
28606
28607
28608
28609
28610
28611
28612
28613
28614
28615
28616
28617
28618
28619
28620
28621
28622
28623
28624
28625
28626
28627
28628
28629
28630
28631
28632
28633
28634
28635
28636
28637
28638
28639
28640
28641
28642
28643
28644
28645
28646
28647
28648
28649
28650
28651
28652
28653
28654
28655
28656
28657
28658
28659
28660
28661
28662
28663
28664
28665
28666
28667
28668
28669
28670
28671
28672
28673
28674
28675
28676
28677
28678
28679
28680
28681
28682
28683
28684
28685
28686
28687
28688
28689
28690
28691
28692
28693
28694
28695
28696
28697
28698
28699
28700
28701
28702
28703
28704
28705
28706
28707
28708
28709
28710
28711
28712
28713
28714
28715
28716
28717
28718
28719
28720
28721
28722
28723
28724
28725
28726
28727
28728
28729
28730
28731
28732
28733
28734
28735
28736
28737
28738
28739
28740
28741
28742
28743
28744
28745
28746
28747
28748
28749
28750
28751
28752
28753
28754
28755
28756
28757
28758
28759
28760
28761
28762
28763
28764
28765
28766
28767
28768
28769
28770
28771
28772
28773
28774
28775
28776
28777
28778
28779
28780
28781
28782
28783
28784
28785
28786
28787
28788
28789
28790
28791
28792
28793
28794
28795
28796
28797
28798
28799
28800
28801
28802
28803
28804
28805
28806
28807
28808
28809
28810
28811
28812
28813
28814
28815
28816
28817
28818
28819
28820
28821
28822
28823
28824
28825
28826
28827
28828
28829
28830
28831
28832
28833
28834
28835
28836
28837
28838
28839
28840
28841
28842
28843
28844
28845
28846
28847
28848
28849
28850
28851
28852
28853
28854
28855
28856
28857
28858
28859
28860
28861
28862
28863
28864
28865
28866
28867
28868
28869
28870
28871
28872
28873
28874
28875
28876
28877
28878
28879
28880
28881
28882
28883
28884
28885
28886
28887
28888
28889
28890
28891
28892
28893
28894
28895
28896
28897
28898
28899
28900
28901
28902
28903
28904
28905
28906
28907
28908
28909
28910
28911
28912
28913
28914
28915
28916
28917
28918
28919
28920
28921
28922
28923
28924
28925
28926
28927
28928
28929
28930
28931
28932
28933
28934
28935
28936
28937
28938
28939
28940
28941
28942
28943
28944
28945
28946
28947
28948
28949
28950
28951
28952
28953
28954
28955
28956
28957
28958
28959
28960
28961
28962
28963
28964
28965
28966
28967
28968
28969
28970
28971
28972
28973
28974
28975
28976
28977
28978
28979
28980
28981
28982
28983
28984
28985
28986
28987
28988
28989
28990
28991
28992
28993
28994
28995
28996
28997
28998
28999
29000
29001
29002
29003
29004
29005
29006
29007
29008
29009
29010
29011
29012
29013
29014
29015
29016
29017
29018
29019
29020
29021
29022
29023
29024
29025
29026
29027
29028
29029
29030
29031
29032
29033
29034
29035
29036
29037
29038
29039
29040
29041
29042
29043
29044
29045
29046
29047
29048
29049
29050
29051
29052
29053
29054
29055
29056
29057
29058
29059
29060
29061
29062
29063
29064
29065
29066
29067
29068
29069
29070
29071
29072
29073
29074
29075
29076
29077
29078
29079
29080
29081
29082
29083
29084
29085
29086
29087
29088
29089
29090
29091
29092
29093
29094
29095
29096
29097
29098
29099
29100
29101
29102
29103
29104
29105
29106
29107
29108
29109
29110
29111
29112
29113
29114
29115
29116
29117
29118
29119
29120
29121
29122
29123
29124
29125
29126
29127
29128
29129
29130
29131
29132
29133
29134
29135
29136
29137
29138
29139
29140
29141
29142
29143
29144
29145
29146
29147
29148
29149
29150
29151
29152
29153
29154
29155
29156
29157
29158
29159
29160
29161
29162
29163
29164
29165
29166
29167
29168
29169
29170
29171
29172
29173
29174
29175
29176
29177
29178
29179
29180
29181
29182
29183
29184
29185
29186
29187
29188
29189
29190
29191
29192
29193
29194
29195
29196
29197
29198
29199
29200
29201
29202
29203
29204
29205
29206
29207
29208
29209
29210
29211
29212
29213
29214
29215
29216
29217
29218
29219
29220
29221
29222
29223
29224
29225
29226
29227
29228
29229
29230
29231
29232
29233
29234
29235
29236
29237
29238
29239
29240
29241
29242
29243
29244
29245
29246
29247
29248
29249
29250
29251
29252
29253
29254
29255
29256
29257
29258
29259
29260
29261
29262
29263
29264
29265
29266
29267
29268
29269
29270
29271
29272
29273
29274
29275
29276
29277
29278
29279
29280
29281
29282
29283
29284
29285
29286
29287
29288
29289
29290
29291
29292
29293
29294
29295
29296
29297
29298
29299
29300
29301
29302
29303
29304
29305
29306
29307
29308
29309
29310
29311
29312
29313
29314
29315
29316
29317
29318
29319
29320
29321
29322
29323
29324
29325
29326
29327
29328
29329
29330
29331
29332
29333
29334
29335
29336
29337
29338
29339
29340
29341
29342
29343
29344
29345
29346
29347
29348
29349
29350
29351
29352
29353
29354
29355
29356
29357
29358
29359
29360
29361
29362
29363
29364
29365
29366
29367
29368
29369
29370
29371
29372
29373
29374
29375
29376
29377
29378
29379
29380
29381
29382
29383
29384
29385
29386
29387
29388
29389
29390
29391
29392
29393
29394
29395
29396
29397
29398
29399
29400
29401
29402
29403
29404
29405
29406
29407
29408
29409
29410
29411
29412
29413
29414
29415
29416
29417
29418
29419
29420
29421
29422
29423
29424
29425
29426
29427
29428
29429
29430
29431
29432
29433
29434
29435
29436
29437
29438
29439
29440
29441
29442
29443
29444
29445
29446
29447
29448
29449
29450
29451
29452
29453
29454
29455
29456
29457
29458
29459
29460
29461
29462
29463
29464
29465
29466
29467
29468
29469
29470
29471
29472
29473
29474
29475
29476
29477
29478
29479
29480
29481
29482
29483
29484
29485
29486
29487
29488
29489
29490
29491
29492
29493
29494
29495
29496
29497
29498
29499
29500
29501
29502
29503
29504
29505
29506
29507
29508
29509
29510
29511
29512
29513
29514
29515
29516
29517
29518
29519
29520
29521
29522
29523
29524
29525
29526
29527
29528
29529
29530
29531
29532
29533
29534
29535
29536
29537
29538
29539
29540
29541
29542
29543
29544
29545
29546
29547
29548
29549
29550
29551
29552
29553
29554
29555
29556
29557
29558
29559
29560
29561
29562
29563
29564
29565
29566
29567
29568
29569
29570
29571
29572
29573
29574
29575
29576
29577
29578
29579
29580
29581
29582
29583
29584
29585
29586
29587
29588
29589
29590
29591
29592
29593
29594
29595
29596
29597
29598
29599
29600
29601
29602
29603
29604
29605
29606
29607
29608
29609
29610
29611
29612
29613
29614
29615
29616
29617
29618
29619
29620
29621
29622
29623
29624
29625
29626
29627
29628
29629
29630
29631
29632
29633
29634
29635
29636
29637
29638
29639
29640
29641
29642
29643
29644
29645
29646
29647
29648
29649
29650
29651
29652
29653
29654
29655
29656
29657
29658
29659
29660
29661
29662
29663
29664
29665
29666
29667
29668
29669
29670
29671
29672
29673
29674
29675
29676
29677
29678
29679
29680
29681
29682
29683
29684
29685
29686
29687
29688
29689
29690
29691
29692
29693
29694
29695
29696
29697
29698
29699
29700
29701
29702
29703
29704
29705
29706
29707
29708
29709
29710
29711
29712
29713
29714
29715
29716
29717
29718
29719
29720
29721
29722
29723
29724
29725
29726
29727
29728
29729
29730
29731
29732
29733
29734
29735
29736
29737
29738
29739
29740
29741
29742
29743
29744
29745
29746
29747
29748
29749
29750
29751
29752
29753
29754
29755
29756
29757
29758
29759
29760
29761
29762
29763
29764
29765
29766
29767
29768
29769
29770
29771
29772
29773
29774
29775
29776
29777
29778
29779
29780
29781
29782
29783
29784
29785
29786
29787
29788
29789
29790
29791
29792
29793
29794
29795
29796
29797
29798
29799
29800
29801
29802
29803
29804
29805
29806
29807
29808
29809
29810
29811
29812
29813
29814
29815
29816
29817
29818
29819
29820
29821
29822
29823
29824
29825
29826
29827
29828
29829
29830
29831
29832
29833
29834
29835
29836
29837
29838
29839
29840
29841
29842
29843
29844
29845
29846
29847
29848
29849
29850
29851
29852
29853
29854
29855
29856
29857
29858
29859
29860
29861
29862
29863
29864
29865
29866
29867
29868
29869
29870
29871
29872
29873
29874
29875
29876
29877
29878
29879
29880
29881
29882
29883
29884
29885
29886
29887
29888
29889
29890
29891
29892
29893
29894
29895
29896
29897
29898
29899
29900
29901
29902
29903
29904
29905
29906
29907
29908
29909
29910
29911
29912
29913
29914
29915
29916
29917
29918
29919
29920
29921
29922
29923
29924
29925
29926
29927
29928
29929
29930
29931
29932
29933
29934
29935
29936
29937
29938
29939
29940
29941
29942
29943
29944
29945
29946
29947
29948
29949
29950
29951
29952
29953
29954
29955
29956
29957
29958
29959
29960
29961
29962
29963
29964
29965
29966
29967
29968
29969
29970
29971
29972
29973
29974
29975
29976
29977
29978
29979
29980
29981
29982
29983
29984
29985
29986
29987
29988
29989
29990
29991
29992
29993
29994
29995
29996
29997
29998
29999
30000
30001
30002
30003
30004
30005
30006
30007
30008
30009
30010
30011
30012
30013
30014
30015
30016
30017
30018
30019
30020
30021
30022
30023
30024
30025
30026
30027
30028
30029
30030
30031
30032
30033
30034
30035
30036
30037
30038
30039
30040
30041
30042
30043
30044
30045
30046
30047
30048
30049
30050
30051
30052
30053
30054
30055
30056
30057
30058
30059
30060
30061
30062
30063
30064
30065
30066
30067
30068
30069
30070
30071
30072
30073
30074
30075
30076
30077
30078
30079
30080
30081
30082
30083
30084
30085
30086
30087
30088
30089
30090
30091
30092
30093
30094
30095
30096
30097
30098
30099
30100
30101
30102
30103
30104
30105
30106
30107
30108
30109
30110
30111
30112
30113
30114
30115
30116
30117
30118
30119
30120
30121
30122
30123
30124
30125
30126
30127
30128
30129
30130
30131
30132
30133
30134
30135
30136
30137
30138
30139
30140
30141
30142
30143
30144
30145
30146
30147
30148
30149
30150
30151
30152
30153
30154
30155
30156
30157
30158
30159
30160
30161
30162
30163
30164
30165
30166
30167
30168
30169
30170
30171
30172
30173
30174
30175
30176
30177
30178
30179
30180
30181
30182
30183
30184
30185
30186
30187
30188
30189
30190
30191
30192
30193
30194
30195
30196
30197
30198
30199
30200
30201
30202
30203
30204
30205
30206
30207
30208
30209
30210
30211
30212
30213
30214
30215
30216
30217
30218
30219
30220
30221
30222
30223
30224
30225
30226
30227
30228
30229
30230
30231
30232
30233
30234
30235
30236
30237
30238
30239
30240
30241
30242
30243
30244
30245
30246
30247
30248
30249
30250
30251
30252
30253
30254
30255
30256
30257
30258
30259
30260
30261
30262
30263
30264
30265
30266
30267
30268
30269
30270
30271
30272
30273
30274
30275
30276
30277
30278
30279
30280
30281
30282
30283
30284
30285
30286
30287
30288
30289
30290
30291
30292
30293
30294
30295
30296
30297
30298
30299
30300
30301
30302
30303
30304
30305
30306
30307
30308
30309
30310
30311
30312
30313
30314
30315
30316
30317
30318
30319
30320
30321
30322
30323
30324
30325
30326
30327
30328
30329
30330
30331
30332
30333
30334
30335
30336
30337
30338
30339
30340
30341
30342
30343
30344
30345
30346
30347
30348
30349
30350
30351
30352
30353
30354
30355
30356
30357
30358
30359
30360
30361
30362
30363
30364
30365
30366
30367
30368
30369
30370
30371
30372
30373
30374
30375
30376
30377
30378
30379
30380
30381
30382
30383
30384
30385
30386
30387
30388
30389
30390
30391
30392
30393
30394
30395
30396
30397
30398
30399
30400
30401
30402
30403
30404
30405
30406
30407
30408
30409
30410
30411
30412
30413
30414
30415
30416
30417
30418
30419
30420
30421
30422
30423
30424
30425
30426
30427
30428
30429
30430
30431
30432
30433
30434
30435
30436
30437
30438
30439
30440
30441
30442
30443
30444
30445
30446
30447
30448
30449
30450
30451
30452
30453
30454
30455
30456
30457
30458
30459
30460
30461
30462
30463
30464
30465
30466
30467
30468
30469
30470
30471
30472
30473
30474
30475
30476
30477
30478
30479
30480
30481
30482
30483
30484
30485
30486
30487
30488
30489
30490
30491
30492
30493
30494
30495
30496
30497
30498
30499
30500
30501
30502
30503
30504
30505
30506
30507
30508
30509
30510
30511
30512
30513
30514
30515
30516
30517
30518
30519
30520
30521
30522
30523
30524
30525
30526
30527
30528
30529
30530
30531
30532
30533
30534
30535
30536
30537
30538
30539
30540
30541
30542
30543
30544
30545
30546
30547
30548
30549
30550
30551
30552
30553
30554
30555
30556
30557
30558
30559
30560
30561
30562
30563
30564
30565
30566
30567
30568
30569
30570
30571
30572
30573
30574
30575
30576
30577
30578
30579
30580
30581
30582
30583
30584
30585
30586
30587
30588
30589
30590
30591
30592
30593
30594
30595
30596
30597
30598
30599
30600
30601
30602
30603
30604
30605
30606
30607
30608
30609
30610
30611
30612
30613
30614
30615
30616
30617
30618
30619
30620
30621
30622
30623
30624
30625
30626
30627
30628
30629
30630
30631
30632
30633
30634
30635
30636
30637
30638
30639
30640
30641
30642
30643
30644
30645
30646
30647
30648
30649
30650
30651
30652
30653
30654
30655
30656
30657
30658
30659
30660
30661
30662
30663
30664
30665
30666
30667
30668
30669
30670
30671
30672
30673
30674
30675
30676
30677
30678
30679
30680
30681
30682
30683
30684
30685
30686
30687
30688
30689
30690
30691
30692
30693
30694
30695
30696
30697
30698
30699
30700
30701
30702
30703
30704
30705
30706
30707
30708
30709
30710
30711
30712
30713
30714
30715
30716
30717
30718
30719
30720
30721
30722
30723
30724
30725
30726
30727
30728
30729
30730
30731
30732
30733
30734
30735
30736
30737
30738
30739
30740
30741
30742
30743
30744
30745
30746
30747
30748
30749
30750
30751
30752
30753
30754
30755
30756
30757
30758
30759
30760
30761
30762
30763
30764
30765
30766
30767
30768
30769
30770
30771
30772
30773
30774
30775
30776
30777
30778
30779
30780
30781
30782
30783
30784
30785
30786
30787
30788
30789
30790
30791
30792
30793
30794
30795
30796
30797
30798
30799
30800
30801
30802
30803
30804
30805
30806
30807
30808
30809
30810
30811
30812
30813
30814
30815
30816
30817
30818
30819
30820
30821
30822
30823
30824
30825
30826
30827
30828
30829
30830
30831
30832
30833
30834
30835
30836
30837
30838
30839
30840
30841
30842
30843
30844
30845
30846
30847
30848
30849
30850
30851
30852
30853
30854
30855
30856
30857
30858
30859
30860
30861
30862
30863
30864
30865
30866
30867
30868
30869
30870
30871
30872
30873
30874
30875
30876
30877
30878
30879
30880
30881
30882
30883
30884
30885
30886
30887
30888
30889
30890
30891
30892
30893
30894
30895
30896
30897
30898
30899
30900
30901
30902
30903
30904
30905
30906
30907
30908
30909
30910
30911
30912
30913
30914
30915
30916
30917
30918
30919
30920
30921
30922
30923
30924
30925
30926
30927
30928
30929
30930
30931
30932
30933
30934
30935
30936
30937
30938
30939
30940
30941
30942
30943
30944
30945
30946
30947
30948
30949
30950
30951
30952
30953
30954
30955
30956
30957
30958
30959
30960
30961
30962
30963
30964
30965
30966
30967
30968
30969
30970
30971
30972
30973
30974
30975
30976
30977
30978
30979
30980
30981
30982
30983
30984
30985
30986
30987
30988
30989
30990
30991
30992
30993
30994
30995
30996
30997
30998
30999
31000
31001
31002
31003
31004
31005
31006
31007
31008
31009
31010
31011
31012
31013
31014
31015
31016
31017
31018
31019
31020
31021
31022
31023
31024
31025
31026
31027
31028
31029
31030
31031
31032
31033
31034
31035
31036
31037
31038
31039
31040
31041
31042
31043
31044
31045
31046
31047
31048
31049
31050
31051
31052
31053
31054
31055
31056
31057
31058
31059
31060
31061
31062
31063
31064
31065
31066
31067
31068
31069
31070
31071
31072
31073
31074
31075
31076
31077
31078
31079
31080
31081
31082
31083
31084
31085
31086
31087
31088
31089
31090
31091
31092
31093
31094
31095
31096
31097
31098
31099
31100
31101
31102
31103
31104
31105
31106
31107
31108
31109
31110
31111
31112
31113
31114
31115
31116
31117
31118
31119
31120
31121
31122
31123
31124
31125
31126
31127
31128
31129
31130
31131
31132
31133
31134
31135
31136
31137
31138
31139
31140
31141
31142
31143
31144
31145
31146
31147
31148
31149
31150
31151
31152
31153
31154
31155
31156
31157
31158
31159
31160
31161
31162
31163
31164
31165
31166
31167
31168
31169
31170
31171
31172
31173
31174
31175
31176
31177
31178
31179
31180
31181
31182
31183
31184
31185
31186
31187
31188
31189
31190
31191
31192
31193
31194
31195
31196
31197
31198
31199
31200
31201
31202
31203
31204
31205
31206
31207
31208
31209
31210
31211
31212
31213
31214
31215
31216
31217
31218
31219
31220
31221
31222
31223
31224
31225
31226
31227
31228
31229
31230
31231
31232
31233
31234
31235
31236
31237
31238
31239
31240
31241
31242
31243
31244
31245
31246
31247
31248
31249
31250
31251
31252
31253
31254
31255
31256
31257
31258
31259
31260
31261
31262
31263
31264
31265
31266
31267
31268
31269
31270
31271
31272
31273
31274
31275
31276
31277
31278
31279
31280
31281
31282
31283
31284
31285
31286
31287
31288
31289
31290
31291
31292
31293
31294
31295
31296
31297
31298
31299
31300
31301
31302
31303
31304
31305
31306
31307
31308
31309
31310
31311
31312
31313
31314
31315
31316
31317
31318
31319
31320
31321
31322
31323
31324
31325
31326
31327
31328
31329
31330
31331
31332
31333
31334
31335
31336
31337
31338
31339
31340
31341
31342
31343
31344
31345
31346
31347
31348
31349
31350
31351
31352
31353
31354
31355
31356
31357
31358
31359
31360
31361
31362
31363
31364
31365
31366
31367
31368
31369
31370
31371
31372
31373
31374
31375
31376
31377
31378
31379
31380
31381
31382
31383
31384
31385
31386
31387
31388
31389
31390
31391
31392
31393
31394
31395
31396
31397
31398
31399
31400
31401
31402
31403
31404
31405
31406
31407
31408
31409
31410
31411
31412
31413
31414
31415
31416
31417
31418
31419
31420
31421
31422
31423
31424
31425
31426
31427
31428
31429
31430
31431
31432
31433
31434
31435
31436
31437
31438
31439
31440
31441
31442
31443
31444
31445
31446
31447
31448
31449
31450
31451
31452
31453
31454
31455
31456
31457
31458
31459
31460
31461
31462
31463
31464
31465
31466
31467
31468
31469
31470
31471
31472
31473
31474
31475
31476
31477
31478
31479
31480
31481
31482
31483
31484
31485
31486
31487
31488
31489
31490
31491
31492
31493
31494
31495
31496
31497
31498
31499
31500
31501
31502
31503
31504
31505
31506
31507
31508
31509
31510
31511
31512
31513
31514
31515
31516
31517
31518
31519
31520
31521
31522
31523
31524
31525
31526
31527
31528
31529
31530
31531
31532
31533
31534
31535
31536
31537
31538
31539
31540
31541
31542
31543
31544
31545
31546
31547
31548
31549
31550
31551
31552
31553
31554
31555
31556
31557
31558
31559
31560
31561
31562
31563
31564
31565
31566
31567
31568
31569
31570
31571
31572
31573
31574
31575
31576
31577
31578
31579
31580
31581
31582
31583
31584
31585
31586
31587
31588
31589
31590
31591
31592
31593
31594
31595
31596
31597
31598
31599
31600
31601
31602
31603
31604
31605
31606
31607
31608
31609
31610
31611
31612
31613
31614
31615
31616
31617
31618
31619
31620
31621
31622
31623
31624
31625
31626
31627
31628
31629
31630
31631
31632
31633
31634
31635
31636
31637
31638
31639
31640
31641
31642
31643
31644
31645
31646
31647
31648
31649
31650
31651
31652
31653
31654
31655
31656
31657
31658
31659
31660
31661
31662
31663
31664
31665
31666
31667
31668
31669
31670
31671
31672
31673
31674
31675
31676
31677
31678
31679
31680
31681
31682
31683
31684
31685
31686
31687
31688
31689
31690
31691
31692
31693
31694
31695
31696
31697
31698
31699
31700
31701
31702
31703
31704
31705
31706
31707
31708
31709
31710
31711
31712
31713
31714
31715
31716
31717
31718
31719
31720
31721
31722
31723
31724
31725
31726
31727
31728
31729
31730
31731
31732
31733
31734
31735
31736
31737
31738
31739
31740
31741
31742
31743
31744
31745
31746
31747
31748
31749
31750
31751
31752
31753
31754
31755
31756
31757
31758
31759
31760
31761
31762
31763
31764
31765
31766
31767
31768
31769
31770
31771
31772
31773
31774
31775
31776
31777
31778
31779
31780
31781
31782
31783
31784
31785
31786
31787
31788
31789
31790
31791
31792
31793
31794
31795
31796
31797
31798
31799
31800
31801
31802
31803
31804
31805
31806
31807
31808
31809
31810
31811
31812
31813
31814
31815
31816
31817
31818
31819
31820
31821
31822
31823
31824
31825
31826
31827
31828
31829
31830
31831
31832
31833
31834
31835
31836
31837
31838
31839
31840
31841
31842
31843
31844
31845
31846
31847
31848
31849
31850
31851
31852
31853
31854
31855
31856
31857
31858
31859
31860
31861
31862
31863
31864
31865
31866
31867
31868
31869
31870
31871
31872
31873
31874
31875
31876
31877
31878
31879
31880
31881
31882
31883
31884
31885
31886
31887
31888
31889
31890
31891
31892
31893
31894
31895
31896
31897
31898
31899
31900
31901
31902
31903
31904
31905
31906
31907
31908
31909
31910
31911
31912
31913
31914
31915
31916
31917
31918
31919
31920
31921
31922
31923
31924
31925
31926
31927
31928
31929
31930
31931
31932
31933
31934
31935
31936
31937
31938
31939
31940
31941
31942
31943
31944
31945
31946
31947
31948
31949
31950
31951
31952
31953
31954
31955
31956
31957
31958
31959
31960
31961
31962
31963
31964
31965
31966
31967
31968
31969
31970
31971
31972
31973
31974
31975
31976
31977
31978
31979
31980
31981
31982
31983
31984
31985
31986
31987
31988
31989
31990
31991
31992
31993
31994
31995
31996
31997
31998
31999
32000
32001
32002
32003
32004
32005
32006
32007
32008
32009
32010
32011
32012
32013
32014
32015
32016
32017
32018
32019
32020
32021
32022
32023
32024
32025
32026
32027
32028
32029
32030
32031
32032
32033
32034
32035
32036
32037
32038
32039
32040
32041
32042
32043
32044
32045
32046
32047
32048
32049
32050
32051
32052
32053
32054
32055
32056
32057
32058
32059
32060
32061
32062
32063
32064
32065
32066
32067
32068
32069
32070
32071
32072
32073
32074
32075
32076
32077
32078
32079
32080
32081
32082
32083
32084
32085
32086
32087
32088
32089
32090
32091
32092
32093
32094
32095
32096
32097
32098
32099
32100
32101
32102
32103
32104
32105
32106
32107
32108
32109
32110
32111
32112
32113
32114
32115
32116
32117
32118
32119
32120
32121
32122
32123
32124
32125
32126
32127
32128
32129
32130
32131
32132
32133
32134
32135
32136
32137
32138
32139
32140
32141
32142
32143
32144
32145
32146
32147
32148
32149
32150
32151
32152
32153
32154
32155
32156
32157
32158
32159
32160
32161
32162
32163
32164
32165
32166
32167
32168
32169
32170
32171
32172
32173
32174
32175
32176
32177
32178
32179
32180
32181
32182
32183
32184
32185
32186
32187
32188
32189
32190
32191
32192
32193
32194
32195
32196
32197
32198
32199
32200
32201
32202
32203
32204
32205
32206
32207
32208
32209
32210
32211
32212
32213
32214
32215
32216
32217
32218
32219
32220
32221
32222
32223
32224
32225
32226
32227
32228
32229
32230
32231
32232
32233
32234
32235
32236
32237
32238
32239
32240
32241
32242
32243
32244
32245
32246
32247
32248
32249
32250
32251
32252
32253
32254
32255
32256
32257
32258
32259
32260
32261
32262
32263
32264
32265
32266
32267
32268
32269
32270
32271
32272
32273
32274
32275
32276
32277
32278
32279
32280
32281
32282
32283
32284
32285
32286
32287
32288
32289
32290
32291
32292
32293
32294
32295
32296
32297
32298
32299
32300
32301
32302
32303
32304
32305
32306
32307
32308
32309
32310
32311
32312
32313
32314
32315
32316
32317
32318
32319
32320
32321
32322
32323
32324
32325
32326
32327
32328
32329
32330
32331
32332
32333
32334
32335
32336
32337
32338
32339
32340
32341
32342
32343
32344
32345
32346
32347
32348
32349
32350
32351
32352
32353
32354
32355
32356
32357
32358
32359
32360
32361
32362
32363
32364
32365
32366
32367
32368
32369
32370
32371
32372
32373
32374
32375
32376
32377
32378
32379
32380
32381
32382
32383
32384
32385
32386
32387
32388
32389
32390
32391
32392
32393
32394
32395
32396
32397
32398
32399
32400
32401
32402
32403
32404
32405
32406
32407
32408
32409
32410
32411
32412
32413
32414
32415
32416
32417
32418
32419
32420
32421
32422
32423
32424
32425
32426
32427
32428
32429
32430
32431
32432
32433
32434
32435
32436
32437
32438
32439
32440
32441
32442
32443
32444
32445
32446
32447
32448
32449
32450
32451
32452
32453
32454
32455
32456
32457
32458
32459
32460
32461
32462
32463
32464
32465
32466
32467
32468
32469
32470
32471
32472
32473
32474
32475
32476
32477
32478
32479
32480
32481
32482
32483
32484
32485
32486
32487
32488
32489
32490
32491
32492
32493
32494
32495
32496
32497
32498
32499
32500
32501
32502
32503
32504
32505
32506
32507
32508
32509
32510
32511
32512
32513
32514
32515
32516
32517
32518
32519
32520
32521
32522
32523
32524
32525
32526
32527
32528
32529
32530
32531
32532
32533
32534
32535
32536
32537
32538
32539
32540
32541
32542
32543
32544
32545
32546
32547
32548
32549
32550
32551
32552
32553
32554
32555
32556
32557
32558
32559
32560
32561
32562
32563
32564
32565
32566
32567
32568
32569
32570
32571
32572
32573
32574
32575
32576
32577
32578
32579
32580
32581
32582
32583
32584
32585
32586
32587
32588
32589
32590
32591
32592
32593
32594
32595
32596
32597
32598
32599
32600
32601
32602
32603
32604
32605
32606
32607
32608
32609
32610
32611
32612
32613
32614
32615
32616
32617
32618
32619
32620
32621
32622
32623
32624
32625
32626
32627
32628
32629
32630
32631
32632
32633
32634
32635
32636
32637
32638
32639
32640
32641
32642
32643
32644
32645
32646
32647
32648
32649
32650
32651
32652
32653
32654
32655
32656
32657
32658
32659
32660
32661
32662
32663
32664
32665
32666
32667
32668
32669
32670
32671
32672
32673
32674
32675
32676
32677
32678
32679
32680
32681
32682
32683
32684
32685
32686
32687
32688
32689
32690
32691
32692
32693
32694
32695
32696
32697
32698
32699
32700
32701
32702
32703
32704
32705
32706
32707
32708
32709
32710
32711
32712
32713
32714
32715
32716
32717
32718
32719
32720
32721
32722
32723
32724
32725
32726
32727
32728
32729
32730
32731
32732
32733
32734
32735
32736
32737
32738
32739
32740
32741
32742
32743
32744
32745
32746
32747
32748
32749
32750
32751
32752
32753
32754
32755
32756
32757
32758
32759
32760
32761
32762
32763
32764
32765
32766
32767
32768
32769
32770
32771
32772
32773
32774
32775
32776
32777
32778
32779
32780
32781
32782
32783
32784
32785
32786
32787
32788
32789
32790
32791
32792
32793
32794
32795
32796
32797
32798
32799
32800
32801
32802
32803
32804
32805
32806
32807
32808
32809
32810
32811
32812
32813
32814
32815
32816
32817
32818
32819
32820
32821
32822
32823
32824
32825
32826
32827
32828
32829
32830
32831
32832
32833
32834
32835
32836
32837
32838
32839
32840
32841
32842
32843
32844
32845
32846
32847
32848
32849
32850
32851
32852
32853
32854
32855
32856
32857
32858
32859
32860
32861
32862
32863
32864
32865
32866
32867
32868
32869
32870
32871
32872
32873
32874
32875
32876
32877
32878
32879
32880
32881
32882
32883
32884
32885
32886
32887
32888
32889
32890
32891
32892
32893
32894
32895
32896
32897
32898
32899
32900
32901
32902
32903
32904
32905
32906
32907
32908
32909
32910
32911
32912
32913
32914
32915
32916
32917
32918
32919
32920
32921
32922
32923
32924
32925
32926
32927
32928
32929
32930
32931
32932
32933
32934
32935
32936
32937
32938
32939
32940
32941
32942
32943
32944
32945
32946
32947
32948
32949
32950
32951
32952
32953
32954
32955
32956
32957
32958
32959
32960
32961
32962
32963
32964
32965
32966
32967
32968
32969
32970
32971
32972
32973
32974
32975
32976
32977
32978
32979
32980
32981
32982
32983
32984
32985
32986
32987
32988
32989
32990
32991
32992
32993
32994
32995
32996
32997
32998
32999
33000
33001
33002
33003
33004
33005
33006
33007
33008
33009
33010
33011
33012
33013
33014
33015
33016
33017
33018
33019
33020
33021
33022
33023
33024
33025
33026
33027
33028
33029
33030
33031
33032
33033
33034
33035
33036
33037
33038
33039
33040
33041
33042
33043
33044
33045
33046
33047
33048
33049
33050
33051
33052
33053
33054
33055
33056
33057
33058
33059
33060
33061
33062
33063
33064
33065
33066
33067
33068
33069
33070
33071
33072
33073
33074
33075
33076
33077
33078
33079
33080
33081
33082
33083
33084
33085
33086
33087
33088
33089
33090
33091
33092
33093
33094
33095
33096
33097
33098
33099
33100
33101
33102
33103
33104
33105
33106
33107
33108
33109
33110
33111
33112
33113
33114
33115
33116
33117
33118
33119
33120
33121
33122
33123
33124
33125
33126
33127
33128
33129
33130
33131
33132
33133
33134
33135
33136
33137
33138
33139
33140
33141
33142
33143
33144
33145
33146
33147
33148
33149
33150
33151
33152
33153
33154
33155
33156
33157
33158
33159
33160
33161
33162
33163
33164
33165
33166
33167
33168
33169
33170
33171
33172
33173
33174
33175
33176
33177
33178
33179
33180
33181
33182
33183
33184
33185
33186
33187
33188
33189
33190
33191
33192
33193
33194
33195
33196
33197
33198
33199
33200
33201
33202
33203
33204
33205
33206
33207
33208
33209
33210
33211
33212
33213
33214
33215
33216
33217
33218
33219
33220
33221
33222
33223
33224
33225
33226
33227
33228
33229
33230
33231
33232
33233
33234
33235
33236
33237
33238
33239
33240
33241
33242
33243
33244
33245
33246
33247
33248
33249
33250
33251
33252
33253
33254
33255
33256
33257
33258
33259
33260
33261
33262
33263
33264
33265
33266
33267
33268
33269
33270
33271
33272
33273
33274
33275
33276
33277
33278
33279
33280
33281
33282
33283
33284
33285
33286
33287
33288
33289
33290
33291
33292
33293
33294
33295
33296
33297
33298
33299
33300
33301
33302
33303
33304
33305
33306
33307
33308
33309
33310
33311
33312
33313
33314
33315
33316
33317
33318
33319
33320
33321
33322
33323
33324
33325
33326
33327
33328
33329
33330
33331
33332
33333
33334
33335
33336
33337
33338
33339
33340
33341
33342
33343
33344
33345
33346
33347
33348
33349
33350
33351
33352
33353
33354
33355
33356
33357
33358
33359
33360
33361
33362
33363
33364
33365
33366
33367
33368
33369
33370
33371
33372
33373
33374
33375
33376
33377
33378
33379
33380
33381
33382
33383
33384
33385
33386
33387
33388
33389
33390
33391
33392
33393
33394
33395
33396
33397
33398
33399
33400
33401
33402
33403
33404
33405
33406
33407
33408
33409
33410
33411
33412
33413
33414
33415
33416
33417
33418
33419
33420
33421
33422
33423
33424
33425
33426
33427
33428
33429
33430
33431
33432
33433
33434
33435
33436
33437
33438
33439
33440
33441
33442
33443
33444
33445
33446
33447
33448
33449
33450
33451
33452
33453
33454
33455
33456
33457
33458
33459
33460
33461
33462
33463
33464
33465
33466
33467
33468
33469
33470
33471
33472
33473
33474
33475
33476
33477
33478
33479
33480
33481
33482
33483
33484
33485
33486
33487
33488
33489
33490
33491
33492
33493
33494
33495
33496
33497
33498
33499
33500
33501
33502
33503
33504
33505
33506
33507
33508
33509
33510
33511
33512
33513
33514
33515
33516
33517
33518
33519
33520
33521
33522
33523
33524
33525
33526
33527
33528
33529
33530
33531
33532
33533
33534
33535
33536
33537
33538
33539
33540
33541
33542
33543
33544
33545
33546
33547
33548
33549
33550
33551
33552
33553
33554
33555
33556
33557
33558
33559
33560
33561
33562
33563
33564
33565
33566
33567
33568
33569
33570
33571
33572
33573
33574
33575
33576
33577
33578
33579
33580
33581
33582
33583
33584
33585
33586
33587
33588
33589
33590
33591
33592
33593
33594
33595
33596
33597
33598
33599
33600
33601
33602
33603
33604
33605
33606
33607
33608
33609
33610
33611
33612
33613
33614
33615
33616
33617
33618
33619
33620
33621
33622
33623
33624
33625
33626
33627
33628
33629
33630
33631
33632
33633
33634
33635
33636
33637
33638
33639
33640
33641
33642
33643
33644
33645
33646
33647
33648
33649
33650
33651
33652
33653
33654
33655
33656
33657
33658
33659
33660
33661
33662
33663
33664
33665
33666
33667
33668
33669
33670
33671
33672
33673
33674
33675
33676
33677
33678
33679
33680
33681
33682
33683
33684
33685
33686
33687
33688
33689
33690
33691
33692
33693
33694
33695
33696
33697
33698
33699
33700
33701
33702
33703
33704
33705
33706
33707
33708
33709
33710
33711
33712
33713
33714
33715
33716
33717
33718
33719
33720
33721
33722
33723
33724
33725
33726
33727
33728
33729
33730
33731
33732
33733
33734
33735
33736
33737
33738
33739
33740
33741
33742
33743
33744
33745
33746
33747
33748
33749
33750
33751
33752
33753
33754
33755
33756
33757
33758
33759
33760
33761
33762
33763
33764
33765
33766
33767
33768
33769
33770
33771
33772
33773
33774
33775
33776
33777
33778
33779
33780
33781
33782
33783
33784
33785
33786
33787
33788
33789
33790
33791
33792
33793
33794
33795
33796
33797
33798
33799
33800
33801
33802
33803
33804
33805
33806
33807
33808
33809
33810
33811
33812
33813
33814
33815
33816
33817
33818
33819
33820
33821
33822
33823
33824
33825
33826
33827
33828
33829
33830
33831
33832
33833
33834
33835
33836
33837
33838
33839
33840
33841
33842
33843
33844
33845
33846
33847
33848
33849
33850
33851
33852
33853
33854
33855
33856
33857
33858
33859
33860
33861
33862
33863
33864
33865
33866
33867
33868
33869
33870
33871
33872
33873
33874
33875
33876
33877
33878
33879
33880
33881
33882
33883
33884
33885
33886
33887
33888
33889
33890
33891
33892
33893
33894
33895
33896
33897
33898
33899
33900
33901
33902
33903
33904
33905
33906
33907
33908
33909
33910
33911
33912
33913
33914
33915
33916
33917
33918
33919
33920
33921
33922
33923
33924
33925
33926
33927
33928
33929
33930
33931
33932
33933
33934
33935
33936
33937
33938
33939
33940
33941
33942
33943
33944
33945
33946
33947
33948
33949
33950
33951
33952
33953
33954
33955
33956
33957
33958
33959
33960
33961
33962
33963
33964
33965
33966
33967
33968
33969
33970
33971
33972
33973
33974
33975
33976
33977
33978
33979
33980
33981
33982
33983
33984
33985
33986
33987
33988
33989
33990
33991
33992
33993
33994
33995
33996
33997
33998
33999
34000
34001
34002
34003
34004
34005
34006
34007
34008
34009
34010
34011
34012
34013
34014
34015
34016
34017
34018
34019
34020
34021
34022
34023
34024
34025
34026
34027
34028
34029
34030
34031
34032
34033
34034
34035
34036
34037
34038
34039
34040
34041
34042
34043
34044
34045
34046
34047
34048
34049
34050
34051
34052
34053
34054
34055
34056
34057
34058
34059
34060
34061
34062
34063
34064
34065
34066
34067
34068
34069
34070
34071
34072
34073
34074
34075
34076
34077
34078
34079
34080
34081
34082
34083
34084
34085
34086
34087
34088
34089
34090
34091
34092
34093
34094
34095
34096
34097
34098
34099
34100
34101
34102
34103
34104
34105
34106
34107
34108
34109
34110
34111
34112
34113
34114
34115
34116
34117
34118
34119
34120
34121
34122
34123
34124
34125
34126
34127
34128
34129
34130
34131
34132
34133
34134
34135
34136
34137
34138
34139
34140
34141
34142
34143
34144
34145
34146
34147
34148
34149
34150
34151
34152
34153
34154
34155
34156
34157
34158
34159
34160
34161
34162
34163
34164
34165
34166
34167
34168
34169
34170
34171
34172
34173
34174
34175
34176
34177
34178
34179
34180
34181
34182
34183
34184
34185
34186
34187
34188
34189
34190
34191
34192
34193
34194
34195
34196
34197
34198
34199
34200
34201
34202
34203
34204
34205
34206
34207
34208
34209
34210
34211
34212
34213
34214
34215
34216
34217
34218
34219
34220
34221
34222
34223
34224
34225
34226
34227
34228
34229
34230
34231
34232
34233
34234
34235
34236
34237
34238
34239
34240
34241
34242
34243
34244
34245
34246
34247
34248
34249
34250
34251
34252
34253
34254
34255
34256
34257
34258
34259
34260
34261
34262
34263
34264
34265
34266
34267
34268
34269
34270
34271
34272
34273
34274
34275
34276
34277
34278
34279
34280
34281
34282
34283
34284
34285
34286
34287
34288
34289
34290
34291
34292
34293
34294
34295
34296
34297
34298
34299
34300
34301
34302
34303
34304
34305
34306
34307
34308
34309
34310
34311
34312
34313
34314
34315
34316
34317
34318
34319
34320
34321
34322
34323
34324
34325
34326
34327
34328
34329
34330
34331
34332
34333
34334
34335
34336
34337
34338
34339
34340
34341
34342
34343
34344
34345
34346
34347
34348
34349
34350
34351
34352
34353
34354
34355
34356
34357
34358
34359
34360
34361
34362
34363
34364
34365
34366
34367
34368
34369
34370
34371
34372
34373
34374
34375
34376
34377
34378
34379
34380
34381
34382
34383
34384
34385
34386
34387
34388
34389
34390
34391
34392
34393
34394
34395
34396
34397
34398
34399
34400
34401
34402
34403
34404
34405
34406
34407
34408
34409
34410
34411
34412
34413
34414
34415
34416
34417
34418
34419
34420
34421
34422
34423
34424
34425
34426
34427
34428
34429
34430
34431
34432
34433
34434
34435
34436
34437
34438
34439
34440
34441
34442
34443
34444
34445
34446
34447
34448
34449
34450
34451
34452
34453
34454
34455
34456
34457
34458
34459
34460
34461
34462
34463
34464
34465
34466
34467
34468
34469
34470
34471
34472
34473
34474
34475
34476
34477
34478
34479
34480
34481
34482
34483
34484
34485
34486
34487
34488
34489
34490
34491
34492
34493
34494
34495
34496
34497
34498
34499
34500
34501
34502
34503
34504
34505
34506
34507
34508
34509
34510
34511
34512
34513
34514
34515
34516
34517
34518
34519
34520
34521
34522
34523
34524
34525
34526
34527
34528
34529
34530
34531
34532
34533
34534
34535
34536
34537
34538
34539
34540
34541
34542
34543
34544
34545
34546
34547
34548
34549
34550
34551
34552
34553
34554
34555
34556
34557
34558
34559
34560
34561
34562
34563
34564
34565
34566
34567
34568
34569
34570
34571
34572
34573
34574
34575
34576
34577
34578
34579
34580
34581
34582
34583
34584
34585
34586
34587
34588
34589
34590
34591
34592
34593
34594
34595
34596
34597
34598
34599
34600
34601
34602
34603
34604
34605
34606
34607
34608
34609
34610
34611
34612
34613
34614
34615
34616
34617
34618
34619
34620
34621
34622
34623
34624
34625
34626
34627
34628
34629
34630
34631
34632
34633
34634
34635
34636
34637
34638
34639
34640
34641
34642
34643
34644
34645
34646
34647
34648
34649
34650
34651
34652
34653
34654
34655
34656
34657
34658
34659
34660
34661
34662
34663
34664
34665
34666
34667
34668
34669
34670
34671
34672
34673
34674
34675
34676
34677
34678
34679
34680
34681
34682
34683
34684
34685
34686
34687
34688
34689
34690
34691
34692
34693
34694
34695
34696
34697
34698
34699
34700
34701
34702
34703
34704
34705
34706
34707
34708
34709
34710
34711
34712
34713
34714
34715
34716
34717
34718
34719
34720
34721
34722
34723
34724
34725
34726
34727
34728
34729
34730
34731
34732
34733
34734
34735
34736
34737
34738
34739
34740
34741
34742
34743
34744
34745
34746
34747
34748
34749
34750
34751
34752
34753
34754
34755
34756
34757
34758
34759
34760
34761
34762
34763
34764
34765
34766
34767
34768
34769
34770
34771
34772
34773
34774
34775
34776
34777
34778
34779
34780
34781
34782
34783
34784
34785
34786
34787
34788
34789
34790
34791
34792
34793
34794
34795
34796
34797
34798
34799
34800
34801
34802
34803
34804
34805
34806
34807
34808
34809
34810
34811
34812
34813
34814
34815
34816
34817
34818
34819
34820
34821
34822
34823
34824
34825
34826
34827
34828
34829
34830
34831
34832
34833
34834
34835
34836
34837
34838
34839
34840
34841
34842
34843
34844
34845
34846
34847
34848
34849
34850
34851
34852
34853
34854
34855
34856
34857
34858
34859
34860
34861
34862
34863
34864
34865
34866
34867
34868
34869
34870
34871
34872
34873
34874
34875
34876
34877
34878
34879
34880
34881
34882
34883
34884
34885
34886
34887
34888
34889
34890
34891
34892
34893
34894
34895
34896
34897
34898
34899
34900
34901
34902
34903
34904
34905
34906
34907
34908
34909
34910
34911
34912
34913
34914
34915
34916
34917
34918
34919
34920
34921
34922
34923
34924
34925
34926
34927
34928
34929
34930
34931
34932
34933
34934
34935
34936
34937
34938
34939
34940
34941
34942
34943
34944
34945
34946
34947
34948
34949
34950
34951
34952
34953
34954
34955
34956
34957
34958
34959
34960
34961
34962
34963
34964
34965
34966
34967
34968
34969
34970
34971
34972
34973
34974
34975
34976
34977
34978
34979
34980
34981
34982
34983
34984
34985
34986
34987
34988
34989
34990
34991
34992
34993
34994
34995
34996
34997
34998
34999
35000
35001
35002
35003
35004
35005
35006
35007
35008
35009
35010
35011
35012
35013
35014
35015
35016
35017
35018
35019
35020
35021
35022
35023
35024
35025
35026
35027
35028
35029
35030
35031
35032
35033
35034
35035
35036
35037
35038
35039
35040
35041
35042
35043
35044
35045
35046
35047
35048
35049
35050
35051
35052
35053
35054
35055
35056
35057
35058
35059
35060
35061
35062
35063
35064
35065
35066
35067
35068
35069
35070
35071
35072
35073
35074
35075
35076
35077
35078
35079
35080
35081
35082
35083
35084
35085
35086
35087
35088
35089
35090
35091
35092
35093
35094
35095
35096
35097
35098
35099
35100
35101
35102
35103
35104
35105
35106
35107
35108
35109
35110
35111
35112
35113
35114
35115
35116
35117
35118
35119
35120
35121
35122
35123
35124
35125
35126
35127
35128
35129
35130
35131
35132
35133
35134
35135
35136
35137
35138
35139
35140
35141
35142
35143
35144
35145
35146
35147
35148
35149
35150
35151
35152
35153
35154
35155
35156
35157
35158
35159
35160
35161
35162
35163
35164
35165
35166
35167
35168
35169
35170
35171
35172
35173
35174
35175
35176
35177
35178
35179
35180
35181
35182
35183
35184
35185
35186
35187
35188
35189
35190
35191
35192
35193
35194
35195
35196
35197
35198
35199
35200
35201
35202
35203
35204
35205
35206
35207
35208
35209
35210
35211
35212
35213
35214
35215
35216
35217
35218
35219
35220
35221
35222
35223
35224
35225
35226
35227
35228
35229
35230
35231
35232
35233
35234
35235
35236
35237
35238
35239
35240
35241
35242
35243
35244
35245
35246
35247
35248
35249
35250
35251
35252
35253
35254
35255
35256
35257
35258
35259
35260
35261
35262
35263
35264
35265
35266
35267
35268
35269
35270
35271
35272
35273
35274
35275
35276
35277
35278
35279
35280
35281
35282
35283
35284
35285
35286
35287
35288
35289
35290
35291
35292
35293
35294
35295
35296
35297
35298
35299
35300
35301
35302
35303
35304
35305
35306
35307
35308
35309
35310
35311
35312
35313
35314
35315
35316
35317
35318
35319
35320
35321
35322
35323
35324
35325
35326
35327
35328
35329
35330
35331
35332
35333
35334
35335
35336
35337
35338
35339
35340
35341
35342
35343
35344
35345
35346
35347
35348
35349
35350
35351
35352
35353
35354
35355
35356
35357
35358
35359
35360
35361
35362
35363
35364
35365
35366
35367
35368
35369
35370
35371
35372
35373
35374
35375
35376
35377
35378
35379
35380
35381
35382
35383
35384
35385
35386
35387
35388
35389
35390
35391
35392
35393
35394
35395
35396
35397
35398
35399
35400
35401
35402
35403
35404
35405
35406
35407
35408
35409
35410
35411
35412
35413
35414
35415
35416
35417
35418
35419
35420
35421
35422
35423
35424
35425
35426
35427
35428
35429
35430
35431
35432
35433
35434
35435
35436
35437
35438
35439
35440
35441
35442
35443
35444
35445
35446
35447
35448
35449
35450
35451
35452
35453
35454
35455
35456
35457
35458
35459
35460
35461
35462
35463
35464
35465
35466
35467
35468
35469
35470
35471
35472
35473
35474
35475
35476
35477
35478
35479
35480
35481
35482
35483
35484
35485
35486
35487
35488
35489
35490
35491
35492
35493
35494
35495
35496
35497
35498
35499
35500
35501
35502
35503
35504
35505
35506
35507
35508
35509
35510
35511
35512
35513
35514
35515
35516
35517
35518
35519
35520
35521
35522
35523
35524
35525
35526
35527
35528
35529
35530
35531
35532
35533
35534
35535
35536
35537
35538
35539
35540
35541
35542
35543
35544
35545
35546
35547
35548
35549
35550
35551
35552
35553
35554
35555
35556
35557
35558
35559
35560
35561
35562
35563
35564
35565
35566
35567
35568
35569
35570
35571
35572
35573
35574
35575
35576
35577
35578
35579
35580
35581
35582
35583
35584
35585
35586
35587
35588
35589
35590
35591
35592
35593
35594
35595
35596
35597
35598
35599
35600
35601
35602
35603
35604
35605
35606
35607
35608
35609
35610
35611
35612
35613
35614
35615
35616
35617
35618
35619
35620
35621
35622
35623
35624
35625
35626
35627
35628
35629
35630
35631
35632
35633
35634
35635
35636
35637
35638
35639
35640
35641
35642
35643
35644
35645
35646
35647
35648
35649
35650
35651
35652
35653
35654
35655
35656
35657
35658
35659
35660
35661
35662
35663
35664
35665
35666
35667
35668
35669
35670
35671
35672
35673
35674
35675
35676
35677
35678
35679
35680
35681
35682
35683
35684
35685
35686
35687
35688
35689
35690
35691
35692
35693
35694
35695
35696
35697
35698
35699
35700
35701
35702
35703
35704
35705
35706
35707
35708
35709
35710
35711
35712
35713
35714
35715
35716
35717
35718
35719
35720
35721
35722
35723
35724
35725
35726
35727
35728
35729
35730
35731
35732
35733
35734
35735
35736
35737
35738
35739
35740
35741
35742
35743
35744
35745
35746
35747
35748
35749
35750
35751
35752
35753
35754
35755
35756
35757
35758
35759
35760
35761
35762
35763
35764
35765
35766
35767
35768
35769
35770
35771
35772
35773
35774
35775
35776
35777
35778
35779
35780
35781
35782
35783
35784
35785
35786
35787
35788
35789
35790
35791
35792
35793
35794
35795
35796
35797
35798
35799
35800
35801
35802
35803
35804
35805
35806
35807
35808
35809
35810
35811
35812
35813
35814
35815
35816
35817
35818
35819
35820
35821
35822
35823
35824
35825
35826
35827
35828
35829
35830
35831
35832
35833
35834
35835
35836
35837
35838
35839
35840
35841
35842
35843
35844
35845
35846
35847
35848
35849
35850
35851
35852
35853
35854
35855
35856
35857
35858
35859
35860
35861
35862
35863
35864
35865
35866
35867
35868
35869
35870
35871
35872
35873
35874
35875
35876
35877
35878
35879
35880
35881
35882
35883
35884
35885
35886
35887
35888
35889
35890
35891
35892
35893
35894
35895
35896
35897
35898
35899
35900
35901
35902
35903
35904
35905
35906
35907
35908
35909
35910
35911
35912
35913
35914
35915
35916
35917
35918
35919
35920
35921
35922
35923
35924
35925
35926
35927
35928
35929
35930
35931
35932
35933
35934
35935
35936
35937
35938
35939
35940
35941
35942
35943
35944
35945
35946
35947
35948
35949
35950
35951
35952
35953
35954
35955
35956
35957
35958
35959
35960
35961
35962
35963
35964
35965
35966
35967
35968
35969
35970
35971
35972
35973
35974
35975
35976
35977
35978
35979
35980
35981
35982
35983
35984
35985
35986
35987
35988
35989
35990
35991
35992
35993
35994
35995
35996
35997
35998
35999
36000
36001
36002
36003
36004
36005
36006
36007
36008
36009
36010
36011
36012
36013
36014
36015
36016
36017
36018
36019
36020
36021
36022
36023
36024
36025
36026
36027
36028
36029
36030
36031
36032
36033
36034
36035
36036
36037
36038
36039
36040
36041
36042
36043
36044
36045
36046
36047
36048
36049
36050
36051
36052
36053
36054
36055
36056
36057
36058
36059
36060
36061
36062
36063
36064
36065
36066
36067
36068
36069
36070
36071
36072
36073
36074
36075
36076
36077
36078
36079
36080
36081
36082
36083
36084
36085
36086
36087
36088
36089
36090
36091
36092
36093
36094
36095
36096
36097
36098
36099
36100
36101
36102
36103
36104
36105
36106
36107
36108
36109
36110
36111
36112
36113
36114
36115
36116
36117
36118
36119
36120
36121
36122
36123
36124
36125
36126
36127
36128
36129
36130
36131
36132
36133
36134
36135
36136
36137
36138
36139
36140
36141
36142
36143
36144
36145
36146
36147
36148
36149
36150
36151
36152
36153
36154
36155
36156
36157
36158
36159
36160
36161
36162
36163
36164
36165
36166
36167
36168
36169
36170
36171
36172
36173
36174
36175
36176
36177
36178
36179
36180
36181
36182
36183
36184
36185
36186
36187
36188
36189
36190
36191
36192
36193
36194
36195
36196
36197
36198
36199
36200
36201
36202
36203
36204
36205
36206
36207
36208
36209
36210
36211
36212
36213
36214
36215
36216
36217
36218
36219
36220
36221
36222
36223
36224
36225
36226
36227
36228
36229
36230
36231
36232
36233
36234
36235
36236
36237
36238
36239
36240
36241
36242
36243
36244
36245
36246
36247
36248
36249
36250
36251
36252
36253
36254
36255
36256
36257
36258
36259
36260
36261
36262
36263
36264
36265
36266
36267
36268
36269
36270
36271
36272
36273
36274
36275
36276
36277
36278
36279
36280
36281
36282
36283
36284
36285
36286
36287
36288
36289
36290
36291
36292
36293
36294
36295
36296
36297
36298
36299
36300
36301
36302
36303
36304
36305
36306
36307
36308
36309
36310
36311
36312
36313
36314
36315
36316
36317
36318
36319
36320
36321
36322
36323
36324
36325
36326
36327
36328
36329
36330
36331
36332
36333
36334
36335
36336
36337
36338
36339
36340
36341
36342
36343
36344
36345
36346
36347
36348
36349
36350
36351
36352
36353
36354
36355
36356
36357
36358
36359
36360
36361
36362
36363
36364
36365
36366
36367
36368
36369
36370
36371
36372
36373
36374
36375
36376
36377
36378
36379
36380
36381
36382
36383
36384
36385
36386
36387
36388
36389
36390
36391
36392
36393
36394
36395
36396
36397
36398
36399
36400
36401
36402
36403
36404
36405
36406
36407
36408
36409
36410
36411
36412
36413
36414
36415
36416
36417
36418
36419
36420
36421
36422
36423
36424
36425
36426
36427
36428
36429
36430
36431
36432
36433
36434
36435
36436
36437
36438
36439
36440
36441
36442
36443
36444
36445
36446
36447
36448
36449
36450
36451
36452
36453
36454
36455
36456
36457
36458
36459
36460
36461
36462
36463
36464
36465
36466
36467
36468
36469
36470
36471
36472
36473
36474
36475
36476
36477
36478
36479
36480
36481
36482
36483
36484
36485
36486
36487
36488
36489
36490
36491
36492
36493
36494
36495
36496
36497
36498
36499
36500
36501
36502
36503
36504
36505
36506
36507
36508
36509
36510
36511
36512
36513
36514
36515
36516
36517
36518
36519
36520
36521
36522
36523
36524
36525
36526
36527
36528
36529
36530
36531
36532
36533
36534
36535
36536
36537
36538
36539
36540
36541
36542
36543
36544
36545
36546
36547
36548
36549
36550
36551
36552
36553
36554
36555
36556
36557
36558
36559
36560
36561
36562
36563
36564
36565
36566
36567
36568
36569
36570
36571
36572
36573
36574
36575
36576
36577
36578
36579
36580
36581
36582
36583
36584
36585
36586
36587
36588
36589
36590
36591
36592
36593
36594
36595
36596
36597
36598
36599
36600
36601
36602
36603
36604
36605
36606
36607
36608
36609
36610
36611
36612
36613
36614
36615
36616
36617
36618
36619
36620
36621
36622
36623
36624
36625
36626
36627
36628
36629
36630
36631
36632
36633
36634
36635
36636
36637
36638
36639
36640
36641
36642
36643
36644
36645
36646
36647
36648
36649
36650
36651
36652
36653
36654
36655
36656
36657
36658
36659
36660
36661
36662
36663
36664
36665
36666
36667
36668
36669
36670
36671
36672
36673
36674
36675
36676
36677
36678
36679
36680
36681
36682
36683
36684
36685
36686
36687
36688
36689
36690
36691
36692
36693
36694
36695
36696
36697
36698
36699
36700
36701
36702
36703
36704
36705
36706
36707
36708
36709
36710
36711
36712
36713
36714
36715
36716
36717
36718
36719
36720
36721
36722
36723
36724
36725
36726
36727
36728
36729
36730
36731
36732
36733
36734
36735
36736
36737
36738
36739
36740
36741
36742
36743
36744
36745
36746
36747
36748
36749
36750
36751
36752
36753
36754
36755
36756
36757
36758
36759
36760
36761
36762
36763
36764
36765
36766
36767
36768
36769
36770
36771
36772
36773
36774
36775
36776
36777
36778
36779
36780
36781
36782
36783
36784
36785
36786
36787
36788
36789
36790
36791
36792
36793
36794
36795
36796
36797
36798
36799
36800
36801
36802
36803
36804
36805
36806
36807
36808
36809
36810
36811
36812
36813
36814
36815
36816
36817
36818
36819
36820
36821
36822
36823
36824
36825
36826
36827
36828
36829
36830
36831
36832
36833
36834
36835
36836
36837
36838
36839
36840
36841
36842
36843
36844
36845
36846
36847
36848
36849
36850
36851
36852
36853
36854
36855
36856
36857
36858
36859
36860
36861
36862
36863
36864
36865
36866
36867
36868
36869
36870
36871
36872
36873
36874
36875
36876
36877
36878
36879
36880
36881
36882
36883
36884
36885
36886
36887
36888
36889
36890
36891
36892
36893
36894
36895
36896
36897
36898
36899
36900
36901
36902
36903
36904
36905
36906
36907
36908
36909
36910
36911
36912
36913
36914
36915
36916
36917
36918
36919
36920
36921
36922
36923
36924
36925
36926
36927
36928
36929
36930
36931
36932
36933
36934
36935
36936
36937
36938
36939
36940
36941
36942
36943
36944
36945
36946
36947
36948
36949
36950
36951
36952
36953
36954
36955
36956
36957
36958
36959
36960
36961
36962
36963
36964
36965
36966
36967
36968
36969
36970
36971
36972
36973
36974
36975
36976
36977
36978
36979
36980
36981
36982
36983
36984
36985
36986
36987
36988
36989
36990
36991
36992
36993
36994
36995
36996
36997
36998
36999
37000
37001
37002
37003
37004
37005
37006
37007
37008
37009
37010
37011
37012
37013
37014
37015
37016
37017
37018
37019
37020
37021
37022
37023
37024
37025
37026
37027
37028
37029
37030
37031
37032
37033
37034
37035
37036
37037
37038
37039
37040
37041
37042
37043
37044
37045
37046
37047
37048
37049
37050
37051
37052
37053
37054
37055
37056
37057
37058
37059
37060
37061
37062
37063
37064
37065
37066
37067
37068
37069
37070
37071
37072
37073
37074
37075
37076
37077
37078
37079
37080
37081
37082
37083
37084
37085
37086
37087
37088
37089
37090
37091
37092
37093
37094
37095
37096
37097
37098
37099
37100
37101
37102
37103
37104
37105
37106
37107
37108
37109
37110
37111
37112
37113
37114
37115
37116
37117
37118
37119
37120
37121
37122
37123
37124
37125
37126
37127
37128
37129
37130
37131
37132
37133
37134
37135
37136
37137
37138
37139
37140
37141
37142
37143
37144
37145
37146
37147
37148
37149
37150
37151
37152
37153
37154
37155
37156
37157
37158
37159
37160
37161
37162
37163
37164
37165
37166
37167
37168
37169
37170
37171
37172
37173
37174
37175
37176
37177
37178
37179
37180
37181
37182
37183
37184
37185
37186
37187
37188
37189
37190
37191
37192
37193
37194
37195
37196
37197
37198
37199
37200
37201
37202
37203
37204
37205
37206
37207
37208
37209
37210
37211
37212
37213
37214
37215
37216
37217
37218
37219
37220
37221
37222
37223
37224
37225
37226
37227
37228
37229
37230
37231
37232
37233
37234
37235
37236
37237
37238
37239
37240
37241
37242
37243
37244
37245
37246
37247
37248
37249
37250
37251
37252
37253
37254
37255
37256
37257
37258
37259
37260
37261
37262
37263
37264
37265
37266
37267
37268
37269
37270
37271
37272
37273
37274
37275
37276
37277
37278
37279
37280
37281
37282
37283
37284
37285
37286
37287
37288
37289
37290
37291
37292
37293
37294
37295
37296
37297
37298
37299
37300
37301
37302
37303
37304
37305
37306
37307
37308
37309
37310
37311
37312
37313
37314
37315
37316
37317
37318
37319
37320
37321
37322
37323
37324
37325
37326
37327
37328
37329
37330
37331
37332
37333
37334
37335
37336
37337
37338
37339
37340
37341
37342
37343
37344
37345
37346
37347
37348
37349
37350
37351
37352
37353
37354
37355
37356
37357
37358
37359
37360
37361
37362
37363
37364
37365
37366
37367
37368
37369
37370
37371
37372
37373
37374
37375
37376
37377
37378
37379
37380
37381
37382
37383
37384
37385
37386
37387
37388
37389
37390
37391
37392
37393
37394
37395
37396
37397
37398
37399
37400
37401
37402
37403
37404
37405
37406
37407
37408
37409
37410
37411
37412
37413
37414
37415
37416
37417
37418
37419
37420
37421
37422
37423
37424
37425
37426
37427
37428
37429
37430
37431
37432
37433
37434
37435
37436
37437
37438
37439
37440
37441
37442
37443
37444
37445
37446
37447
37448
37449
37450
37451
37452
37453
37454
37455
37456
37457
37458
37459
37460
37461
37462
37463
37464
37465
37466
37467
37468
37469
37470
37471
37472
37473
37474
37475
37476
37477
37478
37479
37480
37481
37482
37483
37484
37485
37486
37487
37488
37489
37490
37491
37492
37493
37494
37495
37496
37497
37498
37499
37500
37501
37502
37503
37504
37505
37506
37507
37508
37509
37510
37511
37512
37513
37514
37515
37516
37517
37518
37519
37520
37521
37522
37523
37524
37525
37526
37527
37528
37529
37530
37531
37532
37533
37534
37535
37536
37537
37538
37539
37540
37541
37542
37543
37544
37545
37546
37547
37548
37549
37550
37551
37552
37553
37554
37555
37556
37557
37558
37559
37560
37561
37562
37563
37564
37565
37566
37567
37568
37569
37570
37571
37572
37573
37574
37575
37576
37577
37578
37579
37580
37581
37582
37583
37584
37585
37586
37587
37588
37589
37590
37591
37592
37593
37594
37595
37596
37597
37598
37599
37600
37601
37602
37603
37604
37605
37606
37607
37608
37609
37610
37611
37612
37613
37614
37615
37616
37617
37618
37619
37620
37621
37622
37623
37624
37625
37626
37627
37628
37629
37630
37631
37632
37633
37634
37635
37636
37637
37638
37639
37640
37641
37642
37643
37644
37645
37646
37647
37648
37649
37650
37651
37652
37653
37654
37655
37656
37657
37658
37659
37660
37661
37662
37663
37664
37665
37666
37667
37668
37669
37670
37671
37672
37673
37674
37675
37676
37677
37678
37679
37680
37681
37682
37683
37684
37685
37686
37687
37688
37689
37690
37691
37692
37693
37694
37695
37696
37697
37698
37699
37700
37701
37702
37703
37704
37705
37706
37707
37708
37709
37710
37711
37712
37713
37714
37715
37716
37717
37718
37719
37720
37721
37722
37723
37724
37725
37726
37727
37728
37729
37730
37731
37732
37733
37734
37735
37736
37737
37738
37739
37740
37741
37742
37743
37744
37745
37746
37747
37748
37749
37750
37751
37752
37753
37754
37755
37756
37757
37758
37759
37760
37761
37762
37763
37764
37765
37766
37767
37768
37769
37770
37771
37772
37773
37774
37775
37776
37777
37778
37779
37780
37781
37782
37783
37784
37785
37786
37787
37788
37789
37790
37791
37792
37793
37794
37795
37796
37797
37798
37799
37800
37801
37802
37803
37804
37805
37806
37807
37808
37809
37810
37811
37812
37813
37814
37815
37816
37817
37818
37819
37820
37821
37822
37823
37824
37825
37826
37827
37828
37829
37830
37831
37832
37833
37834
37835
37836
37837
37838
37839
37840
37841
37842
37843
37844
37845
37846
37847
37848
37849
37850
37851
37852
37853
37854
37855
37856
37857
37858
37859
37860
37861
37862
37863
37864
37865
37866
37867
37868
37869
37870
37871
37872
37873
37874
37875
37876
37877
37878
37879
37880
37881
37882
37883
37884
37885
37886
37887
37888
37889
37890
37891
37892
37893
37894
37895
37896
37897
37898
37899
37900
37901
37902
37903
37904
37905
37906
37907
37908
37909
37910
37911
37912
37913
37914
37915
37916
37917
37918
37919
37920
37921
37922
37923
37924
37925
37926
37927
37928
37929
37930
37931
37932
37933
37934
37935
37936
37937
37938
37939
37940
37941
37942
37943
37944
37945
37946
37947
37948
37949
37950
37951
37952
37953
37954
37955
37956
37957
37958
37959
37960
37961
37962
37963
37964
37965
37966
37967
37968
37969
37970
37971
37972
37973
37974
37975
37976
37977
37978
37979
37980
37981
37982
37983
37984
37985
37986
37987
37988
37989
37990
37991
37992
37993
37994
37995
37996
37997
37998
37999
38000
38001
38002
38003
38004
38005
38006
38007
38008
38009
38010
38011
38012
38013
38014
38015
38016
38017
38018
38019
38020
38021
38022
38023
38024
38025
38026
38027
38028
38029
38030
38031
38032
38033
38034
38035
38036
38037
38038
38039
38040
38041
38042
38043
38044
38045
38046
38047
38048
38049
38050
38051
38052
38053
38054
38055
38056
38057
38058
38059
38060
38061
38062
38063
38064
38065
38066
38067
38068
38069
38070
38071
38072
38073
38074
38075
38076
38077
38078
38079
38080
38081
38082
38083
38084
38085
38086
38087
38088
38089
38090
38091
38092
38093
38094
38095
38096
38097
38098
38099
38100
38101
38102
38103
38104
38105
38106
38107
38108
38109
38110
38111
38112
38113
38114
38115
38116
38117
38118
38119
38120
38121
38122
38123
38124
38125
38126
38127
38128
38129
38130
38131
38132
38133
38134
38135
38136
38137
38138
38139
38140
38141
38142
38143
38144
38145
38146
38147
38148
38149
38150
38151
38152
38153
38154
38155
38156
38157
38158
38159
38160
38161
38162
38163
38164
38165
38166
38167
38168
38169
38170
38171
38172
38173
38174
38175
38176
38177
38178
38179
38180
38181
38182
38183
38184
38185
38186
38187
38188
38189
38190
38191
38192
38193
38194
38195
38196
38197
38198
38199
38200
38201
38202
38203
38204
38205
38206
38207
38208
38209
38210
38211
38212
38213
38214
38215
38216
38217
38218
38219
38220
38221
38222
38223
38224
38225
38226
38227
38228
38229
38230
38231
38232
38233
38234
38235
38236
38237
38238
38239
38240
38241
38242
38243
38244
38245
38246
38247
38248
38249
38250
38251
38252
38253
38254
38255
38256
38257
38258
38259
38260
38261
38262
38263
38264
38265
38266
38267
38268
38269
38270
38271
38272
38273
38274
38275
38276
38277
38278
38279
38280
38281
38282
38283
38284
38285
38286
38287
38288
38289
38290
38291
38292
38293
38294
38295
38296
38297
38298
38299
38300
38301
38302
38303
38304
38305
38306
38307
38308
38309
38310
38311
38312
38313
38314
38315
38316
38317
38318
38319
38320
38321
38322
38323
38324
38325
38326
38327
38328
38329
38330
38331
38332
38333
38334
38335
38336
38337
38338
38339
38340
38341
38342
38343
38344
38345
38346
38347
38348
38349
38350
38351
38352
38353
38354
38355
38356
38357
38358
38359
38360
38361
38362
38363
38364
38365
38366
38367
38368
38369
38370
38371
38372
38373
38374
38375
38376
38377
38378
38379
38380
38381
38382
38383
38384
38385
38386
38387
38388
38389
38390
38391
38392
38393
38394
38395
38396
38397
38398
38399
38400
38401
38402
38403
38404
38405
38406
38407
38408
38409
38410
38411
38412
38413
38414
38415
38416
38417
38418
38419
38420
38421
38422
38423
38424
38425
38426
38427
38428
38429
38430
38431
38432
38433
38434
38435
38436
38437
38438
38439
38440
38441
38442
38443
38444
38445
38446
38447
38448
38449
38450
38451
38452
38453
38454
38455
38456
38457
38458
38459
38460
38461
38462
38463
38464
38465
38466
38467
38468
38469
38470
38471
38472
38473
38474
38475
38476
38477
38478
38479
38480
38481
38482
38483
38484
38485
38486
38487
38488
38489
38490
38491
38492
38493
38494
38495
38496
38497
38498
38499
38500
38501
38502
38503
38504
38505
38506
38507
38508
38509
38510
38511
38512
38513
38514
38515
38516
38517
38518
38519
38520
38521
38522
38523
38524
38525
38526
38527
38528
38529
38530
38531
38532
38533
38534
38535
38536
38537
38538
38539
38540
38541
38542
38543
38544
38545
38546
38547
38548
38549
38550
38551
38552
38553
38554
38555
38556
38557
38558
38559
38560
38561
38562
38563
38564
38565
38566
38567
38568
38569
38570
38571
38572
38573
38574
38575
38576
38577
38578
38579
38580
38581
38582
38583
38584
38585
38586
38587
38588
38589
38590
38591
38592
38593
38594
38595
38596
38597
38598
38599
38600
38601
38602
38603
38604
38605
38606
38607
38608
38609
38610
38611
38612
38613
38614
38615
38616
38617
38618
38619
38620
38621
38622
38623
38624
38625
38626
38627
38628
38629
38630
38631
38632
38633
38634
38635
38636
38637
38638
38639
38640
38641
38642
38643
38644
38645
38646
38647
38648
38649
38650
38651
38652
38653
38654
38655
38656
38657
38658
38659
38660
38661
38662
38663
38664
38665
38666
38667
38668
38669
38670
38671
38672
38673
38674
38675
38676
38677
38678
38679
38680
38681
38682
38683
38684
38685
38686
38687
38688
38689
38690
38691
38692
38693
38694
38695
38696
38697
38698
38699
38700
38701
38702
38703
38704
38705
38706
38707
38708
38709
38710
38711
38712
38713
38714
38715
38716
38717
38718
38719
38720
38721
38722
38723
38724
38725
38726
38727
38728
38729
38730
38731
38732
38733
38734
38735
38736
38737
38738
38739
38740
38741
38742
38743
38744
38745
38746
38747
38748
38749
38750
38751
38752
38753
38754
38755
38756
38757
38758
38759
38760
38761
38762
38763
38764
38765
38766
38767
38768
38769
38770
38771
38772
38773
38774
38775
38776
38777
38778
38779
38780
38781
38782
38783
38784
38785
38786
38787
38788
38789
38790
38791
38792
38793
38794
38795
38796
38797
38798
38799
38800
38801
38802
38803
38804
38805
38806
38807
38808
38809
38810
38811
38812
38813
38814
38815
38816
38817
38818
38819
38820
38821
38822
38823
38824
38825
38826
38827
38828
38829
38830
38831
38832
38833
38834
38835
38836
38837
38838
38839
38840
38841
38842
38843
38844
38845
38846
38847
38848
38849
38850
38851
38852
38853
38854
38855
38856
38857
38858
38859
38860
38861
38862
38863
38864
38865
38866
38867
38868
38869
38870
38871
38872
38873
38874
38875
38876
38877
38878
38879
38880
38881
38882
38883
38884
38885
38886
38887
38888
38889
38890
38891
38892
38893
38894
38895
38896
38897
38898
38899
38900
38901
38902
38903
38904
38905
38906
38907
38908
38909
38910
38911
38912
38913
38914
38915
38916
38917
38918
38919
38920
38921
38922
38923
38924
38925
38926
38927
38928
38929
38930
38931
38932
38933
38934
38935
38936
38937
38938
38939
38940
38941
38942
38943
38944
38945
38946
38947
38948
38949
38950
38951
38952
38953
38954
38955
38956
38957
38958
38959
38960
38961
38962
38963
38964
38965
38966
38967
38968
38969
38970
38971
38972
38973
38974
38975
38976
38977
38978
38979
38980
38981
38982
38983
38984
38985
38986
38987
38988
38989
38990
38991
38992
38993
38994
38995
38996
38997
38998
38999
39000
39001
39002
39003
39004
39005
39006
39007
39008
39009
39010
39011
39012
39013
39014
39015
39016
39017
39018
39019
39020
39021
39022
39023
39024
39025
39026
39027
39028
39029
39030
39031
39032
39033
39034
39035
39036
39037
39038
39039
39040
39041
39042
39043
39044
39045
39046
39047
39048
39049
39050
39051
39052
39053
39054
39055
39056
39057
39058
39059
39060
39061
39062
39063
39064
39065
39066
39067
39068
39069
39070
39071
39072
39073
39074
39075
39076
39077
39078
39079
39080
39081
39082
39083
39084
39085
39086
39087
39088
39089
39090
39091
39092
39093
39094
39095
39096
39097
39098
39099
39100
39101
39102
39103
39104
39105
39106
39107
39108
39109
39110
39111
39112
39113
39114
39115
39116
39117
39118
39119
39120
39121
39122
39123
39124
39125
39126
39127
39128
39129
39130
39131
39132
39133
39134
39135
39136
39137
39138
39139
39140
39141
39142
39143
39144
39145
39146
39147
39148
39149
39150
39151
39152
39153
39154
39155
39156
39157
39158
39159
39160
39161
39162
39163
39164
39165
39166
39167
39168
39169
39170
39171
39172
39173
39174
39175
39176
39177
39178
39179
39180
39181
39182
39183
39184
39185
39186
39187
39188
39189
39190
39191
39192
39193
39194
39195
39196
39197
39198
39199
39200
39201
39202
39203
39204
39205
39206
39207
39208
39209
39210
39211
39212
39213
39214
39215
39216
39217
39218
39219
39220
39221
39222
39223
39224
39225
39226
39227
39228
39229
39230
39231
39232
39233
39234
39235
39236
39237
39238
39239
39240
39241
39242
39243
39244
39245
39246
39247
39248
39249
39250
39251
39252
39253
39254
39255
39256
39257
39258
39259
39260
39261
39262
39263
39264
39265
39266
39267
39268
39269
39270
39271
39272
39273
39274
39275
39276
39277
39278
39279
39280
39281
39282
39283
39284
39285
39286
39287
39288
39289
39290
39291
39292
39293
39294
39295
39296
39297
39298
39299
39300
39301
39302
39303
39304
39305
39306
39307
39308
39309
39310
39311
39312
39313
39314
39315
39316
39317
39318
39319
39320
39321
39322
39323
39324
39325
39326
39327
39328
39329
39330
39331
39332
39333
39334
39335
39336
39337
39338
39339
39340
39341
39342
39343
39344
39345
39346
39347
39348
39349
39350
39351
39352
39353
39354
39355
39356
39357
39358
39359
39360
39361
39362
39363
39364
39365
39366
39367
39368
39369
39370
39371
39372
39373
39374
39375
39376
39377
39378
39379
39380
39381
39382
39383
39384
39385
39386
39387
39388
39389
39390
39391
39392
39393
39394
39395
39396
39397
39398
39399
39400
39401
39402
39403
39404
39405
39406
39407
39408
39409
39410
39411
39412
39413
39414
39415
39416
39417
39418
39419
39420
39421
39422
39423
39424
39425
39426
39427
39428
39429
39430
39431
39432
39433
39434
39435
39436
39437
39438
39439
39440
39441
39442
39443
39444
39445
39446
39447
39448
39449
39450
39451
39452
39453
39454
39455
39456
39457
39458
39459
39460
39461
39462
39463
39464
39465
39466
39467
39468
39469
39470
39471
39472
39473
39474
39475
39476
39477
39478
39479
39480
39481
39482
39483
39484
39485
39486
39487
39488
39489
39490
39491
39492
39493
39494
39495
39496
39497
39498
39499
39500
39501
39502
39503
39504
39505
39506
39507
39508
39509
39510
39511
39512
39513
39514
39515
39516
39517
39518
39519
39520
39521
39522
39523
39524
39525
39526
39527
39528
39529
39530
39531
39532
39533
39534
39535
39536
39537
39538
39539
39540
39541
39542
39543
39544
39545
39546
39547
39548
39549
39550
39551
39552
39553
39554
39555
39556
39557
39558
39559
39560
39561
39562
39563
39564
39565
39566
39567
39568
39569
39570
39571
39572
39573
39574
39575
39576
39577
39578
39579
39580
39581
39582
39583
39584
39585
39586
39587
39588
39589
39590
39591
39592
39593
39594
39595
39596
39597
39598
39599
39600
39601
39602
39603
39604
39605
39606
39607
39608
39609
39610
39611
39612
39613
39614
39615
39616
39617
39618
39619
39620
39621
39622
39623
39624
39625
39626
39627
39628
39629
39630
39631
39632
39633
39634
39635
39636
39637
39638
39639
39640
39641
39642
39643
39644
39645
39646
39647
39648
39649
39650
39651
39652
39653
39654
39655
39656
39657
39658
39659
39660
39661
39662
39663
39664
39665
39666
39667
39668
39669
39670
39671
39672
39673
39674
39675
39676
39677
39678
39679
39680
39681
39682
39683
39684
39685
39686
39687
39688
39689
39690
39691
39692
39693
39694
39695
39696
39697
39698
39699
39700
39701
39702
39703
39704
39705
39706
39707
39708
39709
39710
39711
39712
39713
39714
39715
39716
39717
39718
39719
39720
39721
39722
39723
39724
39725
39726
39727
39728
39729
39730
39731
39732
39733
39734
39735
39736
39737
39738
39739
39740
39741
39742
39743
39744
39745
39746
39747
39748
39749
39750
39751
39752
39753
39754
39755
39756
39757
39758
39759
39760
39761
39762
39763
39764
39765
39766
39767
39768
39769
39770
39771
39772
39773
39774
39775
39776
39777
39778
39779
39780
39781
39782
39783
39784
39785
39786
39787
39788
39789
39790
39791
39792
39793
39794
39795
39796
39797
39798
39799
39800
39801
39802
39803
39804
39805
39806
39807
39808
39809
39810
39811
39812
39813
39814
39815
39816
39817
39818
39819
39820
39821
39822
39823
39824
39825
39826
39827
39828
39829
39830
39831
39832
39833
39834
39835
39836
39837
39838
39839
39840
39841
39842
39843
39844
39845
39846
39847
39848
39849
39850
39851
39852
39853
39854
39855
39856
39857
39858
39859
39860
39861
39862
39863
39864
39865
39866
39867
39868
39869
39870
39871
39872
39873
39874
39875
39876
39877
39878
39879
39880
39881
39882
39883
39884
39885
39886
39887
39888
39889
39890
39891
39892
39893
39894
39895
39896
39897
39898
39899
39900
39901
39902
39903
39904
39905
39906
39907
39908
39909
39910
39911
39912
39913
39914
39915
39916
39917
39918
39919
39920
39921
39922
39923
39924
39925
39926
39927
39928
39929
39930
39931
39932
39933
39934
39935
39936
39937
39938
39939
39940
39941
39942
39943
39944
39945
39946
39947
39948
39949
39950
39951
39952
39953
39954
39955
39956
39957
39958
39959
39960
39961
39962
39963
39964
39965
39966
39967
39968
39969
39970
39971
39972
39973
39974
39975
39976
39977
39978
39979
39980
39981
39982
39983
39984
39985
39986
39987
39988
39989
39990
39991
39992
39993
39994
39995
39996
39997
39998
39999
40000
40001
40002
40003
40004
40005
40006
40007
40008
40009
40010
40011
40012
40013
40014
40015
40016
40017
40018
40019
40020
40021
40022
40023
40024
40025
40026
40027
40028
40029
40030
40031
40032
40033
40034
40035
40036
40037
40038
40039
40040
40041
40042
40043
40044
40045
40046
40047
40048
40049
40050
40051
40052
40053
40054
40055
40056
40057
40058
40059
40060
40061
40062
40063
40064
40065
40066
40067
40068
40069
40070
40071
40072
40073
40074
40075
40076
40077
40078
40079
40080
40081
40082
40083
40084
40085
40086
40087
40088
40089
40090
40091
40092
40093
40094
40095
40096
40097
40098
40099
40100
40101
40102
40103
40104
40105
40106
40107
40108
40109
40110
40111
40112
40113
40114
40115
40116
40117
40118
40119
40120
40121
40122
40123
40124
40125
40126
40127
40128
40129
40130
40131
40132
40133
40134
40135
40136
40137
40138
40139
40140
40141
40142
40143
40144
40145
40146
40147
40148
40149
40150
40151
40152
40153
40154
40155
40156
40157
40158
40159
40160
40161
40162
40163
40164
40165
40166
40167
40168
40169
40170
40171
40172
40173
40174
40175
40176
40177
40178
40179
40180
40181
40182
40183
40184
40185
40186
40187
40188
40189
40190
40191
40192
40193
40194
40195
40196
40197
40198
40199
40200
40201
40202
40203
40204
40205
40206
40207
40208
40209
40210
40211
40212
40213
40214
40215
40216
40217
40218
40219
40220
40221
40222
40223
40224
40225
40226
40227
40228
40229
40230
40231
40232
40233
40234
40235
40236
40237
40238
40239
40240
40241
40242
40243
40244
40245
40246
40247
40248
40249
40250
40251
40252
40253
40254
40255
40256
40257
40258
40259
40260
40261
40262
40263
40264
40265
40266
40267
40268
40269
40270
40271
40272
40273
40274
40275
40276
40277
40278
40279
40280
40281
40282
40283
40284
40285
40286
40287
40288
40289
40290
40291
40292
40293
40294
40295
40296
40297
40298
40299
40300
40301
40302
40303
40304
40305
40306
40307
40308
40309
40310
40311
40312
40313
40314
40315
40316
40317
40318
40319
40320
40321
40322
40323
40324
40325
40326
40327
40328
40329
40330
40331
40332
40333
40334
40335
40336
40337
40338
40339
40340
40341
40342
40343
40344
40345
40346
40347
40348
40349
40350
40351
40352
40353
40354
40355
40356
40357
40358
40359
40360
40361
40362
40363
40364
40365
40366
40367
40368
40369
40370
40371
40372
40373
40374
40375
40376
40377
40378
40379
40380
40381
40382
40383
40384
40385
40386
40387
40388
40389
40390
40391
40392
40393
40394
40395
40396
40397
40398
40399
40400
40401
40402
40403
40404
40405
40406
40407
40408
40409
40410
40411
40412
40413
40414
40415
40416
40417
40418
40419
40420
40421
40422
40423
40424
40425
40426
40427
40428
40429
40430
40431
40432
40433
40434
40435
40436
40437
40438
40439
40440
40441
40442
40443
40444
40445
40446
40447
40448
40449
40450
40451
40452
40453
40454
40455
40456
40457
40458
40459
40460
40461
40462
40463
40464
40465
40466
40467
40468
40469
40470
40471
40472
40473
40474
40475
40476
40477
40478
40479
40480
40481
40482
40483
40484
40485
40486
40487
40488
40489
40490
40491
40492
40493
40494
40495
40496
40497
40498
40499
40500
40501
40502
40503
40504
40505
40506
40507
40508
40509
40510
40511
40512
40513
40514
40515
40516
40517
40518
40519
40520
40521
40522
40523
40524
40525
40526
40527
40528
40529
40530
40531
40532
40533
40534
40535
40536
40537
40538
40539
40540
40541
40542
40543
40544
40545
40546
40547
40548
40549
40550
40551
40552
40553
40554
40555
40556
40557
40558
40559
40560
40561
40562
40563
40564
40565
40566
40567
40568
40569
40570
40571
40572
40573
40574
40575
40576
40577
40578
40579
40580
40581
40582
40583
40584
40585
40586
40587
40588
40589
40590
40591
40592
40593
40594
40595
40596
40597
40598
40599
40600
40601
40602
40603
40604
40605
40606
40607
40608
40609
40610
40611
40612
40613
40614
40615
40616
40617
40618
40619
40620
40621
40622
40623
40624
40625
40626
40627
40628
40629
40630
40631
40632
40633
40634
40635
40636
40637
40638
40639
40640
40641
40642
40643
40644
40645
40646
40647
40648
40649
40650
40651
40652
40653
40654
40655
40656
40657
40658
40659
40660
40661
40662
40663
40664
40665
40666
40667
40668
40669
40670
40671
40672
40673
40674
40675
40676
40677
40678
40679
40680
40681
40682
40683
40684
40685
40686
40687
40688
40689
40690
40691
40692
40693
40694
40695
40696
40697
40698
40699
40700
40701
40702
40703
40704
40705
40706
40707
40708
40709
40710
40711
40712
40713
40714
40715
40716
40717
40718
40719
40720
40721
40722
40723
40724
40725
40726
40727
40728
40729
40730
40731
40732
40733
40734
40735
40736
40737
40738
40739
40740
40741
40742
40743
40744
40745
40746
40747
40748
40749
40750
40751
40752
40753
40754
40755
40756
40757
40758
40759
40760
40761
40762
40763
40764
40765
40766
40767
40768
40769
40770
40771
40772
40773
40774
40775
40776
40777
40778
40779
40780
40781
40782
40783
40784
40785
40786
40787
40788
40789
40790
40791
40792
40793
40794
40795
40796
40797
40798
40799
40800
40801
40802
40803
40804
40805
40806
40807
40808
40809
40810
40811
40812
40813
40814
40815
40816
40817
40818
40819
40820
40821
40822
40823
40824
40825
40826
40827
40828
40829
40830
40831
40832
40833
40834
40835
40836
40837
40838
40839
40840
40841
40842
40843
40844
40845
40846
40847
40848
40849
40850
40851
40852
40853
40854
40855
40856
40857
40858
40859
40860
40861
40862
40863
40864
40865
40866
40867
40868
40869
40870
40871
40872
40873
40874
40875
40876
40877
40878
40879
40880
40881
40882
40883
40884
40885
40886
40887
40888
40889
40890
40891
40892
40893
40894
40895
40896
40897
40898
40899
40900
40901
40902
40903
40904
40905
40906
40907
40908
40909
40910
40911
40912
40913
40914
40915
40916
40917
40918
40919
40920
40921
40922
40923
40924
40925
40926
40927
40928
40929
40930
40931
40932
40933
40934
40935
40936
40937
40938
40939
40940
40941
40942
40943
40944
40945
40946
40947
40948
40949
40950
40951
40952
40953
40954
40955
40956
40957
40958
40959
40960
40961
40962
40963
40964
40965
40966
40967
40968
40969
40970
40971
40972
40973
40974
40975
40976
40977
40978
40979
40980
40981
40982
40983
40984
40985
40986
40987
40988
40989
40990
40991
40992
40993
40994
40995
40996
40997
40998
40999
41000
41001
41002
41003
41004
41005
41006
41007
41008
41009
41010
41011
41012
41013
41014
41015
41016
41017
41018
41019
41020
41021
41022
41023
41024
41025
41026
41027
41028
41029
41030
41031
41032
41033
41034
41035
41036
41037
41038
41039
41040
41041
41042
41043
41044
41045
41046
41047
41048
41049
41050
41051
41052
41053
41054
41055
41056
41057
41058
41059
41060
41061
41062
41063
41064
41065
41066
41067
41068
41069
41070
41071
41072
41073
41074
41075
41076
41077
41078
41079
41080
41081
41082
41083
41084
41085
41086
41087
41088
41089
41090
41091
41092
41093
41094
41095
41096
41097
41098
41099
41100
41101
41102
41103
41104
41105
41106
41107
41108
41109
41110
41111
41112
41113
41114
41115
41116
41117
41118
41119
41120
41121
41122
41123
41124
41125
41126
41127
41128
41129
41130
41131
41132
41133
41134
41135
41136
41137
41138
41139
41140
41141
41142
41143
41144
41145
41146
41147
41148
41149
41150
41151
41152
41153
41154
41155
41156
41157
41158
41159
41160
41161
41162
41163
41164
41165
41166
41167
41168
41169
41170
41171
41172
41173
41174
41175
41176
41177
41178
41179
41180
41181
41182
41183
41184
41185
41186
41187
41188
41189
41190
41191
41192
41193
41194
41195
41196
41197
41198
41199
41200
41201
41202
41203
41204
41205
41206
41207
41208
41209
41210
41211
41212
41213
41214
41215
41216
41217
41218
41219
41220
41221
41222
41223
41224
41225
41226
41227
41228
41229
41230
41231
41232
41233
41234
41235
41236
41237
41238
41239
41240
41241
41242
41243
41244
41245
41246
41247
41248
41249
41250
41251
41252
41253
41254
41255
41256
41257
41258
41259
41260
41261
41262
41263
41264
41265
41266
41267
41268
41269
41270
41271
41272
41273
41274
41275
41276
41277
41278
41279
41280
41281
41282
41283
41284
41285
41286
41287
41288
41289
41290
41291
41292
41293
41294
41295
41296
41297
41298
41299
41300
41301
41302
41303
41304
41305
41306
41307
41308
41309
41310
41311
41312
41313
41314
41315
41316
41317
41318
41319
41320
41321
41322
41323
41324
41325
41326
41327
41328
41329
41330
41331
41332
41333
41334
41335
41336
41337
41338
41339
41340
41341
41342
41343
41344
41345
41346
41347
41348
41349
41350
41351
41352
41353
41354
41355
41356
41357
41358
41359
41360
41361
41362
41363
41364
41365
41366
41367
41368
41369
41370
41371
41372
41373
41374
41375
41376
41377
41378
41379
41380
41381
41382
41383
41384
41385
41386
41387
41388
41389
41390
41391
41392
41393
41394
41395
41396
41397
41398
41399
41400
41401
41402
41403
41404
41405
41406
41407
41408
41409
41410
41411
41412
41413
41414
41415
41416
41417
41418
41419
41420
41421
41422
41423
41424
41425
41426
41427
41428
41429
41430
41431
41432
41433
41434
41435
41436
41437
41438
41439
41440
41441
41442
41443
41444
41445
41446
41447
41448
41449
41450
41451
41452
41453
41454
41455
41456
41457
41458
41459
41460
41461
41462
41463
41464
41465
41466
41467
41468
41469
41470
41471
41472
41473
41474
41475
41476
41477
41478
41479
41480
41481
41482
41483
41484
41485
41486
41487
41488
41489
41490
41491
41492
41493
41494
41495
41496
41497
41498
41499
41500
41501
41502
41503
41504
41505
41506
41507
41508
41509
41510
41511
41512
41513
41514
41515
41516
41517
41518
41519
41520
41521
41522
41523
41524
41525
41526
41527
41528
41529
41530
41531
41532
41533
41534
41535
41536
41537
41538
41539
41540
41541
41542
41543
41544
41545
41546
41547
41548
41549
41550
41551
41552
41553
41554
41555
41556
41557
41558
41559
41560
41561
41562
41563
41564
41565
41566
41567
41568
41569
41570
41571
41572
41573
41574
41575
41576
41577
41578
41579
41580
41581
41582
41583
41584
41585
41586
41587
41588
41589
41590
41591
41592
41593
41594
41595
41596
41597
41598
41599
41600
41601
41602
41603
41604
41605
41606
41607
41608
41609
41610
41611
41612
41613
41614
41615
41616
41617
41618
41619
41620
41621
41622
41623
41624
41625
41626
41627
41628
41629
41630
41631
41632
41633
41634
41635
41636
41637
41638
41639
41640
41641
41642
41643
41644
41645
41646
41647
41648
41649
41650
41651
41652
41653
41654
41655
41656
41657
41658
41659
41660
41661
41662
41663
41664
41665
41666
41667
41668
41669
41670
41671
41672
41673
41674
41675
41676
41677
41678
41679
41680
41681
41682
41683
41684
41685
41686
41687
41688
41689
41690
41691
41692
41693
41694
41695
41696
41697
41698
41699
41700
41701
41702
41703
41704
41705
41706
41707
41708
41709
41710
41711
41712
41713
41714
41715
41716
41717
41718
41719
41720
41721
41722
41723
41724
41725
41726
41727
41728
41729
41730
41731
41732
41733
41734
41735
41736
41737
41738
41739
41740
41741
41742
41743
41744
41745
41746
41747
41748
41749
41750
41751
41752
41753
41754
41755
41756
41757
41758
41759
41760
41761
41762
41763
41764
41765
41766
41767
41768
41769
41770
41771
41772
41773
41774
41775
41776
41777
41778
41779
41780
41781
41782
41783
41784
41785
41786
41787
41788
41789
41790
41791
41792
41793
41794
41795
41796
41797
41798
41799
41800
41801
41802
41803
41804
41805
41806
41807
41808
41809
41810
41811
41812
41813
41814
41815
41816
41817
41818
41819
41820
41821
41822
41823
41824
41825
41826
41827
41828
41829
41830
41831
41832
41833
41834
41835
41836
41837
41838
41839
41840
41841
41842
41843
41844
41845
41846
41847
41848
41849
41850
41851
41852
41853
41854
41855
41856
41857
41858
41859
41860
41861
41862
41863
41864
41865
41866
41867
41868
41869
41870
41871
41872
41873
41874
41875
41876
41877
41878
41879
41880
41881
41882
41883
41884
41885
41886
41887
41888
41889
41890
41891
41892
41893
41894
41895
41896
41897
41898
41899
41900
41901
41902
41903
41904
41905
41906
41907
41908
41909
41910
41911
41912
41913
41914
41915
41916
41917
41918
41919
41920
41921
41922
41923
41924
41925
41926
41927
41928
41929
41930
41931
41932
41933
41934
41935
41936
41937
41938
41939
41940
41941
41942
41943
41944
41945
41946
41947
41948
41949
41950
41951
41952
41953
41954
41955
41956
41957
41958
41959
41960
41961
41962
41963
41964
41965
41966
41967
41968
41969
41970
41971
41972
41973
41974
41975
41976
41977
41978
41979
41980
41981
41982
41983
41984
41985
41986
41987
41988
41989
41990
41991
41992
41993
41994
41995
41996
41997
41998
41999
42000
42001
42002
42003
42004
42005
42006
42007
42008
42009
42010
42011
42012
42013
42014
42015
42016
42017
42018
42019
42020
42021
42022
42023
42024
42025
42026
42027
42028
42029
42030
42031
42032
42033
42034
42035
42036
42037
42038
42039
42040
42041
42042
42043
42044
42045
42046
42047
42048
42049
42050
42051
42052
42053
42054
42055
42056
42057
42058
42059
42060
42061
42062
42063
42064
42065
42066
42067
42068
42069
42070
42071
42072
42073
42074
42075
42076
42077
42078
42079
42080
42081
42082
42083
42084
42085
42086
42087
42088
42089
42090
42091
42092
42093
42094
42095
42096
42097
42098
42099
42100
42101
42102
42103
42104
42105
42106
42107
42108
42109
42110
42111
42112
42113
42114
42115
42116
42117
42118
42119
42120
42121
42122
42123
42124
42125
42126
42127
42128
42129
42130
42131
42132
42133
42134
42135
42136
42137
42138
42139
42140
42141
42142
42143
42144
42145
42146
42147
42148
42149
42150
42151
42152
42153
42154
42155
42156
42157
42158
42159
42160
42161
42162
42163
42164
42165
42166
42167
42168
42169
42170
42171
42172
42173
42174
42175
42176
42177
42178
42179
42180
42181
42182
42183
42184
42185
42186
42187
42188
42189
42190
42191
42192
42193
42194
42195
42196
42197
42198
42199
42200
42201
42202
42203
42204
42205
42206
42207
42208
42209
42210
42211
42212
42213
42214
42215
42216
42217
42218
42219
42220
42221
42222
42223
42224
42225
42226
42227
42228
42229
42230
42231
42232
42233
42234
42235
42236
42237
42238
42239
42240
42241
42242
42243
42244
42245
42246
42247
42248
42249
42250
42251
42252
42253
42254
42255
42256
42257
42258
42259
42260
42261
42262
42263
42264
42265
42266
42267
42268
42269
42270
42271
42272
42273
42274
42275
42276
42277
42278
42279
42280
42281
42282
42283
42284
42285
42286
42287
42288
42289
42290
42291
42292
42293
42294
42295
42296
42297
42298
42299
42300
42301
42302
42303
42304
42305
42306
42307
42308
42309
42310
42311
42312
42313
42314
42315
42316
42317
42318
42319
42320
42321
42322
42323
42324
42325
42326
42327
42328
42329
42330
42331
42332
42333
42334
42335
42336
42337
42338
42339
42340
42341
42342
42343
42344
42345
42346
42347
42348
42349
42350
42351
42352
42353
42354
42355
42356
42357
42358
42359
42360
42361
42362
42363
42364
42365
42366
42367
42368
42369
42370
42371
42372
42373
42374
42375
42376
42377
42378
42379
42380
42381
42382
42383
42384
42385
42386
42387
42388
42389
42390
42391
42392
42393
42394
42395
42396
42397
42398
42399
42400
42401
42402
42403
42404
42405
42406
42407
42408
42409
42410
42411
42412
42413
42414
42415
42416
42417
42418
42419
42420
42421
42422
42423
42424
42425
42426
42427
42428
42429
42430
42431
42432
42433
42434
42435
42436
42437
42438
42439
42440
42441
42442
42443
42444
42445
42446
42447
42448
42449
42450
42451
42452
42453
42454
42455
42456
42457
42458
42459
42460
42461
42462
42463
42464
42465
42466
42467
42468
42469
42470
42471
42472
42473
42474
42475
42476
42477
42478
42479
42480
42481
42482
42483
42484
42485
42486
42487
42488
42489
42490
42491
42492
42493
42494
42495
42496
42497
42498
42499
42500
42501
42502
42503
42504
42505
42506
42507
42508
42509
42510
42511
42512
42513
42514
42515
42516
42517
42518
42519
42520
42521
42522
42523
42524
42525
42526
42527
42528
42529
42530
42531
42532
42533
42534
42535
42536
42537
42538
42539
42540
42541
42542
42543
42544
42545
42546
42547
42548
42549
42550
42551
42552
42553
42554
42555
42556
42557
42558
42559
42560
42561
42562
42563
42564
42565
42566
42567
42568
42569
42570
42571
42572
42573
42574
42575
42576
42577
42578
42579
42580
42581
42582
42583
42584
42585
42586
42587
42588
42589
42590
42591
42592
42593
42594
42595
42596
42597
42598
42599
42600
42601
42602
42603
42604
42605
42606
42607
42608
42609
42610
42611
42612
42613
42614
42615
42616
42617
42618
42619
42620
42621
42622
42623
42624
42625
42626
42627
42628
42629
42630
42631
42632
42633
42634
42635
42636
42637
42638
42639
42640
42641
42642
42643
42644
42645
42646
42647
42648
42649
42650
42651
42652
42653
42654
42655
42656
42657
42658
42659
42660
42661
42662
42663
42664
42665
42666
42667
42668
42669
42670
42671
42672
42673
42674
42675
42676
42677
42678
42679
42680
42681
42682
42683
42684
42685
42686
42687
42688
42689
42690
42691
42692
42693
42694
42695
42696
42697
42698
42699
42700
42701
42702
42703
42704
42705
42706
42707
42708
42709
42710
42711
42712
42713
42714
42715
42716
42717
42718
42719
42720
42721
42722
42723
42724
42725
42726
42727
42728
42729
42730
42731
42732
42733
42734
42735
42736
42737
42738
42739
42740
42741
42742
42743
42744
42745
42746
42747
42748
42749
42750
42751
42752
42753
42754
42755
42756
42757
42758
42759
42760
42761
42762
42763
42764
42765
42766
42767
42768
42769
42770
42771
42772
42773
42774
42775
42776
42777
42778
42779
42780
42781
42782
42783
42784
42785
42786
42787
42788
42789
42790
42791
42792
42793
42794
42795
42796
42797
42798
42799
42800
42801
42802
42803
42804
42805
42806
42807
42808
42809
42810
42811
42812
42813
42814
42815
42816
42817
42818
42819
42820
42821
42822
42823
42824
42825
42826
42827
42828
42829
42830
42831
42832
42833
42834
42835
42836
42837
42838
42839
42840
42841
42842
42843
42844
42845
42846
42847
42848
42849
42850
42851
42852
42853
42854
42855
42856
42857
42858
42859
42860
42861
42862
42863
42864
42865
42866
42867
42868
42869
42870
42871
42872
42873
42874
42875
42876
42877
42878
42879
42880
42881
42882
42883
42884
42885
42886
42887
42888
42889
42890
42891
42892
42893
42894
42895
42896
42897
42898
42899
42900
42901
42902
42903
42904
42905
42906
42907
42908
42909
42910
42911
42912
42913
42914
42915
42916
42917
42918
42919
42920
42921
42922
42923
42924
42925
42926
42927
42928
42929
42930
42931
42932
42933
42934
42935
42936
42937
42938
42939
42940
42941
42942
42943
42944
42945
42946
42947
42948
42949
42950
42951
42952
42953
42954
42955
42956
42957
42958
42959
42960
42961
42962
42963
42964
42965
42966
42967
42968
42969
42970
42971
42972
42973
42974
42975
42976
42977
42978
42979
42980
42981
42982
42983
42984
42985
42986
42987
42988
42989
42990
42991
42992
42993
42994
42995
42996
42997
42998
42999
43000
43001
43002
43003
43004
43005
43006
43007
43008
43009
43010
43011
43012
43013
43014
43015
43016
43017
43018
43019
43020
43021
43022
43023
43024
43025
43026
43027
43028
43029
43030
43031
43032
43033
43034
43035
43036
43037
43038
43039
43040
43041
43042
43043
43044
43045
43046
43047
43048
43049
43050
43051
43052
43053
43054
43055
43056
43057
43058
43059
43060
43061
43062
43063
43064
43065
43066
43067
43068
43069
43070
43071
43072
43073
43074
43075
43076
43077
43078
43079
43080
43081
43082
43083
43084
43085
43086
43087
43088
43089
43090
43091
43092
43093
43094
43095
43096
43097
43098
43099
43100
43101
43102
43103
43104
43105
43106
43107
43108
43109
43110
43111
43112
43113
43114
43115
43116
43117
43118
43119
43120
43121
43122
43123
43124
43125
43126
43127
43128
43129
43130
43131
43132
43133
43134
43135
43136
43137
43138
43139
43140
43141
43142
43143
43144
43145
43146
43147
43148
43149
43150
43151
43152
43153
43154
43155
43156
43157
43158
43159
43160
43161
43162
43163
43164
43165
43166
43167
43168
43169
43170
43171
43172
43173
43174
43175
43176
43177
43178
43179
43180
43181
43182
43183
43184
43185
43186
43187
43188
43189
43190
43191
43192
43193
43194
43195
43196
43197
43198
43199
43200
43201
43202
43203
43204
43205
43206
43207
43208
43209
43210
43211
43212
43213
43214
43215
43216
43217
43218
43219
43220
43221
43222
43223
43224
43225
43226
43227
43228
43229
43230
43231
43232
43233
43234
43235
43236
43237
43238
43239
43240
43241
43242
43243
43244
43245
43246
43247
43248
43249
43250
43251
43252
43253
43254
43255
43256
43257
43258
43259
43260
43261
43262
43263
43264
43265
43266
43267
43268
43269
43270
43271
43272
43273
43274
43275
43276
43277
43278
43279
43280
43281
43282
43283
43284
43285
43286
43287
43288
43289
43290
43291
43292
43293
43294
43295
43296
43297
43298
43299
43300
43301
43302
43303
43304
43305
43306
43307
43308
43309
43310
43311
43312
43313
43314
43315
43316
43317
43318
43319
43320
43321
43322
43323
43324
43325
43326
43327
43328
43329
43330
43331
43332
43333
43334
43335
43336
43337
43338
43339
43340
43341
43342
43343
43344
43345
43346
43347
43348
43349
43350
43351
43352
43353
43354
43355
43356
43357
43358
43359
43360
43361
43362
43363
43364
43365
43366
43367
43368
43369
43370
43371
43372
43373
43374
43375
43376
43377
43378
43379
43380
43381
43382
43383
43384
43385
43386
43387
43388
43389
43390
43391
43392
43393
43394
43395
43396
43397
43398
43399
43400
43401
43402
43403
43404
43405
43406
43407
43408
43409
43410
43411
43412
43413
43414
43415
43416
43417
43418
43419
43420
43421
43422
43423
43424
43425
43426
43427
43428
43429
43430
43431
43432
43433
43434
43435
43436
43437
43438
43439
43440
43441
43442
43443
43444
43445
43446
43447
43448
43449
43450
43451
43452
43453
43454
43455
43456
43457
43458
43459
43460
43461
43462
43463
43464
43465
43466
43467
43468
43469
43470
43471
43472
43473
43474
43475
43476
43477
43478
43479
43480
43481
43482
43483
43484
43485
43486
43487
43488
43489
43490
43491
43492
43493
43494
43495
43496
43497
43498
43499
43500
43501
43502
43503
43504
43505
43506
43507
43508
43509
43510
43511
43512
43513
43514
43515
43516
43517
43518
43519
43520
43521
43522
43523
43524
43525
43526
43527
43528
43529
43530
43531
43532
43533
43534
43535
43536
43537
43538
43539
43540
43541
43542
43543
43544
43545
43546
43547
43548
43549
43550
43551
43552
43553
43554
43555
43556
43557
43558
43559
43560
43561
43562
43563
43564
43565
43566
43567
43568
43569
43570
43571
43572
43573
43574
43575
43576
43577
43578
43579
43580
43581
43582
43583
43584
43585
43586
43587
43588
43589
43590
43591
43592
43593
43594
43595
43596
43597
43598
43599
43600
43601
43602
43603
43604
43605
43606
43607
43608
43609
43610
43611
43612
43613
43614
43615
43616
43617
43618
43619
43620
43621
43622
43623
43624
43625
43626
43627
43628
43629
43630
43631
43632
43633
43634
43635
43636
43637
43638
43639
43640
43641
43642
43643
43644
43645
43646
43647
43648
43649
43650
43651
43652
43653
43654
43655
43656
43657
43658
43659
43660
43661
43662
43663
43664
43665
43666
43667
43668
43669
43670
43671
43672
43673
43674
43675
43676
43677
43678
43679
43680
43681
43682
43683
43684
43685
43686
43687
43688
43689
43690
43691
43692
43693
43694
43695
43696
43697
43698
43699
43700
43701
43702
43703
43704
43705
43706
43707
43708
43709
43710
43711
43712
43713
43714
43715
43716
43717
43718
43719
43720
43721
43722
43723
43724
43725
43726
43727
43728
43729
43730
43731
43732
43733
43734
43735
43736
43737
43738
43739
43740
43741
43742
43743
43744
43745
43746
43747
43748
43749
43750
43751
43752
43753
43754
43755
43756
43757
43758
43759
43760
43761
43762
43763
43764
43765
43766
43767
43768
43769
43770
43771
43772
43773
43774
43775
43776
43777
43778
43779
43780
43781
43782
43783
43784
43785
43786
43787
43788
43789
43790
43791
43792
43793
43794
43795
43796
43797
43798
43799
43800
43801
43802
43803
43804
43805
43806
43807
43808
43809
43810
43811
43812
43813
43814
43815
43816
43817
43818
43819
43820
43821
43822
43823
43824
43825
43826
43827
43828
43829
43830
43831
43832
43833
43834
43835
43836
43837
43838
43839
43840
43841
43842
43843
43844
43845
43846
43847
43848
43849
43850
43851
43852
43853
43854
43855
43856
43857
43858
43859
43860
43861
43862
43863
43864
43865
43866
43867
43868
43869
43870
43871
43872
43873
43874
43875
43876
43877
43878
43879
43880
43881
43882
43883
43884
43885
43886
43887
43888
43889
43890
43891
43892
43893
43894
43895
43896
43897
43898
43899
43900
43901
43902
43903
43904
43905
43906
43907
43908
43909
43910
43911
43912
43913
43914
43915
43916
43917
43918
43919
43920
43921
43922
43923
43924
43925
43926
43927
43928
43929
43930
43931
43932
43933
43934
43935
43936
43937
43938
43939
43940
43941
43942
43943
43944
43945
43946
43947
43948
43949
43950
43951
43952
43953
43954
43955
43956
43957
43958
43959
43960
43961
43962
43963
43964
43965
43966
43967
43968
43969
43970
43971
43972
43973
43974
43975
43976
43977
43978
43979
43980
43981
43982
43983
43984
43985
43986
43987
43988
43989
43990
43991
43992
43993
43994
43995
43996
43997
43998
43999
44000
44001
44002
44003
44004
44005
44006
44007
44008
44009
44010
44011
44012
44013
44014
44015
44016
44017
44018
44019
44020
44021
44022
44023
44024
44025
44026
44027
44028
44029
44030
44031
44032
44033
44034
44035
44036
44037
44038
44039
44040
44041
44042
44043
44044
44045
44046
44047
44048
44049
44050
44051
44052
44053
44054
44055
44056
44057
44058
44059
44060
44061
44062
44063
44064
44065
44066
44067
44068
44069
44070
44071
44072
44073
44074
44075
44076
44077
44078
44079
44080
44081
44082
44083
44084
44085
44086
44087
44088
44089
44090
44091
44092
44093
44094
44095
44096
44097
44098
44099
44100
44101
44102
44103
44104
44105
44106
44107
44108
44109
44110
44111
44112
44113
44114
44115
44116
44117
44118
44119
44120
44121
44122
44123
44124
44125
44126
44127
44128
44129
44130
44131
44132
44133
44134
44135
44136
44137
44138
44139
44140
44141
44142
44143
44144
44145
44146
44147
44148
44149
44150
44151
44152
44153
44154
44155
44156
44157
44158
44159
44160
44161
44162
44163
44164
44165
44166
44167
44168
44169
44170
44171
44172
44173
44174
44175
44176
44177
44178
44179
44180
44181
44182
44183
44184
44185
44186
44187
44188
44189
44190
44191
44192
44193
44194
44195
44196
44197
44198
44199
44200
44201
44202
44203
44204
44205
44206
44207
44208
44209
44210
44211
44212
44213
44214
44215
44216
44217
44218
44219
44220
44221
44222
44223
44224
44225
44226
44227
44228
44229
44230
44231
44232
44233
44234
44235
44236
44237
44238
44239
44240
44241
44242
44243
44244
44245
44246
44247
44248
44249
44250
44251
44252
44253
44254
44255
44256
44257
44258
44259
44260
44261
44262
44263
44264
44265
44266
44267
44268
44269
44270
44271
44272
44273
44274
44275
44276
44277
44278
44279
44280
44281
44282
44283
44284
44285
44286
44287
44288
44289
44290
44291
44292
44293
44294
44295
44296
44297
44298
44299
44300
44301
44302
44303
44304
44305
44306
44307
44308
44309
44310
44311
44312
44313
44314
44315
44316
44317
44318
44319
44320
44321
44322
44323
44324
44325
44326
44327
44328
44329
44330
44331
44332
44333
44334
44335
44336
44337
44338
44339
44340
44341
44342
44343
44344
44345
44346
44347
44348
44349
44350
44351
44352
44353
44354
44355
44356
44357
44358
44359
44360
44361
44362
44363
44364
44365
44366
44367
44368
44369
44370
44371
44372
44373
44374
44375
44376
44377
44378
44379
44380
44381
44382
44383
44384
44385
44386
44387
44388
44389
44390
44391
44392
44393
44394
44395
44396
44397
44398
44399
44400
44401
44402
44403
44404
44405
44406
44407
44408
44409
44410
44411
44412
44413
44414
44415
44416
44417
44418
44419
44420
44421
44422
44423
44424
44425
44426
44427
44428
44429
44430
44431
44432
44433
44434
44435
44436
44437
44438
44439
44440
44441
44442
44443
44444
44445
44446
44447
44448
44449
44450
44451
44452
44453
44454
44455
44456
44457
44458
44459
44460
44461
44462
44463
44464
44465
44466
44467
44468
44469
44470
44471
44472
44473
44474
44475
44476
44477
44478
44479
44480
44481
44482
44483
44484
44485
44486
44487
44488
44489
44490
44491
44492
44493
44494
44495
44496
44497
44498
44499
44500
44501
44502
44503
44504
44505
44506
44507
44508
44509
44510
44511
44512
44513
44514
44515
44516
44517
44518
44519
44520
44521
44522
44523
44524
44525
44526
44527
44528
44529
44530
44531
44532
44533
44534
44535
44536
44537
44538
44539
44540
44541
44542
44543
44544
44545
44546
44547
44548
44549
44550
44551
44552
44553
44554
44555
44556
44557
44558
44559
44560
44561
44562
44563
44564
44565
44566
44567
44568
44569
44570
44571
44572
44573
44574
44575
44576
44577
44578
44579
44580
44581
44582
44583
44584
44585
44586
44587
44588
44589
44590
44591
44592
44593
44594
44595
44596
44597
44598
44599
44600
44601
44602
44603
44604
44605
44606
44607
44608
44609
44610
44611
44612
44613
44614
44615
44616
44617
44618
44619
44620
44621
44622
44623
44624
44625
44626
44627
44628
44629
44630
44631
44632
44633
44634
44635
44636
44637
44638
44639
44640
44641
44642
44643
44644
44645
44646
44647
44648
44649
44650
44651
44652
44653
44654
44655
44656
44657
44658
44659
44660
44661
44662
44663
44664
44665
44666
44667
44668
44669
44670
44671
44672
44673
44674
44675
44676
44677
44678
44679
44680
44681
44682
44683
44684
44685
44686
44687
44688
44689
44690
44691
44692
44693
44694
44695
44696
44697
44698
44699
44700
44701
44702
44703
44704
44705
44706
44707
44708
44709
44710
44711
44712
44713
44714
44715
44716
44717
44718
44719
44720
44721
44722
44723
44724
44725
44726
44727
44728
44729
44730
44731
44732
44733
44734
44735
44736
44737
44738
44739
44740
44741
44742
44743
44744
44745
44746
44747
44748
44749
44750
44751
44752
44753
44754
44755
44756
44757
44758
44759
44760
44761
44762
44763
44764
44765
44766
44767
44768
44769
44770
44771
44772
44773
44774
44775
44776
44777
44778
44779
44780
44781
44782
44783
44784
44785
44786
44787
44788
44789
44790
44791
44792
44793
44794
44795
44796
44797
44798
44799
44800
44801
44802
44803
44804
44805
44806
44807
44808
44809
44810
44811
44812
44813
44814
44815
44816
44817
44818
44819
44820
44821
44822
44823
44824
44825
44826
44827
44828
44829
44830
44831
44832
44833
44834
44835
44836
44837
44838
44839
44840
44841
44842
44843
44844
44845
44846
44847
44848
44849
44850
44851
44852
44853
44854
44855
44856
44857
44858
44859
44860
44861
44862
44863
44864
44865
44866
44867
44868
44869
44870
44871
44872
44873
44874
44875
44876
44877
44878
44879
44880
44881
44882
44883
44884
44885
44886
44887
44888
44889
44890
44891
44892
44893
44894
44895
44896
44897
44898
44899
44900
44901
44902
44903
44904
44905
44906
44907
44908
44909
44910
44911
44912
44913
44914
44915
44916
44917
44918
44919
44920
44921
44922
44923
44924
44925
44926
44927
44928
44929
44930
44931
44932
44933
44934
44935
44936
44937
44938
44939
44940
44941
44942
44943
44944
44945
44946
44947
44948
44949
44950
44951
44952
44953
44954
44955
44956
44957
44958
44959
44960
44961
44962
44963
44964
44965
44966
44967
44968
44969
44970
44971
44972
44973
44974
44975
44976
44977
44978
44979
44980
44981
44982
44983
44984
44985
44986
44987
44988
44989
44990
44991
44992
44993
44994
44995
44996
44997
44998
44999
45000
45001
45002
45003
45004
45005
45006
45007
45008
45009
45010
45011
45012
45013
45014
45015
45016
45017
45018
45019
45020
45021
45022
45023
45024
45025
45026
45027
45028
45029
45030
45031
45032
45033
45034
45035
45036
45037
45038
45039
45040
45041
45042
45043
45044
45045
45046
45047
45048
45049
45050
45051
45052
45053
45054
45055
45056
45057
45058
45059
45060
45061
45062
45063
45064
45065
45066
45067
45068
45069
45070
45071
45072
45073
45074
45075
45076
45077
45078
45079
45080
45081
45082
45083
45084
45085
45086
45087
45088
45089
45090
45091
45092
45093
45094
45095
45096
45097
45098
45099
45100
45101
45102
45103
45104
45105
45106
45107
45108
45109
45110
45111
45112
45113
45114
45115
45116
45117
45118
45119
45120
45121
45122
45123
45124
45125
45126
45127
45128
45129
45130
45131
45132
45133
45134
45135
45136
45137
45138
45139
45140
45141
45142
45143
45144
45145
45146
45147
45148
45149
45150
45151
45152
45153
45154
45155
45156
45157
45158
45159
45160
45161
45162
45163
45164
45165
45166
45167
45168
45169
45170
45171
45172
45173
45174
45175
45176
45177
45178
45179
45180
45181
45182
45183
45184
45185
45186
45187
45188
45189
45190
45191
45192
45193
45194
45195
45196
45197
45198
45199
45200
45201
45202
45203
45204
45205
45206
45207
45208
45209
45210
45211
45212
45213
45214
45215
45216
45217
45218
45219
45220
45221
45222
45223
45224
45225
45226
45227
45228
45229
45230
45231
45232
45233
45234
45235
45236
45237
45238
45239
45240
45241
45242
45243
45244
45245
45246
45247
45248
45249
45250
45251
45252
45253
45254
45255
45256
45257
45258
45259
45260
45261
45262
45263
45264
45265
45266
45267
45268
45269
45270
45271
45272
45273
45274
45275
45276
45277
45278
45279
45280
45281
45282
45283
45284
45285
45286
45287
45288
45289
45290
45291
45292
45293
45294
45295
45296
45297
45298
45299
45300
45301
45302
45303
45304
45305
45306
45307
45308
45309
45310
45311
45312
45313
45314
45315
45316
45317
45318
45319
45320
45321
45322
45323
45324
45325
45326
45327
45328
45329
45330
45331
45332
45333
45334
45335
45336
45337
45338
45339
45340
45341
45342
45343
45344
45345
45346
45347
45348
45349
45350
45351
45352
45353
45354
45355
45356
45357
45358
45359
45360
45361
45362
45363
45364
45365
45366
45367
45368
45369
45370
45371
45372
45373
45374
45375
45376
45377
45378
45379
45380
45381
45382
45383
45384
45385
45386
45387
45388
45389
45390
45391
45392
45393
45394
45395
45396
45397
45398
45399
45400
45401
45402
45403
45404
45405
45406
45407
45408
45409
45410
45411
45412
45413
45414
45415
45416
45417
45418
45419
45420
45421
45422
45423
45424
45425
45426
45427
45428
45429
45430
45431
45432
45433
45434
45435
45436
45437
45438
45439
45440
45441
45442
45443
45444
45445
45446
45447
45448
45449
45450
45451
45452
45453
45454
45455
45456
45457
45458
45459
45460
45461
45462
45463
45464
45465
45466
45467
45468
45469
45470
45471
45472
45473
45474
45475
45476
45477
45478
45479
45480
45481
45482
45483
45484
45485
45486
45487
45488
45489
45490
45491
45492
45493
45494
45495
45496
45497
45498
45499
45500
45501
45502
45503
45504
45505
45506
45507
45508
45509
45510
45511
45512
45513
45514
45515
45516
45517
45518
45519
45520
45521
45522
45523
45524
45525
45526
45527
45528
45529
45530
45531
45532
45533
45534
45535
45536
45537
45538
45539
45540
45541
45542
45543
45544
45545
45546
45547
45548
45549
45550
45551
45552
45553
45554
45555
45556
45557
45558
45559
45560
45561
45562
45563
45564
45565
45566
45567
45568
45569
45570
45571
45572
45573
45574
45575
45576
45577
45578
45579
45580
45581
45582
45583
45584
45585
45586
45587
45588
45589
45590
45591
45592
45593
45594
45595
45596
45597
45598
45599
45600
45601
45602
45603
45604
45605
45606
45607
45608
45609
45610
45611
45612
45613
45614
45615
45616
45617
45618
45619
45620
45621
45622
45623
45624
45625
45626
45627
45628
45629
45630
45631
45632
45633
45634
45635
45636
45637
45638
45639
45640
45641
45642
45643
45644
45645
45646
45647
45648
45649
45650
45651
45652
45653
45654
45655
45656
45657
45658
45659
45660
45661
45662
45663
45664
45665
45666
45667
45668
45669
45670
45671
45672
45673
45674
45675
45676
45677
45678
45679
45680
45681
45682
45683
45684
45685
45686
45687
45688
45689
45690
45691
45692
45693
45694
45695
45696
45697
45698
45699
45700
45701
45702
45703
45704
45705
45706
45707
45708
45709
45710
45711
45712
45713
45714
45715
45716
45717
45718
45719
45720
45721
45722
45723
45724
45725
45726
45727
45728
45729
45730
45731
45732
45733
45734
45735
45736
45737
45738
45739
45740
45741
45742
45743
45744
45745
45746
45747
45748
45749
45750
45751
45752
45753
45754
45755
45756
45757
45758
45759
45760
45761
45762
45763
45764
45765
45766
45767
45768
45769
45770
45771
45772
45773
45774
45775
45776
45777
45778
45779
45780
45781
45782
45783
45784
45785
45786
45787
45788
45789
45790
45791
45792
45793
45794
45795
45796
45797
45798
45799
45800
45801
45802
45803
45804
45805
45806
45807
45808
45809
45810
45811
45812
45813
45814
45815
45816
45817
45818
45819
45820
45821
45822
45823
45824
45825
45826
45827
45828
45829
45830
45831
45832
45833
45834
45835
45836
45837
45838
45839
45840
45841
45842
45843
45844
45845
45846
45847
45848
45849
45850
45851
45852
45853
45854
45855
45856
45857
45858
45859
45860
45861
45862
45863
45864
45865
45866
45867
45868
45869
45870
45871
45872
45873
45874
45875
45876
45877
45878
45879
45880
45881
45882
45883
45884
45885
45886
45887
45888
45889
45890
45891
45892
45893
45894
45895
45896
45897
45898
45899
45900
45901
45902
45903
45904
45905
45906
45907
45908
45909
45910
45911
45912
45913
45914
45915
45916
45917
45918
45919
45920
45921
45922
45923
45924
45925
45926
45927
45928
45929
45930
45931
45932
45933
45934
45935
45936
45937
45938
45939
45940
45941
45942
45943
45944
45945
45946
45947
45948
45949
45950
45951
45952
45953
45954
45955
45956
45957
45958
45959
45960
45961
45962
45963
45964
45965
45966
45967
45968
45969
45970
45971
45972
45973
45974
45975
45976
45977
45978
45979
45980
45981
45982
45983
45984
45985
45986
45987
45988
45989
45990
45991
45992
45993
45994
45995
45996
45997
45998
45999
46000
46001
46002
46003
46004
46005
46006
46007
46008
46009
46010
46011
46012
46013
46014
46015
46016
46017
46018
46019
46020
46021
46022
46023
46024
46025
46026
46027
46028
46029
46030
46031
46032
46033
46034
46035
46036
46037
46038
46039
46040
46041
46042
46043
46044
46045
46046
46047
46048
46049
46050
46051
46052
46053
46054
46055
46056
46057
46058
46059
46060
46061
46062
46063
46064
46065
46066
46067
46068
46069
46070
46071
46072
46073
46074
46075
46076
46077
46078
46079
46080
46081
46082
46083
46084
46085
46086
46087
46088
46089
46090
46091
46092
46093
46094
46095
46096
46097
46098
46099
46100
46101
46102
46103
46104
46105
46106
46107
46108
46109
46110
46111
46112
46113
46114
46115
46116
46117
46118
46119
46120
46121
46122
46123
46124
46125
46126
46127
46128
46129
46130
46131
46132
46133
46134
46135
46136
46137
46138
46139
46140
46141
46142
46143
46144
46145
46146
46147
46148
46149
46150
46151
46152
46153
46154
46155
46156
46157
46158
46159
46160
46161
46162
46163
46164
46165
46166
46167
46168
46169
46170
46171
46172
46173
46174
46175
46176
46177
46178
46179
46180
46181
46182
46183
46184
46185
46186
46187
46188
46189
46190
46191
46192
46193
46194
46195
46196
46197
46198
46199
46200
46201
46202
46203
46204
46205
46206
46207
46208
46209
46210
46211
46212
46213
46214
46215
46216
46217
46218
46219
46220
46221
46222
46223
46224
46225
46226
46227
46228
46229
46230
46231
46232
46233
46234
46235
46236
46237
46238
46239
46240
46241
46242
46243
46244
46245
46246
46247
46248
46249
46250
46251
46252
46253
46254
46255
46256
46257
46258
46259
46260
46261
46262
46263
46264
46265
46266
46267
46268
46269
46270
46271
46272
46273
46274
46275
46276
46277
46278
46279
46280
46281
46282
46283
46284
46285
46286
46287
46288
46289
46290
46291
46292
46293
46294
46295
46296
46297
46298
46299
46300
46301
46302
46303
46304
46305
46306
46307
46308
46309
46310
46311
46312
46313
46314
46315
46316
46317
46318
46319
46320
46321
46322
46323
46324
46325
46326
46327
46328
46329
46330
46331
46332
46333
46334
46335
46336
46337
46338
46339
46340
46341
46342
46343
46344
46345
46346
46347
46348
46349
46350
46351
46352
46353
46354
46355
46356
46357
46358
46359
46360
46361
46362
46363
46364
46365
46366
46367
46368
46369
46370
46371
46372
46373
46374
46375
46376
46377
46378
46379
46380
46381
46382
46383
46384
46385
46386
46387
46388
46389
46390
46391
46392
46393
46394
46395
46396
46397
46398
46399
46400
46401
46402
46403
46404
46405
46406
46407
46408
46409
46410
46411
46412
46413
46414
46415
46416
46417
46418
46419
46420
46421
46422
46423
46424
46425
46426
46427
46428
46429
46430
46431
46432
46433
46434
46435
46436
46437
46438
46439
46440
46441
46442
46443
46444
46445
46446
46447
46448
46449
46450
46451
46452
46453
46454
46455
46456
46457
46458
46459
46460
46461
46462
46463
46464
46465
46466
46467
46468
46469
46470
46471
46472
46473
46474
46475
46476
46477
46478
46479
46480
46481
46482
46483
46484
46485
46486
46487
46488
46489
46490
46491
46492
46493
46494
46495
46496
46497
46498
46499
46500
46501
46502
46503
46504
46505
46506
46507
46508
46509
46510
46511
46512
46513
46514
46515
46516
46517
46518
46519
46520
46521
46522
46523
46524
46525
46526
46527
46528
46529
46530
46531
46532
46533
46534
46535
46536
46537
46538
46539
46540
46541
46542
46543
46544
46545
46546
46547
46548
46549
46550
46551
46552
46553
46554
46555
46556
46557
46558
46559
46560
46561
46562
46563
46564
46565
46566
46567
46568
46569
46570
46571
46572
46573
46574
46575
46576
46577
46578
46579
46580
46581
46582
46583
46584
46585
46586
46587
46588
46589
46590
46591
46592
46593
46594
46595
46596
46597
46598
46599
46600
46601
46602
46603
46604
46605
46606
46607
46608
46609
46610
46611
46612
46613
46614
46615
46616
46617
46618
46619
46620
46621
46622
46623
46624
46625
46626
46627
46628
46629
46630
46631
46632
46633
46634
46635
46636
46637
46638
46639
46640
46641
46642
46643
46644
46645
46646
46647
46648
46649
46650
46651
46652
46653
46654
46655
46656
46657
46658
46659
46660
46661
46662
46663
46664
46665
46666
46667
46668
46669
46670
46671
46672
46673
46674
46675
46676
46677
46678
46679
46680
46681
46682
46683
46684
46685
46686
46687
46688
46689
46690
46691
46692
46693
46694
46695
46696
46697
46698
46699
46700
46701
46702
46703
46704
46705
46706
46707
46708
46709
46710
46711
46712
46713
46714
46715
46716
46717
46718
46719
46720
46721
46722
46723
46724
46725
46726
46727
46728
46729
46730
46731
46732
46733
46734
46735
46736
46737
46738
46739
46740
46741
46742
46743
46744
46745
46746
46747
46748
46749
46750
46751
46752
46753
46754
46755
46756
46757
46758
46759
46760
46761
46762
46763
46764
46765
46766
46767
46768
46769
46770
46771
46772
46773
46774
46775
46776
46777
46778
46779
46780
46781
46782
46783
46784
46785
46786
46787
46788
46789
46790
46791
46792
46793
46794
46795
46796
46797
46798
46799
46800
46801
46802
46803
46804
46805
46806
46807
46808
46809
46810
46811
46812
46813
46814
46815
46816
46817
46818
46819
46820
46821
46822
46823
46824
46825
46826
46827
46828
46829
46830
46831
46832
46833
46834
46835
46836
46837
46838
46839
46840
46841
46842
46843
46844
46845
46846
46847
46848
46849
46850
46851
46852
46853
46854
46855
46856
46857
46858
46859
46860
46861
46862
46863
46864
46865
46866
46867
46868
46869
46870
46871
46872
46873
46874
46875
46876
46877
46878
46879
46880
46881
46882
46883
46884
46885
46886
46887
46888
46889
46890
46891
46892
46893
46894
46895
46896
46897
46898
46899
46900
46901
46902
46903
46904
46905
46906
46907
46908
46909
46910
46911
46912
46913
46914
46915
46916
46917
46918
46919
46920
46921
46922
46923
46924
46925
46926
46927
46928
46929
46930
46931
46932
46933
46934
46935
46936
46937
46938
46939
46940
46941
46942
46943
46944
46945
46946
46947
46948
46949
46950
46951
46952
46953
46954
46955
46956
46957
46958
46959
46960
46961
46962
46963
46964
46965
46966
46967
46968
46969
46970
46971
46972
46973
46974
46975
46976
46977
46978
46979
46980
46981
46982
46983
46984
46985
46986
46987
46988
46989
46990
46991
46992
46993
46994
46995
46996
46997
46998
46999
47000
47001
47002
47003
47004
47005
47006
47007
47008
47009
47010
47011
47012
47013
47014
47015
47016
47017
47018
47019
47020
47021
47022
47023
47024
47025
47026
47027
47028
47029
47030
47031
47032
47033
47034
47035
47036
47037
47038
47039
47040
47041
47042
47043
47044
47045
47046
47047
47048
47049
47050
47051
47052
47053
47054
47055
47056
47057
47058
47059
47060
47061
47062
47063
47064
47065
47066
47067
47068
47069
47070
47071
47072
47073
47074
47075
47076
47077
47078
47079
47080
47081
47082
47083
47084
47085
47086
47087
47088
47089
47090
47091
47092
47093
47094
47095
47096
47097
47098
47099
47100
47101
47102
47103
47104
47105
47106
47107
47108
47109
47110
47111
47112
47113
47114
47115
47116
47117
47118
47119
47120
47121
47122
47123
47124
47125
47126
47127
47128
47129
47130
47131
47132
47133
47134
47135
47136
47137
47138
47139
47140
47141
47142
47143
47144
47145
47146
47147
47148
47149
47150
47151
47152
47153
47154
47155
47156
47157
47158
47159
47160
47161
47162
47163
47164
47165
47166
47167
47168
47169
47170
47171
47172
47173
47174
47175
47176
47177
47178
47179
47180
47181
47182
47183
47184
47185
47186
47187
47188
47189
47190
47191
47192
47193
47194
47195
47196
47197
47198
47199
47200
47201
47202
47203
47204
47205
47206
47207
47208
47209
47210
47211
47212
47213
47214
47215
47216
47217
47218
47219
47220
47221
47222
47223
47224
47225
47226
47227
47228
47229
47230
47231
47232
47233
47234
47235
47236
47237
47238
47239
47240
47241
47242
47243
47244
47245
47246
47247
47248
47249
47250
47251
47252
47253
47254
47255
47256
47257
47258
47259
47260
47261
47262
47263
47264
47265
47266
47267
47268
47269
47270
47271
47272
47273
47274
47275
47276
47277
47278
47279
47280
47281
47282
47283
47284
47285
47286
47287
47288
47289
47290
47291
47292
47293
47294
47295
47296
47297
47298
47299
47300
47301
47302
47303
47304
47305
47306
47307
47308
47309
47310
47311
47312
47313
47314
47315
47316
47317
47318
47319
47320
47321
47322
47323
47324
47325
47326
47327
47328
47329
47330
47331
47332
47333
47334
47335
47336
47337
47338
47339
47340
47341
47342
47343
47344
47345
47346
47347
47348
47349
47350
47351
47352
47353
47354
47355
47356
47357
47358
47359
47360
47361
47362
47363
47364
47365
47366
47367
47368
47369
47370
47371
47372
47373
47374
47375
47376
47377
47378
47379
47380
47381
47382
47383
47384
47385
47386
47387
47388
47389
47390
47391
47392
47393
47394
47395
47396
47397
47398
47399
47400
47401
47402
47403
47404
47405
47406
47407
47408
47409
47410
47411
47412
47413
47414
47415
47416
47417
47418
47419
47420
47421
47422
47423
47424
47425
47426
47427
47428
47429
47430
47431
47432
47433
47434
47435
47436
47437
47438
47439
47440
47441
47442
47443
47444
47445
47446
47447
47448
47449
47450
47451
47452
47453
47454
47455
47456
47457
47458
47459
47460
47461
47462
47463
47464
47465
47466
47467
47468
47469
47470
47471
47472
47473
47474
47475
47476
47477
47478
47479
47480
47481
47482
47483
47484
47485
47486
47487
47488
47489
47490
47491
47492
47493
47494
47495
47496
47497
47498
47499
47500
47501
47502
47503
47504
47505
47506
47507
47508
47509
47510
47511
47512
47513
47514
47515
47516
47517
47518
47519
47520
47521
47522
47523
47524
47525
47526
47527
47528
47529
47530
47531
47532
47533
47534
47535
47536
47537
47538
47539
47540
47541
47542
47543
47544
47545
47546
47547
47548
47549
47550
47551
47552
47553
47554
47555
47556
47557
47558
47559
47560
47561
47562
47563
47564
47565
47566
47567
47568
47569
47570
47571
47572
47573
47574
47575
47576
47577
47578
47579
47580
47581
47582
47583
47584
47585
47586
47587
47588
47589
47590
47591
47592
47593
47594
47595
47596
47597
47598
47599
47600
47601
47602
47603
47604
47605
47606
47607
47608
47609
47610
47611
47612
47613
47614
47615
47616
47617
47618
47619
47620
47621
47622
47623
47624
47625
47626
47627
47628
47629
47630
47631
47632
47633
47634
47635
47636
47637
47638
47639
47640
47641
47642
47643
47644
47645
47646
47647
47648
47649
47650
47651
47652
47653
47654
47655
47656
47657
47658
47659
47660
47661
47662
47663
47664
47665
47666
47667
47668
47669
47670
47671
47672
47673
47674
47675
47676
47677
47678
47679
47680
47681
47682
47683
47684
47685
47686
47687
47688
47689
47690
47691
47692
47693
47694
47695
47696
47697
47698
47699
47700
47701
47702
47703
47704
47705
47706
47707
47708
47709
47710
47711
47712
47713
47714
47715
47716
47717
47718
47719
47720
47721
47722
47723
47724
47725
47726
47727
47728
47729
47730
47731
47732
47733
47734
47735
47736
47737
47738
47739
47740
47741
47742
47743
47744
47745
47746
47747
47748
47749
47750
47751
47752
47753
47754
47755
47756
47757
47758
47759
47760
47761
47762
47763
47764
47765
47766
47767
47768
47769
47770
47771
47772
47773
47774
47775
47776
47777
47778
47779
47780
47781
47782
47783
47784
47785
47786
47787
47788
47789
47790
47791
47792
47793
47794
47795
47796
47797
47798
47799
47800
47801
47802
47803
47804
47805
47806
47807
47808
47809
47810
47811
47812
47813
47814
47815
47816
47817
47818
47819
47820
47821
47822
47823
47824
47825
47826
47827
47828
47829
47830
47831
47832
47833
47834
47835
47836
47837
47838
47839
47840
47841
47842
47843
47844
47845
47846
47847
47848
47849
47850
47851
47852
47853
47854
47855
47856
47857
47858
47859
47860
47861
47862
47863
47864
47865
47866
47867
47868
47869
47870
47871
47872
47873
47874
47875
47876
47877
47878
47879
47880
47881
47882
47883
47884
47885
47886
47887
47888
47889
47890
47891
47892
47893
47894
47895
47896
47897
47898
47899
47900
47901
47902
47903
47904
47905
47906
47907
47908
47909
47910
47911
47912
47913
47914
47915
47916
47917
47918
47919
47920
47921
47922
47923
47924
47925
47926
47927
47928
47929
47930
47931
47932
47933
47934
47935
47936
47937
47938
47939
47940
47941
47942
47943
47944
47945
47946
47947
47948
47949
47950
47951
47952
47953
47954
47955
47956
47957
47958
47959
47960
47961
47962
47963
47964
47965
47966
47967
47968
47969
47970
47971
47972
47973
47974
47975
47976
47977
47978
47979
47980
47981
47982
47983
47984
47985
47986
47987
47988
47989
47990
47991
47992
47993
47994
47995
47996
47997
47998
47999
48000
48001
48002
48003
48004
48005
48006
48007
48008
48009
48010
48011
48012
48013
48014
48015
48016
48017
48018
48019
48020
48021
48022
48023
48024
48025
48026
48027
48028
48029
48030
48031
48032
48033
48034
48035
48036
48037
48038
48039
48040
48041
48042
48043
48044
48045
48046
48047
48048
48049
48050
48051
48052
48053
48054
48055
48056
48057
48058
48059
48060
48061
48062
48063
48064
48065
48066
48067
48068
48069
48070
48071
48072
48073
48074
48075
48076
48077
48078
48079
48080
48081
48082
48083
48084
48085
48086
48087
48088
48089
48090
48091
48092
48093
48094
48095
48096
48097
48098
48099
48100
48101
48102
48103
48104
48105
48106
48107
48108
48109
48110
48111
48112
48113
48114
48115
48116
48117
48118
48119
48120
48121
48122
48123
48124
48125
48126
48127
48128
48129
48130
48131
48132
48133
48134
48135
48136
48137
48138
48139
48140
48141
48142
48143
48144
48145
48146
48147
48148
48149
48150
48151
48152
48153
48154
48155
48156
48157
48158
48159
48160
48161
48162
48163
48164
48165
48166
48167
48168
48169
48170
48171
48172
48173
48174
48175
48176
48177
48178
48179
48180
48181
48182
48183
48184
48185
48186
48187
48188
48189
48190
48191
48192
48193
48194
48195
48196
48197
48198
48199
48200
48201
48202
48203
48204
48205
48206
48207
48208
48209
48210
48211
48212
48213
48214
48215
48216
48217
48218
48219
48220
48221
48222
48223
48224
48225
48226
48227
48228
48229
48230
48231
48232
48233
48234
48235
48236
48237
48238
48239
48240
48241
48242
48243
48244
48245
48246
48247
48248
48249
48250
48251
48252
48253
48254
48255
48256
48257
48258
48259
48260
48261
48262
48263
48264
48265
48266
48267
48268
48269
48270
48271
48272
48273
48274
48275
48276
48277
48278
48279
48280
48281
48282
48283
48284
48285
48286
48287
48288
48289
48290
48291
48292
48293
48294
48295
48296
48297
48298
48299
48300
48301
48302
48303
48304
48305
48306
48307
48308
48309
48310
48311
48312
48313
48314
48315
48316
48317
48318
48319
48320
48321
48322
48323
48324
48325
48326
48327
48328
48329
48330
48331
48332
48333
48334
48335
48336
48337
48338
48339
48340
48341
48342
48343
48344
48345
48346
48347
48348
48349
48350
48351
48352
48353
48354
48355
48356
48357
48358
48359
48360
48361
48362
48363
48364
48365
48366
48367
48368
48369
48370
48371
48372
48373
48374
48375
48376
48377
48378
48379
48380
48381
48382
48383
48384
48385
48386
48387
48388
48389
48390
48391
48392
48393
48394
48395
48396
48397
48398
48399
48400
48401
48402
48403
48404
48405
48406
48407
48408
48409
48410
48411
48412
48413
48414
48415
48416
48417
48418
48419
48420
48421
48422
48423
48424
48425
48426
48427
48428
48429
48430
48431
48432
48433
48434
48435
48436
48437
48438
48439
48440
48441
48442
48443
48444
48445
48446
48447
48448
48449
48450
48451
48452
48453
48454
48455
48456
48457
48458
48459
48460
48461
48462
48463
48464
48465
48466
48467
48468
48469
48470
48471
48472
48473
48474
48475
48476
48477
48478
48479
48480
48481
48482
48483
48484
48485
48486
48487
48488
48489
48490
48491
48492
48493
48494
48495
48496
48497
48498
48499
48500
48501
48502
48503
48504
48505
48506
48507
48508
48509
48510
48511
48512
48513
48514
48515
48516
48517
48518
48519
48520
48521
48522
48523
48524
48525
48526
48527
48528
48529
48530
48531
48532
48533
48534
48535
48536
48537
48538
48539
48540
48541
48542
48543
48544
48545
48546
48547
48548
48549
48550
48551
48552
48553
48554
48555
48556
48557
48558
48559
48560
48561
48562
48563
48564
48565
48566
48567
48568
48569
48570
48571
48572
48573
48574
48575
48576
48577
48578
48579
48580
48581
48582
48583
48584
48585
48586
48587
48588
48589
48590
48591
48592
48593
48594
48595
48596
48597
48598
48599
48600
48601
48602
48603
48604
48605
48606
48607
48608
48609
48610
48611
48612
48613
48614
48615
48616
48617
48618
48619
48620
48621
48622
48623
48624
48625
48626
48627
48628
48629
48630
48631
48632
48633
48634
48635
48636
48637
48638
48639
48640
48641
48642
48643
48644
48645
48646
48647
48648
48649
48650
48651
48652
48653
48654
48655
48656
48657
48658
48659
48660
48661
48662
48663
48664
48665
48666
48667
48668
48669
48670
48671
48672
48673
48674
48675
48676
48677
48678
48679
48680
48681
48682
48683
48684
48685
48686
48687
48688
48689
48690
48691
48692
48693
48694
48695
48696
48697
48698
48699
48700
48701
48702
48703
48704
48705
48706
48707
48708
48709
48710
48711
48712
48713
48714
48715
48716
48717
48718
48719
48720
48721
48722
48723
48724
48725
48726
48727
48728
48729
48730
48731
48732
48733
48734
48735
48736
48737
48738
48739
48740
48741
48742
48743
48744
48745
48746
48747
48748
48749
48750
48751
48752
48753
48754
48755
48756
48757
48758
48759
48760
48761
48762
48763
48764
48765
48766
48767
48768
48769
48770
48771
48772
48773
48774
48775
48776
48777
48778
48779
48780
48781
48782
48783
48784
48785
48786
48787
48788
48789
48790
48791
48792
48793
48794
48795
48796
48797
48798
48799
48800
48801
48802
48803
48804
48805
48806
48807
48808
48809
48810
48811
48812
48813
48814
48815
48816
48817
48818
48819
48820
48821
48822
48823
48824
48825
48826
48827
48828
48829
48830
48831
48832
48833
48834
48835
48836
48837
48838
48839
48840
48841
48842
48843
48844
48845
48846
48847
48848
48849
48850
48851
48852
48853
48854
48855
48856
48857
48858
48859
48860
48861
48862
48863
48864
48865
48866
48867
48868
48869
48870
48871
48872
48873
48874
48875
48876
48877
48878
48879
48880
48881
48882
48883
48884
48885
48886
48887
48888
48889
48890
48891
48892
48893
48894
48895
48896
48897
48898
48899
48900
48901
48902
48903
48904
48905
48906
48907
48908
48909
48910
48911
48912
48913
48914
48915
48916
48917
48918
48919
48920
48921
48922
48923
48924
48925
48926
48927
48928
48929
48930
48931
48932
48933
48934
48935
48936
48937
48938
48939
48940
48941
48942
48943
48944
48945
48946
48947
48948
48949
48950
48951
48952
48953
48954
48955
48956
48957
48958
48959
48960
48961
48962
48963
48964
48965
48966
48967
48968
48969
48970
48971
48972
48973
48974
48975
48976
48977
48978
48979
48980
48981
48982
48983
48984
48985
48986
48987
48988
48989
48990
48991
48992
48993
48994
48995
48996
48997
48998
48999
49000
49001
49002
49003
49004
49005
49006
49007
49008
49009
49010
49011
49012
49013
49014
49015
49016
49017
49018
49019
49020
49021
49022
49023
49024
49025
49026
49027
49028
49029
49030
49031
49032
49033
49034
49035
49036
49037
49038
49039
49040
49041
49042
49043
49044
49045
49046
49047
49048
49049
49050
49051
49052
49053
49054
49055
49056
49057
49058
49059
49060
49061
49062
49063
49064
49065
49066
49067
49068
49069
49070
49071
49072
49073
49074
49075
49076
49077
49078
49079
49080
49081
49082
49083
49084
49085
49086
49087
49088
49089
49090
49091
49092
49093
49094
49095
49096
49097
49098
49099
49100
49101
49102
49103
49104
49105
49106
49107
49108
49109
49110
49111
49112
49113
49114
49115
49116
49117
49118
49119
49120
49121
49122
49123
49124
49125
49126
49127
49128
49129
49130
49131
49132
49133
49134
49135
49136
49137
49138
49139
49140
49141
49142
49143
49144
49145
49146
49147
49148
49149
49150
49151
49152
49153
49154
49155
49156
49157
49158
49159
49160
49161
49162
49163
49164
49165
49166
49167
49168
49169
49170
49171
49172
49173
49174
49175
49176
49177
49178
49179
49180
49181
49182
49183
49184
49185
49186
49187
49188
49189
49190
49191
49192
49193
49194
49195
49196
49197
49198
49199
49200
49201
49202
49203
49204
49205
49206
49207
49208
49209
49210
49211
49212
49213
49214
49215
49216
49217
49218
49219
49220
49221
49222
49223
49224
49225
49226
49227
49228
49229
49230
49231
49232
49233
49234
49235
49236
49237
49238
49239
49240
49241
49242
49243
49244
49245
49246
49247
49248
49249
49250
49251
49252
49253
49254
49255
49256
49257
49258
49259
49260
49261
49262
49263
49264
49265
49266
49267
49268
49269
49270
49271
49272
49273
49274
49275
49276
49277
49278
49279
49280
49281
49282
49283
49284
49285
49286
49287
49288
49289
49290
49291
49292
49293
49294
49295
49296
49297
49298
49299
49300
49301
49302
49303
49304
49305
49306
49307
49308
49309
49310
49311
49312
49313
49314
49315
49316
49317
49318
49319
49320
49321
49322
49323
49324
49325
49326
49327
49328
49329
49330
49331
49332
49333
49334
49335
49336
49337
49338
49339
49340
49341
49342
49343
49344
49345
49346
49347
49348
49349
49350
49351
49352
49353
49354
49355
49356
49357
49358
49359
49360
49361
49362
49363
49364
49365
49366
49367
49368
49369
49370
49371
49372
49373
49374
49375
49376
49377
49378
49379
49380
49381
49382
49383
49384
49385
49386
49387
49388
49389
49390
49391
49392
49393
49394
49395
49396
49397
49398
49399
49400
49401
49402
49403
49404
49405
49406
49407
49408
49409
49410
49411
49412
49413
49414
49415
49416
49417
49418
49419
49420
49421
49422
49423
49424
49425
49426
49427
49428
49429
49430
49431
49432
49433
49434
49435
49436
49437
49438
49439
49440
49441
49442
49443
49444
49445
49446
49447
49448
49449
49450
49451
49452
49453
49454
49455
49456
49457
49458
49459
49460
49461
49462
49463
49464
49465
49466
49467
49468
49469
49470
49471
49472
49473
49474
49475
49476
49477
49478
49479
49480
49481
49482
49483
49484
49485
49486
49487
49488
49489
49490
49491
49492
49493
49494
49495
49496
49497
49498
49499
49500
49501
49502
49503
49504
49505
49506
49507
49508
49509
49510
49511
49512
49513
49514
49515
49516
49517
49518
49519
49520
49521
49522
49523
49524
49525
49526
49527
49528
49529
49530
49531
49532
49533
49534
49535
49536
49537
49538
49539
49540
49541
49542
49543
49544
49545
49546
49547
49548
49549
49550
49551
49552
49553
49554
49555
49556
49557
49558
49559
49560
49561
49562
49563
49564
49565
49566
49567
49568
49569
49570
49571
49572
49573
49574
49575
49576
49577
49578
49579
49580
49581
49582
49583
49584
49585
49586
49587
49588
49589
49590
49591
49592
49593
49594
49595
49596
49597
49598
49599
49600
49601
49602
49603
49604
49605
49606
49607
49608
49609
49610
49611
49612
49613
49614
49615
49616
49617
49618
49619
49620
49621
49622
49623
49624
49625
49626
49627
49628
49629
49630
49631
49632
49633
49634
49635
49636
49637
49638
49639
49640
49641
49642
49643
49644
49645
49646
49647
49648
49649
49650
49651
49652
49653
49654
49655
49656
49657
49658
49659
49660
49661
49662
49663
49664
49665
49666
49667
49668
49669
49670
49671
49672
49673
49674
49675
49676
49677
49678
49679
49680
49681
49682
49683
49684
49685
49686
49687
49688
49689
49690
49691
49692
49693
49694
49695
49696
49697
49698
49699
49700
49701
49702
49703
49704
49705
49706
49707
49708
49709
49710
49711
49712
49713
49714
49715
49716
49717
49718
49719
49720
49721
49722
49723
49724
49725
49726
49727
49728
49729
49730
49731
49732
49733
49734
49735
49736
49737
49738
49739
49740
49741
49742
49743
49744
49745
49746
49747
49748
49749
49750
49751
49752
49753
49754
49755
49756
49757
49758
49759
49760
49761
49762
49763
49764
49765
49766
49767
49768
49769
49770
49771
49772
49773
49774
49775
49776
49777
49778
49779
49780
49781
49782
49783
49784
49785
49786
49787
49788
49789
49790
49791
49792
49793
49794
49795
49796
49797
49798
49799
49800
49801
49802
49803
49804
49805
49806
49807
49808
49809
49810
49811
49812
49813
49814
49815
49816
49817
49818
49819
49820
49821
49822
49823
49824
49825
49826
49827
49828
49829
49830
49831
49832
49833
49834
49835
49836
49837
49838
49839
49840
49841
49842
49843
49844
49845
49846
49847
49848
49849
49850
49851
49852
49853
49854
49855
49856
49857
49858
49859
49860
49861
49862
49863
49864
49865
49866
49867
49868
49869
49870
49871
49872
49873
49874
49875
49876
49877
49878
49879
49880
49881
49882
49883
49884
49885
49886
49887
49888
49889
49890
49891
49892
49893
49894
49895
49896
49897
49898
49899
49900
49901
49902
49903
49904
49905
49906
49907
49908
49909
49910
49911
49912
49913
49914
49915
49916
49917
49918
49919
49920
49921
49922
49923
49924
49925
49926
49927
49928
49929
49930
49931
49932
49933
49934
49935
49936
49937
49938
49939
49940
49941
49942
49943
49944
49945
49946
49947
49948
49949
49950
49951
49952
49953
49954
49955
49956
49957
49958
49959
49960
49961
49962
49963
49964
49965
49966
49967
49968
49969
49970
49971
49972
49973
49974
49975
49976
49977
49978
49979
49980
49981
49982
49983
49984
49985
49986
49987
49988
49989
49990
49991
49992
49993
49994
49995
49996
49997
49998
49999
50000
50001
50002
50003
50004
50005
50006
50007
50008
50009
50010
50011
50012
50013
50014
50015
50016
50017
50018
50019
50020
50021
50022
50023
50024
50025
50026
50027
50028
50029
50030
50031
50032
50033
50034
50035
50036
50037
50038
50039
50040
50041
50042
50043
50044
50045
50046
50047
50048
50049
50050
50051
50052
50053
50054
50055
50056
50057
50058
50059
50060
50061
50062
50063
50064
50065
50066
50067
50068
50069
50070
50071
50072
50073
50074
50075
50076
50077
50078
50079
50080
50081
50082
50083
50084
50085
50086
50087
50088
50089
50090
50091
50092
50093
50094
50095
50096
50097
50098
50099
50100
50101
50102
50103
50104
50105
50106
50107
50108
50109
50110
50111
50112
50113
50114
50115
50116
50117
50118
50119
50120
50121
50122
50123
50124
50125
50126
50127
50128
50129
50130
50131
50132
50133
50134
50135
50136
50137
50138
50139
50140
50141
50142
50143
50144
50145
50146
50147
50148
50149
50150
50151
50152
50153
50154
50155
50156
50157
50158
50159
50160
50161
50162
50163
50164
50165
50166
50167
50168
50169
50170
50171
50172
50173
50174
50175
50176
50177
50178
50179
50180
50181
50182
50183
50184
50185
50186
50187
50188
50189
50190
50191
50192
50193
50194
50195
50196
50197
50198
50199
50200
50201
50202
50203
50204
50205
50206
50207
50208
50209
50210
50211
50212
50213
50214
50215
50216
50217
50218
50219
50220
50221
50222
50223
50224
50225
50226
50227
50228
50229
50230
50231
50232
50233
50234
50235
50236
50237
50238
50239
50240
50241
50242
50243
50244
50245
50246
50247
50248
50249
50250
50251
50252
50253
50254
50255
50256
50257
50258
50259
50260
50261
50262
50263
50264
50265
50266
50267
50268
50269
50270
50271
50272
50273
50274
50275
50276
50277
50278
50279
50280
50281
50282
50283
50284
50285
50286
50287
50288
50289
50290
50291
50292
50293
50294
50295
50296
50297
50298
50299
50300
50301
50302
50303
50304
50305
50306
50307
50308
50309
50310
50311
50312
50313
50314
50315
50316
50317
50318
50319
50320
50321
50322
50323
50324
50325
50326
50327
50328
50329
50330
50331
50332
50333
50334
50335
50336
50337
50338
50339
50340
50341
50342
50343
50344
50345
50346
50347
50348
50349
50350
50351
50352
50353
50354
50355
50356
50357
50358
50359
50360
50361
50362
50363
50364
50365
50366
50367
50368
50369
50370
50371
50372
50373
50374
50375
50376
50377
50378
50379
50380
50381
50382
50383
50384
50385
50386
50387
50388
50389
50390
50391
50392
50393
50394
50395
50396
50397
50398
50399
50400
50401
50402
50403
50404
50405
50406
50407
50408
50409
50410
50411
50412
50413
50414
50415
50416
50417
50418
50419
50420
50421
50422
50423
50424
50425
50426
50427
50428
50429
50430
50431
50432
50433
50434
50435
50436
50437
50438
50439
50440
50441
50442
50443
50444
50445
50446
50447
50448
50449
50450
50451
50452
50453
50454
50455
50456
50457
50458
50459
50460
50461
50462
50463
50464
50465
50466
50467
50468
50469
50470
50471
50472
50473
50474
50475
50476
50477
50478
50479
50480
50481
50482
50483
50484
50485
50486
50487
50488
50489
50490
50491
50492
50493
50494
50495
50496
50497
50498
50499
50500
50501
50502
50503
50504
50505
50506
50507
50508
50509
50510
50511
50512
50513
50514
50515
50516
50517
50518
50519
50520
50521
50522
50523
50524
50525
50526
50527
50528
50529
50530
50531
50532
50533
50534
50535
50536
50537
50538
50539
50540
50541
50542
50543
50544
50545
50546
50547
50548
50549
50550
50551
50552
50553
50554
50555
50556
50557
50558
50559
50560
50561
50562
50563
50564
50565
50566
50567
50568
50569
50570
50571
50572
50573
50574
50575
50576
50577
50578
50579
50580
50581
50582
50583
50584
50585
50586
50587
50588
50589
50590
50591
50592
50593
50594
50595
50596
50597
50598
50599
50600
50601
50602
50603
50604
50605
50606
50607
50608
50609
50610
50611
50612
50613
50614
50615
50616
50617
50618
50619
50620
50621
50622
50623
50624
50625
50626
50627
50628
50629
50630
50631
50632
50633
50634
50635
50636
50637
50638
50639
50640
50641
50642
50643
50644
50645
50646
50647
50648
50649
50650
50651
50652
50653
50654
50655
50656
50657
50658
50659
50660
50661
50662
50663
50664
50665
50666
50667
50668
50669
50670
50671
50672
50673
50674
50675
50676
50677
50678
50679
50680
50681
50682
50683
50684
50685
50686
50687
50688
50689
50690
50691
50692
50693
50694
50695
50696
50697
50698
50699
50700
50701
50702
50703
50704
50705
50706
50707
50708
50709
50710
50711
50712
50713
50714
50715
50716
50717
50718
50719
50720
50721
50722
50723
50724
50725
50726
50727
50728
50729
50730
50731
50732
50733
50734
50735
50736
50737
50738
50739
50740
50741
50742
50743
50744
50745
50746
50747
50748
50749
50750
50751
50752
50753
50754
50755
50756
50757
50758
50759
50760
50761
50762
50763
50764
50765
50766
50767
50768
50769
50770
50771
50772
50773
50774
50775
50776
50777
50778
50779
50780
50781
50782
50783
50784
50785
50786
50787
50788
50789
50790
50791
50792
50793
50794
50795
50796
50797
50798
50799
50800
50801
50802
50803
50804
50805
50806
50807
50808
50809
50810
50811
50812
50813
50814
50815
50816
50817
50818
50819
50820
50821
50822
50823
50824
50825
50826
50827
50828
50829
50830
50831
50832
50833
50834
50835
50836
50837
50838
50839
50840
50841
50842
50843
50844
50845
50846
50847
50848
50849
50850
50851
50852
50853
50854
50855
50856
50857
50858
50859
50860
50861
50862
50863
50864
50865
50866
50867
50868
50869
50870
50871
50872
50873
50874
50875
50876
50877
50878
50879
50880
50881
50882
50883
50884
50885
50886
50887
50888
50889
50890
50891
50892
50893
50894
50895
50896
50897
50898
50899
50900
50901
50902
50903
50904
50905
50906
50907
50908
50909
50910
50911
50912
50913
50914
50915
50916
50917
50918
50919
50920
50921
50922
50923
50924
50925
50926
50927
50928
50929
50930
50931
50932
50933
50934
50935
50936
50937
50938
50939
50940
50941
50942
50943
50944
50945
50946
50947
50948
50949
50950
50951
50952
50953
50954
50955
50956
50957
50958
50959
50960
50961
50962
50963
50964
50965
50966
50967
50968
50969
50970
50971
50972
50973
50974
50975
50976
50977
50978
50979
50980
50981
50982
50983
50984
50985
50986
50987
50988
50989
50990
50991
50992
50993
50994
50995
50996
50997
50998
50999
51000
51001
51002
51003
51004
51005
51006
51007
51008
51009
51010
51011
51012
51013
51014
51015
51016
51017
51018
51019
51020
51021
51022
51023
51024
51025
51026
51027
51028
51029
51030
51031
51032
51033
51034
51035
51036
51037
51038
51039
51040
51041
51042
51043
51044
51045
51046
51047
51048
51049
51050
51051
51052
51053
51054
51055
51056
51057
51058
51059
51060
51061
51062
51063
51064
51065
51066
51067
51068
51069
51070
51071
51072
51073
51074
51075
51076
51077
51078
51079
51080
51081
51082
51083
51084
51085
51086
51087
51088
51089
51090
51091
51092
51093
51094
51095
51096
51097
51098
51099
51100
51101
51102
51103
51104
51105
51106
51107
51108
51109
51110
51111
51112
51113
51114
51115
51116
51117
51118
51119
51120
51121
51122
51123
51124
51125
51126
51127
51128
51129
51130
51131
51132
51133
51134
51135
51136
51137
51138
51139
51140
51141
51142
51143
51144
51145
51146
51147
51148
51149
51150
51151
51152
51153
51154
51155
51156
51157
51158
51159
51160
51161
51162
51163
51164
51165
51166
51167
51168
51169
51170
51171
51172
51173
51174
51175
51176
51177
51178
51179
51180
51181
51182
51183
51184
51185
51186
51187
51188
51189
51190
51191
51192
51193
51194
51195
51196
51197
51198
51199
51200
51201
51202
51203
51204
51205
51206
51207
51208
51209
51210
51211
51212
51213
51214
51215
51216
51217
51218
51219
51220
51221
51222
51223
51224
51225
51226
51227
51228
51229
51230
51231
51232
51233
51234
51235
51236
51237
51238
51239
51240
51241
51242
51243
51244
51245
51246
51247
51248
51249
51250
51251
51252
51253
51254
51255
51256
51257
51258
51259
51260
51261
51262
51263
51264
51265
51266
51267
51268
51269
51270
51271
51272
51273
51274
51275
51276
51277
51278
51279
51280
51281
51282
51283
51284
51285
51286
51287
51288
51289
51290
51291
51292
51293
51294
51295
51296
51297
51298
51299
51300
51301
51302
51303
51304
51305
51306
51307
51308
51309
51310
51311
51312
51313
51314
51315
51316
51317
51318
51319
51320
51321
51322
51323
51324
51325
51326
51327
51328
51329
51330
51331
51332
51333
51334
51335
51336
51337
51338
51339
51340
51341
51342
51343
51344
51345
51346
51347
51348
51349
51350
51351
51352
51353
51354
51355
51356
51357
51358
51359
51360
51361
51362
51363
51364
51365
51366
51367
51368
51369
51370
51371
51372
51373
51374
51375
51376
51377
51378
51379
51380
51381
51382
51383
51384
51385
51386
51387
51388
51389
51390
51391
51392
51393
51394
51395
51396
51397
51398
51399
51400
51401
51402
51403
51404
51405
51406
51407
51408
51409
51410
51411
51412
51413
51414
51415
51416
51417
51418
51419
51420
51421
51422
51423
51424
51425
51426
51427
51428
51429
51430
51431
51432
51433
51434
51435
51436
51437
51438
51439
51440
51441
51442
51443
51444
51445
51446
51447
51448
51449
51450
51451
51452
51453
51454
51455
51456
51457
51458
51459
51460
51461
51462
51463
51464
51465
51466
51467
51468
51469
51470
51471
51472
51473
51474
51475
51476
51477
51478
51479
51480
51481
51482
51483
51484
51485
51486
51487
51488
51489
51490
51491
51492
51493
51494
51495
51496
51497
51498
51499
51500
51501
51502
51503
51504
51505
51506
51507
51508
51509
51510
51511
51512
51513
51514
51515
51516
51517
51518
51519
51520
51521
51522
51523
51524
51525
51526
51527
51528
51529
51530
51531
51532
51533
51534
51535
51536
51537
51538
51539
51540
51541
51542
51543
51544
51545
51546
51547
51548
51549
51550
51551
51552
51553
51554
51555
51556
51557
51558
51559
51560
51561
51562
51563
51564
51565
51566
51567
51568
51569
51570
51571
51572
51573
51574
51575
51576
51577
51578
51579
51580
51581
51582
51583
51584
51585
51586
51587
51588
51589
51590
51591
51592
51593
51594
51595
51596
51597
51598
51599
51600
51601
51602
51603
51604
51605
51606
51607
51608
51609
51610
51611
51612
51613
51614
51615
51616
51617
51618
51619
51620
51621
51622
51623
51624
51625
51626
51627
51628
51629
51630
51631
51632
51633
51634
51635
51636
51637
51638
51639
51640
51641
51642
51643
51644
51645
51646
51647
51648
51649
51650
51651
51652
51653
51654
51655
51656
51657
51658
51659
51660
51661
51662
51663
51664
51665
51666
51667
51668
51669
51670
51671
51672
51673
51674
51675
51676
51677
51678
51679
51680
51681
51682
51683
51684
51685
51686
51687
51688
51689
51690
51691
51692
51693
51694
51695
51696
51697
51698
51699
51700
51701
51702
51703
51704
51705
51706
51707
51708
51709
51710
51711
51712
51713
51714
51715
51716
51717
51718
51719
51720
51721
51722
51723
51724
51725
51726
51727
51728
51729
51730
51731
51732
51733
51734
51735
51736
51737
51738
51739
51740
51741
51742
51743
51744
51745
51746
51747
51748
51749
51750
51751
51752
51753
51754
51755
51756
51757
51758
51759
51760
51761
51762
51763
51764
51765
51766
51767
51768
51769
51770
51771
51772
51773
51774
51775
51776
51777
51778
51779
51780
51781
51782
51783
51784
51785
51786
51787
51788
51789
51790
51791
51792
51793
51794
51795
51796
51797
51798
51799
51800
51801
51802
51803
51804
51805
51806
51807
51808
51809
51810
51811
51812
51813
51814
51815
51816
51817
51818
51819
51820
51821
51822
51823
51824
51825
51826
51827
51828
51829
51830
51831
51832
51833
51834
51835
51836
51837
51838
51839
51840
51841
51842
51843
51844
51845
51846
51847
51848
51849
51850
51851
51852
51853
51854
51855
51856
51857
51858
51859
51860
51861
51862
51863
51864
51865
51866
51867
51868
51869
51870
51871
51872
51873
51874
51875
51876
51877
51878
51879
51880
51881
51882
51883
51884
51885
51886
51887
51888
51889
51890
51891
51892
51893
51894
51895
51896
51897
51898
51899
51900
51901
51902
51903
51904
51905
51906
51907
51908
51909
51910
51911
51912
51913
51914
51915
51916
51917
51918
51919
51920
51921
51922
51923
51924
51925
51926
51927
51928
51929
51930
51931
51932
51933
51934
51935
51936
51937
51938
51939
51940
51941
51942
51943
51944
51945
51946
51947
51948
51949
51950
51951
51952
51953
51954
51955
51956
51957
51958
51959
51960
51961
51962
51963
51964
51965
51966
51967
51968
51969
51970
51971
51972
51973
51974
51975
51976
51977
51978
51979
51980
51981
51982
51983
51984
51985
51986
51987
51988
51989
51990
51991
51992
51993
51994
51995
51996
51997
51998
51999
52000
52001
52002
52003
52004
52005
52006
52007
52008
52009
52010
52011
52012
52013
52014
52015
52016
52017
52018
52019
52020
52021
52022
52023
52024
52025
52026
52027
52028
52029
52030
52031
52032
52033
52034
52035
52036
52037
52038
52039
52040
52041
52042
52043
52044
52045
52046
52047
52048
52049
52050
52051
52052
52053
52054
52055
52056
52057
52058
52059
52060
52061
52062
52063
52064
52065
52066
52067
52068
52069
52070
52071
52072
52073
52074
52075
52076
52077
52078
52079
52080
52081
52082
52083
52084
52085
52086
52087
52088
52089
52090
52091
52092
52093
52094
52095
52096
52097
52098
52099
52100
52101
52102
52103
52104
52105
52106
52107
52108
52109
52110
52111
52112
52113
52114
52115
52116
52117
52118
52119
52120
52121
52122
52123
52124
52125
52126
52127
52128
52129
52130
52131
52132
52133
52134
52135
52136
52137
52138
52139
52140
52141
52142
52143
52144
52145
52146
52147
52148
52149
52150
52151
52152
52153
52154
52155
52156
52157
52158
52159
52160
52161
52162
52163
52164
52165
52166
52167
52168
52169
52170
52171
52172
52173
52174
52175
52176
52177
52178
52179
52180
52181
52182
52183
52184
52185
52186
52187
52188
52189
52190
52191
52192
52193
52194
52195
52196
52197
52198
52199
52200
52201
52202
52203
52204
52205
52206
52207
52208
52209
52210
52211
52212
52213
52214
52215
52216
52217
52218
52219
52220
52221
52222
52223
52224
52225
52226
52227
52228
52229
52230
52231
52232
52233
52234
52235
52236
52237
52238
52239
52240
52241
52242
52243
52244
52245
52246
52247
52248
52249
52250
52251
52252
52253
52254
52255
52256
52257
52258
52259
52260
52261
52262
52263
52264
52265
52266
52267
52268
52269
52270
52271
52272
52273
52274
52275
52276
52277
52278
52279
52280
52281
52282
52283
52284
52285
52286
52287
52288
52289
52290
52291
52292
52293
52294
52295
52296
52297
52298
52299
52300
52301
52302
52303
52304
52305
52306
52307
52308
52309
52310
52311
52312
52313
52314
52315
52316
52317
52318
52319
52320
52321
52322
52323
52324
52325
52326
52327
52328
52329
52330
52331
52332
52333
52334
52335
52336
52337
52338
52339
52340
52341
52342
52343
52344
52345
52346
52347
52348
52349
52350
52351
52352
52353
52354
52355
52356
52357
52358
52359
52360
52361
52362
52363
52364
52365
52366
52367
52368
52369
52370
52371
52372
52373
52374
52375
52376
52377
52378
52379
52380
52381
52382
52383
52384
52385
52386
52387
52388
52389
52390
52391
52392
52393
52394
52395
52396
52397
52398
52399
52400
52401
52402
52403
52404
52405
52406
52407
52408
52409
52410
52411
52412
52413
52414
52415
52416
52417
52418
52419
52420
52421
52422
52423
52424
52425
52426
52427
52428
52429
52430
52431
52432
52433
52434
52435
52436
52437
52438
52439
52440
52441
52442
52443
52444
52445
52446
52447
52448
52449
52450
52451
52452
52453
52454
52455
52456
52457
52458
52459
52460
52461
52462
52463
52464
52465
52466
52467
52468
52469
52470
52471
52472
52473
52474
52475
52476
52477
52478
52479
52480
52481
52482
52483
52484
52485
52486
52487
52488
52489
52490
52491
52492
52493
52494
52495
52496
52497
52498
52499
52500
52501
52502
52503
52504
52505
52506
52507
52508
52509
52510
52511
52512
52513
52514
52515
52516
52517
52518
52519
52520
52521
52522
52523
52524
52525
52526
52527
52528
52529
52530
52531
52532
52533
52534
52535
52536
52537
52538
52539
52540
52541
52542
52543
52544
52545
52546
52547
52548
52549
52550
52551
52552
52553
52554
52555
52556
52557
52558
52559
52560
52561
52562
52563
52564
52565
52566
52567
52568
52569
52570
52571
52572
52573
52574
52575
52576
52577
52578
52579
52580
52581
52582
52583
52584
52585
52586
52587
52588
52589
52590
52591
52592
52593
52594
52595
52596
52597
52598
52599
52600
52601
52602
52603
52604
52605
52606
52607
52608
52609
52610
52611
52612
52613
52614
52615
52616
52617
52618
52619
52620
52621
52622
52623
52624
52625
52626
52627
52628
52629
52630
52631
52632
52633
52634
52635
52636
52637
52638
52639
52640
52641
52642
52643
52644
52645
52646
52647
52648
52649
52650
52651
52652
52653
52654
52655
52656
52657
52658
52659
52660
52661
52662
52663
52664
52665
52666
52667
52668
52669
52670
52671
52672
52673
52674
52675
52676
52677
52678
52679
52680
52681
52682
52683
52684
52685
52686
52687
52688
52689
52690
52691
52692
52693
52694
52695
52696
52697
52698
52699
52700
52701
52702
52703
52704
52705
52706
52707
52708
52709
52710
52711
52712
52713
52714
52715
52716
52717
52718
52719
52720
52721
52722
52723
52724
52725
52726
52727
52728
52729
52730
52731
52732
52733
52734
52735
52736
52737
52738
52739
52740
52741
52742
52743
52744
52745
52746
52747
52748
52749
52750
52751
52752
52753
52754
52755
52756
52757
52758
52759
52760
52761
52762
52763
52764
52765
52766
52767
52768
52769
52770
52771
52772
52773
52774
52775
52776
52777
52778
52779
52780
52781
52782
52783
52784
52785
52786
52787
52788
52789
52790
52791
52792
52793
52794
52795
52796
52797
52798
52799
52800
52801
52802
52803
52804
52805
52806
52807
52808
52809
52810
52811
52812
52813
52814
52815
52816
52817
52818
52819
52820
52821
52822
52823
52824
52825
52826
52827
52828
52829
52830
52831
52832
52833
52834
52835
52836
52837
52838
52839
52840
52841
52842
52843
52844
52845
52846
52847
52848
52849
52850
52851
52852
52853
52854
52855
52856
52857
52858
52859
52860
52861
52862
52863
52864
52865
52866
52867
52868
52869
52870
52871
52872
52873
52874
52875
52876
52877
52878
52879
52880
52881
52882
52883
52884
52885
52886
52887
52888
52889
52890
52891
52892
52893
52894
52895
52896
52897
52898
52899
52900
52901
52902
52903
52904
52905
52906
52907
52908
52909
52910
52911
52912
52913
52914
52915
52916
52917
52918
52919
52920
52921
52922
52923
52924
52925
52926
52927
52928
52929
52930
52931
52932
52933
52934
52935
52936
52937
52938
52939
52940
52941
52942
52943
52944
52945
52946
52947
52948
52949
52950
52951
52952
52953
52954
52955
52956
52957
52958
52959
52960
52961
52962
52963
52964
52965
52966
52967
52968
52969
52970
52971
52972
52973
52974
52975
52976
52977
52978
52979
52980
52981
52982
52983
52984
52985
52986
52987
52988
52989
52990
52991
52992
52993
52994
52995
52996
52997
52998
52999
53000
53001
53002
53003
53004
53005
53006
53007
53008
53009
53010
53011
53012
53013
53014
53015
53016
53017
53018
53019
53020
53021
53022
53023
53024
53025
53026
53027
53028
53029
53030
53031
53032
53033
53034
53035
53036
53037
53038
53039
53040
53041
53042
53043
53044
53045
53046
53047
53048
53049
53050
53051
53052
53053
53054
53055
53056
53057
53058
53059
53060
53061
53062
53063
53064
53065
53066
53067
53068
53069
53070
53071
53072
53073
53074
53075
53076
53077
53078
53079
53080
53081
53082
53083
53084
53085
53086
53087
53088
53089
53090
53091
53092
53093
53094
53095
53096
53097
53098
53099
53100
53101
53102
53103
53104
53105
53106
53107
53108
53109
53110
53111
53112
53113
53114
53115
53116
53117
53118
53119
53120
53121
53122
53123
53124
53125
53126
53127
53128
53129
53130
53131
53132
53133
53134
53135
53136
53137
53138
53139
53140
53141
53142
53143
53144
53145
53146
53147
53148
53149
53150
53151
53152
53153
53154
53155
53156
53157
53158
53159
53160
53161
53162
53163
53164
53165
53166
53167
53168
53169
53170
53171
53172
53173
53174
53175
53176
53177
53178
53179
53180
53181
53182
53183
53184
53185
53186
53187
53188
53189
53190
53191
53192
53193
53194
53195
53196
53197
53198
53199
53200
53201
53202
53203
53204
53205
53206
53207
53208
53209
53210
53211
53212
53213
53214
53215
53216
53217
53218
53219
53220
53221
53222
53223
53224
53225
53226
53227
53228
53229
53230
53231
53232
53233
53234
53235
53236
53237
53238
53239
53240
53241
53242
53243
53244
53245
53246
53247
53248
53249
53250
53251
53252
53253
53254
53255
53256
53257
53258
53259
53260
53261
53262
53263
53264
53265
53266
53267
53268
53269
53270
53271
53272
53273
53274
53275
53276
53277
53278
53279
53280
53281
53282
53283
53284
53285
53286
53287
53288
53289
53290
53291
53292
53293
53294
53295
53296
53297
53298
53299
53300
53301
53302
53303
53304
53305
53306
53307
53308
53309
53310
53311
53312
53313
53314
53315
53316
53317
53318
53319
53320
53321
53322
53323
53324
53325
53326
53327
53328
53329
53330
53331
53332
53333
53334
53335
53336
53337
53338
53339
53340
53341
53342
53343
53344
53345
53346
53347
53348
53349
53350
53351
53352
53353
53354
53355
53356
53357
53358
53359
53360
53361
53362
53363
53364
53365
53366
53367
53368
53369
53370
53371
53372
53373
53374
53375
53376
53377
53378
53379
53380
53381
53382
53383
53384
53385
53386
53387
53388
53389
53390
53391
53392
53393
53394
53395
53396
53397
53398
53399
53400
53401
53402
53403
53404
53405
53406
53407
53408
53409
53410
53411
53412
53413
53414
53415
53416
53417
53418
53419
53420
53421
53422
53423
53424
53425
53426
53427
53428
53429
53430
53431
53432
53433
53434
53435
53436
53437
53438
53439
53440
53441
53442
53443
53444
53445
53446
53447
53448
53449
53450
53451
53452
53453
53454
53455
53456
53457
53458
53459
53460
53461
53462
53463
53464
53465
53466
53467
53468
53469
53470
53471
53472
53473
53474
53475
53476
53477
53478
53479
53480
53481
53482
53483
53484
53485
53486
53487
53488
53489
53490
53491
53492
53493
53494
53495
53496
53497
53498
53499
53500
53501
53502
53503
53504
53505
53506
53507
53508
53509
53510
53511
53512
53513
53514
53515
53516
53517
53518
53519
53520
53521
53522
53523
53524
53525
53526
53527
53528
53529
53530
53531
53532
53533
53534
53535
53536
53537
53538
53539
53540
53541
53542
53543
53544
53545
53546
53547
53548
53549
53550
53551
53552
53553
53554
53555
53556
53557
53558
53559
53560
53561
53562
53563
53564
53565
53566
53567
53568
53569
53570
53571
53572
53573
53574
53575
53576
53577
53578
53579
53580
53581
53582
53583
53584
53585
53586
53587
53588
53589
53590
53591
53592
53593
53594
53595
53596
53597
53598
53599
53600
53601
53602
53603
53604
53605
53606
53607
53608
53609
53610
53611
53612
53613
53614
53615
53616
53617
53618
53619
53620
53621
53622
53623
53624
53625
53626
53627
53628
53629
53630
53631
53632
53633
53634
53635
53636
53637
53638
53639
53640
53641
53642
53643
53644
53645
53646
53647
53648
53649
53650
53651
53652
53653
53654
53655
53656
53657
53658
53659
53660
53661
53662
53663
53664
53665
53666
53667
53668
53669
53670
53671
53672
53673
53674
53675
53676
53677
53678
53679
53680
53681
53682
53683
53684
53685
53686
53687
53688
53689
53690
53691
53692
53693
53694
53695
53696
53697
53698
53699
53700
53701
53702
53703
53704
53705
53706
53707
53708
53709
53710
53711
53712
53713
53714
53715
53716
53717
53718
53719
53720
53721
53722
53723
53724
53725
53726
53727
53728
53729
53730
53731
53732
53733
53734
53735
53736
53737
53738
53739
53740
53741
53742
53743
53744
53745
53746
53747
53748
53749
53750
53751
53752
53753
53754
53755
53756
53757
53758
53759
53760
53761
53762
53763
53764
53765
53766
53767
53768
53769
53770
53771
53772
53773
53774
53775
53776
53777
53778
53779
53780
53781
53782
53783
53784
53785
53786
53787
53788
53789
53790
53791
53792
53793
53794
53795
53796
53797
53798
53799
53800
53801
53802
53803
53804
53805
53806
53807
53808
53809
53810
53811
53812
53813
53814
53815
53816
53817
53818
53819
53820
53821
53822
53823
53824
53825
53826
53827
53828
53829
53830
53831
53832
53833
53834
53835
53836
53837
53838
53839
53840
53841
53842
53843
53844
53845
53846
53847
53848
53849
53850
53851
53852
53853
53854
53855
53856
53857
53858
53859
53860
53861
53862
53863
53864
53865
53866
53867
53868
53869
53870
53871
53872
53873
53874
53875
53876
53877
53878
53879
53880
53881
53882
53883
53884
53885
53886
53887
53888
53889
53890
53891
53892
53893
53894
53895
53896
53897
53898
53899
53900
53901
53902
53903
53904
53905
53906
53907
53908
53909
53910
53911
53912
53913
53914
53915
53916
53917
53918
53919
53920
53921
53922
53923
53924
53925
53926
53927
53928
53929
53930
53931
53932
53933
53934
53935
53936
53937
53938
53939
53940
53941
53942
53943
53944
53945
53946
53947
53948
53949
53950
53951
53952
53953
53954
53955
53956
53957
53958
53959
53960
53961
53962
53963
53964
53965
53966
53967
53968
53969
53970
53971
53972
53973
53974
53975
53976
53977
53978
53979
53980
53981
53982
53983
53984
53985
53986
53987
53988
53989
53990
53991
53992
53993
53994
53995
53996
53997
53998
53999
54000
54001
54002
54003
54004
54005
54006
54007
54008
54009
54010
54011
54012
54013
54014
54015
54016
54017
54018
54019
54020
54021
54022
54023
54024
54025
54026
54027
54028
54029
54030
54031
54032
54033
54034
54035
54036
54037
54038
54039
54040
54041
54042
54043
54044
54045
54046
54047
54048
54049
54050
54051
54052
54053
54054
54055
54056
54057
54058
54059
54060
54061
54062
54063
54064
54065
54066
54067
54068
54069
54070
54071
54072
54073
54074
54075
54076
54077
54078
54079
54080
54081
54082
54083
54084
54085
54086
54087
54088
54089
54090
54091
54092
54093
54094
54095
54096
54097
54098
54099
54100
54101
54102
54103
54104
54105
54106
54107
54108
54109
54110
54111
54112
54113
54114
54115
54116
54117
54118
54119
54120
54121
54122
54123
54124
54125
54126
54127
54128
54129
54130
54131
54132
54133
54134
54135
54136
54137
54138
54139
54140
54141
54142
54143
54144
54145
54146
54147
54148
54149
54150
54151
54152
54153
54154
54155
54156
54157
54158
54159
54160
54161
54162
54163
54164
54165
54166
54167
54168
54169
54170
54171
54172
54173
54174
54175
54176
54177
54178
54179
54180
54181
54182
54183
54184
54185
54186
54187
54188
54189
54190
54191
54192
54193
54194
54195
54196
54197
54198
54199
54200
54201
54202
54203
54204
54205
54206
54207
54208
54209
54210
54211
54212
54213
54214
54215
54216
54217
54218
54219
54220
54221
54222
54223
54224
54225
54226
54227
54228
54229
54230
54231
54232
54233
54234
54235
54236
54237
54238
54239
54240
54241
54242
54243
54244
54245
54246
54247
54248
54249
54250
54251
54252
54253
54254
54255
54256
54257
54258
54259
54260
54261
54262
54263
54264
54265
54266
54267
54268
54269
54270
54271
54272
54273
54274
54275
54276
54277
54278
54279
54280
54281
54282
54283
54284
54285
54286
54287
54288
54289
54290
54291
54292
54293
54294
54295
54296
54297
54298
54299
54300
54301
54302
54303
54304
54305
54306
54307
54308
54309
54310
54311
54312
54313
54314
54315
54316
54317
54318
54319
54320
54321
54322
54323
54324
54325
54326
54327
54328
54329
54330
54331
54332
54333
54334
54335
54336
54337
54338
54339
54340
54341
54342
54343
54344
54345
54346
54347
54348
54349
54350
54351
54352
54353
54354
54355
54356
54357
54358
54359
54360
54361
54362
54363
54364
54365
54366
54367
54368
54369
54370
54371
54372
54373
54374
54375
54376
54377
54378
54379
54380
54381
54382
54383
54384
54385
54386
54387
54388
54389
54390
54391
54392
54393
54394
54395
54396
54397
54398
54399
54400
54401
54402
54403
54404
54405
54406
54407
54408
54409
54410
54411
54412
54413
54414
54415
54416
54417
54418
54419
54420
54421
54422
54423
54424
54425
54426
54427
54428
54429
54430
54431
54432
54433
54434
54435
54436
54437
54438
54439
54440
54441
54442
54443
54444
54445
54446
54447
54448
54449
54450
54451
54452
54453
54454
54455
54456
54457
54458
54459
54460
54461
54462
54463
54464
54465
54466
54467
54468
54469
54470
54471
54472
54473
54474
54475
54476
54477
54478
54479
54480
54481
54482
54483
54484
54485
54486
54487
54488
54489
54490
54491
54492
54493
54494
54495
54496
54497
54498
54499
54500
54501
54502
54503
54504
54505
54506
54507
54508
54509
54510
54511
54512
54513
54514
54515
54516
54517
54518
54519
54520
54521
54522
54523
54524
54525
54526
54527
54528
54529
54530
54531
54532
54533
54534
54535
54536
54537
54538
54539
54540
54541
54542
54543
54544
54545
54546
54547
54548
54549
54550
54551
54552
54553
54554
54555
54556
54557
54558
54559
54560
54561
54562
54563
54564
54565
54566
54567
54568
54569
54570
54571
54572
54573
54574
54575
54576
54577
54578
54579
54580
54581
54582
54583
54584
54585
54586
54587
54588
54589
54590
54591
54592
54593
54594
54595
54596
54597
54598
54599
54600
54601
54602
54603
54604
54605
54606
54607
54608
54609
54610
54611
54612
54613
54614
54615
54616
54617
54618
54619
54620
54621
54622
54623
54624
54625
54626
54627
54628
54629
54630
54631
54632
54633
54634
54635
54636
54637
54638
54639
54640
54641
54642
54643
54644
54645
54646
54647
54648
54649
54650
54651
54652
54653
54654
54655
54656
54657
54658
54659
54660
54661
54662
54663
54664
54665
54666
54667
54668
54669
54670
54671
54672
54673
54674
54675
54676
54677
54678
54679
54680
54681
54682
54683
54684
54685
54686
54687
54688
54689
54690
54691
54692
54693
54694
54695
54696
54697
54698
54699
54700
54701
54702
54703
54704
54705
54706
54707
54708
54709
54710
54711
54712
54713
54714
54715
54716
54717
54718
54719
54720
54721
54722
54723
54724
54725
54726
54727
54728
54729
54730
54731
54732
54733
54734
54735
54736
54737
54738
54739
54740
54741
54742
54743
54744
54745
54746
54747
54748
54749
54750
54751
54752
54753
54754
54755
54756
54757
54758
54759
54760
54761
54762
54763
54764
54765
54766
54767
54768
54769
54770
54771
54772
54773
54774
54775
54776
54777
54778
54779
54780
54781
54782
54783
54784
54785
54786
54787
54788
54789
54790
54791
54792
54793
54794
54795
54796
54797
54798
54799
54800
54801
54802
54803
54804
54805
54806
54807
54808
54809
54810
54811
54812
54813
54814
54815
54816
54817
54818
54819
54820
54821
54822
54823
54824
54825
54826
54827
54828
54829
54830
54831
54832
54833
54834
54835
54836
54837
54838
54839
54840
54841
54842
54843
54844
54845
54846
54847
54848
54849
54850
54851
54852
54853
54854
54855
54856
54857
54858
54859
54860
54861
54862
54863
54864
54865
54866
54867
54868
54869
54870
54871
54872
54873
54874
54875
54876
54877
54878
54879
54880
54881
54882
54883
54884
54885
54886
54887
54888
54889
54890
54891
54892
54893
54894
54895
54896
54897
54898
54899
54900
54901
54902
54903
54904
54905
54906
54907
54908
54909
54910
54911
54912
54913
54914
54915
54916
54917
54918
54919
54920
54921
54922
54923
54924
54925
54926
54927
54928
54929
54930
54931
54932
54933
54934
54935
54936
54937
54938
54939
54940
54941
54942
54943
54944
54945
54946
54947
54948
54949
54950
54951
54952
54953
54954
54955
54956
54957
54958
54959
54960
54961
54962
54963
54964
54965
54966
54967
54968
54969
54970
54971
54972
54973
54974
54975
54976
54977
54978
54979
54980
54981
54982
54983
54984
54985
54986
54987
54988
54989
54990
54991
54992
54993
54994
54995
54996
54997
54998
54999
55000
55001
55002
55003
55004
55005
55006
55007
55008
55009
55010
55011
55012
55013
55014
55015
55016
55017
55018
55019
55020
55021
55022
55023
55024
55025
55026
55027
55028
55029
55030
55031
55032
55033
55034
55035
55036
55037
55038
55039
55040
55041
55042
55043
55044
55045
55046
55047
55048
55049
55050
55051
55052
55053
55054
55055
55056
55057
55058
55059
55060
55061
55062
55063
55064
55065
55066
55067
55068
55069
55070
55071
55072
55073
55074
55075
55076
55077
55078
55079
55080
55081
55082
55083
55084
55085
55086
55087
55088
55089
55090
55091
55092
55093
55094
55095
55096
55097
55098
55099
55100
55101
55102
55103
55104
55105
55106
55107
55108
55109
55110
55111
55112
55113
55114
55115
55116
55117
55118
55119
55120
55121
55122
55123
55124
55125
55126
55127
55128
55129
55130
55131
55132
55133
55134
55135
55136
55137
55138
55139
55140
55141
55142
55143
55144
55145
55146
55147
55148
55149
55150
55151
55152
55153
55154
55155
55156
55157
55158
55159
55160
55161
55162
55163
55164
55165
55166
55167
55168
55169
55170
55171
55172
55173
55174
55175
55176
55177
55178
55179
55180
55181
55182
55183
55184
55185
55186
55187
55188
55189
55190
55191
55192
55193
55194
55195
55196
55197
55198
55199
55200
55201
55202
55203
55204
55205
55206
55207
55208
55209
55210
55211
55212
55213
55214
55215
55216
55217
55218
55219
55220
55221
55222
55223
55224
55225
55226
55227
55228
55229
55230
55231
55232
55233
55234
55235
55236
55237
55238
55239
55240
55241
55242
55243
55244
55245
55246
55247
55248
55249
55250
55251
55252
55253
55254
55255
55256
55257
55258
55259
55260
55261
55262
55263
55264
55265
55266
55267
55268
55269
55270
55271
55272
55273
55274
55275
55276
55277
55278
55279
55280
55281
55282
55283
55284
55285
55286
55287
55288
55289
55290
55291
55292
55293
55294
55295
55296
55297
55298
55299
55300
55301
55302
55303
55304
55305
55306
55307
55308
55309
55310
55311
55312
55313
55314
55315
55316
55317
55318
55319
55320
55321
55322
55323
55324
55325
55326
55327
55328
55329
55330
55331
55332
55333
55334
55335
55336
55337
55338
55339
55340
55341
55342
55343
55344
55345
55346
55347
55348
55349
55350
55351
55352
55353
55354
55355
55356
55357
55358
55359
55360
55361
55362
55363
55364
55365
55366
55367
55368
55369
55370
55371
55372
55373
55374
55375
55376
55377
55378
55379
55380
55381
55382
55383
55384
55385
55386
55387
55388
55389
55390
55391
55392
55393
55394
55395
55396
55397
55398
55399
55400
55401
55402
55403
55404
55405
55406
55407
55408
55409
55410
55411
55412
55413
55414
55415
55416
55417
55418
55419
55420
55421
55422
55423
55424
55425
55426
55427
55428
55429
55430
55431
55432
55433
55434
55435
55436
55437
55438
55439
55440
55441
55442
55443
55444
55445
55446
55447
55448
55449
55450
55451
55452
55453
55454
55455
55456
55457
55458
55459
55460
55461
55462
55463
55464
55465
55466
55467
55468
55469
55470
55471
55472
55473
55474
55475
55476
55477
55478
55479
55480
55481
55482
55483
55484
55485
55486
55487
55488
55489
55490
55491
55492
55493
55494
55495
55496
55497
55498
55499
55500
55501
55502
55503
55504
55505
55506
55507
55508
55509
55510
55511
55512
55513
55514
55515
55516
55517
55518
55519
55520
55521
55522
55523
55524
55525
55526
55527
55528
55529
55530
55531
55532
55533
55534
55535
55536
55537
55538
55539
55540
55541
55542
55543
55544
55545
55546
55547
55548
55549
55550
55551
55552
55553
55554
55555
55556
55557
55558
55559
55560
55561
55562
55563
55564
55565
55566
55567
55568
55569
55570
55571
55572
55573
55574
55575
55576
55577
55578
55579
55580
55581
55582
55583
55584
55585
55586
55587
55588
55589
55590
55591
55592
55593
55594
55595
55596
55597
55598
55599
55600
55601
55602
55603
55604
55605
55606
55607
55608
55609
55610
55611
55612
55613
55614
55615
55616
55617
55618
55619
55620
55621
55622
55623
55624
55625
55626
55627
55628
55629
55630
55631
55632
55633
55634
55635
55636
55637
55638
55639
55640
55641
55642
55643
55644
55645
55646
55647
55648
55649
55650
55651
55652
55653
55654
55655
55656
55657
55658
55659
55660
55661
55662
55663
55664
55665
55666
55667
55668
55669
55670
55671
55672
55673
55674
55675
55676
55677
55678
55679
55680
55681
55682
55683
55684
55685
55686
55687
55688
55689
55690
55691
55692
55693
55694
55695
55696
55697
55698
55699
55700
55701
55702
55703
55704
55705
55706
55707
55708
55709
55710
55711
55712
55713
55714
55715
55716
55717
55718
55719
55720
55721
55722
55723
55724
55725
55726
55727
55728
55729
55730
55731
55732
55733
55734
55735
55736
55737
55738
55739
55740
55741
55742
55743
55744
55745
55746
55747
55748
55749
55750
55751
55752
55753
55754
55755
55756
55757
55758
55759
55760
55761
55762
55763
55764
55765
55766
55767
55768
55769
55770
55771
55772
55773
55774
55775
55776
55777
55778
55779
55780
55781
55782
55783
55784
55785
55786
55787
55788
55789
55790
55791
55792
55793
55794
55795
55796
55797
55798
55799
55800
55801
55802
55803
55804
55805
55806
55807
55808
55809
55810
55811
55812
55813
55814
55815
55816
55817
55818
55819
55820
55821
55822
55823
55824
55825
55826
55827
55828
55829
55830
55831
55832
55833
55834
55835
55836
55837
55838
55839
55840
55841
55842
55843
55844
55845
55846
55847
55848
55849
55850
55851
55852
55853
55854
55855
55856
55857
55858
55859
55860
55861
55862
55863
55864
55865
55866
55867
55868
55869
55870
55871
55872
55873
55874
55875
55876
55877
55878
55879
55880
55881
55882
55883
55884
55885
55886
55887
55888
55889
55890
55891
55892
55893
55894
55895
55896
55897
55898
55899
55900
55901
55902
55903
55904
55905
55906
55907
55908
55909
55910
55911
55912
55913
55914
55915
55916
55917
55918
55919
55920
55921
55922
55923
55924
55925
55926
55927
55928
55929
55930
55931
55932
55933
55934
55935
55936
55937
55938
55939
55940
55941
55942
55943
55944
55945
55946
55947
55948
55949
55950
55951
55952
55953
55954
55955
55956
55957
55958
55959
55960
55961
55962
55963
55964
55965
55966
55967
55968
55969
55970
55971
55972
55973
55974
55975
55976
55977
55978
55979
55980
55981
55982
55983
55984
55985
55986
55987
55988
55989
55990
55991
55992
55993
55994
55995
55996
55997
55998
55999
56000
56001
56002
56003
56004
56005
56006
56007
56008
56009
56010
56011
56012
56013
56014
56015
56016
56017
56018
56019
56020
56021
56022
56023
56024
56025
56026
56027
56028
56029
56030
56031
56032
56033
56034
56035
56036
56037
56038
56039
56040
56041
56042
56043
56044
56045
56046
56047
56048
56049
56050
56051
56052
56053
56054
56055
56056
56057
56058
56059
56060
56061
56062
56063
56064
56065
56066
56067
56068
56069
56070
56071
56072
56073
56074
56075
56076
56077
56078
56079
56080
56081
56082
56083
56084
56085
56086
56087
56088
56089
56090
56091
56092
56093
56094
56095
56096
56097
56098
56099
56100
56101
56102
56103
56104
56105
56106
56107
56108
56109
56110
56111
56112
56113
56114
56115
56116
56117
56118
56119
56120
56121
56122
56123
56124
56125
56126
56127
56128
56129
56130
56131
56132
56133
56134
56135
56136
56137
56138
56139
56140
56141
56142
56143
56144
56145
56146
56147
56148
56149
56150
56151
56152
56153
56154
56155
56156
56157
56158
56159
56160
56161
56162
56163
56164
56165
56166
56167
56168
56169
56170
56171
56172
56173
56174
56175
56176
56177
56178
56179
56180
56181
56182
56183
56184
56185
56186
56187
56188
56189
56190
56191
56192
56193
56194
56195
56196
56197
56198
56199
56200
56201
56202
56203
56204
56205
56206
56207
56208
56209
56210
56211
56212
56213
56214
56215
56216
56217
56218
56219
56220
56221
56222
56223
56224
56225
56226
56227
56228
56229
56230
56231
56232
56233
56234
56235
56236
56237
56238
56239
56240
56241
56242
56243
56244
56245
56246
56247
56248
56249
56250
56251
56252
56253
56254
56255
56256
56257
56258
56259
56260
56261
56262
56263
56264
56265
56266
56267
56268
56269
56270
56271
56272
56273
56274
56275
56276
56277
56278
56279
56280
56281
56282
56283
56284
56285
56286
56287
56288
56289
56290
56291
56292
56293
56294
56295
56296
56297
56298
56299
56300
56301
56302
56303
56304
56305
56306
56307
56308
56309
56310
56311
56312
56313
56314
56315
56316
56317
56318
56319
56320
56321
56322
56323
56324
56325
56326
56327
56328
56329
56330
56331
56332
56333
56334
56335
56336
56337
56338
56339
56340
56341
56342
56343
56344
56345
56346
56347
56348
56349
56350
56351
56352
56353
56354
56355
56356
56357
56358
56359
56360
56361
56362
56363
56364
56365
56366
56367
56368
56369
56370
56371
56372
56373
56374
56375
56376
56377
56378
56379
56380
56381
56382
56383
56384
56385
56386
56387
56388
56389
56390
56391
56392
56393
56394
56395
56396
56397
56398
56399
56400
56401
56402
56403
56404
56405
56406
56407
56408
56409
56410
56411
56412
56413
56414
56415
56416
56417
56418
56419
56420
56421
56422
56423
56424
56425
56426
56427
56428
56429
56430
56431
56432
56433
56434
56435
56436
56437
56438
56439
56440
56441
56442
56443
56444
56445
56446
56447
56448
56449
56450
56451
56452
56453
56454
56455
56456
56457
56458
56459
56460
56461
56462
56463
56464
56465
56466
56467
56468
56469
56470
56471
56472
56473
56474
56475
56476
56477
56478
56479
56480
56481
56482
56483
56484
56485
56486
56487
56488
56489
56490
56491
56492
56493
56494
56495
56496
56497
56498
56499
56500
56501
56502
56503
56504
56505
56506
56507
56508
56509
56510
56511
56512
56513
56514
56515
56516
56517
56518
56519
56520
56521
56522
56523
56524
56525
56526
56527
56528
56529
56530
56531
56532
56533
56534
56535
56536
56537
56538
56539
56540
56541
56542
56543
56544
56545
56546
56547
56548
56549
56550
56551
56552
56553
56554
56555
56556
56557
56558
56559
56560
56561
56562
56563
56564
56565
56566
56567
56568
56569
56570
56571
56572
56573
56574
56575
56576
56577
56578
56579
56580
56581
56582
56583
56584
56585
56586
56587
56588
56589
56590
56591
56592
56593
56594
56595
56596
56597
56598
56599
56600
56601
56602
56603
56604
56605
56606
56607
56608
56609
56610
56611
56612
56613
56614
56615
56616
56617
56618
56619
56620
56621
56622
56623
56624
56625
56626
56627
56628
56629
56630
56631
56632
56633
56634
56635
56636
56637
56638
56639
56640
56641
56642
56643
56644
56645
56646
56647
56648
56649
56650
56651
56652
56653
56654
56655
56656
56657
56658
56659
56660
56661
56662
56663
56664
56665
56666
56667
56668
56669
56670
56671
56672
56673
56674
56675
56676
56677
56678
56679
56680
56681
56682
56683
56684
56685
56686
56687
56688
56689
56690
56691
56692
56693
56694
56695
56696
56697
56698
56699
56700
56701
56702
56703
56704
56705
56706
56707
56708
56709
56710
56711
56712
56713
56714
56715
56716
56717
56718
56719
56720
56721
56722
56723
56724
56725
56726
56727
56728
56729
56730
56731
56732
56733
56734
56735
56736
56737
56738
56739
56740
56741
56742
56743
56744
56745
56746
56747
56748
56749
56750
56751
56752
56753
56754
56755
56756
56757
56758
56759
56760
56761
56762
56763
56764
56765
56766
56767
56768
56769
56770
56771
56772
56773
56774
56775
56776
56777
56778
56779
56780
56781
56782
56783
56784
56785
56786
56787
56788
56789
56790
56791
56792
56793
56794
56795
56796
56797
56798
56799
56800
56801
56802
56803
56804
56805
56806
56807
56808
56809
56810
56811
56812
56813
56814
56815
56816
56817
56818
56819
56820
56821
56822
56823
56824
56825
56826
56827
56828
56829
56830
56831
56832
56833
56834
56835
56836
56837
56838
56839
56840
56841
56842
56843
56844
56845
56846
56847
56848
56849
56850
56851
56852
56853
56854
56855
56856
56857
56858
56859
56860
56861
56862
56863
56864
56865
56866
56867
56868
56869
56870
56871
56872
56873
56874
56875
56876
56877
56878
56879
56880
56881
56882
56883
56884
56885
56886
56887
56888
56889
56890
56891
56892
56893
56894
56895
56896
56897
56898
56899
56900
56901
56902
56903
56904
56905
56906
56907
56908
56909
56910
56911
56912
56913
56914
56915
56916
56917
56918
56919
56920
56921
56922
56923
56924
56925
56926
56927
56928
56929
56930
56931
56932
56933
56934
56935
56936
56937
56938
56939
56940
56941
56942
56943
56944
56945
56946
56947
56948
56949
56950
56951
56952
56953
56954
56955
56956
56957
56958
56959
56960
56961
56962
56963
56964
56965
56966
56967
56968
56969
56970
56971
56972
56973
56974
56975
56976
56977
56978
56979
56980
56981
56982
56983
56984
56985
56986
56987
56988
56989
56990
56991
56992
56993
56994
56995
56996
56997
56998
56999
57000
57001
57002
57003
57004
57005
57006
57007
57008
57009
57010
57011
57012
57013
57014
57015
57016
57017
57018
57019
57020
57021
57022
57023
57024
57025
57026
57027
57028
57029
57030
57031
57032
57033
57034
57035
57036
57037
57038
57039
57040
57041
57042
57043
57044
57045
57046
57047
57048
57049
57050
57051
57052
57053
57054
57055
57056
57057
57058
57059
57060
57061
57062
57063
57064
57065
57066
57067
57068
57069
57070
57071
57072
57073
57074
57075
57076
57077
57078
57079
57080
57081
57082
57083
57084
57085
57086
57087
57088
57089
57090
57091
57092
57093
57094
57095
57096
57097
57098
57099
57100
57101
57102
57103
57104
57105
57106
57107
57108
57109
57110
57111
57112
57113
57114
57115
57116
57117
57118
57119
57120
57121
57122
57123
57124
57125
57126
57127
57128
57129
57130
57131
57132
57133
57134
57135
57136
57137
57138
57139
57140
57141
57142
57143
57144
57145
57146
57147
57148
57149
57150
57151
57152
57153
57154
57155
57156
57157
57158
57159
57160
57161
57162
57163
57164
57165
57166
57167
57168
57169
57170
57171
57172
57173
57174
57175
57176
57177
57178
57179
57180
57181
57182
57183
57184
57185
57186
57187
57188
57189
57190
57191
57192
57193
57194
57195
57196
57197
57198
57199
57200
57201
57202
57203
57204
57205
57206
57207
57208
57209
57210
57211
57212
57213
57214
57215
57216
57217
57218
57219
57220
57221
57222
57223
57224
57225
57226
57227
57228
57229
57230
57231
57232
57233
57234
57235
57236
57237
57238
57239
57240
57241
57242
57243
57244
57245
57246
57247
57248
57249
57250
57251
57252
57253
57254
57255
57256
57257
57258
57259
57260
57261
57262
57263
57264
57265
57266
57267
57268
57269
57270
57271
57272
57273
57274
57275
57276
57277
57278
57279
57280
57281
57282
57283
57284
57285
57286
57287
57288
57289
57290
57291
57292
57293
57294
57295
57296
57297
57298
57299
57300
57301
57302
57303
57304
57305
57306
57307
57308
57309
57310
57311
57312
57313
57314
57315
57316
57317
57318
57319
57320
57321
57322
57323
57324
57325
57326
57327
57328
57329
57330
57331
57332
57333
57334
57335
57336
57337
57338
57339
57340
57341
57342
57343
57344
57345
57346
57347
57348
57349
57350
57351
57352
57353
57354
57355
57356
57357
57358
57359
57360
57361
57362
57363
57364
57365
57366
57367
57368
57369
57370
57371
57372
57373
57374
57375
57376
57377
57378
57379
57380
57381
57382
57383
57384
57385
57386
57387
57388
57389
57390
57391
57392
57393
57394
57395
57396
57397
57398
57399
57400
57401
57402
57403
57404
57405
57406
57407
57408
57409
57410
57411
57412
57413
57414
57415
57416
57417
57418
57419
57420
57421
57422
57423
57424
57425
57426
57427
57428
57429
57430
57431
57432
57433
57434
57435
57436
57437
57438
57439
57440
57441
57442
57443
57444
57445
57446
57447
57448
57449
57450
57451
57452
57453
57454
57455
57456
57457
57458
57459
57460
57461
57462
57463
57464
57465
57466
57467
57468
57469
57470
57471
57472
57473
57474
57475
57476
57477
57478
57479
57480
57481
57482
57483
57484
57485
57486
57487
57488
57489
57490
57491
57492
57493
57494
57495
57496
57497
57498
57499
57500
57501
57502
57503
57504
57505
57506
57507
57508
57509
57510
57511
57512
57513
57514
57515
57516
57517
57518
57519
57520
57521
57522
57523
57524
57525
57526
57527
57528
57529
57530
57531
57532
57533
57534
57535
57536
57537
57538
57539
57540
57541
57542
57543
57544
57545
57546
57547
57548
57549
57550
57551
57552
57553
57554
57555
57556
57557
57558
57559
57560
57561
57562
57563
57564
57565
57566
57567
57568
57569
57570
57571
57572
57573
57574
57575
57576
57577
57578
57579
57580
57581
57582
57583
57584
57585
57586
57587
57588
57589
57590
57591
57592
57593
57594
57595
57596
57597
57598
57599
57600
57601
57602
57603
57604
57605
57606
57607
57608
57609
57610
57611
57612
57613
57614
57615
57616
57617
57618
57619
57620
57621
57622
57623
57624
57625
57626
57627
57628
57629
57630
57631
57632
57633
57634
57635
57636
57637
57638
57639
57640
57641
57642
57643
57644
57645
57646
57647
57648
57649
57650
57651
57652
57653
57654
57655
57656
57657
57658
57659
57660
57661
57662
57663
57664
57665
57666
57667
57668
57669
57670
57671
57672
57673
57674
57675
57676
57677
57678
57679
57680
57681
57682
57683
57684
57685
57686
57687
57688
57689
57690
57691
57692
57693
57694
57695
57696
57697
57698
57699
57700
57701
57702
57703
57704
57705
57706
57707
57708
57709
57710
57711
57712
57713
57714
57715
57716
57717
57718
57719
57720
57721
57722
57723
57724
57725
57726
57727
57728
57729
57730
57731
57732
57733
57734
57735
57736
57737
57738
57739
57740
57741
57742
57743
57744
57745
57746
57747
57748
57749
57750
57751
57752
57753
57754
57755
57756
57757
57758
57759
57760
57761
57762
57763
57764
57765
57766
57767
57768
57769
57770
57771
57772
57773
57774
57775
57776
57777
57778
57779
57780
57781
57782
57783
57784
57785
57786
57787
57788
57789
57790
57791
57792
57793
57794
57795
57796
57797
57798
57799
57800
57801
57802
57803
57804
57805
57806
57807
57808
57809
57810
57811
57812
57813
57814
57815
57816
57817
57818
57819
57820
57821
57822
57823
57824
57825
57826
57827
57828
57829
57830
57831
57832
57833
57834
57835
57836
57837
57838
57839
57840
57841
57842
57843
57844
57845
57846
57847
57848
57849
57850
57851
57852
57853
57854
57855
57856
57857
57858
57859
57860
57861
57862
57863
57864
57865
57866
57867
57868
57869
57870
57871
57872
57873
57874
57875
57876
57877
57878
57879
57880
57881
57882
57883
57884
57885
57886
57887
57888
57889
57890
57891
57892
57893
57894
57895
57896
57897
57898
57899
57900
57901
57902
57903
57904
57905
57906
57907
57908
57909
57910
57911
57912
57913
57914
57915
57916
57917
57918
57919
57920
57921
57922
57923
57924
57925
57926
57927
57928
57929
57930
57931
57932
57933
57934
57935
57936
57937
57938
57939
57940
57941
57942
57943
57944
57945
57946
57947
57948
57949
57950
57951
57952
57953
57954
57955
57956
57957
57958
57959
57960
57961
57962
57963
57964
57965
57966
57967
57968
57969
57970
57971
57972
57973
57974
57975
57976
57977
57978
57979
57980
57981
57982
57983
57984
57985
57986
57987
57988
57989
57990
57991
57992
57993
57994
57995
57996
57997
57998
57999
58000
58001
58002
58003
58004
58005
58006
58007
58008
58009
58010
58011
58012
58013
58014
58015
58016
58017
58018
58019
58020
58021
58022
58023
58024
58025
58026
58027
58028
58029
58030
58031
58032
58033
58034
58035
58036
58037
58038
58039
58040
58041
58042
58043
58044
58045
58046
58047
58048
58049
58050
58051
58052
58053
58054
58055
58056
58057
58058
58059
58060
58061
58062
58063
58064
58065
58066
58067
58068
58069
58070
58071
58072
58073
58074
58075
58076
58077
58078
58079
58080
58081
58082
58083
58084
58085
58086
58087
58088
58089
58090
58091
58092
58093
58094
58095
58096
58097
58098
58099
58100
58101
58102
58103
58104
58105
58106
58107
58108
58109
58110
58111
58112
58113
58114
58115
58116
58117
58118
58119
58120
58121
58122
58123
58124
58125
58126
58127
58128
58129
58130
58131
58132
58133
58134
58135
58136
58137
58138
58139
58140
58141
58142
58143
58144
58145
58146
58147
58148
58149
58150
58151
58152
58153
58154
58155
58156
58157
58158
58159
58160
58161
58162
58163
58164
58165
58166
58167
58168
58169
58170
58171
58172
58173
58174
58175
58176
58177
58178
58179
58180
58181
58182
58183
58184
58185
58186
58187
58188
58189
58190
58191
58192
58193
58194
58195
58196
58197
58198
58199
58200
58201
58202
58203
58204
58205
58206
58207
58208
58209
58210
58211
58212
58213
58214
58215
58216
58217
58218
58219
58220
58221
58222
58223
58224
58225
58226
58227
58228
58229
58230
58231
58232
58233
58234
58235
58236
58237
58238
58239
58240
58241
58242
58243
58244
58245
58246
58247
58248
58249
58250
58251
58252
58253
58254
58255
58256
58257
58258
58259
58260
58261
58262
58263
58264
58265
58266
58267
58268
58269
58270
58271
58272
58273
58274
58275
58276
58277
58278
58279
58280
58281
58282
58283
58284
58285
58286
58287
58288
58289
58290
58291
58292
58293
58294
58295
58296
58297
58298
58299
58300
58301
58302
58303
58304
58305
58306
58307
58308
58309
58310
58311
58312
58313
58314
58315
58316
58317
58318
58319
58320
58321
58322
58323
58324
58325
58326
58327
58328
58329
58330
58331
58332
58333
58334
58335
58336
58337
58338
58339
58340
58341
58342
58343
58344
58345
58346
58347
58348
58349
58350
58351
58352
58353
58354
58355
58356
58357
58358
58359
58360
58361
58362
58363
58364
58365
58366
58367
58368
58369
58370
58371
58372
58373
58374
58375
58376
58377
58378
58379
58380
58381
58382
58383
58384
58385
58386
58387
58388
58389
58390
58391
58392
58393
58394
58395
58396
58397
58398
58399
58400
58401
58402
58403
58404
58405
58406
58407
58408
58409
58410
58411
58412
58413
58414
58415
58416
58417
58418
58419
58420
58421
58422
58423
58424
58425
58426
58427
58428
58429
58430
58431
58432
58433
58434
58435
58436
58437
58438
58439
58440
58441
58442
58443
58444
58445
58446
58447
58448
58449
58450
58451
58452
58453
58454
58455
58456
58457
58458
58459
58460
58461
58462
58463
58464
58465
58466
58467
58468
58469
58470
58471
58472
58473
58474
58475
58476
58477
58478
58479
58480
58481
58482
58483
58484
58485
58486
58487
58488
58489
58490
58491
58492
58493
58494
58495
58496
58497
58498
58499
58500
58501
58502
58503
58504
58505
58506
58507
58508
58509
58510
58511
58512
58513
58514
58515
58516
58517
58518
58519
58520
58521
58522
58523
58524
58525
58526
58527
58528
58529
58530
58531
58532
58533
58534
58535
58536
58537
58538
58539
58540
58541
58542
58543
58544
58545
58546
58547
58548
58549
58550
58551
58552
58553
58554
58555
58556
58557
58558
58559
58560
58561
58562
58563
58564
58565
58566
58567
58568
58569
58570
58571
58572
58573
58574
58575
58576
58577
58578
58579
58580
58581
58582
58583
58584
58585
58586
58587
58588
58589
58590
58591
58592
58593
58594
58595
58596
58597
58598
58599
58600
58601
58602
58603
58604
58605
58606
58607
58608
58609
58610
58611
58612
58613
58614
58615
58616
58617
58618
58619
58620
58621
58622
58623
58624
58625
58626
58627
58628
58629
58630
58631
58632
58633
58634
58635
58636
58637
58638
58639
58640
58641
58642
58643
58644
58645
58646
58647
58648
58649
58650
58651
58652
58653
58654
58655
58656
58657
58658
58659
58660
58661
58662
58663
58664
58665
58666
58667
58668
58669
58670
58671
58672
58673
58674
58675
58676
58677
58678
58679
58680
58681
58682
58683
58684
58685
58686
58687
58688
58689
58690
58691
58692
58693
58694
58695
58696
58697
58698
58699
58700
58701
58702
58703
58704
58705
58706
58707
58708
58709
58710
58711
58712
58713
58714
58715
58716
58717
58718
58719
58720
58721
58722
58723
58724
58725
58726
58727
58728
58729
58730
58731
58732
58733
58734
58735
58736
58737
58738
58739
58740
58741
58742
58743
58744
58745
58746
58747
58748
58749
58750
58751
58752
58753
58754
58755
58756
58757
58758
58759
58760
58761
58762
58763
58764
58765
58766
58767
58768
58769
58770
58771
58772
58773
58774
58775
58776
58777
58778
58779
58780
58781
58782
58783
58784
58785
58786
58787
58788
58789
58790
58791
58792
58793
58794
58795
58796
58797
58798
58799
58800
58801
58802
58803
58804
58805
58806
58807
58808
58809
58810
58811
58812
58813
58814
58815
58816
58817
58818
58819
58820
58821
58822
58823
58824
58825
58826
58827
58828
58829
58830
58831
58832
58833
58834
58835
58836
58837
58838
58839
58840
58841
58842
58843
58844
58845
58846
58847
58848
58849
58850
58851
58852
58853
58854
58855
58856
58857
58858
58859
58860
58861
58862
58863
58864
58865
58866
58867
58868
58869
58870
58871
58872
58873
58874
58875
58876
58877
58878
58879
58880
58881
58882
58883
58884
58885
58886
58887
58888
58889
58890
58891
58892
58893
58894
58895
58896
58897
58898
58899
58900
58901
58902
58903
58904
58905
58906
58907
58908
58909
58910
58911
58912
58913
58914
58915
58916
58917
58918
58919
58920
58921
58922
58923
58924
58925
58926
58927
58928
58929
58930
58931
58932
58933
58934
58935
58936
58937
58938
58939
58940
58941
58942
58943
58944
58945
58946
58947
58948
58949
58950
58951
58952
58953
58954
58955
58956
58957
58958
58959
58960
58961
58962
58963
58964
58965
58966
58967
58968
58969
58970
58971
58972
58973
58974
58975
58976
58977
58978
58979
58980
58981
58982
58983
58984
58985
58986
58987
58988
58989
58990
58991
58992
58993
58994
58995
58996
58997
58998
58999
59000
59001
59002
59003
59004
59005
59006
59007
59008
59009
59010
59011
59012
59013
59014
59015
59016
59017
59018
59019
59020
59021
59022
59023
59024
59025
59026
59027
59028
59029
59030
59031
59032
59033
59034
59035
59036
59037
59038
59039
59040
59041
59042
59043
59044
59045
59046
59047
59048
59049
59050
59051
59052
59053
59054
59055
59056
59057
59058
59059
59060
59061
59062
59063
59064
59065
59066
59067
59068
59069
59070
59071
59072
59073
59074
59075
59076
59077
59078
59079
59080
59081
59082
59083
59084
59085
59086
59087
59088
59089
59090
59091
59092
59093
59094
59095
59096
59097
59098
59099
59100
59101
59102
59103
59104
59105
59106
59107
59108
59109
59110
59111
59112
59113
59114
59115
59116
59117
59118
59119
59120
59121
59122
59123
59124
59125
59126
59127
59128
59129
59130
59131
59132
59133
59134
59135
59136
59137
59138
59139
59140
59141
59142
59143
59144
59145
59146
59147
59148
59149
59150
59151
59152
59153
59154
59155
59156
59157
59158
59159
59160
59161
59162
59163
59164
59165
59166
59167
59168
59169
59170
59171
59172
59173
59174
59175
59176
59177
59178
59179
59180
59181
59182
59183
59184
59185
59186
59187
59188
59189
59190
59191
59192
59193
59194
59195
59196
59197
59198
59199
59200
59201
59202
59203
59204
59205
59206
59207
59208
59209
59210
59211
59212
59213
59214
59215
59216
59217
59218
59219
59220
59221
59222
59223
59224
59225
59226
59227
59228
59229
59230
59231
59232
59233
59234
59235
59236
59237
59238
59239
59240
59241
59242
59243
59244
59245
59246
59247
59248
59249
59250
59251
59252
59253
59254
59255
59256
59257
59258
59259
59260
59261
59262
59263
59264
59265
59266
59267
59268
59269
59270
59271
59272
59273
59274
59275
59276
59277
59278
59279
59280
59281
59282
59283
59284
59285
59286
59287
59288
59289
59290
59291
59292
59293
59294
59295
59296
59297
59298
59299
59300
59301
59302
59303
59304
59305
59306
59307
59308
59309
59310
59311
59312
59313
59314
59315
59316
59317
59318
59319
59320
59321
59322
59323
59324
59325
59326
59327
59328
59329
59330
59331
59332
59333
59334
59335
59336
59337
59338
59339
59340
59341
59342
59343
59344
59345
59346
59347
59348
59349
59350
59351
59352
59353
59354
59355
59356
59357
59358
59359
59360
59361
59362
59363
59364
59365
59366
59367
59368
59369
59370
59371
59372
59373
59374
59375
59376
59377
59378
59379
59380
59381
59382
59383
59384
59385
59386
59387
59388
59389
59390
59391
59392
59393
59394
59395
59396
59397
59398
59399
59400
59401
59402
59403
59404
59405
59406
59407
59408
59409
59410
59411
59412
59413
59414
59415
59416
59417
59418
59419
59420
59421
59422
59423
59424
59425
59426
59427
59428
59429
59430
59431
59432
59433
59434
59435
59436
59437
59438
59439
59440
59441
59442
59443
59444
59445
59446
59447
59448
59449
59450
59451
59452
59453
59454
59455
59456
59457
59458
59459
59460
59461
59462
59463
59464
59465
59466
59467
59468
59469
59470
59471
59472
59473
59474
59475
59476
59477
59478
59479
59480
59481
59482
59483
59484
59485
59486
59487
59488
59489
59490
59491
59492
59493
59494
59495
59496
59497
59498
59499
59500
59501
59502
59503
59504
59505
59506
59507
59508
59509
59510
59511
59512
59513
59514
59515
59516
59517
59518
59519
59520
59521
59522
59523
59524
59525
59526
59527
59528
59529
59530
59531
59532
59533
59534
59535
59536
59537
59538
59539
59540
59541
59542
59543
59544
59545
59546
59547
59548
59549
59550
59551
59552
59553
59554
59555
59556
59557
59558
59559
59560
59561
59562
59563
59564
59565
59566
59567
59568
59569
59570
59571
59572
59573
59574
59575
59576
59577
59578
59579
59580
59581
59582
59583
59584
59585
59586
59587
59588
59589
59590
59591
59592
59593
59594
59595
59596
59597
59598
59599
59600
59601
59602
59603
59604
59605
59606
59607
59608
59609
59610
59611
59612
59613
59614
59615
59616
59617
59618
59619
59620
59621
59622
59623
59624
59625
59626
59627
59628
59629
59630
59631
59632
59633
59634
59635
59636
59637
59638
59639
59640
59641
59642
59643
59644
59645
59646
59647
59648
59649
59650
59651
59652
59653
59654
59655
59656
59657
59658
59659
59660
59661
59662
59663
59664
59665
59666
59667
59668
59669
59670
59671
59672
59673
59674
59675
59676
59677
59678
59679
59680
59681
59682
59683
59684
59685
59686
59687
59688
59689
59690
59691
59692
59693
59694
59695
59696
59697
59698
59699
59700
59701
59702
59703
59704
59705
59706
59707
59708
59709
59710
59711
59712
59713
59714
59715
59716
59717
59718
59719
59720
59721
59722
59723
59724
59725
59726
59727
59728
59729
59730
59731
59732
59733
59734
59735
59736
59737
59738
59739
59740
59741
59742
59743
59744
59745
59746
59747
59748
59749
59750
59751
59752
59753
59754
59755
59756
59757
59758
59759
59760
59761
59762
59763
59764
59765
59766
59767
59768
59769
59770
59771
59772
59773
59774
59775
59776
59777
59778
59779
59780
59781
59782
59783
59784
59785
59786
59787
59788
59789
59790
59791
59792
59793
59794
59795
59796
59797
59798
59799
59800
59801
59802
59803
59804
59805
59806
59807
59808
59809
59810
59811
59812
59813
59814
59815
59816
59817
59818
59819
59820
59821
59822
59823
59824
59825
59826
59827
59828
59829
59830
59831
59832
59833
59834
59835
59836
59837
59838
59839
59840
59841
59842
59843
59844
59845
59846
59847
59848
59849
59850
59851
59852
59853
59854
59855
59856
59857
59858
59859
59860
59861
59862
59863
59864
59865
59866
59867
59868
59869
59870
59871
59872
59873
59874
59875
59876
59877
59878
59879
59880
59881
59882
59883
59884
59885
59886
59887
59888
59889
59890
59891
59892
59893
59894
59895
59896
59897
59898
59899
59900
59901
59902
59903
59904
59905
59906
59907
59908
59909
59910
59911
59912
59913
59914
59915
59916
59917
59918
59919
59920
59921
59922
59923
59924
59925
59926
59927
59928
59929
59930
59931
59932
59933
59934
59935
59936
59937
59938
59939
59940
59941
59942
59943
59944
59945
59946
59947
59948
59949
59950
59951
59952
59953
59954
59955
59956
59957
59958
59959
59960
59961
59962
59963
59964
59965
59966
59967
59968
59969
59970
59971
59972
59973
59974
59975
59976
59977
59978
59979
59980
59981
59982
59983
59984
59985
59986
59987
59988
59989
59990
59991
59992
59993
59994
59995
59996
59997
59998
59999
60000
60001
60002
60003
60004
60005
60006
60007
60008
60009
60010
60011
60012
60013
60014
60015
60016
60017
60018
60019
60020
60021
60022
60023
60024
60025
60026
60027
60028
60029
60030
60031
60032
60033
60034
60035
60036
60037
60038
60039
60040
60041
60042
60043
60044
60045
60046
60047
60048
60049
60050
60051
60052
60053
60054
60055
60056
60057
60058
60059
60060
60061
60062
60063
60064
60065
60066
60067
60068
60069
60070
60071
60072
60073
60074
60075
60076
60077
60078
60079
60080
60081
60082
60083
60084
60085
60086
60087
60088
60089
60090
60091
60092
60093
60094
60095
60096
60097
60098
60099
60100
60101
60102
60103
60104
60105
60106
60107
60108
60109
60110
60111
60112
60113
60114
60115
60116
60117
60118
60119
60120
60121
60122
60123
60124
60125
60126
60127
60128
60129
60130
60131
60132
60133
60134
60135
60136
60137
60138
60139
60140
60141
60142
60143
60144
60145
60146
60147
60148
60149
60150
60151
60152
60153
60154
60155
60156
60157
60158
60159
60160
60161
60162
60163
60164
60165
60166
60167
60168
60169
60170
60171
60172
60173
60174
60175
60176
60177
60178
60179
60180
60181
60182
60183
60184
60185
60186
60187
60188
60189
60190
60191
60192
60193
60194
60195
60196
60197
60198
60199
60200
60201
60202
60203
60204
60205
60206
60207
60208
60209
60210
60211
60212
60213
60214
60215
60216
60217
60218
60219
60220
60221
60222
60223
60224
60225
60226
60227
60228
60229
60230
60231
60232
60233
60234
60235
60236
60237
60238
60239
60240
60241
60242
60243
60244
60245
60246
60247
60248
60249
60250
60251
60252
60253
60254
60255
60256
60257
60258
60259
60260
60261
60262
60263
60264
60265
60266
60267
60268
60269
60270
60271
60272
60273
60274
60275
60276
60277
60278
60279
60280
60281
60282
60283
60284
60285
60286
60287
60288
60289
60290
60291
60292
60293
60294
60295
60296
60297
60298
60299
60300
60301
60302
60303
60304
60305
60306
60307
60308
60309
60310
60311
60312
60313
60314
60315
60316
60317
60318
60319
60320
60321
60322
60323
60324
60325
60326
60327
60328
60329
60330
60331
60332
60333
60334
60335
60336
60337
60338
60339
60340
60341
60342
60343
60344
60345
60346
60347
60348
60349
60350
60351
60352
60353
60354
60355
60356
60357
60358
60359
60360
60361
60362
60363
60364
60365
60366
60367
60368
60369
60370
60371
60372
60373
60374
60375
60376
60377
60378
60379
60380
60381
60382
60383
60384
60385
60386
60387
60388
60389
60390
60391
60392
60393
60394
60395
60396
60397
60398
60399
60400
60401
60402
60403
60404
60405
60406
60407
60408
60409
60410
60411
60412
60413
60414
60415
60416
60417
60418
60419
60420
60421
60422
60423
60424
60425
60426
60427
60428
60429
60430
60431
60432
60433
60434
60435
60436
60437
60438
60439
60440
60441
60442
60443
60444
60445
60446
60447
60448
60449
60450
60451
60452
60453
60454
60455
60456
60457
60458
60459
60460
60461
60462
60463
60464
60465
60466
60467
60468
60469
60470
60471
60472
60473
60474
60475
60476
60477
60478
60479
60480
60481
60482
60483
60484
60485
60486
60487
60488
60489
60490
60491
60492
60493
60494
60495
60496
60497
60498
60499
60500
60501
60502
60503
60504
60505
60506
60507
60508
60509
60510
60511
60512
60513
60514
60515
60516
60517
60518
60519
60520
60521
60522
60523
60524
60525
60526
60527
60528
60529
60530
60531
60532
60533
60534
60535
60536
60537
60538
60539
60540
60541
60542
60543
60544
60545
60546
60547
60548
60549
60550
60551
60552
60553
60554
60555
60556
60557
60558
60559
60560
60561
60562
60563
60564
60565
60566
60567
60568
60569
60570
60571
60572
60573
60574
60575
60576
60577
60578
60579
60580
60581
60582
60583
60584
60585
60586
60587
60588
60589
60590
60591
60592
60593
60594
60595
60596
60597
60598
60599
60600
60601
60602
60603
60604
60605
60606
60607
60608
60609
60610
60611
60612
60613
60614
60615
60616
60617
60618
60619
60620
60621
60622
60623
60624
60625
60626
60627
60628
60629
60630
60631
60632
60633
60634
60635
60636
60637
60638
60639
60640
60641
60642
60643
60644
60645
60646
60647
60648
60649
60650
60651
60652
60653
60654
60655
60656
60657
60658
60659
60660
60661
60662
60663
60664
60665
60666
60667
60668
60669
60670
60671
60672
60673
60674
60675
60676
60677
60678
60679
60680
60681
60682
60683
60684
60685
60686
60687
60688
60689
60690
60691
60692
60693
60694
60695
60696
60697
60698
60699
60700
60701
60702
60703
60704
60705
60706
60707
60708
60709
60710
60711
60712
60713
60714
60715
60716
60717
60718
60719
60720
60721
60722
60723
60724
60725
60726
60727
60728
60729
60730
60731
60732
60733
60734
60735
60736
60737
60738
60739
60740
60741
60742
60743
60744
60745
60746
60747
60748
60749
60750
60751
60752
60753
60754
60755
60756
60757
60758
60759
60760
60761
60762
60763
60764
60765
60766
60767
60768
60769
60770
60771
60772
60773
60774
60775
60776
60777
60778
60779
60780
60781
60782
60783
60784
60785
60786
60787
60788
60789
60790
60791
60792
60793
60794
60795
60796
60797
60798
60799
60800
60801
60802
60803
60804
60805
60806
60807
60808
60809
60810
60811
60812
60813
60814
60815
60816
60817
60818
60819
60820
60821
60822
60823
60824
60825
60826
60827
60828
60829
60830
60831
60832
60833
60834
60835
60836
60837
60838
60839
60840
60841
60842
60843
60844
60845
60846
60847
60848
60849
60850
60851
60852
60853
60854
60855
60856
60857
60858
60859
60860
60861
60862
60863
60864
60865
60866
60867
60868
60869
60870
60871
60872
60873
60874
60875
60876
60877
60878
60879
60880
60881
60882
60883
60884
60885
60886
60887
60888
60889
60890
60891
60892
60893
60894
60895
60896
60897
60898
60899
60900
60901
60902
60903
60904
60905
60906
60907
60908
60909
60910
60911
60912
60913
60914
60915
60916
60917
60918
60919
60920
60921
60922
60923
60924
60925
60926
60927
60928
60929
60930
60931
60932
60933
60934
60935
60936
60937
60938
60939
60940
60941
60942
60943
60944
60945
60946
60947
60948
60949
60950
60951
60952
60953
60954
60955
60956
60957
60958
60959
60960
60961
60962
60963
60964
60965
60966
60967
60968
60969
60970
60971
60972
60973
60974
60975
60976
60977
60978
60979
60980
60981
60982
60983
60984
60985
60986
60987
60988
60989
60990
60991
60992
60993
60994
60995
60996
60997
60998
60999
61000
61001
61002
61003
61004
61005
61006
61007
61008
61009
61010
61011
61012
61013
61014
61015
61016
61017
61018
61019
61020
61021
61022
61023
61024
61025
61026
61027
61028
61029
61030
61031
61032
61033
61034
61035
61036
61037
61038
61039
61040
61041
61042
61043
61044
61045
61046
61047
61048
61049
61050
61051
61052
61053
61054
61055
61056
61057
61058
61059
61060
61061
61062
61063
61064
61065
61066
61067
61068
61069
61070
61071
61072
61073
61074
61075
61076
61077
61078
61079
61080
61081
61082
61083
61084
61085
61086
61087
61088
61089
61090
61091
61092
61093
61094
61095
61096
61097
61098
61099
61100
61101
61102
61103
61104
61105
61106
61107
61108
61109
61110
61111
61112
61113
61114
61115
61116
61117
61118
61119
61120
61121
61122
61123
61124
61125
61126
61127
61128
61129
61130
61131
61132
61133
61134
61135
61136
61137
61138
61139
61140
61141
61142
61143
61144
61145
61146
61147
61148
61149
61150
61151
61152
61153
61154
61155
61156
61157
61158
61159
61160
61161
61162
61163
61164
61165
61166
61167
61168
61169
61170
61171
61172
61173
61174
61175
61176
61177
61178
61179
61180
61181
61182
61183
61184
61185
61186
61187
61188
61189
61190
61191
61192
61193
61194
61195
61196
61197
61198
61199
61200
61201
61202
61203
61204
61205
61206
61207
61208
61209
61210
61211
61212
61213
61214
61215
61216
61217
61218
61219
61220
61221
61222
61223
61224
61225
61226
61227
61228
61229
61230
61231
61232
61233
61234
61235
61236
61237
61238
61239
61240
61241
61242
61243
61244
61245
61246
61247
61248
61249
61250
61251
61252
61253
61254
61255
61256
61257
61258
61259
61260
61261
61262
61263
61264
61265
61266
61267
61268
61269
61270
61271
61272
61273
61274
61275
61276
61277
61278
61279
61280
61281
61282
61283
61284
61285
61286
61287
61288
61289
61290
61291
61292
61293
61294
61295
61296
61297
61298
61299
61300
61301
61302
61303
61304
61305
61306
61307
61308
61309
61310
61311
61312
61313
61314
61315
61316
61317
61318
61319
61320
61321
61322
61323
61324
61325
61326
61327
61328
61329
61330
61331
61332
61333
61334
61335
61336
61337
61338
61339
61340
61341
61342
61343
61344
61345
61346
61347
61348
61349
61350
61351
61352
61353
61354
61355
61356
61357
61358
61359
61360
61361
61362
61363
61364
61365
61366
61367
61368
61369
61370
61371
61372
61373
61374
61375
61376
61377
61378
61379
61380
61381
61382
61383
61384
61385
61386
61387
61388
61389
61390
61391
61392
61393
61394
61395
61396
61397
61398
61399
61400
61401
61402
61403
61404
61405
61406
61407
61408
61409
61410
61411
61412
61413
61414
61415
61416
61417
61418
61419
61420
61421
61422
61423
61424
61425
61426
61427
61428
61429
61430
61431
61432
61433
61434
61435
61436
61437
61438
61439
61440
61441
61442
61443
61444
61445
61446
61447
61448
61449
61450
61451
61452
61453
61454
61455
61456
61457
61458
61459
61460
61461
61462
61463
61464
61465
61466
61467
61468
61469
61470
61471
61472
61473
61474
61475
61476
61477
61478
61479
61480
61481
61482
61483
61484
61485
61486
61487
61488
61489
61490
61491
61492
61493
61494
61495
61496
61497
61498
61499
61500
61501
61502
61503
61504
61505
61506
61507
61508
61509
61510
61511
61512
61513
61514
61515
61516
61517
61518
61519
61520
61521
61522
61523
61524
61525
61526
61527
61528
61529
61530
61531
61532
61533
61534
61535
61536
61537
61538
61539
61540
61541
61542
61543
61544
61545
61546
61547
61548
61549
61550
61551
61552
61553
61554
61555
61556
61557
61558
61559
61560
61561
61562
61563
61564
61565
61566
61567
61568
61569
61570
61571
61572
61573
61574
61575
61576
61577
61578
61579
61580
61581
61582
61583
61584
61585
61586
61587
61588
61589
61590
61591
61592
61593
61594
61595
61596
61597
61598
61599
61600
61601
61602
61603
61604
61605
61606
61607
61608
61609
61610
61611
61612
61613
61614
61615
61616
61617
61618
61619
61620
61621
61622
61623
61624
61625
61626
61627
61628
61629
61630
61631
61632
61633
61634
61635
61636
61637
61638
61639
61640
61641
61642
61643
61644
61645
61646
61647
61648
61649
61650
61651
61652
61653
61654
61655
61656
61657
61658
61659
61660
61661
61662
61663
61664
61665
61666
61667
61668
61669
61670
61671
61672
61673
61674
61675
61676
61677
61678
61679
61680
61681
61682
61683
61684
61685
61686
61687
61688
61689
61690
61691
61692
61693
61694
61695
61696
61697
61698
61699
61700
61701
61702
61703
61704
61705
61706
61707
61708
61709
61710
61711
61712
61713
61714
61715
61716
61717
61718
61719
61720
61721
61722
61723
61724
61725
61726
61727
61728
61729
61730
61731
61732
61733
61734
61735
61736
61737
61738
61739
61740
61741
61742
61743
61744
61745
61746
61747
61748
61749
61750
61751
61752
61753
61754
61755
61756
61757
61758
61759
61760
61761
61762
61763
61764
61765
61766
61767
61768
61769
61770
61771
61772
61773
61774
61775
61776
61777
61778
61779
61780
61781
61782
61783
61784
61785
61786
61787
61788
61789
61790
61791
61792
61793
61794
61795
61796
61797
61798
61799
61800
61801
61802
61803
61804
61805
61806
61807
61808
61809
61810
61811
61812
61813
61814
61815
61816
61817
61818
61819
61820
61821
61822
61823
61824
61825
61826
61827
61828
61829
61830
61831
61832
61833
61834
61835
61836
61837
61838
61839
61840
61841
61842
61843
61844
61845
61846
61847
61848
61849
61850
61851
61852
61853
61854
61855
61856
61857
61858
61859
61860
61861
61862
61863
61864
61865
61866
61867
61868
61869
61870
61871
61872
61873
61874
61875
61876
61877
61878
61879
61880
61881
61882
61883
61884
61885
61886
61887
61888
61889
61890
61891
61892
61893
61894
61895
61896
61897
61898
61899
61900
61901
61902
61903
61904
61905
61906
61907
61908
61909
61910
61911
61912
61913
61914
61915
61916
61917
61918
61919
61920
61921
61922
61923
61924
61925
61926
61927
61928
61929
61930
61931
61932
61933
61934
61935
61936
61937
61938
61939
61940
61941
61942
61943
61944
61945
61946
61947
61948
61949
61950
61951
61952
61953
61954
61955
61956
61957
61958
61959
61960
61961
61962
61963
61964
61965
61966
61967
61968
61969
61970
61971
61972
61973
61974
61975
61976
61977
61978
61979
61980
61981
61982
61983
61984
61985
61986
61987
61988
61989
61990
61991
61992
61993
61994
61995
61996
61997
61998
61999
62000
62001
62002
62003
62004
62005
62006
62007
62008
62009
62010
62011
62012
62013
62014
62015
62016
62017
62018
62019
62020
62021
62022
62023
62024
62025
62026
62027
62028
62029
62030
62031
62032
62033
62034
62035
62036
62037
62038
62039
62040
62041
62042
62043
62044
62045
62046
62047
62048
62049
62050
62051
62052
62053
62054
62055
62056
62057
62058
62059
62060
62061
62062
62063
62064
62065
62066
62067
62068
62069
62070
62071
62072
62073
62074
62075
62076
62077
62078
62079
62080
62081
62082
62083
62084
62085
62086
62087
62088
62089
62090
62091
62092
62093
62094
62095
62096
62097
62098
62099
62100
62101
62102
62103
62104
62105
62106
62107
62108
62109
62110
62111
62112
62113
62114
62115
62116
62117
62118
62119
62120
62121
62122
62123
62124
62125
62126
62127
62128
62129
62130
62131
62132
62133
62134
62135
62136
62137
62138
62139
62140
62141
62142
62143
62144
62145
62146
62147
62148
62149
62150
62151
62152
62153
62154
62155
62156
62157
62158
62159
62160
62161
62162
62163
62164
62165
62166
62167
62168
62169
62170
62171
62172
62173
62174
62175
62176
62177
62178
62179
62180
62181
62182
62183
62184
62185
62186
62187
62188
62189
62190
62191
62192
62193
62194
62195
62196
62197
62198
62199
62200
62201
62202
62203
62204
62205
62206
62207
62208
62209
62210
62211
62212
62213
62214
62215
62216
62217
62218
62219
62220
62221
62222
62223
62224
62225
62226
62227
62228
62229
62230
62231
62232
62233
62234
62235
62236
62237
62238
62239
62240
62241
62242
62243
62244
62245
62246
62247
62248
62249
62250
62251
62252
62253
62254
62255
62256
62257
62258
62259
62260
62261
62262
62263
62264
62265
62266
62267
62268
62269
62270
62271
62272
62273
62274
62275
62276
62277
62278
62279
62280
62281
62282
62283
62284
62285
62286
62287
62288
62289
62290
62291
62292
62293
62294
62295
62296
62297
62298
62299
62300
62301
62302
62303
62304
62305
62306
62307
62308
62309
62310
62311
62312
62313
62314
62315
62316
62317
62318
62319
62320
62321
62322
62323
62324
62325
62326
62327
62328
62329
62330
62331
62332
62333
62334
62335
62336
62337
62338
62339
62340
62341
62342
62343
62344
62345
62346
62347
62348
62349
/*!
 * 
 *     deck.gl.js (https://github.com/SuperMap/deck.gl.git)
 *     license: MIT
 *     
 *     origin: 'https://github.com/uber/deck.gl.git'
 *     fork: 'https://github.com/SuperMap/deck.gl.git'
 *     branch: 'https://github.com/SuperMap/deck.gl/tree/deck.gl-for-iclient'
 * 
 * 
 */
(function webpackUniversalModuleDefinition(root, factory) {
    if(typeof exports === 'object' && typeof module === 'object')
        module.exports = factory();
    else if(typeof define === 'function' && define.amd)
        define([], factory);
    else if(typeof exports === 'object')
        exports["deckgl"] = factory();
    else
        root["deckgl"] = factory();
})(this, function() {
return /******/ (function(modules) { // webpackBootstrap
/******/     // The module cache
/******/     var installedModules = {};
/******/
/******/     // The require function
/******/     function __webpack_require__(moduleId) {
/******/
/******/         // Check if module is in cache
/******/         if(installedModules[moduleId]) {
/******/             return installedModules[moduleId].exports;
/******/         }
/******/         // Create a new module (and put it into the cache)
/******/         var module = installedModules[moduleId] = {
/******/             i: moduleId,
/******/             l: false,
/******/             exports: {}
/******/         };
/******/
/******/         // Execute the module function
/******/         modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/         // Flag the module as loaded
/******/         module.l = true;
/******/
/******/         // Return the exports of the module
/******/         return module.exports;
/******/     }
/******/
/******/
/******/     // expose the modules object (__webpack_modules__)
/******/     __webpack_require__.m = modules;
/******/
/******/     // expose the module cache
/******/     __webpack_require__.c = installedModules;
/******/
/******/     // identity function for calling harmony imports with the correct context
/******/     __webpack_require__.i = function(value) { return value; };
/******/
/******/     // define getter function for harmony exports
/******/     __webpack_require__.d = function(exports, name, getter) {
/******/         if(!__webpack_require__.o(exports, name)) {
/******/             Object.defineProperty(exports, name, {
/******/                 configurable: false,
/******/                 enumerable: true,
/******/                 get: getter
/******/             });
/******/         }
/******/     };
/******/
/******/     // getDefaultExport function for compatibility with non-harmony modules
/******/     __webpack_require__.n = function(module) {
/******/         var getter = module && module.__esModule ?
/******/             function getDefault() { return module['default']; } :
/******/             function getModuleExports() { return module; };
/******/         __webpack_require__.d(getter, 'a', getter);
/******/         return getter;
/******/     };
/******/
/******/     // Object.prototype.hasOwnProperty.call
/******/     __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/     // __webpack_public_path__
/******/     __webpack_require__.p = "";
/******/
/******/     // Load entry module and return exports
/******/     return __webpack_require__(__webpack_require__.s = 288);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ (function(module, exports, __webpack_require__) {
 
var global = __webpack_require__(3);
var core = __webpack_require__(33);
var hide = __webpack_require__(19);
var redefine = __webpack_require__(20);
var ctx = __webpack_require__(28);
var PROTOTYPE = 'prototype';
 
var $export = function (type, name, source) {
  var IS_FORCED = type & $export.F;
  var IS_GLOBAL = type & $export.G;
  var IS_STATIC = type & $export.S;
  var IS_PROTO = type & $export.P;
  var IS_BIND = type & $export.B;
  var target = IS_GLOBAL ? global : IS_STATIC ? global[name] || (global[name] = {}) : (global[name] || {})[PROTOTYPE];
  var exports = IS_GLOBAL ? core : core[name] || (core[name] = {});
  var expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {});
  var key, own, out, exp;
  if (IS_GLOBAL) source = name;
  for (key in source) {
    // contains in native
    own = !IS_FORCED && target && target[key] !== undefined;
    // export native or passed
    out = (own ? target : source)[key];
    // bind timers to global for call from export context
    exp = IS_BIND && own ? ctx(out, global) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;
    // extend global
    if (target) redefine(target, key, out, type & $export.U);
    // export
    if (exports[key] != out) hide(exports, key, exp);
    if (IS_PROTO && expProto[key] != out) expProto[key] = out;
  }
};
global.core = core;
// type bitmap
$export.F = 1;   // forced
$export.G = 2;   // global
$export.S = 4;   // static
$export.P = 8;   // proto
$export.B = 16;  // bind
$export.W = 32;  // wrap
$export.U = 64;  // safe
$export.R = 128; // real proto method for `library`
module.exports = $export;
 
 
/***/ }),
/* 1 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
/* WEBPACK VAR INJECTION */(function(global) {
 
// compare and isBuffer taken from https://github.com/feross/buffer/blob/680e9e5e488f22aac27599a57dc844a6315928dd/index.js
// original notice:
 
/*!
 * The buffer module from node.js, for the browser.
 *
 * @author   Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
 * @license  MIT
 */
function compare(a, b) {
  if (a === b) {
    return 0;
  }
 
  var x = a.length;
  var y = b.length;
 
  for (var i = 0, len = Math.min(x, y); i < len; ++i) {
    if (a[i] !== b[i]) {
      x = a[i];
      y = b[i];
      break;
    }
  }
 
  if (x < y) {
    return -1;
  }
  if (y < x) {
    return 1;
  }
  return 0;
}
function isBuffer(b) {
  if (global.Buffer && typeof global.Buffer.isBuffer === 'function') {
    return global.Buffer.isBuffer(b);
  }
  return !!(b != null && b._isBuffer);
}
 
// based on node assert, original notice:
 
// http://wiki.commonjs.org/wiki/Unit_Testing/1.0
//
// THIS IS NOT TESTED NOR LIKELY TO WORK OUTSIDE V8!
//
// Originally from narwhal.js (http://narwhaljs.org)
// Copyright (c) 2009 Thomas Robinson <280north.com>
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the 'Software'), to
// deal in the Software without restriction, including without limitation the
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
// sell copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
var util = __webpack_require__(684);
var hasOwn = Object.prototype.hasOwnProperty;
var pSlice = Array.prototype.slice;
var functionsHaveNames = (function () {
  return function foo() {}.name === 'foo';
}());
function pToString (obj) {
  return Object.prototype.toString.call(obj);
}
function isView(arrbuf) {
  if (isBuffer(arrbuf)) {
    return false;
  }
  if (typeof global.ArrayBuffer !== 'function') {
    return false;
  }
  if (typeof ArrayBuffer.isView === 'function') {
    return ArrayBuffer.isView(arrbuf);
  }
  if (!arrbuf) {
    return false;
  }
  if (arrbuf instanceof DataView) {
    return true;
  }
  if (arrbuf.buffer && arrbuf.buffer instanceof ArrayBuffer) {
    return true;
  }
  return false;
}
// 1. The assert module provides functions that throw
// AssertionError's when particular conditions are not met. The
// assert module must conform to the following interface.
 
var assert = module.exports = ok;
 
// 2. The AssertionError is defined in assert.
// new assert.AssertionError({ message: message,
//                             actual: actual,
//                             expected: expected })
 
var regex = /\s*function\s+([^\(\s]*)\s*/;
// based on https://github.com/ljharb/function.prototype.name/blob/adeeeec8bfcc6068b187d7d9fb3d5bb1d3a30899/implementation.js
function getName(func) {
  if (!util.isFunction(func)) {
    return;
  }
  if (functionsHaveNames) {
    return func.name;
  }
  var str = func.toString();
  var match = str.match(regex);
  return match && match[1];
}
assert.AssertionError = function AssertionError(options) {
  this.name = 'AssertionError';
  this.actual = options.actual;
  this.expected = options.expected;
  this.operator = options.operator;
  if (options.message) {
    this.message = options.message;
    this.generatedMessage = false;
  } else {
    this.message = getMessage(this);
    this.generatedMessage = true;
  }
  var stackStartFunction = options.stackStartFunction || fail;
  if (Error.captureStackTrace) {
    Error.captureStackTrace(this, stackStartFunction);
  } else {
    // non v8 browsers so we can have a stacktrace
    var err = new Error();
    if (err.stack) {
      var out = err.stack;
 
      // try to strip useless frames
      var fn_name = getName(stackStartFunction);
      var idx = out.indexOf('\n' + fn_name);
      if (idx >= 0) {
        // once we have located the function frame
        // we need to strip out everything before it (and its line)
        var next_line = out.indexOf('\n', idx + 1);
        out = out.substring(next_line + 1);
      }
 
      this.stack = out;
    }
  }
};
 
// assert.AssertionError instanceof Error
util.inherits(assert.AssertionError, Error);
 
function truncate(s, n) {
  if (typeof s === 'string') {
    return s.length < n ? s : s.slice(0, n);
  } else {
    return s;
  }
}
function inspect(something) {
  if (functionsHaveNames || !util.isFunction(something)) {
    return util.inspect(something);
  }
  var rawname = getName(something);
  var name = rawname ? ': ' + rawname : '';
  return '[Function' +  name + ']';
}
function getMessage(self) {
  return truncate(inspect(self.actual), 128) + ' ' +
         self.operator + ' ' +
         truncate(inspect(self.expected), 128);
}
 
// At present only the three keys mentioned above are used and
// understood by the spec. Implementations or sub modules can pass
// other keys to the AssertionError's constructor - they will be
// ignored.
 
// 3. All of the following functions must throw an AssertionError
// when a corresponding condition is not met, with a message that
// may be undefined if not provided.  All assertion methods provide
// both the actual and expected values to the assertion error for
// display purposes.
 
function fail(actual, expected, message, operator, stackStartFunction) {
  throw new assert.AssertionError({
    message: message,
    actual: actual,
    expected: expected,
    operator: operator,
    stackStartFunction: stackStartFunction
  });
}
 
// EXTENSION! allows for well behaved errors defined elsewhere.
assert.fail = fail;
 
// 4. Pure assertion tests whether a value is truthy, as determined
// by !!guard.
// assert.ok(guard, message_opt);
// This statement is equivalent to assert.equal(true, !!guard,
// message_opt);. To test strictly for the value true, use
// assert.strictEqual(true, guard, message_opt);.
 
function ok(value, message) {
  if (!value) fail(value, true, message, '==', assert.ok);
}
assert.ok = ok;
 
// 5. The equality assertion tests shallow, coercive equality with
// ==.
// assert.equal(actual, expected, message_opt);
 
assert.equal = function equal(actual, expected, message) {
  if (actual != expected) fail(actual, expected, message, '==', assert.equal);
};
 
// 6. The non-equality assertion tests for whether two objects are not equal
// with != assert.notEqual(actual, expected, message_opt);
 
assert.notEqual = function notEqual(actual, expected, message) {
  if (actual == expected) {
    fail(actual, expected, message, '!=', assert.notEqual);
  }
};
 
// 7. The equivalence assertion tests a deep equality relation.
// assert.deepEqual(actual, expected, message_opt);
 
assert.deepEqual = function deepEqual(actual, expected, message) {
  if (!_deepEqual(actual, expected, false)) {
    fail(actual, expected, message, 'deepEqual', assert.deepEqual);
  }
};
 
assert.deepStrictEqual = function deepStrictEqual(actual, expected, message) {
  if (!_deepEqual(actual, expected, true)) {
    fail(actual, expected, message, 'deepStrictEqual', assert.deepStrictEqual);
  }
};
 
function _deepEqual(actual, expected, strict, memos) {
  // 7.1. All identical values are equivalent, as determined by ===.
  if (actual === expected) {
    return true;
  } else if (isBuffer(actual) && isBuffer(expected)) {
    return compare(actual, expected) === 0;
 
  // 7.2. If the expected value is a Date object, the actual value is
  // equivalent if it is also a Date object that refers to the same time.
  } else if (util.isDate(actual) && util.isDate(expected)) {
    return actual.getTime() === expected.getTime();
 
  // 7.3 If the expected value is a RegExp object, the actual value is
  // equivalent if it is also a RegExp object with the same source and
  // properties (`global`, `multiline`, `lastIndex`, `ignoreCase`).
  } else if (util.isRegExp(actual) && util.isRegExp(expected)) {
    return actual.source === expected.source &&
           actual.global === expected.global &&
           actual.multiline === expected.multiline &&
           actual.lastIndex === expected.lastIndex &&
           actual.ignoreCase === expected.ignoreCase;
 
  // 7.4. Other pairs that do not both pass typeof value == 'object',
  // equivalence is determined by ==.
  } else if ((actual === null || typeof actual !== 'object') &&
             (expected === null || typeof expected !== 'object')) {
    return strict ? actual === expected : actual == expected;
 
  // If both values are instances of typed arrays, wrap their underlying
  // ArrayBuffers in a Buffer each to increase performance
  // This optimization requires the arrays to have the same type as checked by
  // Object.prototype.toString (aka pToString). Never perform binary
  // comparisons for Float*Arrays, though, since e.g. +0 === -0 but their
  // bit patterns are not identical.
  } else if (isView(actual) && isView(expected) &&
             pToString(actual) === pToString(expected) &&
             !(actual instanceof Float32Array ||
               actual instanceof Float64Array)) {
    return compare(new Uint8Array(actual.buffer),
                   new Uint8Array(expected.buffer)) === 0;
 
  // 7.5 For all other Object pairs, including Array objects, equivalence is
  // determined by having the same number of owned properties (as verified
  // with Object.prototype.hasOwnProperty.call), the same set of keys
  // (although not necessarily the same order), equivalent values for every
  // corresponding key, and an identical 'prototype' property. Note: this
  // accounts for both named and indexed properties on Arrays.
  } else if (isBuffer(actual) !== isBuffer(expected)) {
    return false;
  } else {
    memos = memos || {actual: [], expected: []};
 
    var actualIndex = memos.actual.indexOf(actual);
    if (actualIndex !== -1) {
      if (actualIndex === memos.expected.indexOf(expected)) {
        return true;
      }
    }
 
    memos.actual.push(actual);
    memos.expected.push(expected);
 
    return objEquiv(actual, expected, strict, memos);
  }
}
 
function isArguments(object) {
  return Object.prototype.toString.call(object) == '[object Arguments]';
}
 
function objEquiv(a, b, strict, actualVisitedObjects) {
  if (a === null || a === undefined || b === null || b === undefined)
    return false;
  // if one is a primitive, the other must be same
  if (util.isPrimitive(a) || util.isPrimitive(b))
    return a === b;
  if (strict && Object.getPrototypeOf(a) !== Object.getPrototypeOf(b))
    return false;
  var aIsArgs = isArguments(a);
  var bIsArgs = isArguments(b);
  if ((aIsArgs && !bIsArgs) || (!aIsArgs && bIsArgs))
    return false;
  if (aIsArgs) {
    a = pSlice.call(a);
    b = pSlice.call(b);
    return _deepEqual(a, b, strict);
  }
  var ka = objectKeys(a);
  var kb = objectKeys(b);
  var key, i;
  // having the same number of owned properties (keys incorporates
  // hasOwnProperty)
  if (ka.length !== kb.length)
    return false;
  //the same set of keys (although not necessarily the same order),
  ka.sort();
  kb.sort();
  //~~~cheap key test
  for (i = ka.length - 1; i >= 0; i--) {
    if (ka[i] !== kb[i])
      return false;
  }
  //equivalent values for every corresponding key, and
  //~~~possibly expensive deep test
  for (i = ka.length - 1; i >= 0; i--) {
    key = ka[i];
    if (!_deepEqual(a[key], b[key], strict, actualVisitedObjects))
      return false;
  }
  return true;
}
 
// 8. The non-equivalence assertion tests for any deep inequality.
// assert.notDeepEqual(actual, expected, message_opt);
 
assert.notDeepEqual = function notDeepEqual(actual, expected, message) {
  if (_deepEqual(actual, expected, false)) {
    fail(actual, expected, message, 'notDeepEqual', assert.notDeepEqual);
  }
};
 
assert.notDeepStrictEqual = notDeepStrictEqual;
function notDeepStrictEqual(actual, expected, message) {
  if (_deepEqual(actual, expected, true)) {
    fail(actual, expected, message, 'notDeepStrictEqual', notDeepStrictEqual);
  }
}
 
 
// 9. The strict equality assertion tests strict equality, as determined by ===.
// assert.strictEqual(actual, expected, message_opt);
 
assert.strictEqual = function strictEqual(actual, expected, message) {
  if (actual !== expected) {
    fail(actual, expected, message, '===', assert.strictEqual);
  }
};
 
// 10. The strict non-equality assertion tests for strict inequality, as
// determined by !==.  assert.notStrictEqual(actual, expected, message_opt);
 
assert.notStrictEqual = function notStrictEqual(actual, expected, message) {
  if (actual === expected) {
    fail(actual, expected, message, '!==', assert.notStrictEqual);
  }
};
 
function expectedException(actual, expected) {
  if (!actual || !expected) {
    return false;
  }
 
  if (Object.prototype.toString.call(expected) == '[object RegExp]') {
    return expected.test(actual);
  }
 
  try {
    if (actual instanceof expected) {
      return true;
    }
  } catch (e) {
    // Ignore.  The instanceof check doesn't work for arrow functions.
  }
 
  if (Error.isPrototypeOf(expected)) {
    return false;
  }
 
  return expected.call({}, actual) === true;
}
 
function _tryBlock(block) {
  var error;
  try {
    block();
  } catch (e) {
    error = e;
  }
  return error;
}
 
function _throws(shouldThrow, block, expected, message) {
  var actual;
 
  if (typeof block !== 'function') {
    throw new TypeError('"block" argument must be a function');
  }
 
  if (typeof expected === 'string') {
    message = expected;
    expected = null;
  }
 
  actual = _tryBlock(block);
 
  message = (expected && expected.name ? ' (' + expected.name + ').' : '.') +
            (message ? ' ' + message : '.');
 
  if (shouldThrow && !actual) {
    fail(actual, expected, 'Missing expected exception' + message);
  }
 
  var userProvidedMessage = typeof message === 'string';
  var isUnwantedException = !shouldThrow && util.isError(actual);
  var isUnexpectedException = !shouldThrow && actual && !expected;
 
  if ((isUnwantedException &&
      userProvidedMessage &&
      expectedException(actual, expected)) ||
      isUnexpectedException) {
    fail(actual, expected, 'Got unwanted exception' + message);
  }
 
  if ((shouldThrow && actual && expected &&
      !expectedException(actual, expected)) || (!shouldThrow && actual)) {
    throw actual;
  }
}
 
// 11. Expected to throw an error:
// assert.throws(block, Error_opt, message_opt);
 
assert.throws = function(block, /*optional*/error, /*optional*/message) {
  _throws(true, block, error, message);
};
 
// EXTENSION! This is annoying to write outside this module.
assert.doesNotThrow = function(block, /*optional*/error, /*optional*/message) {
  _throws(false, block, error, message);
};
 
assert.ifError = function(err) { if (err) throw err; };
 
var objectKeys = Object.keys || function (obj) {
  var keys = [];
  for (var key in obj) {
    if (hasOwn.call(obj, key)) keys.push(key);
  }
  return keys;
};
 
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(47)))
 
/***/ }),
/* 2 */
/***/ (function(module, exports, __webpack_require__) {
 
var isObject = __webpack_require__(5);
module.exports = function (it) {
  if (!isObject(it)) throw TypeError(it + ' is not an object!');
  return it;
};
 
 
/***/ }),
/* 3 */
/***/ (function(module, exports) {
 
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
var global = module.exports = typeof window != 'undefined' && window.Math == Math
  ? window : typeof self != 'undefined' && self.Math == Math ? self
  // eslint-disable-next-line no-new-func
  : Function('return this')();
if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef
 
 
/***/ }),
/* 4 */
/***/ (function(module, exports) {
 
module.exports = function (exec) {
  try {
    return !!exec();
  } catch (e) {
    return true;
  }
};
 
 
/***/ }),
/* 5 */
/***/ (function(module, exports) {
 
module.exports = function (it) {
  return typeof it === 'object' ? it !== null : typeof it === 'function';
};
 
 
/***/ }),
/* 6 */
/***/ (function(module, exports, __webpack_require__) {
 
var store = __webpack_require__(98)('wks');
var uid = __webpack_require__(58);
var Symbol = __webpack_require__(3).Symbol;
var USE_SYMBOL = typeof Symbol == 'function';
 
var $exports = module.exports = function (name) {
  return store[name] || (store[name] =
    USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));
};
 
$exports.store = store;
 
 
/***/ }),
/* 7 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* unused harmony export ERR_CONTEXT */
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return ERR_WEBGL; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return ERR_WEBGL2; });
/* harmony export (immutable) */ __webpack_exports__["a"] = isWebGL;
/* harmony export (immutable) */ __webpack_exports__["b"] = isWebGL2;
/* harmony export (immutable) */ __webpack_exports__["j"] = assertWebGLContext;
/* harmony export (immutable) */ __webpack_exports__["g"] = assertWebGL2Context;
/* harmony export (immutable) */ __webpack_exports__["c"] = setContextDefaults;
/* harmony export (immutable) */ __webpack_exports__["d"] = createGLContext;
/* harmony export (immutable) */ __webpack_exports__["e"] = deleteGLContext;
/* harmony export (immutable) */ __webpack_exports__["f"] = pollContext;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__api__ = __webpack_require__(38);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__webgl_utils_track_context_state__ = __webpack_require__(164);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__webgl_utils__ = __webpack_require__(60);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__context_debug__ = __webpack_require__(269);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__context_limits__ = __webpack_require__(165);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__helpers_query_manager__ = __webpack_require__(166);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__utils__ = __webpack_require__(8);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__init__ = __webpack_require__(106);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_assert__ = __webpack_require__(1);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_assert___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_assert__);
// WebGLRenderingContext related methods
 
 
 
 
 
 
 
 
 
 
 
 
// Heuristic testing of contexts (to indentify debug wrappers around gl contexts)
var GL_ARRAY_BUFFER = 0x8892;
var GL_TEXTURE_BINDING_3D = 0x806A;
 
var ERR_CONTEXT = 'Invalid WebGLRenderingContext';
var ERR_WEBGL = ERR_CONTEXT;
var ERR_WEBGL2 = 'Requires WebGL2';
 
var ERR_WEBGL_MISSING_NODE = 'WebGL API is missing. To run luma.gl under Node.js, please "npm install gl"\nand import \'luma.gl/headless\' before importing \'luma.gl\'.';
 
var ERR_HEADLESSGL_NOT_AVAILABLE = 'Cannot create headless WebGL context, headlessGL not available';
 
var ERR_HEADLESSGL_FAILED = 'headlessGL failed to create headless WebGL context';
 
function isWebGL(gl) {
  return Boolean(gl && (gl instanceof __WEBPACK_IMPORTED_MODULE_0__api__["b" /* WebGLRenderingContext */] || gl.ARRAY_BUFFER === GL_ARRAY_BUFFER));
}
 
function isWebGL2(gl) {
  return Boolean(gl && (gl instanceof __WEBPACK_IMPORTED_MODULE_0__api__["c" /* WebGL2RenderingContext */] || gl.TEXTURE_BINDING_3D === GL_TEXTURE_BINDING_3D));
}
 
function assertWebGLContext(gl) {
  // Need to handle debug context
  __WEBPACK_IMPORTED_MODULE_8_assert___default()(isWebGL(gl), ERR_CONTEXT);
}
 
function assertWebGL2Context(gl) {
  // Need to handle debug context
  __WEBPACK_IMPORTED_MODULE_8_assert___default()(isWebGL2(gl), ERR_WEBGL2);
}
 
var contextDefaults = {
  // COMMON CONTEXT PARAMETERS
  // Attempt to allocate WebGL2 context
  webgl2: true, // Attempt to create a WebGL2 context (false to force webgl1)
  webgl1: true, // Attempt to create a WebGL1 context (false to fail if webgl2 not available)
  throwOnFailure: true,
  manageState: true,
  // BROWSER CONTEXT PARAMETERS
  canvas: null, // A canvas element or a canvas string id
  debug: false, // Instrument context (at the expense of performance)
  // HEADLESS CONTEXT PARAMETERS
  width: 800, // width are height are only used by headless gl
  height: 600
  // WEBGL/HEADLESS CONTEXT PARAMETERS
  // Remaining options are passed through to context creator
};
 
/*
 * Change default context creation parameters.
 * Main use case is regression test suite.
 */
function setContextDefaults() {
  var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
 
  Object.assign(contextDefaults, { width: 1, height: 1 }, opts);
}
 
/*
 * Creates a context giving access to the WebGL API
 */
/* eslint-disable complexity, max-statements */
function createGLContext() {
  var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
 
  opts = Object.assign({}, contextDefaults, opts);
  var _opts = opts,
      canvas = _opts.canvas,
      width = _opts.width,
      height = _opts.height,
      throwOnError = _opts.throwOnError,
      manageState = _opts.manageState,
      debug = _opts.debug;
 
  // Error reporting function, enables exceptions to be disabled
 
  function onError(message) {
    if (throwOnError) {
      throw new Error(message);
    }
    // log.log(0, message);
    return null;
  }
 
  var gl = void 0;
  if (__WEBPACK_IMPORTED_MODULE_6__utils__["a" /* isBrowser */]) {
    // Make sure we have a real canvas ("canvas" can a string, a canvas or null)
    var realCanvas = void 0;
    if (!canvas) {
      realCanvas = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__webgl_utils__["c" /* createCanvas */])({ id: 'lumagl-canvas', width: width, height: height, onError: onError });
    } else if (typeof canvas === 'string') {
      realCanvas = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__webgl_utils__["d" /* getCanvas */])({ id: canvas });
    } else {
      realCanvas = canvas;
    }
    // Create a WebGL context in the canvas
    gl = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__webgl_utils__["e" /* createContext */])({ canvas: realCanvas, opts: opts });
  } else {
    // Create a headless-gl context under Node.js
    gl = _createHeadlessContext({ width: width, height: height, opts: opts, onError: onError });
  }
  if (!gl) {
    return null;
  }
 
  // Install context state tracking
  if (manageState) {
    __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__webgl_utils_track_context_state__["a" /* default */])(gl, {
      copyState: false,
      log: function log() {
        for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
          args[_key] = arguments[_key];
        }
 
        return __WEBPACK_IMPORTED_MODULE_6__utils__["b" /* log */].log.apply(__WEBPACK_IMPORTED_MODULE_6__utils__["b" /* log */], [1].concat(args));
      }
    });
  }
 
  // Add debug instrumentation to the context
  if (__WEBPACK_IMPORTED_MODULE_6__utils__["a" /* isBrowser */] && debug) {
    gl = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__context_debug__["a" /* makeDebugContext */])(gl, { debug: debug });
    // Debug forces log level to at least 1
    __WEBPACK_IMPORTED_MODULE_6__utils__["b" /* log */].priority = Math.max(__WEBPACK_IMPORTED_MODULE_6__utils__["b" /* log */].priority, 1);
    // Log some debug info about the context
  }
  logInfo(gl);
 
  // Add to seer integration
 
  return gl;
}
 
function deleteGLContext(gl) {}
// Remove from seer integration
 
 
// POLLING FOR PENDING QUERIES
// Calling this function checks all pending queries for completion
function pollContext(gl) {
  __WEBPACK_IMPORTED_MODULE_5__helpers_query_manager__["a" /* default */].poll(gl);
}
 
function logInfo(gl) {
  var webGL = isWebGL2(gl) ? 'WebGL2' : 'WebGL1';
  var info = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__context_limits__["d" /* glGetDebugInfo */])(gl);
  var driver = info ? '(' + info.vendor + ',' + info.renderer + ')' : '';
  var debug = gl.debug ? ' debug' : '';
  __WEBPACK_IMPORTED_MODULE_6__utils__["b" /* log */].once(0, '' + webGL + debug + ' context ' + driver);
}
 
// Create headless gl context (for running under Node.js)
function _createHeadlessContext(_ref) {
  var width = _ref.width,
      height = _ref.height,
      opts = _ref.opts,
      onError = _ref.onError;
  var webgl1 = opts.webgl1,
      webgl2 = opts.webgl2;
 
  if (webgl2 && !webgl1) {
    return onError('headless-gl does not support WebGL2');
  }
  if (!__WEBPACK_IMPORTED_MODULE_0__api__["d" /* webGLTypesAvailable */]) {
    return onError(ERR_WEBGL_MISSING_NODE);
  }
  if (!__WEBPACK_IMPORTED_MODULE_7__init__["default"].globals.headlessGL) {
    return onError(ERR_HEADLESSGL_NOT_AVAILABLE);
  }
  var gl = __WEBPACK_IMPORTED_MODULE_7__init__["default"].globals.headlessGL(width, height, opts);
  if (!gl) {
    return onError(ERR_HEADLESSGL_FAILED);
  }
  return gl;
}
//# sourceMappingURL=context.js.map
 
/***/ }),
/* 8 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__is_browser__ = __webpack_require__(262);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_0__is_browser__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__promise_utils__ = __webpack_require__(660);
/* unused harmony reexport promisify */
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils__ = __webpack_require__(661);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return __WEBPACK_IMPORTED_MODULE_2__utils__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return __WEBPACK_IMPORTED_MODULE_2__utils__["b"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return __WEBPACK_IMPORTED_MODULE_2__utils__["c"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__log__ = __webpack_require__(263);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_3__log__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return __WEBPACK_IMPORTED_MODULE_3__log__["b"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__typed_array_utils__ = __webpack_require__(163);
/* unused harmony reexport getGLTypeFromTypedArray */
/* unused harmony reexport getTypedArrayFromGLType */
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return __WEBPACK_IMPORTED_MODULE_4__typed_array_utils__["c"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return __WEBPACK_IMPORTED_MODULE_4__typed_array_utils__["d"]; });
 
 
 
 
 
//# sourceMappingURL=index.js.map
 
/***/ }),
/* 9 */
/***/ (function(module, exports, __webpack_require__) {
 
// Thank's IE8 for his funny defineProperty
module.exports = !__webpack_require__(4)(function () {
  return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;
});
 
 
/***/ }),
/* 10 */
/***/ (function(module, exports, __webpack_require__) {
 
var anObject = __webpack_require__(2);
var IE8_DOM_DEFINE = __webpack_require__(207);
var toPrimitive = __webpack_require__(37);
var dP = Object.defineProperty;
 
exports.f = __webpack_require__(9) ? Object.defineProperty : function defineProperty(O, P, Attributes) {
  anObject(O);
  P = toPrimitive(P, true);
  anObject(Attributes);
  if (IE8_DOM_DEFINE) try {
    return dP(O, P, Attributes);
  } catch (e) { /* empty */ }
  if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');
  if ('value' in Attributes) O[P] = Attributes.value;
  return O;
};
 
 
/***/ }),
/* 11 */
/***/ (function(module, exports, __webpack_require__) {
 
// 7.1.15 ToLength
var toInteger = __webpack_require__(36);
var min = Math.min;
module.exports = function (it) {
  return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991
};
 
 
/***/ }),
/* 12 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "experimental", function() { return experimental; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__webgl_gl_constants__ = __webpack_require__(25);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "GL", function() { return __WEBPACK_IMPORTED_MODULE_0__webgl_gl_constants__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "glGet", function() { return __WEBPACK_IMPORTED_MODULE_0__webgl_gl_constants__["b"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "glKey", function() { return __WEBPACK_IMPORTED_MODULE_0__webgl_gl_constants__["c"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__webgl_utils__ = __webpack_require__(60);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "trackContextCreation", function() { return __WEBPACK_IMPORTED_MODULE_1__webgl_utils__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "trackContextState", function() { return __WEBPACK_IMPORTED_MODULE_1__webgl_utils__["b"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__webgl_context__ = __webpack_require__(7);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "isWebGL", function() { return __WEBPACK_IMPORTED_MODULE_2__webgl_context__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "isWebGL2", function() { return __WEBPACK_IMPORTED_MODULE_2__webgl_context__["b"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "setContextDefaults", function() { return __WEBPACK_IMPORTED_MODULE_2__webgl_context__["c"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "createGLContext", function() { return __WEBPACK_IMPORTED_MODULE_2__webgl_context__["d"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "deleteGLContext", function() { return __WEBPACK_IMPORTED_MODULE_2__webgl_context__["e"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "pollContext", function() { return __WEBPACK_IMPORTED_MODULE_2__webgl_context__["f"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__webgl_context_state__ = __webpack_require__(68);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "resetParameters", function() { return __WEBPACK_IMPORTED_MODULE_3__webgl_context_state__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "getParameter", function() { return __WEBPACK_IMPORTED_MODULE_3__webgl_context_state__["b"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "getParameters", function() { return __WEBPACK_IMPORTED_MODULE_3__webgl_context_state__["c"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "setParameter", function() { return __WEBPACK_IMPORTED_MODULE_3__webgl_context_state__["d"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "setParameters", function() { return __WEBPACK_IMPORTED_MODULE_3__webgl_context_state__["e"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "withParameters", function() { return __WEBPACK_IMPORTED_MODULE_3__webgl_context_state__["f"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "getModifiedParameters", function() { return __WEBPACK_IMPORTED_MODULE_3__webgl_context_state__["g"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__webgl_context_limits__ = __webpack_require__(165);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "getContextInfo", function() { return __WEBPACK_IMPORTED_MODULE_4__webgl_context_limits__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "getGLContextInfo", function() { return __WEBPACK_IMPORTED_MODULE_4__webgl_context_limits__["b"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "getContextLimits", function() { return __WEBPACK_IMPORTED_MODULE_4__webgl_context_limits__["c"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "glGetDebugInfo", function() { return __WEBPACK_IMPORTED_MODULE_4__webgl_context_limits__["d"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__webgl_context_features__ = __webpack_require__(108);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "FEATURES", function() { return __WEBPACK_IMPORTED_MODULE_5__webgl_context_features__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "hasFeature", function() { return __WEBPACK_IMPORTED_MODULE_5__webgl_context_features__["b"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "hasFeatures", function() { return __WEBPACK_IMPORTED_MODULE_5__webgl_context_features__["c"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "getFeatures", function() { return __WEBPACK_IMPORTED_MODULE_5__webgl_context_features__["d"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__webgl_context_debug__ = __webpack_require__(269);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "makeDebugContext", function() { return __WEBPACK_IMPORTED_MODULE_6__webgl_context_debug__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__webgl_api_debug_parameters__ = __webpack_require__(267);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "installParameterDefinitions", function() { return __WEBPACK_IMPORTED_MODULE_7__webgl_api_debug_parameters__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__webgl_buffer__ = __webpack_require__(67);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Buffer", function() { return __WEBPACK_IMPORTED_MODULE_8__webgl_buffer__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__webgl_shader__ = __webpack_require__(111);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Shader", function() { return __WEBPACK_IMPORTED_MODULE_9__webgl_shader__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "VertexShader", function() { return __WEBPACK_IMPORTED_MODULE_9__webgl_shader__["b"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "FragmentShader", function() { return __WEBPACK_IMPORTED_MODULE_9__webgl_shader__["c"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__webgl_program__ = __webpack_require__(109);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Program", function() { return __WEBPACK_IMPORTED_MODULE_10__webgl_program__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__webgl_framebuffer__ = __webpack_require__(69);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Framebuffer", function() { return __WEBPACK_IMPORTED_MODULE_11__webgl_framebuffer__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__webgl_renderbuffer__ = __webpack_require__(110);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Renderbuffer", function() { return __WEBPACK_IMPORTED_MODULE_12__webgl_renderbuffer__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__webgl_texture_2d__ = __webpack_require__(167);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Texture2D", function() { return __WEBPACK_IMPORTED_MODULE_13__webgl_texture_2d__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__webgl_texture_cube__ = __webpack_require__(275);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "TextureCube", function() { return __WEBPACK_IMPORTED_MODULE_14__webgl_texture_cube__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__webgl_draw__ = __webpack_require__(270);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "draw", function() { return __WEBPACK_IMPORTED_MODULE_15__webgl_draw__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__webgl_clear__ = __webpack_require__(107);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "clear", function() { return __WEBPACK_IMPORTED_MODULE_16__webgl_clear__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "clearBuffer", function() { return __WEBPACK_IMPORTED_MODULE_16__webgl_clear__["b"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__webgl_fence_sync__ = __webpack_require__(271);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "FenceSync", function() { return __WEBPACK_IMPORTED_MODULE_17__webgl_fence_sync__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_18__webgl_query__ = __webpack_require__(273);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Query", function() { return __WEBPACK_IMPORTED_MODULE_18__webgl_query__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_19__webgl_sampler__ = __webpack_require__(274);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Sampler", function() { return __WEBPACK_IMPORTED_MODULE_19__webgl_sampler__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_20__webgl_texture_3d__ = __webpack_require__(668);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Texture3D", function() { return __WEBPACK_IMPORTED_MODULE_20__webgl_texture_3d__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_21__webgl_texture_2d_array__ = __webpack_require__(667);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Texture2DArray", function() { return __WEBPACK_IMPORTED_MODULE_21__webgl_texture_2d_array__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_22__webgl_transform_feedback__ = __webpack_require__(276);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "TransformFeedback", function() { return __WEBPACK_IMPORTED_MODULE_22__webgl_transform_feedback__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_23__webgl_vertex_array__ = __webpack_require__(169);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "VertexArray", function() { return __WEBPACK_IMPORTED_MODULE_23__webgl_vertex_array__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_24__webgl_uniform_buffer_layout__ = __webpack_require__(669);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "UniformBufferLayout", function() { return __WEBPACK_IMPORTED_MODULE_24__webgl_uniform_buffer_layout__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_25__core_model__ = __webpack_require__(104);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Model", function() { return __WEBPACK_IMPORTED_MODULE_25__core_model__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_26__core_animation_loop__ = __webpack_require__(249);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "AnimationLoop", function() { return __WEBPACK_IMPORTED_MODULE_26__core_animation_loop__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_27__core_pick_models__ = __webpack_require__(626);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "pickModels", function() { return __WEBPACK_IMPORTED_MODULE_27__core_pick_models__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_28__core_picking_colors__ = __webpack_require__(627);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "encodePickingColor", function() { return __WEBPACK_IMPORTED_MODULE_28__core_picking_colors__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "decodePickingColor", function() { return __WEBPACK_IMPORTED_MODULE_28__core_picking_colors__["b"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "getNullPickingColor", function() { return __WEBPACK_IMPORTED_MODULE_28__core_picking_colors__["c"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_29__packages_events__ = __webpack_require__(641);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "addEvents", function() { return __WEBPACK_IMPORTED_MODULE_29__packages_events__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_30__geometry_geometry__ = __webpack_require__(45);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Geometry", function() { return __WEBPACK_IMPORTED_MODULE_30__geometry_geometry__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_31__geometry_cone_geometry__ = __webpack_require__(251);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "ConeGeometry", function() { return __WEBPACK_IMPORTED_MODULE_31__geometry_cone_geometry__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_32__geometry_cube_geometry__ = __webpack_require__(252);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "CubeGeometry", function() { return __WEBPACK_IMPORTED_MODULE_32__geometry_cube_geometry__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_33__geometry_cylinder_geometry__ = __webpack_require__(253);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "CylinderGeometry", function() { return __WEBPACK_IMPORTED_MODULE_33__geometry_cylinder_geometry__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_34__geometry_ico_sphere_geometry__ = __webpack_require__(254);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "IcoSphereGeometry", function() { return __WEBPACK_IMPORTED_MODULE_34__geometry_ico_sphere_geometry__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_35__geometry_plane_geometry__ = __webpack_require__(255);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "PlaneGeometry", function() { return __WEBPACK_IMPORTED_MODULE_35__geometry_plane_geometry__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_36__geometry_sphere_geometry__ = __webpack_require__(256);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "SphereGeometry", function() { return __WEBPACK_IMPORTED_MODULE_36__geometry_sphere_geometry__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_37__geometry_truncated_cone_geometry__ = __webpack_require__(105);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "TruncatedConeGeometry", function() { return __WEBPACK_IMPORTED_MODULE_37__geometry_truncated_cone_geometry__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_38__models_cone__ = __webpack_require__(633);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Cone", function() { return __WEBPACK_IMPORTED_MODULE_38__models_cone__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_39__models_cube__ = __webpack_require__(634);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Cube", function() { return __WEBPACK_IMPORTED_MODULE_39__models_cube__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_40__models_cylinder__ = __webpack_require__(635);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Cylinder", function() { return __WEBPACK_IMPORTED_MODULE_40__models_cylinder__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_41__models_ico_sphere__ = __webpack_require__(636);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "IcoSphere", function() { return __WEBPACK_IMPORTED_MODULE_41__models_ico_sphere__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_42__models_plane__ = __webpack_require__(637);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Plane", function() { return __WEBPACK_IMPORTED_MODULE_42__models_plane__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_43__models_sphere__ = __webpack_require__(638);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Sphere", function() { return __WEBPACK_IMPORTED_MODULE_43__models_sphere__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_44__models_truncated_cone__ = __webpack_require__(639);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "TruncatedCone", function() { return __WEBPACK_IMPORTED_MODULE_44__models_truncated_cone__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_45__models_clip_space_quad__ = __webpack_require__(632);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "ClipSpaceQuad", function() { return __WEBPACK_IMPORTED_MODULE_45__models_clip_space_quad__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_46__io__ = __webpack_require__(630);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_46__io___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_46__io__);
/* harmony reexport (binding) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_46__io__, "setPathPrefix")) __webpack_require__.d(__webpack_exports__, "setPathPrefix", function() { return __WEBPACK_IMPORTED_MODULE_46__io__["setPathPrefix"]; });
/* harmony reexport (binding) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_46__io__, "loadFile")) __webpack_require__.d(__webpack_exports__, "loadFile", function() { return __WEBPACK_IMPORTED_MODULE_46__io__["loadFile"]; });
/* harmony reexport (binding) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_46__io__, "loadImage")) __webpack_require__.d(__webpack_exports__, "loadImage", function() { return __WEBPACK_IMPORTED_MODULE_46__io__["loadImage"]; });
/* harmony reexport (binding) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_46__io__, "loadFiles")) __webpack_require__.d(__webpack_exports__, "loadFiles", function() { return __WEBPACK_IMPORTED_MODULE_46__io__["loadFiles"]; });
/* harmony reexport (binding) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_46__io__, "loadImages")) __webpack_require__.d(__webpack_exports__, "loadImages", function() { return __WEBPACK_IMPORTED_MODULE_46__io__["loadImages"]; });
/* harmony reexport (binding) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_46__io__, "loadTextures")) __webpack_require__.d(__webpack_exports__, "loadTextures", function() { return __WEBPACK_IMPORTED_MODULE_46__io__["loadTextures"]; });
/* harmony reexport (binding) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_46__io__, "loadProgram")) __webpack_require__.d(__webpack_exports__, "loadProgram", function() { return __WEBPACK_IMPORTED_MODULE_46__io__["loadProgram"]; });
/* harmony reexport (binding) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_46__io__, "loadModel")) __webpack_require__.d(__webpack_exports__, "loadModel", function() { return __WEBPACK_IMPORTED_MODULE_46__io__["loadModel"]; });
/* harmony reexport (binding) */ if(__webpack_require__.o(__WEBPACK_IMPORTED_MODULE_46__io__, "parseModel")) __webpack_require__.d(__webpack_exports__, "parseModel", function() { return __WEBPACK_IMPORTED_MODULE_46__io__["parseModel"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_47__shadertools_lib_shader_cache__ = __webpack_require__(259);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "ShaderCache", function() { return __WEBPACK_IMPORTED_MODULE_47__shadertools_lib_shader_cache__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_48__shadertools_lib_assemble_shaders__ = __webpack_require__(258);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "assembleShaders", function() { return __WEBPACK_IMPORTED_MODULE_48__shadertools_lib_assemble_shaders__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_49__shadertools_lib_shader_modules__ = __webpack_require__(162);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "registerShaderModules", function() { return __WEBPACK_IMPORTED_MODULE_49__shadertools_lib_shader_modules__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "setDefaultShaderModules", function() { return __WEBPACK_IMPORTED_MODULE_49__shadertools_lib_shader_modules__["b"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_50__shadertools_modules_fp32_fp32__ = __webpack_require__(646);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "fp32", function() { return __WEBPACK_IMPORTED_MODULE_50__shadertools_modules_fp32_fp32__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_51__shadertools_modules_fp64_fp64__ = __webpack_require__(650);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "fp64", function() { return __WEBPACK_IMPORTED_MODULE_51__shadertools_modules_fp64_fp64__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_52__shadertools_modules_project_project__ = __webpack_require__(260);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "project", function() { return __WEBPACK_IMPORTED_MODULE_52__shadertools_modules_project_project__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_53__shadertools_modules_lighting_lighting__ = __webpack_require__(654);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "lighting", function() { return __WEBPACK_IMPORTED_MODULE_53__shadertools_modules_lighting_lighting__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_54__shadertools_modules_dirlight_dirlight__ = __webpack_require__(645);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "dirlight", function() { return __WEBPACK_IMPORTED_MODULE_54__shadertools_modules_dirlight_dirlight__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_55__shadertools_modules_picking_picking__ = __webpack_require__(656);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "picking", function() { return __WEBPACK_IMPORTED_MODULE_55__shadertools_modules_picking_picking__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_56__shadertools_modules_diffuse_diffuse__ = __webpack_require__(644);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "diffuse", function() { return __WEBPACK_IMPORTED_MODULE_56__shadertools_modules_diffuse_diffuse__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_57_math_gl__ = __webpack_require__(16);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "radians", function() { return __WEBPACK_IMPORTED_MODULE_57_math_gl__["radians"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "degrees", function() { return __WEBPACK_IMPORTED_MODULE_57_math_gl__["degrees"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Vector2", function() { return __WEBPACK_IMPORTED_MODULE_57_math_gl__["Vector2"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Vector3", function() { return __WEBPACK_IMPORTED_MODULE_57_math_gl__["Vector3"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Vector4", function() { return __WEBPACK_IMPORTED_MODULE_57_math_gl__["Vector4"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Matrix4", function() { return __WEBPACK_IMPORTED_MODULE_57_math_gl__["Matrix4"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Quaternion", function() { return __WEBPACK_IMPORTED_MODULE_57_math_gl__["Quaternion"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_58__webgl_functions__ = __webpack_require__(272);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "readPixels", function() { return __WEBPACK_IMPORTED_MODULE_58__webgl_functions__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "FramebufferObject", function() { return __WEBPACK_IMPORTED_MODULE_11__webgl_framebuffer__["a"]; });
// Export core modules for luma.gl
 
// Initialize any global state
__webpack_require__(106);
 
// WebGL
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
// WebGL2 & Extensions
 
 
 
 
 
 
 
 
 
// Core Classes
 
 
// export {default as Object3D} from './core/object-3d';
// export {default as Group} from './core/group';
 
 
 
// Addons
 
 
// Geometry
 
 
 
 
 
 
 
 
 
// Models
 
 
 
 
 
 
 
 
 
 
// IO
 
 
// shadertools
 
 
 
 
// shader modules
 
 
 
 
 
 
 
 
// EXPERIMENTAL EXPORTS
 
 
 
var experimental = {
  clearBuffer: __WEBPACK_IMPORTED_MODULE_16__webgl_clear__["b" /* clearBuffer */]
};
 
// DEPRECATED EXPORTS
 
// DEPRECATED IN V4.1
 
 
 
// DEPRECATED IN V3.0
 
// Alias FramebufferObject to Framebuffer - API is fairly similar
 
//# sourceMappingURL=index.js.map
 
/***/ }),
/* 13 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.experimental = exports.lighting = exports.project64 = exports.project = exports.OrthographicViewport = exports.PerspectiveViewport = exports.WebMercatorViewport = exports.Viewport = exports.CompositeLayer = exports.Layer = exports.AttributeManager = exports.LayerManager = exports.COORDINATE_SYSTEM = undefined;
 
var _constants = __webpack_require__(70);
 
Object.defineProperty(exports, 'COORDINATE_SYSTEM', {
  enumerable: true,
  get: function get() {
    return _constants.COORDINATE_SYSTEM;
  }
});
 
var _layerManager = __webpack_require__(184);
 
Object.defineProperty(exports, 'LayerManager', {
  enumerable: true,
  get: function get() {
    return _interopRequireDefault(_layerManager).default;
  }
});
 
var _attributeManager = __webpack_require__(182);
 
Object.defineProperty(exports, 'AttributeManager', {
  enumerable: true,
  get: function get() {
    return _interopRequireDefault(_attributeManager).default;
  }
});
 
var _layer = __webpack_require__(123);
 
Object.defineProperty(exports, 'Layer', {
  enumerable: true,
  get: function get() {
    return _interopRequireDefault(_layer).default;
  }
});
 
var _compositeLayer = __webpack_require__(337);
 
Object.defineProperty(exports, 'CompositeLayer', {
  enumerable: true,
  get: function get() {
    return _interopRequireDefault(_compositeLayer).default;
  }
});
 
var _viewport = __webpack_require__(42);
 
Object.defineProperty(exports, 'Viewport', {
  enumerable: true,
  get: function get() {
    return _interopRequireDefault(_viewport).default;
  }
});
 
var _webMercatorViewport = __webpack_require__(86);
 
Object.defineProperty(exports, 'WebMercatorViewport', {
  enumerable: true,
  get: function get() {
    return _interopRequireDefault(_webMercatorViewport).default;
  }
});
 
var _perspectiveViewport = __webpack_require__(355);
 
Object.defineProperty(exports, 'PerspectiveViewport', {
  enumerable: true,
  get: function get() {
    return _interopRequireDefault(_perspectiveViewport).default;
  }
});
 
var _orthographicViewport = __webpack_require__(354);
 
Object.defineProperty(exports, 'OrthographicViewport', {
  enumerable: true,
  get: function get() {
    return _interopRequireDefault(_orthographicViewport).default;
  }
});
 
var _project = __webpack_require__(83);
 
Object.defineProperty(exports, 'project', {
  enumerable: true,
  get: function get() {
    return _interopRequireDefault(_project).default;
  }
});
 
var _project2 = __webpack_require__(192);
 
Object.defineProperty(exports, 'project64', {
  enumerable: true,
  get: function get() {
    return _interopRequireDefault(_project2).default;
  }
});
 
var _lighting = __webpack_require__(191);
 
Object.defineProperty(exports, 'lighting', {
  enumerable: true,
  get: function get() {
    return _interopRequireDefault(_lighting).default;
  }
});
 
__webpack_require__(338);
 
__webpack_require__(190);
 
var _firstPersonState = __webpack_require__(333);
 
var _firstPersonState2 = _interopRequireDefault(_firstPersonState);
 
var _orbitState = __webpack_require__(179);
 
var _orbitState2 = _interopRequireDefault(_orbitState);
 
var _mapState = __webpack_require__(82);
 
var _mapState2 = _interopRequireDefault(_mapState);
 
var _viewportControls = __webpack_require__(121);
 
var _viewportControls2 = _interopRequireDefault(_viewportControls);
 
var _mapControls = __webpack_require__(178);
 
var _mapControls2 = _interopRequireDefault(_mapControls);
 
var _firstPersonViewport = __webpack_require__(353);
 
var _firstPersonViewport2 = _interopRequireDefault(_firstPersonViewport);
 
var _thirdPersonViewport = __webpack_require__(356);
 
var _thirdPersonViewport2 = _interopRequireDefault(_thirdPersonViewport);
 
var _orbitViewport = __webpack_require__(85);
 
var _orbitViewport2 = _interopRequireDefault(_orbitViewport);
 
var _deckJs = __webpack_require__(341);
 
var _deckJs2 = _interopRequireDefault(_deckJs);
 
var _mapControllerJs = __webpack_require__(188);
 
var _mapControllerJs2 = _interopRequireDefault(_mapControllerJs);
 
var _orbitControllerJs = __webpack_require__(189);
 
var _orbitControllerJs2 = _interopRequireDefault(_orbitControllerJs);
 
var _effectManager = __webpack_require__(181);
 
var _effectManager2 = _interopRequireDefault(_effectManager);
 
var _effect = __webpack_require__(122);
 
var _effect2 = _interopRequireDefault(_effect);
 
var _transitionManager = __webpack_require__(186);
 
var _transitionManager2 = _interopRequireDefault(_transitionManager);
 
var _linearInterpolator = __webpack_require__(125);
 
var _linearInterpolator2 = _interopRequireDefault(_linearInterpolator);
 
var _viewportFlyToInterpolator = __webpack_require__(346);
 
var _viewportFlyToInterpolator2 = _interopRequireDefault(_viewportFlyToInterpolator);
 
var _transitionUtils = __webpack_require__(84);
 
var _log = __webpack_require__(17);
 
var _log2 = _interopRequireDefault(_log);
 
var _get = __webpack_require__(349);
 
var _count = __webpack_require__(194);
 
var _binSorter = __webpack_require__(347);
 
var _binSorter2 = _interopRequireDefault(_binSorter);
 
var _colorUtils = __webpack_require__(348);
 
var _scaleUtils = __webpack_require__(352);
 
var _flatten = __webpack_require__(126);
 
var _fp = __webpack_require__(195);
 
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
 
// EXPERIMENTAL EXPORTS
// Experimental Features (May change in minor version bumps, use at your own risk)
 
// Experimental Controllers
 
 
// Experimental Pure JS (non-React) bindings
 
 
// Experimental Effects (non-React) bindings
 
 
// Eperimental Transitions
 
 
// INTERNAL EXPORTS
 
// Layer utilities
 
// Layer utilities
 
// TODO - just expose as layer methods instead?
 
 
var experimental = exports.experimental = {
  ViewportControls: _viewportControls2.default,
  FirstPersonState: _firstPersonState2.default,
  OrbitState: _orbitState2.default,
  MapState: _mapState2.default,
 
  Controller: _viewportControls2.default,
  MapController: _mapControls2.default,
  // FirstPersonController,
  // OrbitController,
 
  FirstPersonViewport: _firstPersonViewport2.default,
  ThirdPersonViewport: _thirdPersonViewport2.default,
  OrbitViewport: _orbitViewport2.default,
 
  DeckGLJS: _deckJs2.default,
  MapControllerJS: _mapControllerJs2.default,
  OrbitControllerJS: _orbitControllerJs2.default,
 
  EffectManager: _effectManager2.default,
  Effect: _effect2.default,
 
  // Transitions
  TRANSITION_EVENTS: _transitionManager.TRANSITION_EVENTS,
  LinearInterpolator: _linearInterpolator2.default,
  ViewportFlyToInterpolator: _viewportFlyToInterpolator2.default,
 
  // For react module
  TransitionManager: _transitionManager2.default,
  extractViewportFrom: _transitionUtils.extractViewportFrom,
 
  // For layers
  BinSorter: _binSorter2.default,
  linearScale: _scaleUtils.linearScale,
  getLinearScale: _scaleUtils.getLinearScale,
  quantizeScale: _scaleUtils.quantizeScale,
  getQuantizeScale: _scaleUtils.getQuantizeScale,
  clamp: _scaleUtils.clamp,
  defaultColorRange: _colorUtils.defaultColorRange,
 
  log: _log2.default,
 
  get: _get.get,
  count: _count.count,
 
  flatten: _flatten.flatten,
  countVertices: _flatten.countVertices,
  flattenVertices: _flatten.flattenVertices,
  fillArray: _flatten.fillArray,
 
  enable64bitSupport: _fp.enable64bitSupport,
  fp64ify: _fp.fp64ify,
  fp64LowPart: _fp.fp64LowPart
};
 
/***/ }),
/* 14 */
/***/ (function(module, exports, __webpack_require__) {
 
// 7.1.13 ToObject(argument)
var defined = __webpack_require__(34);
module.exports = function (it) {
  return Object(defined(it));
};
 
 
/***/ }),
/* 15 */
/***/ (function(module, exports) {
 
module.exports = function (it) {
  if (typeof it != 'function') throw TypeError(it + ' is not a function!');
  return it;
};
 
 
/***/ }),
/* 16 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "experimental", function() { return experimental; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__vector2__ = __webpack_require__(280);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Vector2", function() { return __WEBPACK_IMPORTED_MODULE_0__vector2__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__vector3__ = __webpack_require__(113);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Vector3", function() { return __WEBPACK_IMPORTED_MODULE_1__vector3__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__vector4__ = __webpack_require__(281);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Vector4", function() { return __WEBPACK_IMPORTED_MODULE_2__vector4__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__matrix4__ = __webpack_require__(278);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Matrix4", function() { return __WEBPACK_IMPORTED_MODULE_3__matrix4__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__quaternion__ = __webpack_require__(279);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Quaternion", function() { return __WEBPACK_IMPORTED_MODULE_4__quaternion__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__common__ = __webpack_require__(31);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "config", function() { return __WEBPACK_IMPORTED_MODULE_5__common__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "checkNumber", function() { return __WEBPACK_IMPORTED_MODULE_5__common__["g"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "configure", function() { return __WEBPACK_IMPORTED_MODULE_5__common__["h"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "formatValue", function() { return __WEBPACK_IMPORTED_MODULE_5__common__["b"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "isArray", function() { return __WEBPACK_IMPORTED_MODULE_5__common__["i"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "clone", function() { return __WEBPACK_IMPORTED_MODULE_5__common__["j"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "radians", function() { return __WEBPACK_IMPORTED_MODULE_5__common__["d"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "degrees", function() { return __WEBPACK_IMPORTED_MODULE_5__common__["f"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "sin", function() { return __WEBPACK_IMPORTED_MODULE_5__common__["k"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "cos", function() { return __WEBPACK_IMPORTED_MODULE_5__common__["l"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "tan", function() { return __WEBPACK_IMPORTED_MODULE_5__common__["m"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "asin", function() { return __WEBPACK_IMPORTED_MODULE_5__common__["n"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "acos", function() { return __WEBPACK_IMPORTED_MODULE_5__common__["o"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "atan", function() { return __WEBPACK_IMPORTED_MODULE_5__common__["p"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "clamp", function() { return __WEBPACK_IMPORTED_MODULE_5__common__["e"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "equals", function() { return __WEBPACK_IMPORTED_MODULE_5__common__["c"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__euler__ = __webpack_require__(670);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__spherical_coordinates__ = __webpack_require__(671);
var experimental={Euler:__WEBPACK_IMPORTED_MODULE_6__euler__["a" /* default */],SphericalCoordinates:__WEBPACK_IMPORTED_MODULE_7__spherical_coordinates__["a" /* default */]};
//# sourceMappingURL=index.js.map
 
/***/ }),
/* 17 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
 
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
 
var _assert = __webpack_require__(1);
 
var _assert2 = _interopRequireDefault(_assert);
 
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
 
function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } // Copyright (c) 2015 - 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
 
/* eslint-disable no-console */
/* global console */
 
 
var cache = {};
 
function log(priority, arg) {
  for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
    args[_key - 2] = arguments[_key];
  }
 
  (0, _assert2.default)(Number.isFinite(priority), 'log priority must be a number');
  if (priority <= log.priority) {
    // Node doesn't have console.debug, but using it looks better in browser consoles
    args = formatArgs.apply(undefined, [arg].concat(_toConsumableArray(args)));
    if (console.debug) {
      var _console;
 
      (_console = console).debug.apply(_console, _toConsumableArray(args));
    } else {
      var _console2;
 
      (_console2 = console).info.apply(_console2, _toConsumableArray(args));
    }
  }
}
 
function once(priority, arg) {
  for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
    args[_key2 - 2] = arguments[_key2];
  }
 
  if (!cache[arg] && priority <= log.priority) {
    var _console3;
 
    args = checkForAssertionErrors(args);
    (_console3 = console).error.apply(_console3, _toConsumableArray(formatArgs.apply(undefined, [arg].concat(_toConsumableArray(args)))));
    cache[arg] = true;
  }
}
 
function warn(arg) {
  if (!cache[arg]) {
    var _console4;
 
    for (var _len3 = arguments.length, args = Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {
      args[_key3 - 1] = arguments[_key3];
    }
 
    (_console4 = console).warn.apply(_console4, ['deck.gl: ' + arg].concat(args));
    cache[arg] = true;
  }
}
 
function error(arg) {
  var _console5;
 
  for (var _len4 = arguments.length, args = Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) {
    args[_key4 - 1] = arguments[_key4];
  }
 
  (_console5 = console).error.apply(_console5, ['deck.gl: ' + arg].concat(args));
}
 
function deprecated(oldUsage, newUsage) {
  log.warn('`' + oldUsage + '` is deprecated and will be removed in a later version. Use `' + newUsage + '` instead');
}
 
function removed(oldUsage, newUsage) {
  log.error('`' + oldUsage + '` is no longer supported. Use `' + newUsage + '` instead, check our upgrade-guide.md for more details');
}
 
// Logs a message with a time
function time(priority, label) {
  (0, _assert2.default)(Number.isFinite(priority), 'log priority must be a number');
  if (priority <= log.priority) {
    // In case the platform doesn't have console.time
    if (console.time) {
      console.time(label);
    } else {
      console.info(label);
    }
  }
}
 
function timeEnd(priority, label) {
  (0, _assert2.default)(Number.isFinite(priority), 'log priority must be a number');
  if (priority <= log.priority) {
    // In case the platform doesn't have console.timeEnd
    if (console.timeEnd) {
      console.timeEnd(label);
    } else {
      console.info(label);
    }
  }
}
 
function group(priority, arg) {
  var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},
      _ref$collapsed = _ref.collapsed,
      collapsed = _ref$collapsed === undefined ? false : _ref$collapsed;
 
  if (priority <= log.priority) {
    if (collapsed) {
      console.groupCollapsed('luma.gl: ' + arg);
    } else {
      console.group('luma.gl: ' + arg);
    }
  }
}
 
function groupEnd(priority, arg) {
  if (priority <= log.priority) {
    console.groupEnd('luma.gl: ' + arg);
  }
}
 
// Helper functions
 
function formatArgs(firstArg) {
  if (typeof firstArg === 'function') {
    firstArg = firstArg();
  }
 
  for (var _len5 = arguments.length, args = Array(_len5 > 1 ? _len5 - 1 : 0), _key5 = 1; _key5 < _len5; _key5++) {
    args[_key5 - 1] = arguments[_key5];
  }
 
  if (typeof firstArg === 'string') {
    args.unshift('deck.gl ' + firstArg);
  } else {
    args.unshift(firstArg);
    args.unshift('deck.gl');
  }
  return args;
}
 
// Assertions don't generate standard exceptions and don't print nicely
function checkForAssertionErrors(args) {
  var isAssertion = args && args.length > 0 && _typeof(args[0]) === 'object' && args[0] !== null && args[0].name === 'AssertionError';
 
  if (isAssertion) {
    args = Array.prototype.slice.call(args);
    args.unshift('assert(' + args[0].message + ')');
  }
  return args;
}
 
log.priority = 0;
log.log = log;
log.once = once;
log.time = time;
log.timeEnd = timeEnd;
log.warn = warn;
log.error = error;
log.deprecated = deprecated;
log.removed = removed;
log.group = group;
log.groupEnd = groupEnd;
 
exports.default = log;
 
/***/ }),
/* 18 */
/***/ (function(module, exports) {
 
var hasOwnProperty = {}.hasOwnProperty;
module.exports = function (it, key) {
  return hasOwnProperty.call(it, key);
};
 
 
/***/ }),
/* 19 */
/***/ (function(module, exports, __webpack_require__) {
 
var dP = __webpack_require__(10);
var createDesc = __webpack_require__(54);
module.exports = __webpack_require__(9) ? function (object, key, value) {
  return dP.f(object, key, createDesc(1, value));
} : function (object, key, value) {
  object[key] = value;
  return object;
};
 
 
/***/ }),
/* 20 */
/***/ (function(module, exports, __webpack_require__) {
 
var global = __webpack_require__(3);
var hide = __webpack_require__(19);
var has = __webpack_require__(18);
var SRC = __webpack_require__(58)('src');
var TO_STRING = 'toString';
var $toString = Function[TO_STRING];
var TPL = ('' + $toString).split(TO_STRING);
 
__webpack_require__(33).inspectSource = function (it) {
  return $toString.call(it);
};
 
(module.exports = function (O, key, val, safe) {
  var isFunction = typeof val == 'function';
  if (isFunction) has(val, 'name') || hide(val, 'name', key);
  if (O[key] === val) return;
  if (isFunction) has(val, SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key)));
  if (O === global) {
    O[key] = val;
  } else if (!safe) {
    delete O[key];
    hide(O, key, val);
  } else if (O[key]) {
    O[key] = val;
  } else {
    hide(O, key, val);
  }
// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
})(Function.prototype, TO_STRING, function toString() {
  return typeof this == 'function' && this[SRC] || $toString.call(this);
});
 
 
/***/ }),
/* 21 */
/***/ (function(module, exports, __webpack_require__) {
 
var $export = __webpack_require__(0);
var fails = __webpack_require__(4);
var defined = __webpack_require__(34);
var quot = /"/g;
// B.2.3.2.1 CreateHTML(string, tag, attribute, value)
var createHTML = function (string, tag, attribute, value) {
  var S = String(defined(string));
  var p1 = '<' + tag;
  if (attribute !== '') p1 += ' ' + attribute + '="' + String(value).replace(quot, '&quot;') + '"';
  return p1 + '>' + S + '</' + tag + '>';
};
module.exports = function (NAME, exec) {
  var O = {};
  O[NAME] = exec(createHTML);
  $export($export.P + $export.F * fails(function () {
    var test = ''[NAME]('"');
    return test !== test.toLowerCase() || test.split('"').length > 3;
  }), 'String', O);
};
 
 
/***/ }),
/* 22 */
/***/ (function(module, exports, __webpack_require__) {
 
var pIE = __webpack_require__(73);
var createDesc = __webpack_require__(54);
var toIObject = __webpack_require__(24);
var toPrimitive = __webpack_require__(37);
var has = __webpack_require__(18);
var IE8_DOM_DEFINE = __webpack_require__(207);
var gOPD = Object.getOwnPropertyDescriptor;
 
exports.f = __webpack_require__(9) ? gOPD : function getOwnPropertyDescriptor(O, P) {
  O = toIObject(O);
  P = toPrimitive(P, true);
  if (IE8_DOM_DEFINE) try {
    return gOPD(O, P);
  } catch (e) { /* empty */ }
  if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]);
};
 
 
/***/ }),
/* 23 */
/***/ (function(module, exports, __webpack_require__) {
 
// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)
var has = __webpack_require__(18);
var toObject = __webpack_require__(14);
var IE_PROTO = __webpack_require__(144)('IE_PROTO');
var ObjectProto = Object.prototype;
 
module.exports = Object.getPrototypeOf || function (O) {
  O = toObject(O);
  if (has(O, IE_PROTO)) return O[IE_PROTO];
  if (typeof O.constructor == 'function' && O instanceof O.constructor) {
    return O.constructor.prototype;
  } return O instanceof Object ? ObjectProto : null;
};
 
 
/***/ }),
/* 24 */
/***/ (function(module, exports, __webpack_require__) {
 
// to indexed object, toObject with fallback for non-array-like ES3 strings
var IObject = __webpack_require__(72);
var defined = __webpack_require__(34);
module.exports = function (it) {
  return IObject(defined(it));
};
 
 
/***/ }),
/* 25 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["b"] = glGet;
/* harmony export (immutable) */ __webpack_exports__["c"] = glKey;
/* unused harmony export glKeyType */
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__webgl_utils_constants__ = __webpack_require__(46);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__webgl_utils_constants_to_keys__ = __webpack_require__(662);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return __WEBPACK_IMPORTED_MODULE_0__webgl_utils_constants__["a"]; });
// WEBGL BUILT-IN CONSTANTS
 
 
 
 
/* harmony default export */ __webpack_exports__["a"] = (__WEBPACK_IMPORTED_MODULE_0__webgl_utils_constants__["a" /* default */]);
 
// Resolve a WebGL enumeration name (returns itself if already a number)
function glGet(name) {
  return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__webgl_utils_constants_to_keys__["a" /* getKeyValue */])(__WEBPACK_IMPORTED_MODULE_0__webgl_utils_constants__["a" /* default */], name);
}
 
function glKey(value) {
  return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__webgl_utils_constants_to_keys__["b" /* getKey */])(__WEBPACK_IMPORTED_MODULE_0__webgl_utils_constants__["a" /* default */], value);
}
 
function glKeyType(value) {
  return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__webgl_utils_constants_to_keys__["c" /* getKeyType */])(__WEBPACK_IMPORTED_MODULE_0__webgl_utils_constants__["a" /* default */], value);
}
//# sourceMappingURL=gl-constants.js.map
 
/***/ }),
/* 26 */
/***/ (function(module, exports) {
 
// shim for using process in browser
var process = module.exports = {};
 
// cached from whatever global is present so that test runners that stub it
// don't break things.  But we need to wrap it in a try catch in case it is
// wrapped in strict mode code which doesn't define any globals.  It's inside a
// function because try/catches deoptimize in certain engines.
 
var cachedSetTimeout;
var cachedClearTimeout;
 
function defaultSetTimout() {
    throw new Error('setTimeout has not been defined');
}
function defaultClearTimeout () {
    throw new Error('clearTimeout has not been defined');
}
(function () {
    try {
        if (typeof setTimeout === 'function') {
            cachedSetTimeout = setTimeout;
        } else {
            cachedSetTimeout = defaultSetTimout;
        }
    } catch (e) {
        cachedSetTimeout = defaultSetTimout;
    }
    try {
        if (typeof clearTimeout === 'function') {
            cachedClearTimeout = clearTimeout;
        } else {
            cachedClearTimeout = defaultClearTimeout;
        }
    } catch (e) {
        cachedClearTimeout = defaultClearTimeout;
    }
} ())
function runTimeout(fun) {
    if (cachedSetTimeout === setTimeout) {
        //normal enviroments in sane situations
        return setTimeout(fun, 0);
    }
    // if setTimeout wasn't available but was latter defined
    if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
        cachedSetTimeout = setTimeout;
        return setTimeout(fun, 0);
    }
    try {
        // when when somebody has screwed with setTimeout but no I.E. maddness
        return cachedSetTimeout(fun, 0);
    } catch(e){
        try {
            // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
            return cachedSetTimeout.call(null, fun, 0);
        } catch(e){
            // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
            return cachedSetTimeout.call(this, fun, 0);
        }
    }
 
 
}
function runClearTimeout(marker) {
    if (cachedClearTimeout === clearTimeout) {
        //normal enviroments in sane situations
        return clearTimeout(marker);
    }
    // if clearTimeout wasn't available but was latter defined
    if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
        cachedClearTimeout = clearTimeout;
        return clearTimeout(marker);
    }
    try {
        // when when somebody has screwed with setTimeout but no I.E. maddness
        return cachedClearTimeout(marker);
    } catch (e){
        try {
            // When we are in I.E. but the script has been evaled so I.E. doesn't  trust the global object when called normally
            return cachedClearTimeout.call(null, marker);
        } catch (e){
            // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
            // Some versions of I.E. have different rules for clearTimeout vs setTimeout
            return cachedClearTimeout.call(this, marker);
        }
    }
 
 
 
}
var queue = [];
var draining = false;
var currentQueue;
var queueIndex = -1;
 
function cleanUpNextTick() {
    if (!draining || !currentQueue) {
        return;
    }
    draining = false;
    if (currentQueue.length) {
        queue = currentQueue.concat(queue);
    } else {
        queueIndex = -1;
    }
    if (queue.length) {
        drainQueue();
    }
}
 
function drainQueue() {
    if (draining) {
        return;
    }
    var timeout = runTimeout(cleanUpNextTick);
    draining = true;
 
    var len = queue.length;
    while(len) {
        currentQueue = queue;
        queue = [];
        while (++queueIndex < len) {
            if (currentQueue) {
                currentQueue[queueIndex].run();
            }
        }
        queueIndex = -1;
        len = queue.length;
    }
    currentQueue = null;
    draining = false;
    runClearTimeout(timeout);
}
 
process.nextTick = function (fun) {
    var args = new Array(arguments.length - 1);
    if (arguments.length > 1) {
        for (var i = 1; i < arguments.length; i++) {
            args[i - 1] = arguments[i];
        }
    }
    queue.push(new Item(fun, args));
    if (queue.length === 1 && !draining) {
        runTimeout(drainQueue);
    }
};
 
// v8 likes predictible objects
function Item(fun, array) {
    this.fun = fun;
    this.array = array;
}
Item.prototype.run = function () {
    this.fun.apply(null, this.array);
};
process.title = 'browser';
process.browser = true;
process.env = {};
process.argv = [];
process.version = ''; // empty string to avoid regexp issues
process.versions = {};
 
function noop() {}
 
process.on = noop;
process.addListener = noop;
process.once = noop;
process.off = noop;
process.removeListener = noop;
process.removeAllListeners = noop;
process.emit = noop;
process.prependListener = noop;
process.prependOnceListener = noop;
 
process.listeners = function (name) { return [] }
 
process.binding = function (name) {
    throw new Error('process.binding is not supported');
};
 
process.cwd = function () { return '/' };
process.chdir = function (dir) {
    throw new Error('process.chdir is not supported');
};
process.umask = function() { return 0; };
 
 
/***/ }),
/* 27 */
/***/ (function(module, exports) {
 
var toString = {}.toString;
 
module.exports = function (it) {
  return toString.call(it).slice(8, -1);
};
 
 
/***/ }),
/* 28 */
/***/ (function(module, exports, __webpack_require__) {
 
// optional / simple context binding
var aFunction = __webpack_require__(15);
module.exports = function (fn, that, length) {
  aFunction(fn);
  if (that === undefined) return fn;
  switch (length) {
    case 1: return function (a) {
      return fn.call(that, a);
    };
    case 2: return function (a, b) {
      return fn.call(that, a, b);
    };
    case 3: return function (a, b, c) {
      return fn.call(that, a, b, c);
    };
  }
  return function (/* ...args */) {
    return fn.apply(that, arguments);
  };
};
 
 
/***/ }),
/* 29 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var fails = __webpack_require__(4);
 
module.exports = function (method, arg) {
  return !!method && fails(function () {
    // eslint-disable-next-line no-useless-call
    arg ? method.call(null, function () { /* empty */ }, 1) : method.call(null);
  });
};
 
 
/***/ }),
/* 30 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__init__ = __webpack_require__(106);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__context__ = __webpack_require__(7);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__gl_constants__ = __webpack_require__(25);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__utils__ = __webpack_require__(8);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_assert__ = __webpack_require__(1);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_assert___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_assert__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__webgl_utils__ = __webpack_require__(60);
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
 
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
 
 
 
 
 
 
 
 
var ERR_RESOURCE_METHOD_UNDEFINED = 'Resource subclass must define virtual methods';
 
// TODO - Handle context loss
// function glGetContextLossCount(gl) {
//   return (gl.luma && gl.luma.glCount) || 0;
// }
 
var Resource = /*#__PURE__*/function () {
  function Resource(gl) {
    var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
 
    _classCallCheck(this, Resource);
 
    __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__context__["j" /* assertWebGLContext */])(gl);
 
    var id = opts.id,
        _opts$userData = opts.userData,
        userData = _opts$userData === undefined ? {} : _opts$userData;
 
    this.gl = gl;
    this.ext = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__webgl_utils__["f" /* polyfillContext */])(gl);
    this.id = id || __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__utils__["d" /* uid */])(this.constructor.name);
    this.userData = userData;
    this.opts = opts;
 
    // Set the handle
    // If handle was provided, use it, otherwise create a new handle
 
    // TODO - Stores the handle with context loss information
    // this.glCount = glGetContextLossCount(this.gl);
 
    // Default VertexArray needs to be created with null handle, so compare against undefined
    this._handle = opts.handle;
    if (this._handle === undefined) {
      this._handle = this._createHandle();
    }
 
    this._addStats();
  }
 
  _createClass(Resource, [{
    key: 'toString',
    value: function toString() {
      return this.constructor.name + '(' + this.id + ')';
    }
  }, {
    key: 'delete',
    value: function _delete() {
      var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
          _ref$deleteChildren = _ref.deleteChildren,
          deleteChildren = _ref$deleteChildren === undefined ? false : _ref$deleteChildren;
 
      // Delete this object, and get refs to any children
      var children = this._handle && this._deleteHandle(this._handle);
      this._handle = null;
 
      // Optionally, recursively delete the children
      if (children && deleteChildren) {
        children.filter(Boolean).forEach(function (child) {
          child.delete();
        });
      }
 
      return this;
    }
  }, {
    key: 'unbind',
    value: function unbind() {
      this.bind(null);
    }
 
    /**
     * Query a Resource parameter
     *
     * @param {GLenum} pname
     * @return {GLint|GLfloat|GLenum} param
     */
 
  }, {
    key: 'getParameter',
    value: function getParameter(pname) {
      var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
 
      pname = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__gl_constants__["b" /* glGet */])(pname);
      __WEBPACK_IMPORTED_MODULE_4_assert___default()(pname);
 
      var parameters = this.constructor.PARAMETERS || {};
 
      // Use parameter definitions to handle unsupported parameters
      var parameter = parameters[pname];
      if (parameter) {
        var isWebgl2 = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__context__["b" /* isWebGL2 */])(this.gl);
 
        // Check if we can query for this parameter
        var parameterAvailable = (!('webgl2' in parameter) || isWebgl2) && (!('extension' in parameter) || this.gl.getExtension(parameter.extension));
 
        if (!parameterAvailable) {
          var webgl1Default = parameter.webgl1;
          var webgl2Default = 'webgl2' in parameter ? parameter.webgl2 : parameter.webgl1;
          var defaultValue = isWebgl2 ? webgl2Default : webgl1Default;
          return defaultValue;
        }
      }
 
      // If unknown parameter - Could be a valid parameter not covered by PARAMS
      // Attempt to query for it and let WebGL report errors
      return this._getParameter(pname, opts);
    }
 
    // Many resources support a getParameter call -
    // getParameters will get all parameters - slow but useful for debugging
 
  }, {
    key: 'getParameters',
    value: function getParameters() {
      var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
      var _ref2 = {},
          parameters = _ref2.parameters,
          keys = _ref2.keys;
 
      // Get parameter definitions for this Resource
 
      var PARAMETERS = this.constructor.PARAMETERS || {};
 
      var isWebgl2 = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__context__["b" /* isWebGL2 */])(this.gl);
 
      var values = {};
 
      // Query all parameters if no list provided
      var parameterKeys = parameters || Object.keys(PARAMETERS);
 
      // WEBGL limits
      var _iteratorNormalCompletion = true;
      var _didIteratorError = false;
      var _iteratorError = undefined;
 
      try {
        for (var _iterator = parameterKeys[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
          var pname = _step.value;
 
          var parameter = PARAMETERS[pname];
 
          // Check if this parameter is available on this platform
          var parameterAvailable = parameter && (!('webgl2' in parameter) || isWebgl2) && (!('extension' in parameter) || this.gl.getExtension(parameter.extension));
 
          if (parameterAvailable) {
            var key = keys ? __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__gl_constants__["c" /* glKey */])(pname) : pname;
            values[key] = this.getParameter(pname, opts);
            if (keys && parameter.type === 'GLenum') {
              values[key] = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__gl_constants__["c" /* glKey */])(values[key]);
            }
          }
        }
      } catch (err) {
        _didIteratorError = true;
        _iteratorError = err;
      } finally {
        try {
          if (!_iteratorNormalCompletion && _iterator.return) {
            _iterator.return();
          }
        } finally {
          if (_didIteratorError) {
            throw _iteratorError;
          }
        }
      }
 
      return values;
    }
 
    /**
     * Update a Resource setting
     *
     * @todo - cache parameter to avoid issuing WebGL calls?
     *
     * @param {GLenum} pname - parameter (GL constant, value or key)
     * @param {GLint|GLfloat|GLenum} value
     * @return {Resource} returns self to enable chaining
     */
 
  }, {
    key: 'setParameter',
    value: function setParameter(pname, value) {
      pname = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__gl_constants__["b" /* glGet */])(pname);
      __WEBPACK_IMPORTED_MODULE_4_assert___default()(pname);
 
      var parameters = this.constructor.PARAMETERS || {};
 
      var parameter = parameters[pname];
      if (parameter) {
        var isWebgl2 = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__context__["b" /* isWebGL2 */])(this.gl);
 
        // Check if this parameter is available on this platform
        var parameterAvailable = (!('webgl2' in parameter) || isWebgl2) && (!('extension' in parameter) || this.gl.getExtension(parameter.extension));
 
        if (!parameterAvailable) {
          throw new Error('Parameter not available on this platform');
        }
 
        // Handle string keys
        if (parameter.type === 'GLenum') {
          value = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__gl_constants__["b" /* glGet */])(value);
        }
      }
 
      // If unknown parameter - Could be a valid parameter not covered by PARAMS
      // attempt to set it and let WebGL report errors
      this._setParameter(pname, value);
      return this;
    }
 
    /*
     * Batch update resource parameters
     * Assumes the subclass supports a setParameter call
     */
 
  }, {
    key: 'setParameters',
    value: function setParameters(parameters) {
      for (var pname in parameters) {
        this.setParameter(pname, parameters[pname]);
      }
      return this;
    }
 
    // PUBLIC VIRTUAL METHODS
 
  }, {
    key: 'initialize',
    value: function initialize(opts) {}
 
    // PROTECTED METHODS - These must be overridden by subclass
 
  }, {
    key: '_createHandle',
    value: function _createHandle() {
      throw new Error(ERR_RESOURCE_METHOD_UNDEFINED);
    }
  }, {
    key: '_deleteHandle',
    value: function _deleteHandle() {
      throw new Error(ERR_RESOURCE_METHOD_UNDEFINED);
    }
  }, {
    key: '_getOptsFromHandle',
    value: function _getOptsFromHandle() {
      throw new Error(ERR_RESOURCE_METHOD_UNDEFINED);
    }
  }, {
    key: '_getParameter',
    value: function _getParameter(pname, opts) {
      throw new Error(ERR_RESOURCE_METHOD_UNDEFINED);
    }
 
    /**
     * @param {GLenum} pname
     * @param {GLint|GLfloat|GLenum} param
     * @return {Sampler} returns self to enable chaining
     */
 
  }, {
    key: '_setParameter',
    value: function _setParameter(pname, value) {
      throw new Error(ERR_RESOURCE_METHOD_UNDEFINED);
    }
 
    // PRIVATE METHODS
 
  }, {
    key: '_context',
    value: function _context() {
      this.gl.luma = this.gl.luma || {};
      return this.gl.luma;
    }
  }, {
    key: '_addStats',
    value: function _addStats() {
      var name = this.constructor.name;
 
      var stats = __WEBPACK_IMPORTED_MODULE_0__init__["default"].stats;
 
      stats.resourceCount = stats.resourceCount || 0;
      stats.resourceMap = stats.resourceMap || {};
 
      // Resource creation stats
      stats.resourceCount++;
      stats.resourceMap[name] = stats.resourceMap[name] || { count: 0 };
      stats.resourceMap[name].count++;
    }
  }, {
    key: 'handle',
    get: function get() {
      // TODO - Add context loss handling
      // Will regenerate and reinitialize the handle if necessary
      // const glCount = glGetContextLossCount(this.gl);
      // if (this.glCount !== glCount) {
      //   this._handle = this._createHandle(this.opts);
      //   this._glCount = glCount;
      //   // Reinitialize object
      //   this.initialize(this.opts);
      // }
      return this._handle;
    }
  }]);
 
  return Resource;
}();
 
/* harmony default export */ __webpack_exports__["a"] = (Resource);
//# sourceMappingURL=resource.js.map
 
/***/ }),
/* 31 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return config; });
/* harmony export (immutable) */ __webpack_exports__["h"] = configure;
/* harmony export (immutable) */ __webpack_exports__["g"] = checkNumber;
/* harmony export (immutable) */ __webpack_exports__["b"] = formatValue;
/* unused harmony export formatAngle */
/* harmony export (immutable) */ __webpack_exports__["i"] = isArray;
/* harmony export (immutable) */ __webpack_exports__["j"] = clone;
/* harmony export (immutable) */ __webpack_exports__["d"] = radians;
/* harmony export (immutable) */ __webpack_exports__["f"] = degrees;
/* harmony export (immutable) */ __webpack_exports__["k"] = sin;
/* harmony export (immutable) */ __webpack_exports__["l"] = cos;
/* harmony export (immutable) */ __webpack_exports__["m"] = tan;
/* harmony export (immutable) */ __webpack_exports__["n"] = asin;
/* harmony export (immutable) */ __webpack_exports__["o"] = acos;
/* harmony export (immutable) */ __webpack_exports__["p"] = atan;
/* harmony export (immutable) */ __webpack_exports__["e"] = clamp;
/* harmony export (immutable) */ __webpack_exports__["c"] = equals;
var config={EPSILON:1e-12,debug:!0,precision:4,printTypes:!1,printDegrees:!1,printRowMajor:!0};function configure(options){'epsilon'in options&&(config.EPSILON=options.epsilon),'debug'in options&&(config.debug=options.debug)}function checkNumber(value){if(!Number.isFinite(value))throw new Error('Invalid number '+value);return value}function round(value){return Math.round(value/config.EPSILON)*config.EPSILON}function formatValue(value){var _ref=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},_ref$precision=_ref.precision,precision=void 0===_ref$precision?config.precision||4:_ref$precision;return value=round(value),parseFloat(value.toPrecision(precision))}function formatAngle(value){var _ref2=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},_ref2$precision=_ref2.precision,precision=void 0===_ref2$precision?config.precision||4:_ref2$precision,_ref2$printDegrees=_ref2.printDegrees,printDegrees=void 0===_ref2$printDegrees?config.printAngles:_ref2$printDegrees;return value=printDegrees?degrees(value):value,value=round(value),''+parseFloat(value.toPrecision(precision))+(printDegrees?'\xB0':'')}function isArray(value){return Array.isArray(value)||ArrayBuffer.isView(value)&&value.length!==void 0}function clone(array){return array.clone?array.clone():Array(array)}function map(value,func){if(isArray(value)){for(var result=clone(value),i=0;i<result.length;++i)result[i]=func(result[i],i,result);return result}return func(value)}function radians(degrees){return map(degrees,function(degrees){return degrees/180*Math.PI})}function degrees(radians){return map(radians,function(radians){return 180*radians/Math.PI})}function sin(radians){return map(radians,function(angle){return Math.sin(angle)})}function cos(radians){return map(radians,function(angle){return Math.cos(angle)})}function tan(radians){return map(radians,function(angle){return Math.tan(angle)})}function asin(radians){return map(radians,function(angle){return Math.asin(angle)})}function acos(radians){return map(radians,function(angle){return Math.acos(angle)})}function atan(radians){return map(radians,function(angle){return Math.atan(angle)})}function clamp(value,min,max){return map(value,function(value){return Math.max(min,Math.min(max,value))})}function equals(a,b){var _Mathabs=Math.abs;if(Array.isArray(a)&&Array.isArray(b)){if(a===b)return!0;if(a.length!==b.length)return!1;for(var i=0;i<a.length;++i)if(!equals(a[i],b[i]))return!1;return!0}return _Mathabs(a-b)<=config.EPSILON*Math.max(1,_Mathabs(a),_Mathabs(b))}
//# sourceMappingURL=common.js.map
 
/***/ }),
/* 32 */
/***/ (function(module, exports, __webpack_require__) {
 
// 0 -> Array#forEach
// 1 -> Array#map
// 2 -> Array#filter
// 3 -> Array#some
// 4 -> Array#every
// 5 -> Array#find
// 6 -> Array#findIndex
var ctx = __webpack_require__(28);
var IObject = __webpack_require__(72);
var toObject = __webpack_require__(14);
var toLength = __webpack_require__(11);
var asc = __webpack_require__(129);
module.exports = function (TYPE, $create) {
  var IS_MAP = TYPE == 1;
  var IS_FILTER = TYPE == 2;
  var IS_SOME = TYPE == 3;
  var IS_EVERY = TYPE == 4;
  var IS_FIND_INDEX = TYPE == 6;
  var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
  var create = $create || asc;
  return function ($this, callbackfn, that) {
    var O = toObject($this);
    var self = IObject(O);
    var f = ctx(callbackfn, that, 3);
    var length = toLength(self.length);
    var index = 0;
    var result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined;
    var val, res;
    for (;length > index; index++) if (NO_HOLES || index in self) {
      val = self[index];
      res = f(val, index, O);
      if (TYPE) {
        if (IS_MAP) result[index] = res;   // map
        else if (res) switch (TYPE) {
          case 3: return true;             // some
          case 5: return val;              // find
          case 6: return index;            // findIndex
          case 2: result.push(val);        // filter
        } else if (IS_EVERY) return false; // every
      }
    }
    return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result;
  };
};
 
 
/***/ }),
/* 33 */
/***/ (function(module, exports) {
 
var core = module.exports = { version: '2.5.3' };
if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef
 
 
/***/ }),
/* 34 */
/***/ (function(module, exports) {
 
// 7.2.1 RequireObjectCoercible(argument)
module.exports = function (it) {
  if (it == undefined) throw TypeError("Can't call method on  " + it);
  return it;
};
 
 
/***/ }),
/* 35 */
/***/ (function(module, exports, __webpack_require__) {
 
// most Object methods by ES6 should accept primitives
var $export = __webpack_require__(0);
var core = __webpack_require__(33);
var fails = __webpack_require__(4);
module.exports = function (KEY, exec) {
  var fn = (core.Object || {})[KEY] || Object[KEY];
  var exp = {};
  exp[KEY] = exec(fn);
  $export($export.S + $export.F * fails(function () { fn(1); }), 'Object', exp);
};
 
 
/***/ }),
/* 36 */
/***/ (function(module, exports) {
 
// 7.1.4 ToInteger
var ceil = Math.ceil;
var floor = Math.floor;
module.exports = function (it) {
  return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);
};
 
 
/***/ }),
/* 37 */
/***/ (function(module, exports, __webpack_require__) {
 
// 7.1.1 ToPrimitive(input [, PreferredType])
var isObject = __webpack_require__(5);
// instead of the ES6 spec version, we didn't implement @@toPrimitive case
// and the second argument - flag - preferred type is a string
module.exports = function (it, S) {
  if (!isObject(it)) return it;
  var fn, val;
  if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
  if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val;
  if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
  throw TypeError("Can't convert object to primitive value");
};
 
 
/***/ }),
/* 38 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__types__ = __webpack_require__(268);
/* unused harmony reexport Image */
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_0__types__["a"]; });
/* unused harmony reexport WebGLProgram */
/* unused harmony reexport WebGLShader */
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return __WEBPACK_IMPORTED_MODULE_0__types__["d"]; });
/* unused harmony reexport WebGLFramebuffer */
/* unused harmony reexport WebGLRenderbuffer */
/* unused harmony reexport WebGLTexture */
/* unused harmony reexport WebGLUniformLocation */
/* unused harmony reexport WebGLActiveInfo */
/* unused harmony reexport WebGLShaderPrecisionFormat */
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return __WEBPACK_IMPORTED_MODULE_0__types__["b"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return __WEBPACK_IMPORTED_MODULE_0__types__["c"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__webgl_utils__ = __webpack_require__(60);
/* unused harmony reexport formatGLSLCompilerError */
/* unused harmony reexport getShaderName */
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__webgl_utils_constants__ = __webpack_require__(46);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return __WEBPACK_IMPORTED_MODULE_2__webgl_utils_constants__["a"]; });
// Exports WebGL API constants and types, plus some basic type checks
 
 
 
 
// TODO - avoid importing GL as it is a big file
 
 
/* harmony default export */ __webpack_exports__["a"] = (__WEBPACK_IMPORTED_MODULE_2__webgl_utils_constants__["a" /* default */]);
//# sourceMappingURL=index.js.map
 
/***/ }),
/* 39 */
/***/ (function(module, exports, __webpack_require__) {
 
var Map = __webpack_require__(228);
var $export = __webpack_require__(0);
var shared = __webpack_require__(98)('metadata');
var store = shared.store || (shared.store = new (__webpack_require__(231))());
 
var getOrCreateMetadataMap = function (target, targetKey, create) {
  var targetMetadata = store.get(target);
  if (!targetMetadata) {
    if (!create) return undefined;
    store.set(target, targetMetadata = new Map());
  }
  var keyMetadata = targetMetadata.get(targetKey);
  if (!keyMetadata) {
    if (!create) return undefined;
    targetMetadata.set(targetKey, keyMetadata = new Map());
  } return keyMetadata;
};
var ordinaryHasOwnMetadata = function (MetadataKey, O, P) {
  var metadataMap = getOrCreateMetadataMap(O, P, false);
  return metadataMap === undefined ? false : metadataMap.has(MetadataKey);
};
var ordinaryGetOwnMetadata = function (MetadataKey, O, P) {
  var metadataMap = getOrCreateMetadataMap(O, P, false);
  return metadataMap === undefined ? undefined : metadataMap.get(MetadataKey);
};
var ordinaryDefineOwnMetadata = function (MetadataKey, MetadataValue, O, P) {
  getOrCreateMetadataMap(O, P, true).set(MetadataKey, MetadataValue);
};
var ordinaryOwnMetadataKeys = function (target, targetKey) {
  var metadataMap = getOrCreateMetadataMap(target, targetKey, false);
  var keys = [];
  if (metadataMap) metadataMap.forEach(function (_, key) { keys.push(key); });
  return keys;
};
var toMetaKey = function (it) {
  return it === undefined || typeof it == 'symbol' ? it : String(it);
};
var exp = function (O) {
  $export($export.S, 'Reflect', O);
};
 
module.exports = {
  store: store,
  map: getOrCreateMetadataMap,
  has: ordinaryHasOwnMetadata,
  get: ordinaryGetOwnMetadata,
  set: ordinaryDefineOwnMetadata,
  keys: ordinaryOwnMetadataKeys,
  key: toMetaKey,
  exp: exp
};
 
 
/***/ }),
/* 40 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
if (__webpack_require__(9)) {
  var LIBRARY = __webpack_require__(50);
  var global = __webpack_require__(3);
  var fails = __webpack_require__(4);
  var $export = __webpack_require__(0);
  var $typed = __webpack_require__(100);
  var $buffer = __webpack_require__(150);
  var ctx = __webpack_require__(28);
  var anInstance = __webpack_require__(48);
  var propertyDesc = __webpack_require__(54);
  var hide = __webpack_require__(19);
  var redefineAll = __webpack_require__(55);
  var toInteger = __webpack_require__(36);
  var toLength = __webpack_require__(11);
  var toIndex = __webpack_require__(226);
  var toAbsoluteIndex = __webpack_require__(57);
  var toPrimitive = __webpack_require__(37);
  var has = __webpack_require__(18);
  var classof = __webpack_require__(71);
  var isObject = __webpack_require__(5);
  var toObject = __webpack_require__(14);
  var isArrayIter = __webpack_require__(136);
  var create = __webpack_require__(51);
  var getPrototypeOf = __webpack_require__(23);
  var gOPN = __webpack_require__(52).f;
  var getIterFn = __webpack_require__(153);
  var uid = __webpack_require__(58);
  var wks = __webpack_require__(6);
  var createArrayMethod = __webpack_require__(32);
  var createArrayIncludes = __webpack_require__(87);
  var speciesConstructor = __webpack_require__(99);
  var ArrayIterators = __webpack_require__(154);
  var Iterators = __webpack_require__(63);
  var $iterDetect = __webpack_require__(93);
  var setSpecies = __webpack_require__(56);
  var arrayFill = __webpack_require__(128);
  var arrayCopyWithin = __webpack_require__(199);
  var $DP = __webpack_require__(10);
  var $GOPD = __webpack_require__(22);
  var dP = $DP.f;
  var gOPD = $GOPD.f;
  var RangeError = global.RangeError;
  var TypeError = global.TypeError;
  var Uint8Array = global.Uint8Array;
  var ARRAY_BUFFER = 'ArrayBuffer';
  var SHARED_BUFFER = 'Shared' + ARRAY_BUFFER;
  var BYTES_PER_ELEMENT = 'BYTES_PER_ELEMENT';
  var PROTOTYPE = 'prototype';
  var ArrayProto = Array[PROTOTYPE];
  var $ArrayBuffer = $buffer.ArrayBuffer;
  var $DataView = $buffer.DataView;
  var arrayForEach = createArrayMethod(0);
  var arrayFilter = createArrayMethod(2);
  var arraySome = createArrayMethod(3);
  var arrayEvery = createArrayMethod(4);
  var arrayFind = createArrayMethod(5);
  var arrayFindIndex = createArrayMethod(6);
  var arrayIncludes = createArrayIncludes(true);
  var arrayIndexOf = createArrayIncludes(false);
  var arrayValues = ArrayIterators.values;
  var arrayKeys = ArrayIterators.keys;
  var arrayEntries = ArrayIterators.entries;
  var arrayLastIndexOf = ArrayProto.lastIndexOf;
  var arrayReduce = ArrayProto.reduce;
  var arrayReduceRight = ArrayProto.reduceRight;
  var arrayJoin = ArrayProto.join;
  var arraySort = ArrayProto.sort;
  var arraySlice = ArrayProto.slice;
  var arrayToString = ArrayProto.toString;
  var arrayToLocaleString = ArrayProto.toLocaleString;
  var ITERATOR = wks('iterator');
  var TAG = wks('toStringTag');
  var TYPED_CONSTRUCTOR = uid('typed_constructor');
  var DEF_CONSTRUCTOR = uid('def_constructor');
  var ALL_CONSTRUCTORS = $typed.CONSTR;
  var TYPED_ARRAY = $typed.TYPED;
  var VIEW = $typed.VIEW;
  var WRONG_LENGTH = 'Wrong length!';
 
  var $map = createArrayMethod(1, function (O, length) {
    return allocate(speciesConstructor(O, O[DEF_CONSTRUCTOR]), length);
  });
 
  var LITTLE_ENDIAN = fails(function () {
    // eslint-disable-next-line no-undef
    return new Uint8Array(new Uint16Array([1]).buffer)[0] === 1;
  });
 
  var FORCED_SET = !!Uint8Array && !!Uint8Array[PROTOTYPE].set && fails(function () {
    new Uint8Array(1).set({});
  });
 
  var toOffset = function (it, BYTES) {
    var offset = toInteger(it);
    if (offset < 0 || offset % BYTES) throw RangeError('Wrong offset!');
    return offset;
  };
 
  var validate = function (it) {
    if (isObject(it) && TYPED_ARRAY in it) return it;
    throw TypeError(it + ' is not a typed array!');
  };
 
  var allocate = function (C, length) {
    if (!(isObject(C) && TYPED_CONSTRUCTOR in C)) {
      throw TypeError('It is not a typed array constructor!');
    } return new C(length);
  };
 
  var speciesFromList = function (O, list) {
    return fromList(speciesConstructor(O, O[DEF_CONSTRUCTOR]), list);
  };
 
  var fromList = function (C, list) {
    var index = 0;
    var length = list.length;
    var result = allocate(C, length);
    while (length > index) result[index] = list[index++];
    return result;
  };
 
  var addGetter = function (it, key, internal) {
    dP(it, key, { get: function () { return this._d[internal]; } });
  };
 
  var $from = function from(source /* , mapfn, thisArg */) {
    var O = toObject(source);
    var aLen = arguments.length;
    var mapfn = aLen > 1 ? arguments[1] : undefined;
    var mapping = mapfn !== undefined;
    var iterFn = getIterFn(O);
    var i, length, values, result, step, iterator;
    if (iterFn != undefined && !isArrayIter(iterFn)) {
      for (iterator = iterFn.call(O), values = [], i = 0; !(step = iterator.next()).done; i++) {
        values.push(step.value);
      } O = values;
    }
    if (mapping && aLen > 2) mapfn = ctx(mapfn, arguments[2], 2);
    for (i = 0, length = toLength(O.length), result = allocate(this, length); length > i; i++) {
      result[i] = mapping ? mapfn(O[i], i) : O[i];
    }
    return result;
  };
 
  var $of = function of(/* ...items */) {
    var index = 0;
    var length = arguments.length;
    var result = allocate(this, length);
    while (length > index) result[index] = arguments[index++];
    return result;
  };
 
  // iOS Safari 6.x fails here
  var TO_LOCALE_BUG = !!Uint8Array && fails(function () { arrayToLocaleString.call(new Uint8Array(1)); });
 
  var $toLocaleString = function toLocaleString() {
    return arrayToLocaleString.apply(TO_LOCALE_BUG ? arraySlice.call(validate(this)) : validate(this), arguments);
  };
 
  var proto = {
    copyWithin: function copyWithin(target, start /* , end */) {
      return arrayCopyWithin.call(validate(this), target, start, arguments.length > 2 ? arguments[2] : undefined);
    },
    every: function every(callbackfn /* , thisArg */) {
      return arrayEvery(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
    },
    fill: function fill(value /* , start, end */) { // eslint-disable-line no-unused-vars
      return arrayFill.apply(validate(this), arguments);
    },
    filter: function filter(callbackfn /* , thisArg */) {
      return speciesFromList(this, arrayFilter(validate(this), callbackfn,
        arguments.length > 1 ? arguments[1] : undefined));
    },
    find: function find(predicate /* , thisArg */) {
      return arrayFind(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined);
    },
    findIndex: function findIndex(predicate /* , thisArg */) {
      return arrayFindIndex(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined);
    },
    forEach: function forEach(callbackfn /* , thisArg */) {
      arrayForEach(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
    },
    indexOf: function indexOf(searchElement /* , fromIndex */) {
      return arrayIndexOf(validate(this), searchElement, arguments.length > 1 ? arguments[1] : undefined);
    },
    includes: function includes(searchElement /* , fromIndex */) {
      return arrayIncludes(validate(this), searchElement, arguments.length > 1 ? arguments[1] : undefined);
    },
    join: function join(separator) { // eslint-disable-line no-unused-vars
      return arrayJoin.apply(validate(this), arguments);
    },
    lastIndexOf: function lastIndexOf(searchElement /* , fromIndex */) { // eslint-disable-line no-unused-vars
      return arrayLastIndexOf.apply(validate(this), arguments);
    },
    map: function map(mapfn /* , thisArg */) {
      return $map(validate(this), mapfn, arguments.length > 1 ? arguments[1] : undefined);
    },
    reduce: function reduce(callbackfn /* , initialValue */) { // eslint-disable-line no-unused-vars
      return arrayReduce.apply(validate(this), arguments);
    },
    reduceRight: function reduceRight(callbackfn /* , initialValue */) { // eslint-disable-line no-unused-vars
      return arrayReduceRight.apply(validate(this), arguments);
    },
    reverse: function reverse() {
      var that = this;
      var length = validate(that).length;
      var middle = Math.floor(length / 2);
      var index = 0;
      var value;
      while (index < middle) {
        value = that[index];
        that[index++] = that[--length];
        that[length] = value;
      } return that;
    },
    some: function some(callbackfn /* , thisArg */) {
      return arraySome(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
    },
    sort: function sort(comparefn) {
      return arraySort.call(validate(this), comparefn);
    },
    subarray: function subarray(begin, end) {
      var O = validate(this);
      var length = O.length;
      var $begin = toAbsoluteIndex(begin, length);
      return new (speciesConstructor(O, O[DEF_CONSTRUCTOR]))(
        O.buffer,
        O.byteOffset + $begin * O.BYTES_PER_ELEMENT,
        toLength((end === undefined ? length : toAbsoluteIndex(end, length)) - $begin)
      );
    }
  };
 
  var $slice = function slice(start, end) {
    return speciesFromList(this, arraySlice.call(validate(this), start, end));
  };
 
  var $set = function set(arrayLike /* , offset */) {
    validate(this);
    var offset = toOffset(arguments[1], 1);
    var length = this.length;
    var src = toObject(arrayLike);
    var len = toLength(src.length);
    var index = 0;
    if (len + offset > length) throw RangeError(WRONG_LENGTH);
    while (index < len) this[offset + index] = src[index++];
  };
 
  var $iterators = {
    entries: function entries() {
      return arrayEntries.call(validate(this));
    },
    keys: function keys() {
      return arrayKeys.call(validate(this));
    },
    values: function values() {
      return arrayValues.call(validate(this));
    }
  };
 
  var isTAIndex = function (target, key) {
    return isObject(target)
      && target[TYPED_ARRAY]
      && typeof key != 'symbol'
      && key in target
      && String(+key) == String(key);
  };
  var $getDesc = function getOwnPropertyDescriptor(target, key) {
    return isTAIndex(target, key = toPrimitive(key, true))
      ? propertyDesc(2, target[key])
      : gOPD(target, key);
  };
  var $setDesc = function defineProperty(target, key, desc) {
    if (isTAIndex(target, key = toPrimitive(key, true))
      && isObject(desc)
      && has(desc, 'value')
      && !has(desc, 'get')
      && !has(desc, 'set')
      // TODO: add validation descriptor w/o calling accessors
      && !desc.configurable
      && (!has(desc, 'writable') || desc.writable)
      && (!has(desc, 'enumerable') || desc.enumerable)
    ) {
      target[key] = desc.value;
      return target;
    } return dP(target, key, desc);
  };
 
  if (!ALL_CONSTRUCTORS) {
    $GOPD.f = $getDesc;
    $DP.f = $setDesc;
  }
 
  $export($export.S + $export.F * !ALL_CONSTRUCTORS, 'Object', {
    getOwnPropertyDescriptor: $getDesc,
    defineProperty: $setDesc
  });
 
  if (fails(function () { arrayToString.call({}); })) {
    arrayToString = arrayToLocaleString = function toString() {
      return arrayJoin.call(this);
    };
  }
 
  var $TypedArrayPrototype$ = redefineAll({}, proto);
  redefineAll($TypedArrayPrototype$, $iterators);
  hide($TypedArrayPrototype$, ITERATOR, $iterators.values);
  redefineAll($TypedArrayPrototype$, {
    slice: $slice,
    set: $set,
    constructor: function () { /* noop */ },
    toString: arrayToString,
    toLocaleString: $toLocaleString
  });
  addGetter($TypedArrayPrototype$, 'buffer', 'b');
  addGetter($TypedArrayPrototype$, 'byteOffset', 'o');
  addGetter($TypedArrayPrototype$, 'byteLength', 'l');
  addGetter($TypedArrayPrototype$, 'length', 'e');
  dP($TypedArrayPrototype$, TAG, {
    get: function () { return this[TYPED_ARRAY]; }
  });
 
  // eslint-disable-next-line max-statements
  module.exports = function (KEY, BYTES, wrapper, CLAMPED) {
    CLAMPED = !!CLAMPED;
    var NAME = KEY + (CLAMPED ? 'Clamped' : '') + 'Array';
    var GETTER = 'get' + KEY;
    var SETTER = 'set' + KEY;
    var TypedArray = global[NAME];
    var Base = TypedArray || {};
    var TAC = TypedArray && getPrototypeOf(TypedArray);
    var FORCED = !TypedArray || !$typed.ABV;
    var O = {};
    var TypedArrayPrototype = TypedArray && TypedArray[PROTOTYPE];
    var getter = function (that, index) {
      var data = that._d;
      return data.v[GETTER](index * BYTES + data.o, LITTLE_ENDIAN);
    };
    var setter = function (that, index, value) {
      var data = that._d;
      if (CLAMPED) value = (value = Math.round(value)) < 0 ? 0 : value > 0xff ? 0xff : value & 0xff;
      data.v[SETTER](index * BYTES + data.o, value, LITTLE_ENDIAN);
    };
    var addElement = function (that, index) {
      dP(that, index, {
        get: function () {
          return getter(this, index);
        },
        set: function (value) {
          return setter(this, index, value);
        },
        enumerable: true
      });
    };
    if (FORCED) {
      TypedArray = wrapper(function (that, data, $offset, $length) {
        anInstance(that, TypedArray, NAME, '_d');
        var index = 0;
        var offset = 0;
        var buffer, byteLength, length, klass;
        if (!isObject(data)) {
          length = toIndex(data);
          byteLength = length * BYTES;
          buffer = new $ArrayBuffer(byteLength);
        } else if (data instanceof $ArrayBuffer || (klass = classof(data)) == ARRAY_BUFFER || klass == SHARED_BUFFER) {
          buffer = data;
          offset = toOffset($offset, BYTES);
          var $len = data.byteLength;
          if ($length === undefined) {
            if ($len % BYTES) throw RangeError(WRONG_LENGTH);
            byteLength = $len - offset;
            if (byteLength < 0) throw RangeError(WRONG_LENGTH);
          } else {
            byteLength = toLength($length) * BYTES;
            if (byteLength + offset > $len) throw RangeError(WRONG_LENGTH);
          }
          length = byteLength / BYTES;
        } else if (TYPED_ARRAY in data) {
          return fromList(TypedArray, data);
        } else {
          return $from.call(TypedArray, data);
        }
        hide(that, '_d', {
          b: buffer,
          o: offset,
          l: byteLength,
          e: length,
          v: new $DataView(buffer)
        });
        while (index < length) addElement(that, index++);
      });
      TypedArrayPrototype = TypedArray[PROTOTYPE] = create($TypedArrayPrototype$);
      hide(TypedArrayPrototype, 'constructor', TypedArray);
    } else if (!fails(function () {
      TypedArray(1);
    }) || !fails(function () {
      new TypedArray(-1); // eslint-disable-line no-new
    }) || !$iterDetect(function (iter) {
      new TypedArray(); // eslint-disable-line no-new
      new TypedArray(null); // eslint-disable-line no-new
      new TypedArray(1.5); // eslint-disable-line no-new
      new TypedArray(iter); // eslint-disable-line no-new
    }, true)) {
      TypedArray = wrapper(function (that, data, $offset, $length) {
        anInstance(that, TypedArray, NAME);
        var klass;
        // `ws` module bug, temporarily remove validation length for Uint8Array
        // https://github.com/websockets/ws/pull/645
        if (!isObject(data)) return new Base(toIndex(data));
        if (data instanceof $ArrayBuffer || (klass = classof(data)) == ARRAY_BUFFER || klass == SHARED_BUFFER) {
          return $length !== undefined
            ? new Base(data, toOffset($offset, BYTES), $length)
            : $offset !== undefined
              ? new Base(data, toOffset($offset, BYTES))
              : new Base(data);
        }
        if (TYPED_ARRAY in data) return fromList(TypedArray, data);
        return $from.call(TypedArray, data);
      });
      arrayForEach(TAC !== Function.prototype ? gOPN(Base).concat(gOPN(TAC)) : gOPN(Base), function (key) {
        if (!(key in TypedArray)) hide(TypedArray, key, Base[key]);
      });
      TypedArray[PROTOTYPE] = TypedArrayPrototype;
      if (!LIBRARY) TypedArrayPrototype.constructor = TypedArray;
    }
    var $nativeIterator = TypedArrayPrototype[ITERATOR];
    var CORRECT_ITER_NAME = !!$nativeIterator
      && ($nativeIterator.name == 'values' || $nativeIterator.name == undefined);
    var $iterator = $iterators.values;
    hide(TypedArray, TYPED_CONSTRUCTOR, true);
    hide(TypedArrayPrototype, TYPED_ARRAY, NAME);
    hide(TypedArrayPrototype, VIEW, true);
    hide(TypedArrayPrototype, DEF_CONSTRUCTOR, TypedArray);
 
    if (CLAMPED ? new TypedArray(1)[TAG] != NAME : !(TAG in TypedArrayPrototype)) {
      dP(TypedArrayPrototype, TAG, {
        get: function () { return NAME; }
      });
    }
 
    O[NAME] = TypedArray;
 
    $export($export.G + $export.W + $export.F * (TypedArray != Base), O);
 
    $export($export.S, NAME, {
      BYTES_PER_ELEMENT: BYTES
    });
 
    $export($export.S + $export.F * fails(function () { Base.of.call(TypedArray, 1); }), NAME, {
      from: $from,
      of: $of
    });
 
    if (!(BYTES_PER_ELEMENT in TypedArrayPrototype)) hide(TypedArrayPrototype, BYTES_PER_ELEMENT, BYTES);
 
    $export($export.P, NAME, proto);
 
    setSpecies(NAME);
 
    $export($export.P + $export.F * FORCED_SET, NAME, { set: $set });
 
    $export($export.P + $export.F * !CORRECT_ITER_NAME, NAME, $iterators);
 
    if (!LIBRARY && TypedArrayPrototype.toString != arrayToString) TypedArrayPrototype.toString = arrayToString;
 
    $export($export.P + $export.F * fails(function () {
      new TypedArray(1).slice();
    }), NAME, { slice: $slice });
 
    $export($export.P + $export.F * (fails(function () {
      return [1, 2].toLocaleString() != new TypedArray([1, 2]).toLocaleString();
    }) || !fails(function () {
      TypedArrayPrototype.toLocaleString.call([1, 2]);
    })), NAME, { toLocaleString: $toLocaleString });
 
    Iterators[NAME] = CORRECT_ITER_NAME ? $nativeIterator : $iterator;
    if (!LIBRARY && !CORRECT_ITER_NAME) hide(TypedArrayPrototype, ITERATOR, $iterator);
  };
} else module.exports = function () { /* empty */ };
 
 
/***/ }),
/* 41 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__geometry__ = __webpack_require__(45);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Geometry", function() { return __WEBPACK_IMPORTED_MODULE_0__geometry__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__cone_geometry__ = __webpack_require__(251);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "ConeGeometry", function() { return __WEBPACK_IMPORTED_MODULE_1__cone_geometry__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__cube_geometry__ = __webpack_require__(252);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "CubeGeometry", function() { return __WEBPACK_IMPORTED_MODULE_2__cube_geometry__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__cylinder_geometry__ = __webpack_require__(253);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "CylinderGeometry", function() { return __WEBPACK_IMPORTED_MODULE_3__cylinder_geometry__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__ico_sphere_geometry__ = __webpack_require__(254);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "IcoSphereGeometry", function() { return __WEBPACK_IMPORTED_MODULE_4__ico_sphere_geometry__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__plane_geometry__ = __webpack_require__(255);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "PlaneGeometry", function() { return __WEBPACK_IMPORTED_MODULE_5__plane_geometry__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__sphere_geometry__ = __webpack_require__(256);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "SphereGeometry", function() { return __WEBPACK_IMPORTED_MODULE_6__sphere_geometry__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__truncated_cone_geometry__ = __webpack_require__(105);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "TruncatedConeGeometry", function() { return __WEBPACK_IMPORTED_MODULE_7__truncated_cone_geometry__["a"]; });
 
 
 
 
 
 
 
 
 
//# sourceMappingURL=index.js.map
 
/***/ }),
/* 42 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
 
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
 
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); // Copyright (c) 2015 - 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
 
var _log = __webpack_require__(17);
 
var _log2 = _interopRequireDefault(_log);
 
var _mathUtils = __webpack_require__(127);
 
var _math = __webpack_require__(16);
 
var _scale = __webpack_require__(77);
 
var _scale2 = _interopRequireDefault(_scale);
 
var _translate = __webpack_require__(78);
 
var _translate2 = _interopRequireDefault(_translate);
 
var _multiply = __webpack_require__(75);
 
var _multiply2 = _interopRequireDefault(_multiply);
 
var _invert = __webpack_require__(156);
 
var _invert2 = _interopRequireDefault(_invert);
 
var _perspective = __webpack_require__(76);
 
var _perspective2 = _interopRequireDefault(_perspective);
 
var _viewportMercatorProject = __webpack_require__(79);
 
var _assert = __webpack_require__(1);
 
var _assert2 = _interopRequireDefault(_assert);
 
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
 
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
 
var ZERO_VECTOR = [0, 0, 0];
 
var IDENTITY = (0, _mathUtils.createMat4)();
 
var DEFAULT_DISTANCE_SCALES = {
  pixelsPerMeter: [1, 1, 1],
  metersPerPixel: [1, 1, 1],
  pixelsPerDegree: [1, 1, 1],
  degreesPerPixel: [1, 1, 1]
};
 
var DEFAULT_ZOOM = 0;
 
var ERR_ARGUMENT = 'Illegal argument to Viewport';
 
var Viewport = function () {
  /**
   * @classdesc
   * Manages coordinate system transformations for deck.gl.
   *
   * Note: The Viewport is immutable in the sense that it only has accessors.
   * A new viewport instance should be created if any parameters have changed.
   */
  /* eslint-disable complexity, max-statements */
  function Viewport() {
    var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
 
    _classCallCheck(this, Viewport);
 
    var _opts$id = opts.id,
        id = _opts$id === undefined ? null : _opts$id,
        _opts$x = opts.x,
        x = _opts$x === undefined ? 0 : _opts$x,
        _opts$y = opts.y,
        y = _opts$y === undefined ? 0 : _opts$y,
        _opts$width = opts.width,
        width = _opts$width === undefined ? 1 : _opts$width,
        _opts$height = opts.height,
        height = _opts$height === undefined ? 1 : _opts$height,
        _opts$viewMatrix = opts.viewMatrix,
        viewMatrix = _opts$viewMatrix === undefined ? IDENTITY : _opts$viewMatrix,
        _opts$projectionMatri = opts.projectionMatrix,
        projectionMatrix = _opts$projectionMatri === undefined ? null : _opts$projectionMatri,
        _opts$fovy = opts.fovy,
        fovy = _opts$fovy === undefined ? 75 : _opts$fovy,
        _opts$near = opts.near,
        near = _opts$near === undefined ? 0.1 : _opts$near,
        _opts$far = opts.far,
        far = _opts$far === undefined ? 1000 : _opts$far,
        _opts$longitude = opts.longitude,
        longitude = _opts$longitude === undefined ? null : _opts$longitude,
        _opts$latitude = opts.latitude,
        latitude = _opts$latitude === undefined ? null : _opts$latitude,
        _opts$zoom = opts.zoom,
        zoom = _opts$zoom === undefined ? null : _opts$zoom,
        _opts$position = opts.position,
        position = _opts$position === undefined ? null : _opts$position,
        _opts$modelMatrix = opts.modelMatrix,
        modelMatrix = _opts$modelMatrix === undefined ? null : _opts$modelMatrix,
        _opts$distanceScales = opts.distanceScales,
        distanceScales = _opts$distanceScales === undefined ? null : _opts$distanceScales;
//iclient
this.isGeographicCoordinateSystem=opts.isGeographicCoordinateSystem;
    this.id = id || this.constructor.displayName || 'viewport';
 
    // Check if we have a geospatial anchor
    this.isGeospatial = Number.isFinite(latitude) && Number.isFinite(longitude);
 
    // Silently allow apps to send in w,h = 0,0
    this.x = x;
    this.y = y;
    this.width = width || 1;
    this.height = height || 1;
 
    this.zoom = zoom;
    if (!Number.isFinite(this.zoom)) {
      this.zoom = this.isGeospatial ? (0, _viewportMercatorProject.getMeterZoom)({ latitude: latitude }) : DEFAULT_ZOOM;
    }
    this.scale = Math.pow(2, this.zoom);
 
    // Calculate distance scales if lng/lat/zoom are provided
    this.distanceScales = this.isGeospatial ? (0, _viewportMercatorProject.getDistanceScales)({ latitude: latitude, longitude: longitude, scale: this.scale,isGeographicCoordinateSystem:this.isGeographicCoordinateSystem }) : distanceScales || DEFAULT_DISTANCE_SCALES;
 
    this.focalDistance = opts.focalDistance || 1;
 
    this.distanceScales.metersPerPixel = new _math.Vector3(this.distanceScales.metersPerPixel);
    this.distanceScales.pixelsPerMeter = new _math.Vector3(this.distanceScales.pixelsPerMeter);
 
    this.position = ZERO_VECTOR;
    this.meterOffset = ZERO_VECTOR;
    if (position) {
      // Apply model matrix if supplied
      this.position = position;
      this.modelMatrix = modelMatrix;
      this.meterOffset = modelMatrix ? modelMatrix.transformVector(position) : position;
    }
 
    this.viewMatrixUncentered = viewMatrix;
 
    if (this.isGeospatial) {
      // Determine camera center
      this.center = (0, _viewportMercatorProject.getWorldPosition)({
        longitude: longitude,
        latitude: latitude,
        scale: this.scale,
        distanceScales: this.distanceScales,
        meterOffset: this.meterOffset
      });
 
      // Make a centered version of the matrix for projection modes without an offset
      this.viewMatrix = new _math.Matrix4()
      // Apply the uncentered view matrix
      .multiplyRight(this.viewMatrixUncentered)
      // The Mercator world coordinate system is upper left,
      // but GL expects lower left, so we flip it around the center after all transforms are done
      .scale([1, -1, 1])
      // And center it
      .translate(new _math.Vector3(this.center || ZERO_VECTOR).negate());
    } else {
      this.center = position;
      this.viewMatrix = viewMatrix;
    }
 
    // Create a projection matrix if not supplied
    if (projectionMatrix) {
      this.projectionMatrix = projectionMatrix;
    } else {
      (0, _assert2.default)(Number.isFinite(fovy));
      var DEGREES_TO_RADIANS = Math.PI / 180;
      var fovyRadians = fovy * DEGREES_TO_RADIANS;
      var aspect = this.width / this.height;
      this.projectionMatrix = (0, _perspective2.default)([], fovyRadians, aspect, near, far);
    }
 
    // Init pixel matrices
    this._initMatrices();
 
    // Bind methods for easy access
    this.equals = this.equals.bind(this);
    this.project = this.project.bind(this);
    this.unproject = this.unproject.bind(this);
    this.projectFlat = this.projectFlat.bind(this);
    this.unprojectFlat = this.unprojectFlat.bind(this);
    this.getMatrices = this.getMatrices.bind(this);
  }
  /* eslint-enable complexity, max-statements */
 
  // Two viewports are equal if width and height are identical, and if
  // their view and projection matrices are (approximately) equal.
 
 
  _createClass(Viewport, [{
    key: 'equals',
    value: function equals(viewport) {
      if (!(viewport instanceof Viewport)) {
        return false;
      }
 
      return viewport.width === this.width && viewport.height === this.height && (0, _math.equals)(viewport.projectionMatrix, this.projectionMatrix) && (0, _math.equals)(viewport.viewMatrix, this.viewMatrix);
      // TODO - check distance scales?
    }
 
    /**
     * Projects xyz (possibly latitude and longitude) to pixel coordinates in window
     * using viewport projection parameters
     * - [longitude, latitude] to [x, y]
     * - [longitude, latitude, Z] => [x, y, z]
     * Note: By default, returns top-left coordinates for canvas/SVG type render
     *
     * @param {Array} lngLatZ - [lng, lat] or [lng, lat, Z]
     * @param {Object} opts - options
     * @param {Object} opts.topLeft=true - Whether projected coords are top left
     * @return {Array} - [x, y] or [x, y, z] in top left coords
     */
 
  }, {
    key: 'project',
    value: function project(xyz) {
      var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
          _ref$topLeft = _ref.topLeft,
          topLeft = _ref$topLeft === undefined ? true : _ref$topLeft;
 
      var _xyz = _slicedToArray(xyz, 3),
          x0 = _xyz[0],
          y0 = _xyz[1],
          _xyz$ = _xyz[2],
          z0 = _xyz$ === undefined ? 0 : _xyz$;
 
      var _projectFlat2 = this.projectFlat([x0, y0]),
          _projectFlat3 = _slicedToArray(_projectFlat2, 2),
          X = _projectFlat3[0],
          Y = _projectFlat3[1];
 
      var coord = (0, _viewportMercatorProject.worldToPixels)([X, Y, z0], this.pixelProjectionMatrix);
 
      var _coord = _slicedToArray(coord, 2),
          x = _coord[0],
          y = _coord[1];
 
      var y2 = topLeft ? y : this.height - y;
      return xyz.length === 2 ? [x, y2] : [x, y2, coord[2]];
    }
 
    /**
     * Unproject pixel coordinates on screen onto world coordinates,
     * (possibly [lon, lat]) on map.
     * - [x, y] => [lng, lat]
     * - [x, y, z] => [lng, lat, Z]
     * @param {Array} xyz -
     * @param {Object} opts - options
     * @param {Object} opts.topLeft=true - Whether origin is top left
     * @return {Array|null} - [lng, lat, Z] or [X, Y, Z]
     */
 
  }, {
    key: 'unproject',
    value: function unproject(xyz) {
      var _ref2 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
          _ref2$topLeft = _ref2.topLeft,
          topLeft = _ref2$topLeft === undefined ? true : _ref2$topLeft,
          targetZ = _ref2.targetZ;
 
      var _xyz2 = _slicedToArray(xyz, 3),
          x = _xyz2[0],
          y = _xyz2[1],
          z = _xyz2[2];
 
      var y2 = topLeft ? y : this.height - y;
      var coord = (0, _viewportMercatorProject.pixelsToWorld)([x, y2, z], this.pixelUnprojectionMatrix, targetZ);
 
      var _unprojectFlat2 = this.unprojectFlat(coord),
          _unprojectFlat3 = _slicedToArray(_unprojectFlat2, 2),
          X = _unprojectFlat3[0],
          Y = _unprojectFlat3[1];
 
      if (Number.isFinite(z)) {
        // Has depth component
        return [X, Y, coord[2]];
      }
 
      return Number.isFinite(targetZ) ? [X, Y, targetZ] : [X, Y];
    }
 
    // NON_LINEAR PROJECTION HOOKS
    // Used for web meractor projection
 
    /**
     * Project [lng,lat] on sphere onto [x,y] on 512*512 Mercator Zoom 0 tile.
     * Performs the nonlinear part of the web mercator projection.
     * Remaining projection is done with 4x4 matrices which also handles
     * perspective.
     * @param {Array} lngLat - [lng, lat] coordinates
     *   Specifies a point on the sphere to project onto the map.
     * @return {Array} [x,y] coordinates.
     */
 
  }, {
    key: 'projectFlat',
    value: function projectFlat(_ref3) {
      var _ref4 = _slicedToArray(_ref3, 2),
          x = _ref4[0],
          y = _ref4[1];
 
      var scale = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.scale;
 
      return this._projectFlat.apply(this, arguments);
    }
 
    /**
     * Unproject world point [x,y] on map onto {lat, lon} on sphere
     * @param {object|Vector} xy - object with {x,y} members
     *  representing point on projected map plane
     * @return {GeoCoordinates} - object with {lat,lon} of point on sphere.
     *   Has toArray method if you need a GeoJSON Array.
     *   Per cartographic tradition, lat and lon are specified as degrees.
     */
 
  }, {
    key: 'unprojectFlat',
    value: function unprojectFlat(xyz) {
      var scale = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.scale;
 
      return this._unprojectFlat.apply(this, arguments);
    }
 
    // TODO - why do we need these?
 
  }, {
    key: '_projectFlat',
    value: function _projectFlat(xyz) {
      var scale = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.scale;
 
      return xyz;
    }
  }, {
    key: '_unprojectFlat',
    value: function _unprojectFlat(xyz) {
      var scale = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.scale;
 
      return xyz;
    }
  }, {
    key: 'getMercatorParams',
    value: function getMercatorParams() {
      var lngLat = this._addMetersToLngLat([this.longitude || 0, this.latitude || 0], this.meterOffset);
      return {
        longitude: lngLat[0],
        latitude: lngLat[1]
      };
    }
  }, {
    key: 'isMapSynched',
    value: function isMapSynched() {
      return false;
    }
  }, {
    key: 'getDistanceScales',
    value: function getDistanceScales() {
      var coordinateOrigin = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
 
      if (coordinateOrigin) {
        return (0, _viewportMercatorProject.getDistanceScales)({
          longitude: coordinateOrigin[0],
          latitude: coordinateOrigin[1],
          scale: this.scale,
          highPrecision: true
        });
      }
      return this.distanceScales;
    }
  }, {
    key: 'getMatrices',
    value: function getMatrices() {
      var _ref5 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
          _ref5$modelMatrix = _ref5.modelMatrix,
          modelMatrix = _ref5$modelMatrix === undefined ? null : _ref5$modelMatrix;
 
      var modelViewProjectionMatrix = this.viewProjectionMatrix;
      var pixelProjectionMatrix = this.pixelProjectionMatrix;
      var pixelUnprojectionMatrix = this.pixelUnprojectionMatrix;
 
      if (modelMatrix) {
        modelViewProjectionMatrix = (0, _multiply2.default)([], this.viewProjectionMatrix, modelMatrix);
        pixelProjectionMatrix = (0, _multiply2.default)([], this.pixelProjectionMatrix, modelMatrix);
        pixelUnprojectionMatrix = (0, _invert2.default)([], pixelProjectionMatrix);
      }
 
      var matrices = Object.assign({
        modelViewProjectionMatrix: modelViewProjectionMatrix,
        viewProjectionMatrix: this.viewProjectionMatrix,
        viewMatrix: this.viewMatrix,
        projectionMatrix: this.projectionMatrix,
 
        // project/unproject between pixels and world
        pixelProjectionMatrix: pixelProjectionMatrix,
        pixelUnprojectionMatrix: pixelUnprojectionMatrix,
 
        width: this.width,
        height: this.height,
        scale: this.scale
      });
 
      return matrices;
    }
 
    // EXPERIMENTAL METHODS
 
  }, {
    key: 'getCameraPosition',
    value: function getCameraPosition() {
      return this.cameraPosition;
    }
  }, {
    key: 'getCameraDirection',
    value: function getCameraDirection() {
      return this.cameraDirection;
    }
  }, {
    key: 'getCameraUp',
    value: function getCameraUp() {
      return this.cameraUp;
    }
 
    // TODO - these are duplicating WebMercator methods
 
  }, {
    key: '_addMetersToLngLat',
    value: function _addMetersToLngLat(lngLatZ, xyz) {
      var _lngLatZ = _slicedToArray(lngLatZ, 3),
          lng = _lngLatZ[0],
          lat = _lngLatZ[1],
          _lngLatZ$ = _lngLatZ[2],
          Z = _lngLatZ$ === undefined ? 0 : _lngLatZ$;
 
      var _metersToLngLatDelta2 = this._metersToLngLatDelta(xyz),
          _metersToLngLatDelta3 = _slicedToArray(_metersToLngLatDelta2, 3),
          deltaLng = _metersToLngLatDelta3[0],
          deltaLat = _metersToLngLatDelta3[1],
          _metersToLngLatDelta4 = _metersToLngLatDelta3[2],
          deltaZ = _metersToLngLatDelta4 === undefined ? 0 : _metersToLngLatDelta4;
 
      return lngLatZ.length === 2 ? [lng + deltaLng, lat + deltaLat] : [lng + deltaLng, lat + deltaLat, Z + deltaZ];
    }
  }, {
    key: '_metersToLngLatDelta',
    value: function _metersToLngLatDelta(xyz) {
      var _xyz3 = _slicedToArray(xyz, 3),
          x = _xyz3[0],
          y = _xyz3[1],
          _xyz3$ = _xyz3[2],
          z = _xyz3$ === undefined ? 0 : _xyz3$;
 
      (0, _assert2.default)(Number.isFinite(x) && Number.isFinite(y) && Number.isFinite(z), ERR_ARGUMENT);
      var _distanceScales = this.distanceScales,
          pixelsPerMeter = _distanceScales.pixelsPerMeter,
          degreesPerPixel = _distanceScales.degreesPerPixel;
 
      var deltaLng = x * pixelsPerMeter[0] * degreesPerPixel[0];
      var deltaLat = y * pixelsPerMeter[1] * degreesPerPixel[1];
      return xyz.length === 2 ? [deltaLng, deltaLat] : [deltaLng, deltaLat, z];
    }
 
    // INTERNAL METHODS
 
  }, {
    key: '_initMatrices',
    value: function _initMatrices() {
      // Note: As usual, matrix operations should be applied in "reverse" order
      // since vectors will be multiplied in from the right during transformation
      var vpm = (0, _mathUtils.createMat4)();
      (0, _multiply2.default)(vpm, vpm, this.projectionMatrix);
      (0, _multiply2.default)(vpm, vpm, this.viewMatrix);
      this.viewProjectionMatrix = vpm;
 
      // console.log('VPM', this.viewMatrix, this.projectionMatrix, this.viewProjectionMatrix);
 
      // Calculate inverse view matrix
      this.viewMatrixInverse = (0, _invert2.default)([], this.viewMatrix) || this.viewMatrix;
 
      // Decompose camera directions
 
      var _extractCameraVectors = (0, _mathUtils.extractCameraVectors)({
        viewMatrix: this.viewMatrix,
        viewMatrixInverse: this.viewMatrixInverse
      }),
          eye = _extractCameraVectors.eye,
          direction = _extractCameraVectors.direction,
          up = _extractCameraVectors.up;
 
      this.cameraPosition = eye;
      this.cameraDirection = direction;
      this.cameraUp = up;
 
      // console.log(this.cameraPosition, this.cameraDirection, this.cameraUp);
 
      /*
       * Builds matrices that converts preprojected lngLats to screen pixels
       * and vice versa.
       * Note: Currently returns bottom-left coordinates!
       * Note: Starts with the GL projection matrix and adds steps to the
       *       scale and translate that matrix onto the window.
       * Note: WebGL controls clip space to screen projection with gl.viewport
       *       and does not need this step.
       */
 
      // matrix for conversion from world location to screen (pixel) coordinates
      var m = (0, _mathUtils.createMat4)();
      (0, _scale2.default)(m, m, [this.width / 2, -this.height / 2, 1]);
      (0, _translate2.default)(m, m, [1, -1, 0]);
      (0, _multiply2.default)(m, m, this.viewProjectionMatrix);
      this.pixelProjectionMatrix = m;
 
      this.pixelUnprojectionMatrix = (0, _invert2.default)((0, _mathUtils.createMat4)(), this.pixelProjectionMatrix);
      if (!this.pixelUnprojectionMatrix) {
        _log2.default.warn('Pixel project matrix not invertible');
        // throw new Error('Pixel project matrix not invertible');
      }
    }
  }]);
 
  return Viewport;
}();
 
exports.default = Viewport;
 
 
Viewport.displayName = 'Viewport';
 
/***/ }),
/* 43 */
/***/ (function(module, exports, __webpack_require__) {
 
// 22.1.3.31 Array.prototype[@@unscopables]
var UNSCOPABLES = __webpack_require__(6)('unscopables');
var ArrayProto = Array.prototype;
if (ArrayProto[UNSCOPABLES] == undefined) __webpack_require__(19)(ArrayProto, UNSCOPABLES, {});
module.exports = function (key) {
  ArrayProto[UNSCOPABLES][key] = true;
};
 
 
/***/ }),
/* 44 */
/***/ (function(module, exports, __webpack_require__) {
 
var META = __webpack_require__(58)('meta');
var isObject = __webpack_require__(5);
var has = __webpack_require__(18);
var setDesc = __webpack_require__(10).f;
var id = 0;
var isExtensible = Object.isExtensible || function () {
  return true;
};
var FREEZE = !__webpack_require__(4)(function () {
  return isExtensible(Object.preventExtensions({}));
});
var setMeta = function (it) {
  setDesc(it, META, { value: {
    i: 'O' + ++id, // object ID
    w: {}          // weak collections IDs
  } });
};
var fastKey = function (it, create) {
  // return primitive with prefix
  if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;
  if (!has(it, META)) {
    // can't set metadata to uncaught frozen object
    if (!isExtensible(it)) return 'F';
    // not necessary to add metadata
    if (!create) return 'E';
    // add missing metadata
    setMeta(it);
  // return object ID
  } return it[META].i;
};
var getWeak = function (it, create) {
  if (!has(it, META)) {
    // can't set metadata to uncaught frozen object
    if (!isExtensible(it)) return true;
    // not necessary to add metadata
    if (!create) return false;
    // add missing metadata
    setMeta(it);
  // return hash weak collections IDs
  } return it[META].w;
};
// add metadata on freeze-family methods calling
var onFreeze = function (it) {
  if (FREEZE && meta.NEED && isExtensible(it) && !has(it, META)) setMeta(it);
  return it;
};
var meta = module.exports = {
  KEY: META,
  NEED: false,
  fastKey: fastKey,
  getWeak: getWeak,
  onFreeze: onFreeze
};
 
 
/***/ }),
/* 45 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* unused harmony export DRAW_MODE */
/* harmony export (immutable) */ __webpack_exports__["b"] = getDrawMode;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils__ = __webpack_require__(8);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_assert__ = __webpack_require__(1);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_assert___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_assert__);
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
 
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
 
 
 
 
// Rendering primitives - specify how to extract primitives from vertices.
// NOTE: These are numerically identical to the corresponding WebGL/OpenGL constants
var DRAW_MODE = {
  POINTS: 0x0000, // draw single points.
  LINES: 0x0001, // draw lines. Each vertex connects to the one after it.
  LINE_LOOP: 0x0002, // draw lines. Each set of two vertices is treated as a separate line segment.
  LINE_STRIP: 0x0003, // draw a connected group of line segments from the first vertex to the last
  TRIANGLES: 0x0004, // draw triangles. Each set of three vertices creates a separate triangle.
  TRIANGLE_STRIP: 0x0005, // draw a connected group of triangles.
  TRIANGLE_FAN: 0x0006 // draw a connected group of triangles.
  // Each vertex connects to the previous and the first vertex in the fan.
};
 
// Helper function to handle string draw modes - when using this library without WebGL constants
function getDrawMode(drawMode) {
  var mode = typeof drawMode === 'string' ? DRAW_MODE[drawMode] || DRAW_MODE.TRIANGLES : drawMode;
  __WEBPACK_IMPORTED_MODULE_1_assert___default()(mode >= 0 && mode <= DRAW_MODE.TRIANGLE_FAN, 'Illegal drawMode');
  return mode;
}
 
var Geometry = /*#__PURE__*/function () {
  function Geometry() {
    var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
 
    _classCallCheck(this, Geometry);
 
    var id = opts.id,
        _opts$drawMode = opts.drawMode,
        drawMode = _opts$drawMode === undefined ? DRAW_MODE.TRIANGLES : _opts$drawMode,
        _opts$vertexCount = opts.vertexCount,
        vertexCount = _opts$vertexCount === undefined ? undefined : _opts$vertexCount,
        attributes = opts.attributes;
 
 
    this.id = id || __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__utils__["d" /* uid */])(this.constructor.name);
    this.drawMode = getDrawMode(drawMode);
    this.vertexCount = vertexCount;
    this.attributes = {};
    this.needsRedraw = true;
    this.userData = {};
    Object.seal(this);
 
    if (attributes) {
      this.setAttributes(attributes);
    }
  }
 
  _createClass(Geometry, [{
    key: 'setNeedsRedraw',
    value: function setNeedsRedraw() {
      var redraw = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
 
      this.needsRedraw = redraw;
      return this;
    }
  }, {
    key: 'getNeedsRedraw',
    value: function getNeedsRedraw() {
      var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
          _ref$clearRedrawFlags = _ref.clearRedrawFlags,
          clearRedrawFlags = _ref$clearRedrawFlags === undefined ? false : _ref$clearRedrawFlags;
 
      var redraw = false;
      redraw = redraw || this.needsRedraw;
      this.needsRedraw = this.needsRedraw && !clearRedrawFlags;
      return redraw;
    }
  }, {
    key: 'setVertexCount',
    value: function setVertexCount(vertexCount) {
      this.vertexCount = vertexCount;
    }
  }, {
    key: 'getVertexCount',
    value: function getVertexCount() {
      if (this.vertexCount !== undefined) {
        return this.vertexCount;
      } else if (this.attributes.indices) {
        return this.attributes.indices.value.length;
      } else if (this.attributes.vertices) {
        return this.attributes.vertices.value.length / 3;
      } else if (this.attributes.positions) {
        return this.attributes.positions.value.length / 3;
      }
      return false;
    }
  }, {
    key: 'hasAttribute',
    value: function hasAttribute(attributeName) {
      return Boolean(this.attributes[attributeName]);
    }
  }, {
    key: 'getAttribute',
    value: function getAttribute(attributeName) {
      var attribute = this.attributes[attributeName];
      __WEBPACK_IMPORTED_MODULE_1_assert___default()(attribute);
      return attribute.value;
    }
  }, {
    key: 'getArray',
    value: function getArray(attributeName) {
      var attribute = this.attributes[attributeName];
      __WEBPACK_IMPORTED_MODULE_1_assert___default()(attribute);
      return attribute.value;
    }
  }, {
    key: 'getAttributes',
    value: function getAttributes() {
      return this.attributes;
    }
 
    // Attribute
    // value: typed array
    // type: indices, vertices, uvs
    // size: elements per vertex
    // target: WebGL buffer type (string or constant)
 
  }, {
    key: 'setAttributes',
    value: function setAttributes(attributes) {
      for (var attributeName in attributes) {
        var attribute = attributes[attributeName];
 
        // Wrap "unwrapped" arrays and try to autodetect their type
        attribute = ArrayBuffer.isView(attribute) ? { value: attribute } : attribute;
 
        __WEBPACK_IMPORTED_MODULE_1_assert___default()(ArrayBuffer.isView(attribute.value), this._print(attributeName) + ': must be typed array or object with value as typed array');
 
        this._autoDetectAttribute(attributeName, attribute);
 
        this.attributes[attributeName] = Object.assign({}, attribute, {
          instanced: attribute.instanced || 0
        });
      }
      this.setNeedsRedraw();
      return this;
    }
 
    // Check for well known attribute names
    /* eslint-disable default-case, complexity */
 
  }, {
    key: '_autoDetectAttribute',
    value: function _autoDetectAttribute(attributeName, attribute) {
      var category = void 0;
      switch (attributeName) {
        case 'indices':
          category = category || 'indices';
          break;
        case 'texCoords':
        case 'texCoord1':
        case 'texCoord2':
        case 'texCoord3':
          category = 'uvs';
          break;
        case 'vertices':
        case 'positions':
        case 'normals':
        case 'pickingColors':
          category = 'vectors';
          break;
      }
 
      // Check for categorys
      switch (category) {
        case 'vectors':
          attribute.size = attribute.size || 3;
          break;
        case 'uvs':
          attribute.size = attribute.size || 2;
          break;
        case 'indices':
          attribute.size = attribute.size || 1;
          attribute.isIndexed = attribute.isIndexed || true;
          __WEBPACK_IMPORTED_MODULE_1_assert___default()(attribute.value instanceof Uint16Array || attribute.value instanceof Uint32Array, 'attribute array for "indices" must be of integer type');
          break;
      }
 
      __WEBPACK_IMPORTED_MODULE_1_assert___default()(attribute.size, 'attribute ' + attributeName + ' needs size');
    }
    /* eslint-enable default-case, complexity */
 
  }, {
    key: '_print',
    value: function _print(attributeName) {
      return 'Geometry ' + this.id + ' attribute ' + attributeName;
    }
  }]);
 
  return Geometry;
}();
 
/* harmony default export */ __webpack_exports__["a"] = (Geometry);
//# sourceMappingURL=geometry.js.map
 
/***/ }),
/* 46 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
// GL constants, copied from Mozilla documentation
// https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API/Constants
 
// Standard WebGL 1 constants
// These constants are defined on the WebGLRenderingContext interface.
 
/* eslint-disable key-spacing, max-len, no-inline-comments, camelcase */
/* harmony default export */ __webpack_exports__["a"] = ({
  // Clearing buffers
  // Constants passed to clear() to clear buffer masks.
 
  DEPTH_BUFFER_BIT: 0x00000100,
  STENCIL_BUFFER_BIT: 0x00000400,
  COLOR_BUFFER_BIT: 0x00004000,
 
  // Rendering primitives
  // Constants passed to drawElements() or drawArrays() to specify what kind of primitive to render.
 
  POINTS: 0x0000,
  LINES: 0x0001,
  LINE_LOOP: 0x0002,
  LINE_STRIP: 0x0003,
  TRIANGLES: 0x0004,
  TRIANGLE_STRIP: 0x0005,
  TRIANGLE_FAN: 0x0006,
 
  // Blending modes
  // Constants passed to blendFunc() or blendFuncSeparate() to specify the blending mode (for both, RBG and alpha, or separately).
 
  ZERO: 0,
  ONE: 1,
  SRC_COLOR: 0x0300,
  ONE_MINUS_SRC_COLOR: 0x0301,
  SRC_ALPHA: 0x0302,
  ONE_MINUS_SRC_ALPHA: 0x0303,
  DST_ALPHA: 0x0304,
  ONE_MINUS_DST_ALPHA: 0x0305,
  DST_COLOR: 0x0306,
  ONE_MINUS_DST_COLOR: 0x0307,
  SRC_ALPHA_SATURATE: 0x0308,
  CONSTANT_COLOR: 0x8001,
  ONE_MINUS_CONSTANT_COLOR: 0x8002,
  CONSTANT_ALPHA: 0x8003,
  ONE_MINUS_CONSTANT_ALPHA: 0x8004,
 
  // Blending equations
  // Constants passed to blendEquation() or blendEquationSeparate() to control
  // how the blending is calculated (for both, RBG and alpha, or separately).
 
  FUNC_ADD: 0x8006,
  FUNC_SUBTRACT: 0x800A,
  FUNC_REVERSE_SUBTRACT: 0x800B,
 
  // Getting GL parameter information
  // Constants passed to getParameter() to specify what information to return.
 
  BLEND_EQUATION: 0x8009,
  BLEND_EQUATION_RGB: 0x8009,
  BLEND_EQUATION_ALPHA: 0x883D,
  BLEND_DST_RGB: 0x80C8,
  BLEND_SRC_RGB: 0x80C9,
  BLEND_DST_ALPHA: 0x80CA,
  BLEND_SRC_ALPHA: 0x80CB,
  BLEND_COLOR: 0x8005,
  ARRAY_BUFFER_BINDING: 0x8894,
  ELEMENT_ARRAY_BUFFER_BINDING: 0x8895,
  LINE_WIDTH: 0x0B21,
  ALIASED_POINT_SIZE_RANGE: 0x846D,
  ALIASED_LINE_WIDTH_RANGE: 0x846E,
  CULL_FACE_MODE: 0x0B45,
  FRONT_FACE: 0x0B46,
  DEPTH_RANGE: 0x0B70,
  DEPTH_WRITEMASK: 0x0B72,
  DEPTH_CLEAR_VALUE: 0x0B73,
  DEPTH_FUNC: 0x0B74,
  STENCIL_CLEAR_VALUE: 0x0B91,
  STENCIL_FUNC: 0x0B92,
  STENCIL_FAIL: 0x0B94,
  STENCIL_PASS_DEPTH_FAIL: 0x0B95,
  STENCIL_PASS_DEPTH_PASS: 0x0B96,
  STENCIL_REF: 0x0B97,
  STENCIL_VALUE_MASK: 0x0B93,
  STENCIL_WRITEMASK: 0x0B98,
  STENCIL_BACK_FUNC: 0x8800,
  STENCIL_BACK_FAIL: 0x8801,
  STENCIL_BACK_PASS_DEPTH_FAIL: 0x8802,
  STENCIL_BACK_PASS_DEPTH_PASS: 0x8803,
  STENCIL_BACK_REF: 0x8CA3,
  STENCIL_BACK_VALUE_MASK: 0x8CA4,
  STENCIL_BACK_WRITEMASK: 0x8CA5,
  VIEWPORT: 0x0BA2,
  SCISSOR_BOX: 0x0C10,
  COLOR_CLEAR_VALUE: 0x0C22,
  COLOR_WRITEMASK: 0x0C23,
  UNPACK_ALIGNMENT: 0x0CF5,
  PACK_ALIGNMENT: 0x0D05,
  MAX_TEXTURE_SIZE: 0x0D33,
  MAX_VIEWPORT_DIMS: 0x0D3A,
  SUBPIXEL_BITS: 0x0D50,
  RED_BITS: 0x0D52,
  GREEN_BITS: 0x0D53,
  BLUE_BITS: 0x0D54,
  ALPHA_BITS: 0x0D55,
  DEPTH_BITS: 0x0D56,
  STENCIL_BITS: 0x0D57,
  POLYGON_OFFSET_UNITS: 0x2A00,
  POLYGON_OFFSET_FACTOR: 0x8038,
  TEXTURE_BINDING_2D: 0x8069,
  SAMPLE_BUFFERS: 0x80A8,
  SAMPLES: 0x80A9,
  SAMPLE_COVERAGE_VALUE: 0x80AA,
  SAMPLE_COVERAGE_INVERT: 0x80AB,
  COMPRESSED_TEXTURE_FORMATS: 0x86A3,
  VENDOR: 0x1F00,
  RENDERER: 0x1F01,
  VERSION: 0x1F02,
  IMPLEMENTATION_COLOR_READ_TYPE: 0x8B9A,
  IMPLEMENTATION_COLOR_READ_FORMAT: 0x8B9B,
  BROWSER_DEFAULT_WEBGL: 0x9244,
 
  // Buffers
  // Constants passed to bufferData(), bufferSubData(), bindBuffer(), or
  // getBufferParameter().
 
  STATIC_DRAW: 0x88E4,
  STREAM_DRAW: 0x88E0,
  DYNAMIC_DRAW: 0x88E8,
  ARRAY_BUFFER: 0x8892,
  ELEMENT_ARRAY_BUFFER: 0x8893,
  BUFFER_SIZE: 0x8764,
  BUFFER_USAGE: 0x8765,
 
  // Vertex attributes
  // Constants passed to getVertexAttrib().
 
  CURRENT_VERTEX_ATTRIB: 0x8626,
  VERTEX_ATTRIB_ARRAY_ENABLED: 0x8622,
  VERTEX_ATTRIB_ARRAY_SIZE: 0x8623,
  VERTEX_ATTRIB_ARRAY_STRIDE: 0x8624,
  VERTEX_ATTRIB_ARRAY_TYPE: 0x8625,
  VERTEX_ATTRIB_ARRAY_NORMALIZED: 0x886A,
  VERTEX_ATTRIB_ARRAY_POINTER: 0x8645,
  VERTEX_ATTRIB_ARRAY_BUFFER_BINDING: 0x889F,
 
  // Culling
  // Constants passed to cullFace().
 
  CULL_FACE: 0x0B44,
  FRONT: 0x0404,
  BACK: 0x0405,
  FRONT_AND_BACK: 0x0408,
 
  // Enabling and disabling
  // Constants passed to enable() or disable().
 
  BLEND: 0x0BE2,
  DEPTH_TEST: 0x0B71,
  DITHER: 0x0BD0,
  POLYGON_OFFSET_FILL: 0x8037,
  SAMPLE_ALPHA_TO_COVERAGE: 0x809E,
  SAMPLE_COVERAGE: 0x80A0,
  SCISSOR_TEST: 0x0C11,
  STENCIL_TEST: 0x0B90,
 
  // Errors
  // Constants returned from getError().
 
  NO_ERROR: 0,
  INVALID_ENUM: 0x0500,
  INVALID_VALUE: 0x0501,
  INVALID_OPERATION: 0x0502,
  OUT_OF_MEMORY: 0x0505,
  CONTEXT_LOST_WEBGL: 0x9242,
 
  // Front face directions
  // Constants passed to frontFace().
 
  CW: 0x0900,
  CCW: 0x0901,
 
  // Hints
  // Constants passed to hint()
 
  DONT_CARE: 0x1100,
  FASTEST: 0x1101,
  NICEST: 0x1102,
  GENERATE_MIPMAP_HINT: 0x8192,
 
  // Data types
 
  BYTE: 0x1400,
  UNSIGNED_BYTE: 0x1401,
  SHORT: 0x1402,
  UNSIGNED_SHORT: 0x1403,
  INT: 0x1404,
  UNSIGNED_INT: 0x1405,
  FLOAT: 0x1406,
 
  // Pixel formats
 
  DEPTH_COMPONENT: 0x1902,
  ALPHA: 0x1906,
  RGB: 0x1907,
  RGBA: 0x1908,
  LUMINANCE: 0x1909,
  LUMINANCE_ALPHA: 0x190A,
 
  // Pixel types
 
  // UNSIGNED_BYTE: 0x1401,
  UNSIGNED_SHORT_4_4_4_4: 0x8033,
  UNSIGNED_SHORT_5_5_5_1: 0x8034,
  UNSIGNED_SHORT_5_6_5: 0x8363,
 
  // Shaders
  // Constants passed to createShader() or getShaderParameter()
 
  FRAGMENT_SHADER: 0x8B30,
  VERTEX_SHADER: 0x8B31,
  COMPILE_STATUS: 0x8B81,
  DELETE_STATUS: 0x8B80,
  LINK_STATUS: 0x8B82,
  VALIDATE_STATUS: 0x8B83,
  ATTACHED_SHADERS: 0x8B85,
  ACTIVE_ATTRIBUTES: 0x8B89,
  ACTIVE_UNIFORMS: 0x8B86,
  MAX_VERTEX_ATTRIBS: 0x8869,
  MAX_VERTEX_UNIFORM_VECTORS: 0x8DFB,
  MAX_VARYING_VECTORS: 0x8DFC,
  MAX_COMBINED_TEXTURE_IMAGE_UNITS: 0x8B4D,
  MAX_VERTEX_TEXTURE_IMAGE_UNITS: 0x8B4C,
  MAX_TEXTURE_IMAGE_UNITS: 0x8872,
  MAX_FRAGMENT_UNIFORM_VECTORS: 0x8DFD,
  SHADER_TYPE: 0x8B4F,
  SHADING_LANGUAGE_VERSION: 0x8B8C,
  CURRENT_PROGRAM: 0x8B8D,
 
  // Depth or stencil tests
  // Constants passed to depthFunc() or stencilFunc().
 
  NEVER: 0x0200,
  ALWAYS: 0x0207,
  LESS: 0x0201,
  EQUAL: 0x0202,
  LEQUAL: 0x0203,
  GREATER: 0x0204,
  GEQUAL: 0x0206,
  NOTEQUAL: 0x0205,
 
  // Stencil actions
  // Constants passed to stencilOp().
 
  KEEP: 0x1E00,
  REPLACE: 0x1E01,
  INCR: 0x1E02,
  DECR: 0x1E03,
  INVERT: 0x150A,
  INCR_WRAP: 0x8507,
  DECR_WRAP: 0x8508,
 
  // Textures
  // Constants passed to texParameteri(),
  // texParameterf(), bindTexture(), texImage2D(), and others.
 
  NEAREST: 0x2600,
  LINEAR: 0x2601,
  NEAREST_MIPMAP_NEAREST: 0x2700,
  LINEAR_MIPMAP_NEAREST: 0x2701,
  NEAREST_MIPMAP_LINEAR: 0x2702,
  LINEAR_MIPMAP_LINEAR: 0x2703,
  TEXTURE_MAG_FILTER: 0x2800,
  TEXTURE_MIN_FILTER: 0x2801,
  TEXTURE_WRAP_S: 0x2802,
  TEXTURE_WRAP_T: 0x2803,
  TEXTURE_2D: 0x0DE1,
  TEXTURE: 0x1702,
  TEXTURE_CUBE_MAP: 0x8513,
  TEXTURE_BINDING_CUBE_MAP: 0x8514,
  TEXTURE_CUBE_MAP_POSITIVE_X: 0x8515,
  TEXTURE_CUBE_MAP_NEGATIVE_X: 0x8516,
  TEXTURE_CUBE_MAP_POSITIVE_Y: 0x8517,
  TEXTURE_CUBE_MAP_NEGATIVE_Y: 0x8518,
  TEXTURE_CUBE_MAP_POSITIVE_Z: 0x8519,
  TEXTURE_CUBE_MAP_NEGATIVE_Z: 0x851A,
  MAX_CUBE_MAP_TEXTURE_SIZE: 0x851C,
  // TEXTURE0 - 31 0x84C0 - 0x84DF A texture unit.
  TEXTURE0: 0x84C0,
  ACTIVE_TEXTURE: 0x84E0,
  REPEAT: 0x2901,
  CLAMP_TO_EDGE: 0x812F,
  MIRRORED_REPEAT: 0x8370,
 
  // Emulation
  TEXTURE_WIDTH: 0x1000,
  TEXTURE_HEIGHT: 0x1001,
 
  // Uniform types
 
  FLOAT_VEC2: 0x8B50,
  FLOAT_VEC3: 0x8B51,
  FLOAT_VEC4: 0x8B52,
  INT_VEC2: 0x8B53,
  INT_VEC3: 0x8B54,
  INT_VEC4: 0x8B55,
  BOOL: 0x8B56,
  BOOL_VEC2: 0x8B57,
  BOOL_VEC3: 0x8B58,
  BOOL_VEC4: 0x8B59,
  FLOAT_MAT2: 0x8B5A,
  FLOAT_MAT3: 0x8B5B,
  FLOAT_MAT4: 0x8B5C,
  SAMPLER_2D: 0x8B5E,
  SAMPLER_CUBE: 0x8B60,
 
  // Shader precision-specified types
 
  LOW_FLOAT: 0x8DF0,
  MEDIUM_FLOAT: 0x8DF1,
  HIGH_FLOAT: 0x8DF2,
  LOW_INT: 0x8DF3,
  MEDIUM_INT: 0x8DF4,
  HIGH_INT: 0x8DF5,
 
  // Framebuffers and renderbuffers
 
  FRAMEBUFFER: 0x8D40,
  RENDERBUFFER: 0x8D41,
  RGBA4: 0x8056,
  RGB5_A1: 0x8057,
  RGB565: 0x8D62,
  DEPTH_COMPONENT16: 0x81A5,
  STENCIL_INDEX: 0x1901,
  STENCIL_INDEX8: 0x8D48,
  DEPTH_STENCIL: 0x84F9,
  RENDERBUFFER_WIDTH: 0x8D42,
  RENDERBUFFER_HEIGHT: 0x8D43,
  RENDERBUFFER_INTERNAL_FORMAT: 0x8D44,
  RENDERBUFFER_RED_SIZE: 0x8D50,
  RENDERBUFFER_GREEN_SIZE: 0x8D51,
  RENDERBUFFER_BLUE_SIZE: 0x8D52,
  RENDERBUFFER_ALPHA_SIZE: 0x8D53,
  RENDERBUFFER_DEPTH_SIZE: 0x8D54,
  RENDERBUFFER_STENCIL_SIZE: 0x8D55,
  FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE: 0x8CD0,
  FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: 0x8CD1,
  FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL: 0x8CD2,
  FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE: 0x8CD3,
  COLOR_ATTACHMENT0: 0x8CE0,
  DEPTH_ATTACHMENT: 0x8D00,
  STENCIL_ATTACHMENT: 0x8D20,
  DEPTH_STENCIL_ATTACHMENT: 0x821A,
  NONE: 0,
  FRAMEBUFFER_COMPLETE: 0x8CD5,
  FRAMEBUFFER_INCOMPLETE_ATTACHMENT: 0x8CD6,
  FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT: 0x8CD7,
  FRAMEBUFFER_INCOMPLETE_DIMENSIONS: 0x8CD9,
  FRAMEBUFFER_UNSUPPORTED: 0x8CDD,
  FRAMEBUFFER_BINDING: 0x8CA6,
  RENDERBUFFER_BINDING: 0x8CA7,
  READ_FRAMEBUFFER: 0x8CA8,
  DRAW_FRAMEBUFFER: 0x8CA9,
  MAX_RENDERBUFFER_SIZE: 0x84E8,
  INVALID_FRAMEBUFFER_OPERATION: 0x0506,
 
  // Pixel storage modes
  // Constants passed to pixelStorei().
 
  UNPACK_FLIP_Y_WEBGL: 0x9240,
  UNPACK_PREMULTIPLY_ALPHA_WEBGL: 0x9241,
  UNPACK_COLORSPACE_CONVERSION_WEBGL: 0x9243,
 
  // /////////////////////////////////////////////////////
  // Additional constants defined WebGL 2
  // These constants are defined on the WebGL2RenderingContext interface.
  // All WebGL 1 constants are also available in a WebGL 2 context.
  // /////////////////////////////////////////////////////
 
  // Getting GL parameter information
  // Constants passed to getParameter()
  // to specify what information to return.
 
  READ_BUFFER: 0x0C02,
  UNPACK_ROW_LENGTH: 0x0CF2,
  UNPACK_SKIP_ROWS: 0x0CF3,
  UNPACK_SKIP_PIXELS: 0x0CF4,
  PACK_ROW_LENGTH: 0x0D02,
  PACK_SKIP_ROWS: 0x0D03,
  PACK_SKIP_PIXELS: 0x0D04,
  TEXTURE_BINDING_3D: 0x806A,
  UNPACK_SKIP_IMAGES: 0x806D,
  UNPACK_IMAGE_HEIGHT: 0x806E,
  MAX_3D_TEXTURE_SIZE: 0x8073,
  MAX_ELEMENTS_VERTICES: 0x80E8,
  MAX_ELEMENTS_INDICES: 0x80E9,
  MAX_TEXTURE_LOD_BIAS: 0x84FD,
  MAX_FRAGMENT_UNIFORM_COMPONENTS: 0x8B49,
  MAX_VERTEX_UNIFORM_COMPONENTS: 0x8B4A,
  MAX_ARRAY_TEXTURE_LAYERS: 0x88FF,
  MIN_PROGRAM_TEXEL_OFFSET: 0x8904,
  MAX_PROGRAM_TEXEL_OFFSET: 0x8905,
  MAX_VARYING_COMPONENTS: 0x8B4B,
  FRAGMENT_SHADER_DERIVATIVE_HINT: 0x8B8B,
  RASTERIZER_DISCARD: 0x8C89,
  VERTEX_ARRAY_BINDING: 0x85B5,
  MAX_VERTEX_OUTPUT_COMPONENTS: 0x9122,
  MAX_FRAGMENT_INPUT_COMPONENTS: 0x9125,
  MAX_SERVER_WAIT_TIMEOUT: 0x9111,
  MAX_ELEMENT_INDEX: 0x8D6B,
 
  // Textures
  // Constants passed to texParameteri(),
  // texParameterf(), bindTexture(), texImage2D(), and others.
 
  RED: 0x1903,
  RGB8: 0x8051,
  RGBA8: 0x8058,
  RGB10_A2: 0x8059,
  TEXTURE_3D: 0x806F,
  TEXTURE_WRAP_R: 0x8072,
  TEXTURE_MIN_LOD: 0x813A,
  TEXTURE_MAX_LOD: 0x813B,
  TEXTURE_BASE_LEVEL: 0x813C,
  TEXTURE_MAX_LEVEL: 0x813D,
  TEXTURE_COMPARE_MODE: 0x884C,
  TEXTURE_COMPARE_FUNC: 0x884D,
  SRGB: 0x8C40,
  SRGB8: 0x8C41,
  SRGB8_ALPHA8: 0x8C43,
  COMPARE_REF_TO_TEXTURE: 0x884E,
  RGBA32F: 0x8814,
  RGB32F: 0x8815,
  RGBA16F: 0x881A,
  RGB16F: 0x881B,
  TEXTURE_2D_ARRAY: 0x8C1A,
  TEXTURE_BINDING_2D_ARRAY: 0x8C1D,
  R11F_G11F_B10F: 0x8C3A,
  RGB9_E5: 0x8C3D,
  RGBA32UI: 0x8D70,
  RGB32UI: 0x8D71,
  RGBA16UI: 0x8D76,
  RGB16UI: 0x8D77,
  RGBA8UI: 0x8D7C,
  RGB8UI: 0x8D7D,
  RGBA32I: 0x8D82,
  RGB32I: 0x8D83,
  RGBA16I: 0x8D88,
  RGB16I: 0x8D89,
  RGBA8I: 0x8D8E,
  RGB8I: 0x8D8F,
  RED_INTEGER: 0x8D94,
  RGB_INTEGER: 0x8D98,
  RGBA_INTEGER: 0x8D99,
  R8: 0x8229,
  RG8: 0x822B,
  R16F: 0x822D,
  R32F: 0x822E,
  RG16F: 0x822F,
  RG32F: 0x8230,
  R8I: 0x8231,
  R8UI: 0x8232,
  R16I: 0x8233,
  R16UI: 0x8234,
  R32I: 0x8235,
  R32UI: 0x8236,
  RG8I: 0x8237,
  RG8UI: 0x8238,
  RG16I: 0x8239,
  RG16UI: 0x823A,
  RG32I: 0x823B,
  RG32UI: 0x823C,
  R8_SNORM: 0x8F94,
  RG8_SNORM: 0x8F95,
  RGB8_SNORM: 0x8F96,
  RGBA8_SNORM: 0x8F97,
  RGB10_A2UI: 0x906F,
 
  /* covered by extension
  COMPRESSED_R11_EAC : 0x9270,
  COMPRESSED_SIGNED_R11_EAC: 0x9271,
  COMPRESSED_RG11_EAC: 0x9272,
  COMPRESSED_SIGNED_RG11_EAC : 0x9273,
  COMPRESSED_RGB8_ETC2 : 0x9274,
  COMPRESSED_SRGB8_ETC2: 0x9275,
  COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 : 0x9276,
  COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC : 0x9277,
  COMPRESSED_RGBA8_ETC2_EAC: 0x9278,
  COMPRESSED_SRGB8_ALPHA8_ETC2_EAC : 0x9279,
  */
  TEXTURE_IMMUTABLE_FORMAT: 0x912F,
  TEXTURE_IMMUTABLE_LEVELS: 0x82DF,
 
  // Pixel types
 
  UNSIGNED_INT_2_10_10_10_REV: 0x8368,
  UNSIGNED_INT_10F_11F_11F_REV: 0x8C3B,
  UNSIGNED_INT_5_9_9_9_REV: 0x8C3E,
  FLOAT_32_UNSIGNED_INT_24_8_REV: 0x8DAD,
  UNSIGNED_INT_24_8: 0x84FA,
  HALF_FLOAT: 0x140B,
  RG: 0x8227,
  RG_INTEGER: 0x8228,
  INT_2_10_10_10_REV: 0x8D9F,
 
  // Queries
 
  CURRENT_QUERY: 0x8865,
  QUERY_RESULT: 0x8866,
  QUERY_RESULT_AVAILABLE: 0x8867,
  ANY_SAMPLES_PASSED: 0x8C2F,
  ANY_SAMPLES_PASSED_CONSERVATIVE: 0x8D6A,
 
  // Draw buffers
 
  MAX_DRAW_BUFFERS: 0x8824,
  DRAW_BUFFER0: 0x8825,
  DRAW_BUFFER1: 0x8826,
  DRAW_BUFFER2: 0x8827,
  DRAW_BUFFER3: 0x8828,
  DRAW_BUFFER4: 0x8829,
  DRAW_BUFFER5: 0x882A,
  DRAW_BUFFER6: 0x882B,
  DRAW_BUFFER7: 0x882C,
  DRAW_BUFFER8: 0x882D,
  DRAW_BUFFER9: 0x882E,
  DRAW_BUFFER10: 0x882F,
  DRAW_BUFFER11: 0x8830,
  DRAW_BUFFER12: 0x8831,
  DRAW_BUFFER13: 0x8832,
  DRAW_BUFFER14: 0x8833,
  DRAW_BUFFER15: 0x8834,
  MAX_COLOR_ATTACHMENTS: 0x8CDF,
  COLOR_ATTACHMENT1: 0x8CE1,
  COLOR_ATTACHMENT2: 0x8CE2,
  COLOR_ATTACHMENT3: 0x8CE3,
  COLOR_ATTACHMENT4: 0x8CE4,
  COLOR_ATTACHMENT5: 0x8CE5,
  COLOR_ATTACHMENT6: 0x8CE6,
  COLOR_ATTACHMENT7: 0x8CE7,
  COLOR_ATTACHMENT8: 0x8CE8,
  COLOR_ATTACHMENT9: 0x8CE9,
  COLOR_ATTACHMENT10: 0x8CEA,
  COLOR_ATTACHMENT11: 0x8CEB,
  COLOR_ATTACHMENT12: 0x8CEC,
  COLOR_ATTACHMENT13: 0x8CED,
  COLOR_ATTACHMENT14: 0x8CEE,
  COLOR_ATTACHMENT15: 0x8CEF,
 
  // Samplers
 
  SAMPLER_3D: 0x8B5F,
  SAMPLER_2D_SHADOW: 0x8B62,
  SAMPLER_2D_ARRAY: 0x8DC1,
  SAMPLER_2D_ARRAY_SHADOW: 0x8DC4,
  SAMPLER_CUBE_SHADOW: 0x8DC5,
  INT_SAMPLER_2D: 0x8DCA,
  INT_SAMPLER_3D: 0x8DCB,
  INT_SAMPLER_CUBE: 0x8DCC,
  INT_SAMPLER_2D_ARRAY: 0x8DCF,
  UNSIGNED_INT_SAMPLER_2D: 0x8DD2,
  UNSIGNED_INT_SAMPLER_3D: 0x8DD3,
  UNSIGNED_INT_SAMPLER_CUBE: 0x8DD4,
  UNSIGNED_INT_SAMPLER_2D_ARRAY: 0x8DD7,
  MAX_SAMPLES: 0x8D57,
  SAMPLER_BINDING: 0x8919,
 
  // Buffers
 
  PIXEL_PACK_BUFFER: 0x88EB,
  PIXEL_UNPACK_BUFFER: 0x88EC,
  PIXEL_PACK_BUFFER_BINDING: 0x88ED,
  PIXEL_UNPACK_BUFFER_BINDING: 0x88EF,
  COPY_READ_BUFFER: 0x8F36,
  COPY_WRITE_BUFFER: 0x8F37,
  COPY_READ_BUFFER_BINDING: 0x8F36,
  COPY_WRITE_BUFFER_BINDING: 0x8F37,
 
  // Data types
 
  FLOAT_MAT2x3: 0x8B65,
  FLOAT_MAT2x4: 0x8B66,
  FLOAT_MAT3x2: 0x8B67,
  FLOAT_MAT3x4: 0x8B68,
  FLOAT_MAT4x2: 0x8B69,
  FLOAT_MAT4x3: 0x8B6A,
  UNSIGNED_INT_VEC2: 0x8DC6,
  UNSIGNED_INT_VEC3: 0x8DC7,
  UNSIGNED_INT_VEC4: 0x8DC8,
  UNSIGNED_NORMALIZED: 0x8C17,
  SIGNED_NORMALIZED: 0x8F9C,
 
  // Vertex attributes
 
  VERTEX_ATTRIB_ARRAY_INTEGER: 0x88FD,
  VERTEX_ATTRIB_ARRAY_DIVISOR: 0x88FE,
 
  // Transform feedback
 
  TRANSFORM_FEEDBACK_BUFFER_MODE: 0x8C7F,
  MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS: 0x8C80,
  TRANSFORM_FEEDBACK_VARYINGS: 0x8C83,
  TRANSFORM_FEEDBACK_BUFFER_START: 0x8C84,
  TRANSFORM_FEEDBACK_BUFFER_SIZE: 0x8C85,
  TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN: 0x8C88,
  MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS: 0x8C8A,
  MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS: 0x8C8B,
  INTERLEAVED_ATTRIBS: 0x8C8C,
  SEPARATE_ATTRIBS: 0x8C8D,
  TRANSFORM_FEEDBACK_BUFFER: 0x8C8E,
  TRANSFORM_FEEDBACK_BUFFER_BINDING: 0x8C8F,
  TRANSFORM_FEEDBACK: 0x8E22,
  TRANSFORM_FEEDBACK_PAUSED: 0x8E23,
  TRANSFORM_FEEDBACK_ACTIVE: 0x8E24,
  TRANSFORM_FEEDBACK_BINDING: 0x8E25,
 
  // Framebuffers and renderbuffers
 
  FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING: 0x8210,
  FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE: 0x8211,
  FRAMEBUFFER_ATTACHMENT_RED_SIZE: 0x8212,
  FRAMEBUFFER_ATTACHMENT_GREEN_SIZE: 0x8213,
  FRAMEBUFFER_ATTACHMENT_BLUE_SIZE: 0x8214,
  FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE: 0x8215,
  FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE: 0x8216,
  FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE: 0x8217,
  FRAMEBUFFER_DEFAULT: 0x8218,
  // DEPTH_STENCIL_ATTACHMENT : 0x821A,
  // DEPTH_STENCIL: 0x84F9,
  DEPTH24_STENCIL8: 0x88F0,
  DRAW_FRAMEBUFFER_BINDING: 0x8CA6,
  READ_FRAMEBUFFER_BINDING: 0x8CAA,
  RENDERBUFFER_SAMPLES: 0x8CAB,
  FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER: 0x8CD4,
  FRAMEBUFFER_INCOMPLETE_MULTISAMPLE: 0x8D56,
 
  // Uniforms
 
  UNIFORM_BUFFER: 0x8A11,
  UNIFORM_BUFFER_BINDING: 0x8A28,
  UNIFORM_BUFFER_START: 0x8A29,
  UNIFORM_BUFFER_SIZE: 0x8A2A,
  MAX_VERTEX_UNIFORM_BLOCKS: 0x8A2B,
  MAX_FRAGMENT_UNIFORM_BLOCKS: 0x8A2D,
  MAX_COMBINED_UNIFORM_BLOCKS: 0x8A2E,
  MAX_UNIFORM_BUFFER_BINDINGS: 0x8A2F,
  MAX_UNIFORM_BLOCK_SIZE: 0x8A30,
  MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS: 0x8A31,
  MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS: 0x8A33,
  UNIFORM_BUFFER_OFFSET_ALIGNMENT: 0x8A34,
  ACTIVE_UNIFORM_BLOCKS: 0x8A36,
  UNIFORM_TYPE: 0x8A37,
  UNIFORM_SIZE: 0x8A38,
  UNIFORM_BLOCK_INDEX: 0x8A3A,
  UNIFORM_OFFSET: 0x8A3B,
  UNIFORM_ARRAY_STRIDE: 0x8A3C,
  UNIFORM_MATRIX_STRIDE: 0x8A3D,
  UNIFORM_IS_ROW_MAJOR: 0x8A3E,
  UNIFORM_BLOCK_BINDING: 0x8A3F,
  UNIFORM_BLOCK_DATA_SIZE: 0x8A40,
  UNIFORM_BLOCK_ACTIVE_UNIFORMS: 0x8A42,
  UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES: 0x8A43,
  UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER: 0x8A44,
  UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER: 0x8A46,
 
  // Sync objects
 
  OBJECT_TYPE: 0x9112,
  SYNC_CONDITION: 0x9113,
  SYNC_STATUS: 0x9114,
  SYNC_FLAGS: 0x9115,
  SYNC_FENCE: 0x9116,
  SYNC_GPU_COMMANDS_COMPLETE: 0x9117,
  UNSIGNALED: 0x9118,
  SIGNALED: 0x9119,
  ALREADY_SIGNALED: 0x911A,
  TIMEOUT_EXPIRED: 0x911B,
  CONDITION_SATISFIED: 0x911C,
  WAIT_FAILED: 0x911D,
  SYNC_FLUSH_COMMANDS_BIT: 0x00000001,
 
  // Miscellaneous constants
 
  COLOR: 0x1800,
  DEPTH: 0x1801,
  STENCIL: 0x1802,
  MIN: 0x8007,
  MAX: 0x8008,
  DEPTH_COMPONENT24: 0x81A6,
  STREAM_READ: 0x88E1,
  STREAM_COPY: 0x88E2,
  STATIC_READ: 0x88E5,
  STATIC_COPY: 0x88E6,
  DYNAMIC_READ: 0x88E9,
  DYNAMIC_COPY: 0x88EA,
  DEPTH_COMPONENT32F: 0x8CAC,
  DEPTH32F_STENCIL8: 0x8CAD,
  INVALID_INDEX: 0xFFFFFFFF,
  TIMEOUT_IGNORED: -1,
  MAX_CLIENT_WAIT_TIMEOUT_WEBGL: 0x9247,
 
  // Constants defined in WebGL extensions
 
  // ANGLE_instanced_arrays
 
  VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE: 0x88FE,
 
  // WEBGL_debug_renderer_info
 
  UNMASKED_VENDOR_WEBGL: 0x9245,
  UNMASKED_RENDERER_WEBGL: 0x9246,
 
  // EXT_texture_filter_anisotropic
 
  MAX_TEXTURE_MAX_ANISOTROPY_EXT: 0x84FF,
  TEXTURE_MAX_ANISOTROPY_EXT: 0x84FE,
 
  // WEBGL_compressed_texture_s3tc
 
  COMPRESSED_RGB_S3TC_DXT1_EXT: 0x83F0,
  COMPRESSED_RGBA_S3TC_DXT1_EXT: 0x83F1,
  COMPRESSED_RGBA_S3TC_DXT3_EXT: 0x83F2,
  COMPRESSED_RGBA_S3TC_DXT5_EXT: 0x83F3,
 
  // WEBGL_compressed_texture_es3
 
  COMPRESSED_R11_EAC: 0x9270,
  COMPRESSED_SIGNED_R11_EAC: 0x9271,
  COMPRESSED_RG11_EAC: 0x9272,
  COMPRESSED_SIGNED_RG11_EAC: 0x9273,
  COMPRESSED_RGB8_ETC2: 0x9274,
  COMPRESSED_RGBA8_ETC2_EAC: 0x9275,
  COMPRESSED_SRGB8_ETC2: 0x9276,
  COMPRESSED_SRGB8_ALPHA8_ETC2_EAC: 0x9277,
  COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2: 0x9278,
  COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2: 0x9279,
 
  // WEBGL_compressed_texture_pvrtc
 
  COMPRESSED_RGB_PVRTC_4BPPV1_IMG: 0x8C00,
  COMPRESSED_RGBA_PVRTC_4BPPV1_IMG: 0x8C02,
  COMPRESSED_RGB_PVRTC_2BPPV1_IMG: 0x8C01,
  COMPRESSED_RGBA_PVRTC_2BPPV1_IMG: 0x8C03,
 
  // WEBGL_compressed_texture_etc1
 
  COMPRESSED_RGB_ETC1_WEBGL: 0x8D64,
 
  // WEBGL_compressed_texture_atc
 
  COMPRESSED_RGB_ATC_WEBGL: 0x8C92,
  COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL: 0x8C92,
  COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL: 0x87EE,
 
  // WEBGL_depth_texture
 
  UNSIGNED_INT_24_8_WEBGL: 0x84FA,
 
  // OES_texture_half_float
 
  HALF_FLOAT_OES: 0x8D61,
 
  // WEBGL_color_buffer_float
 
  RGBA32F_EXT: 0x8814,
  RGB32F_EXT: 0x8815,
  FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT: 0x8211,
  UNSIGNED_NORMALIZED_EXT: 0x8C17,
 
  // EXT_blend_minmax
 
  MIN_EXT: 0x8007,
  MAX_EXT: 0x8008,
 
  // EXT_sRGB
 
  SRGB_EXT: 0x8C40,
  SRGB_ALPHA_EXT: 0x8C42,
  SRGB8_ALPHA8_EXT: 0x8C43,
  FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT: 0x8210,
 
  // OES_standard_derivatives
 
  FRAGMENT_SHADER_DERIVATIVE_HINT_OES: 0x8B8B,
 
  // WEBGL_draw_buffers
 
  COLOR_ATTACHMENT0_WEBGL: 0x8CE0,
  COLOR_ATTACHMENT1_WEBGL: 0x8CE1,
  COLOR_ATTACHMENT2_WEBGL: 0x8CE2,
  COLOR_ATTACHMENT3_WEBGL: 0x8CE3,
  COLOR_ATTACHMENT4_WEBGL: 0x8CE4,
  COLOR_ATTACHMENT5_WEBGL: 0x8CE5,
  COLOR_ATTACHMENT6_WEBGL: 0x8CE6,
  COLOR_ATTACHMENT7_WEBGL: 0x8CE7,
  COLOR_ATTACHMENT8_WEBGL: 0x8CE8,
  COLOR_ATTACHMENT9_WEBGL: 0x8CE9,
  COLOR_ATTACHMENT10_WEBGL: 0x8CEA,
  COLOR_ATTACHMENT11_WEBGL: 0x8CEB,
  COLOR_ATTACHMENT12_WEBGL: 0x8CEC,
  COLOR_ATTACHMENT13_WEBGL: 0x8CED,
  COLOR_ATTACHMENT14_WEBGL: 0x8CEE,
  COLOR_ATTACHMENT15_WEBGL: 0x8CEF,
  DRAW_BUFFER0_WEBGL: 0x8825,
  DRAW_BUFFER1_WEBGL: 0x8826,
  DRAW_BUFFER2_WEBGL: 0x8827,
  DRAW_BUFFER3_WEBGL: 0x8828,
  DRAW_BUFFER4_WEBGL: 0x8829,
  DRAW_BUFFER5_WEBGL: 0x882A,
  DRAW_BUFFER6_WEBGL: 0x882B,
  DRAW_BUFFER7_WEBGL: 0x882C,
  DRAW_BUFFER8_WEBGL: 0x882D,
  DRAW_BUFFER9_WEBGL: 0x882E,
  DRAW_BUFFER10_WEBGL: 0x882F,
  DRAW_BUFFER11_WEBGL: 0x8830,
  DRAW_BUFFER12_WEBGL: 0x8831,
  DRAW_BUFFER13_WEBGL: 0x8832,
  DRAW_BUFFER14_WEBGL: 0x8833,
  DRAW_BUFFER15_WEBGL: 0x8834,
  MAX_COLOR_ATTACHMENTS_WEBGL: 0x8CDF,
  MAX_DRAW_BUFFERS_WEBGL: 0x8824,
 
  // OES_vertex_array_object
 
  VERTEX_ARRAY_BINDING_OES: 0x85B5,
 
  // EXT_disjoint_timer_query
 
  QUERY_COUNTER_BITS_EXT: 0x8864,
  CURRENT_QUERY_EXT: 0x8865,
  QUERY_RESULT_EXT: 0x8866,
  QUERY_RESULT_AVAILABLE_EXT: 0x8867,
  TIME_ELAPSED_EXT: 0x88BF,
  TIMESTAMP_EXT: 0x8E28,
  GPU_DISJOINT_EXT: 0x8FBB // A Boolean indicating whether or not the GPU performed any disjoint operation.
});
//# sourceMappingURL=constants.js.map
 
/***/ }),
/* 47 */
/***/ (function(module, exports) {
 
var g;
 
// This works in non-strict mode
g = (function() {
    return this;
})();
 
try {
    // This works if eval is allowed (see CSP)
    g = g || Function("return this")() || (1,eval)("this");
} catch(e) {
    // This works if the window reference is available
    if(typeof window === "object")
        g = window;
}
 
// g can still be undefined, but nothing to do about it...
// We return undefined, instead of nothing here, so it's
// easier to handle this case. if(!global) { ...}
 
module.exports = g;
 
 
/***/ }),
/* 48 */
/***/ (function(module, exports) {
 
module.exports = function (it, Constructor, name, forbiddenField) {
  if (!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)) {
    throw TypeError(name + ': incorrect invocation!');
  } return it;
};
 
 
/***/ }),
/* 49 */
/***/ (function(module, exports, __webpack_require__) {
 
var ctx = __webpack_require__(28);
var call = __webpack_require__(210);
var isArrayIter = __webpack_require__(136);
var anObject = __webpack_require__(2);
var toLength = __webpack_require__(11);
var getIterFn = __webpack_require__(153);
var BREAK = {};
var RETURN = {};
var exports = module.exports = function (iterable, entries, fn, that, ITERATOR) {
  var iterFn = ITERATOR ? function () { return iterable; } : getIterFn(iterable);
  var f = ctx(fn, that, entries ? 2 : 1);
  var index = 0;
  var length, step, iterator, result;
  if (typeof iterFn != 'function') throw TypeError(iterable + ' is not iterable!');
  // fast case for arrays with default iterator
  if (isArrayIter(iterFn)) for (length = toLength(iterable.length); length > index; index++) {
    result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]);
    if (result === BREAK || result === RETURN) return result;
  } else for (iterator = iterFn.call(iterable); !(step = iterator.next()).done;) {
    result = call(iterator, f, step.value, entries);
    if (result === BREAK || result === RETURN) return result;
  }
};
exports.BREAK = BREAK;
exports.RETURN = RETURN;
 
 
/***/ }),
/* 50 */
/***/ (function(module, exports) {
 
module.exports = false;
 
 
/***/ }),
/* 51 */
/***/ (function(module, exports, __webpack_require__) {
 
// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
var anObject = __webpack_require__(2);
var dPs = __webpack_require__(216);
var enumBugKeys = __webpack_require__(132);
var IE_PROTO = __webpack_require__(144)('IE_PROTO');
var Empty = function () { /* empty */ };
var PROTOTYPE = 'prototype';
 
// Create object with fake `null` prototype: use iframe Object with cleared prototype
var createDict = function () {
  // Thrash, waste and sodomy: IE GC bug
  var iframe = __webpack_require__(131)('iframe');
  var i = enumBugKeys.length;
  var lt = '<';
  var gt = '>';
  var iframeDocument;
  iframe.style.display = 'none';
  __webpack_require__(134).appendChild(iframe);
  iframe.src = 'javascript:'; // eslint-disable-line no-script-url
  // createDict = iframe.contentWindow.Object;
  // html.removeChild(iframe);
  iframeDocument = iframe.contentWindow.document;
  iframeDocument.open();
  iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);
  iframeDocument.close();
  createDict = iframeDocument.F;
  while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]];
  return createDict();
};
 
module.exports = Object.create || function create(O, Properties) {
  var result;
  if (O !== null) {
    Empty[PROTOTYPE] = anObject(O);
    result = new Empty();
    Empty[PROTOTYPE] = null;
    // add "__proto__" for Object.getPrototypeOf polyfill
    result[IE_PROTO] = O;
  } else result = createDict();
  return Properties === undefined ? result : dPs(result, Properties);
};
 
 
/***/ }),
/* 52 */
/***/ (function(module, exports, __webpack_require__) {
 
// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)
var $keys = __webpack_require__(218);
var hiddenKeys = __webpack_require__(132).concat('length', 'prototype');
 
exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
  return $keys(O, hiddenKeys);
};
 
 
/***/ }),
/* 53 */
/***/ (function(module, exports, __webpack_require__) {
 
// 19.1.2.14 / 15.2.3.14 Object.keys(O)
var $keys = __webpack_require__(218);
var enumBugKeys = __webpack_require__(132);
 
module.exports = Object.keys || function keys(O) {
  return $keys(O, enumBugKeys);
};
 
 
/***/ }),
/* 54 */
/***/ (function(module, exports) {
 
module.exports = function (bitmap, value) {
  return {
    enumerable: !(bitmap & 1),
    configurable: !(bitmap & 2),
    writable: !(bitmap & 4),
    value: value
  };
};
 
 
/***/ }),
/* 55 */
/***/ (function(module, exports, __webpack_require__) {
 
var redefine = __webpack_require__(20);
module.exports = function (target, src, safe) {
  for (var key in src) redefine(target, key, src[key], safe);
  return target;
};
 
 
/***/ }),
/* 56 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var global = __webpack_require__(3);
var dP = __webpack_require__(10);
var DESCRIPTORS = __webpack_require__(9);
var SPECIES = __webpack_require__(6)('species');
 
module.exports = function (KEY) {
  var C = global[KEY];
  if (DESCRIPTORS && C && !C[SPECIES]) dP.f(C, SPECIES, {
    configurable: true,
    get: function () { return this; }
  });
};
 
 
/***/ }),
/* 57 */
/***/ (function(module, exports, __webpack_require__) {
 
var toInteger = __webpack_require__(36);
var max = Math.max;
var min = Math.min;
module.exports = function (index, length) {
  index = toInteger(index);
  return index < 0 ? max(index + length, 0) : min(index, length);
};
 
 
/***/ }),
/* 58 */
/***/ (function(module, exports) {
 
var id = 0;
var px = Math.random();
module.exports = function (key) {
  return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));
};
 
 
/***/ }),
/* 59 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__animation_loop__ = __webpack_require__(249);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "AnimationLoop", function() { return __WEBPACK_IMPORTED_MODULE_0__animation_loop__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "requestAnimationFrame", function() { return __WEBPACK_IMPORTED_MODULE_0__animation_loop__["b"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "cancelAnimationFrame", function() { return __WEBPACK_IMPORTED_MODULE_0__animation_loop__["c"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__model__ = __webpack_require__(104);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Model", function() { return __WEBPACK_IMPORTED_MODULE_1__model__["a"]; });
 
 
//# sourceMappingURL=index.js.map
 
/***/ }),
/* 60 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__create_canvas__ = __webpack_require__(663);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return __WEBPACK_IMPORTED_MODULE_0__create_canvas__["c"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return __WEBPACK_IMPORTED_MODULE_0__create_canvas__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return __WEBPACK_IMPORTED_MODULE_0__create_canvas__["b"]; });
/* unused harmony reexport resizeCanvas */
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return __WEBPACK_IMPORTED_MODULE_0__create_canvas__["d"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__create_context__ = __webpack_require__(664);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_1__create_context__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return __WEBPACK_IMPORTED_MODULE_1__create_context__["b"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__polyfill_context__ = __webpack_require__(265);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return __WEBPACK_IMPORTED_MODULE_2__polyfill_context__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__track_context_state__ = __webpack_require__(164);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_3__track_context_state__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__format_glsl_error__ = __webpack_require__(665);
/* unused harmony reexport formatGLSLCompilerError */
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return __WEBPACK_IMPORTED_MODULE_4__format_glsl_error__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__get_shader_name__ = __webpack_require__(264);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return __WEBPACK_IMPORTED_MODULE_5__get_shader_name__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__constants__ = __webpack_require__(46);
/* unused harmony reexport GL */
 
 
 
 
 
 
 
 
 
 
// TODO - avoid uncondsitionally importing GL as it adds a lot to bundle size?
 
//# sourceMappingURL=index.js.map
 
/***/ }),
/* 61 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__gl_constants__ = __webpack_require__(25);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "GL", function() { return __WEBPACK_IMPORTED_MODULE_0__gl_constants__["d"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return __WEBPACK_IMPORTED_MODULE_0__gl_constants__["d"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__api_types__ = __webpack_require__(268);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Image", function() { return __WEBPACK_IMPORTED_MODULE_1__api_types__["e"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "WebGLRenderingContext", function() { return __WEBPACK_IMPORTED_MODULE_1__api_types__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "WebGLProgram", function() { return __WEBPACK_IMPORTED_MODULE_1__api_types__["f"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "WebGLShader", function() { return __WEBPACK_IMPORTED_MODULE_1__api_types__["g"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "WebGLBuffer", function() { return __WEBPACK_IMPORTED_MODULE_1__api_types__["d"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "WebGLFramebuffer", function() { return __WEBPACK_IMPORTED_MODULE_1__api_types__["h"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "WebGLRenderbuffer", function() { return __WEBPACK_IMPORTED_MODULE_1__api_types__["i"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "WebGLTexture", function() { return __WEBPACK_IMPORTED_MODULE_1__api_types__["j"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "WebGLUniformLocation", function() { return __WEBPACK_IMPORTED_MODULE_1__api_types__["k"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "WebGLActiveInfo", function() { return __WEBPACK_IMPORTED_MODULE_1__api_types__["l"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "WebGLShaderPrecisionFormat", function() { return __WEBPACK_IMPORTED_MODULE_1__api_types__["m"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "WebGL2RenderingContext", function() { return __WEBPACK_IMPORTED_MODULE_1__api_types__["b"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "webGLTypesAvailable", function() { return __WEBPACK_IMPORTED_MODULE_1__api_types__["c"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__context__ = __webpack_require__(7);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "isWebGL", function() { return __WEBPACK_IMPORTED_MODULE_2__context__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "isWebGL2", function() { return __WEBPACK_IMPORTED_MODULE_2__context__["b"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "createGLContext", function() { return __WEBPACK_IMPORTED_MODULE_2__context__["d"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "deleteGLContext", function() { return __WEBPACK_IMPORTED_MODULE_2__context__["e"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__context_state__ = __webpack_require__(68);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "withParameters", function() { return __WEBPACK_IMPORTED_MODULE_3__context_state__["f"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "resetParameters", function() { return __WEBPACK_IMPORTED_MODULE_3__context_state__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__context_limits__ = __webpack_require__(165);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "getContextInfo", function() { return __WEBPACK_IMPORTED_MODULE_4__context_limits__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__buffer__ = __webpack_require__(67);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Buffer", function() { return __WEBPACK_IMPORTED_MODULE_5__buffer__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__shader__ = __webpack_require__(111);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Shader", function() { return __WEBPACK_IMPORTED_MODULE_6__shader__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "VertexShader", function() { return __WEBPACK_IMPORTED_MODULE_6__shader__["b"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "FragmentShader", function() { return __WEBPACK_IMPORTED_MODULE_6__shader__["c"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__program__ = __webpack_require__(109);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Program", function() { return __WEBPACK_IMPORTED_MODULE_7__program__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__framebuffer__ = __webpack_require__(69);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Framebuffer", function() { return __WEBPACK_IMPORTED_MODULE_8__framebuffer__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__renderbuffer__ = __webpack_require__(110);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Renderbuffer", function() { return __WEBPACK_IMPORTED_MODULE_9__renderbuffer__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__texture_2d__ = __webpack_require__(167);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Texture2D", function() { return __WEBPACK_IMPORTED_MODULE_10__texture_2d__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__texture_cube__ = __webpack_require__(275);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "TextureCube", function() { return __WEBPACK_IMPORTED_MODULE_11__texture_cube__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__draw__ = __webpack_require__(270);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "draw", function() { return __WEBPACK_IMPORTED_MODULE_12__draw__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__clear__ = __webpack_require__(107);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "clear", function() { return __WEBPACK_IMPORTED_MODULE_13__clear__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__functions__ = __webpack_require__(272);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "readPixels", function() { return __WEBPACK_IMPORTED_MODULE_14__functions__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__uniforms__ = __webpack_require__(168);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "parseUniformName", function() { return __WEBPACK_IMPORTED_MODULE_15__uniforms__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "getUniformSetter", function() { return __WEBPACK_IMPORTED_MODULE_15__uniforms__["b"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "checkUniformValues", function() { return __WEBPACK_IMPORTED_MODULE_15__uniforms__["c"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__vertex_array__ = __webpack_require__(169);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "VertexArray", function() { return __WEBPACK_IMPORTED_MODULE_16__vertex_array__["a"]; });
// luma.gl Base WebGL wrapper library
// Provides simple class/function wrappers around the low level webgl objects
// These classes are intentionally close to the WebGL API
// but make it easier to use.
// Higher level abstractions can be built on these classes
 
 
 
 
// Exports WebGL API constants and types, plus some basic type checks
 
 
 
 
 
 
 
 
// WebGL1 objects
 
 
 
 
 
 
 
 
// Functions
 
 
 
 
 
 
 
 
// WebGL2
 
//# sourceMappingURL=index.js.map
 
/***/ }),
/* 62 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* unused harmony export TEXTURE_FORMATS */
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__gl_constants__ = __webpack_require__(25);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__api__ = __webpack_require__(38);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__context__ = __webpack_require__(7);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__context_state__ = __webpack_require__(68);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__resource__ = __webpack_require__(30);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__buffer__ = __webpack_require__(67);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__utils__ = __webpack_require__(8);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_assert__ = __webpack_require__(1);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_assert___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_assert__);
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
 
var _TEXTURE_FORMATS;
 
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
 
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
 
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
 
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
 
/* eslint-disable no-inline-comments, max-len */
 
 
 
 
 
 
 
 
 
 
// Supported min filters for NPOT texture.
var NPOT_MIN_FILTERS = [__WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].LINEAR, __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].NEAREST];
 
// const S3TC = 'WEBGL_compressed_texture_s3tc';
// const PVRTC = 'WEBGL_compressed_texture_pvrtc';
// const ES3 = 'WEBGL_compressed_texture_es3';
// const ETC1 = 'WEBGL_compressed_texture_etc1';
// const SRGB = 'EXT_sRGB';
// const DEPTH = 'WEBGL_depth_texture';
 
// Legal combinations for internalFormat, format and type
var TEXTURE_FORMATS = (_TEXTURE_FORMATS = {}, _defineProperty(_TEXTURE_FORMATS, __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].RGB, { dataFormat: __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].RGB, types: [__WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].UNSIGNED_BYTE, __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].UNSIGNED_SHORT_5_6_5] }), _defineProperty(_TEXTURE_FORMATS, __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].RGBA, { dataFormat: __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].RGBA, types: [__WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].UNSIGNED_BYTE, __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].UNSIGNED_SHORT_4_4_4_4, __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].UNSIGNED_SHORT_5_5_5_1] }), _defineProperty(_TEXTURE_FORMATS, __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].ALPHA, { dataFormat: __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].ALPHA, types: [__WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].UNSIGNED_BYTE] }), _defineProperty(_TEXTURE_FORMATS, __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].LUMINANCE, { dataFormat: __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].LUMINANCE, types: [__WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].UNSIGNED_BYTE] }), _defineProperty(_TEXTURE_FORMATS, __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].LUMINANCE_ALPHA, { dataFormat: __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].LUMINANCE_ALPHA, types: [__WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].UNSIGNED_BYTE]
 
  // [GL.DEPTH_COMPONENT]: {types: [GL.UNSIGNED_SHORT, GL.UNSIGNED_INT, GL.UNSIGNED_INT_24_8], gl1: DEPTH},
  // [GL.DEPTH_STENCIL]: {gl1: DEPTH},
 
  // Sized texture format - more performance
  // R
  // [GL.R8]: {dataFormat: GL.RED, types: [GL.UNSIGNED_BYTE], gl2: true},
  // [GL.R16F]: {dataFormat: GL.RED, types: [GL.HALF_FLOAT, GL.FLOAT], gl2: true},
  // [GL.R32F]: {dataFormat: GL.RED, types: [GL.FLOAT], gl2: true},
  // [GL.R8UI]: {dataFormat: GL.RED_INTEGER, types: [GL.UNSIGNED_BYTE], gl2: true},
  // // RG
  // [GL.RG8]: {dataFormat: GL.RG, types: [GL.UNSIGNED_BYTE], gl2: true},
  // [GL.RG16F]: {dataFormat: GL.RG, types: [GL.HALF_FLOAT, GL.FLOAT], gl2: true},
  // [GL.RG32F]: {dataFormat: GL.RG, types: [GL.FLOAT], gl2: true},
  // [GL.RG8UI]: {dataFormat: GL.RG_INTEGER, types: [GL.UNSIGNED_BYTE], gl2: true},
  // // RGB
  // [GL.RGB8]: {dataFormat: GL.RGB, types: [GL.UNSIGNED_BYTE], gl2: true, gl1: SRGB},
  // [GL.SRGB8]: {dataFormat: GL.RGB, types: [GL.UNSIGNED_BYTE], gl2: true, gl1: SRGB},
  // [GL.RGB565]: {dataFormat: GL.RGB, types: [GL.UNSIGNED_BYTE, GL.UNSIGNED_SHORT_5_6_5], gl2: true},
  // [GL.R11F_G11F_B10F]: {dataFormat: GL.RGB, types: [GL.UNSIGNED_INT_10F_11F_11F_REV, GL.HALF_FLOAT, GL.FLOAT], gl2: true},
  // [GL.RGB9_E5]: {dataFormat: GL.RGB, types: [GL.HALF_FLOAT, GL.FLOAT], gl2: true, gl1: 'WEBGL_color_buffer_half_float'},
  // [GL.RGB16F]: {dataFormat: GL.RGB, types: [GL.HALF_FLOAT, GL.FLOAT], gl2: true, gl1: 'WEBGL_color_buffer_float'},
  // [GL.RGB32F]: {dataFormat: GL.RGB, types: [GL.FLOAT], gl2: true},
  // [GL.RGB8UI]: {dataFormat: GL.RGB_INTEGER, types: [GL.UNSIGNED_BYTE], gl2: true},
  // // RGBA
  // [GL.RGBA8]: {dataFormat: GL.RGBA, types: [GL.UNSIGNED_BYTE], gl2: true, gl1: SRGB},
  // [GL.SRGB8_ALPHA8]: {dataFormat: GL.RGBA, types: [GL.UNSIGNED_BYTE], gl2: true, gl1: SRGB},
  // [GL.RGB5_A1]: {dataFormat: GL.RGBA, types: [GL.UNSIGNED_BYTE, GL.UNSIGNED_SHORT_5_5_5_1], gl2: true},
  // [GL.RGBA4]: {dataFormat: GL.RGBA, types: [GL.UNSIGNED_BYTE, GL.UNSIGNED_SHORT_4_4_4_4], gl2: true},
  // [GL.RGBA16F]: {dataFormat: GL.RGBA, types: [GL.HALF_FLOAT, GL.FLOAT], gl2: true},
  // [GL.RGBA32F]: {dataFormat: GL.RGBA, types: [GL.FLOAT], gl2: true},
  // [GL.RGBA8UI]: {dataFormat: GL.RGBA_INTEGER, types: [GL.UNSIGNED_BYTE], gl2: true}
 
  // Compressed formats
 
  // WEBGL_compressed_texture_s3tc
 
  // [GL.COMPRESSED_RGB_S3TC_DXT1_EXT]: {compressed: true, gl1: S3TC},
  // [GL.COMPRESSED_RGBA_S3TC_DXT1_EXT]: {compressed: true, gl1: S3TC},
  // [GL.COMPRESSED_RGBA_S3TC_DXT3_EXT]: {compressed: true, gl1: S3TC},
  // [GL.COMPRESSED_RGBA_S3TC_DXT5_EXT]: {compressed: true, gl1: S3TC},
 
  // WEBGL_compressed_texture_es3
 
  // [GL.COMPRESSED_R11_EAC]: {compressed: true, gl1: ES3}, // RED
  // [GL.COMPRESSED_SIGNED_R11_EAC]: {compressed: true, gl1: ES3}, // RED
  // [GL.COMPRESSED_RG11_EAC]: {compressed: true, gl1: ES3}, // RG
  // [GL.COMPRESSED_SIGNED_RG11_EAC]: {compressed: true, gl1: ES3}, // RG
  // [GL.COMPRESSED_RGB8_ETC2]: {compressed: true, gl1: ES3}, // RGB
  // [GL.COMPRESSED_RGBA8_ETC2_EAC]: {compressed: true, gl1: ES3}, // RBG
  // [GL.COMPRESSED_SRGB8_ETC2]: {compressed: true, gl1: ES3}, // RGB
  // [GL.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC]: {compressed: true, gl1: ES3}, // RGBA
  // [GL.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2]: {compressed: true, gl1: ES3}, // RGBA
  // [GL.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2]: {compressed: true, gl1: ES3}, // RGBA
  /* WebGL2 guaranteed availability compressed formats?
  COMPRESSED_R11_EAC RED
  COMPRESSED_SIGNED_R11_EAC RED
  COMPRESSED_RG11_EAC RG
  COMPRESSED_SIGNED_RG11_EAC RG
  COMPRESSED_RGB8_ETC2 RGB
  COMPRESSED_SRGB8_ETC2 RGB
  COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 RGBA
  COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 RGBA
  COMPRESSED_RGBA8_ETC2_EAC RGBA
  COMPRESSED_SRGB8_ALPHA8_ETC2_EAC
  */
 
  // WEBGL_compressed_texture_pvrtc
 
  // [GL.COMPRESSED_RGB_PVRTC_4BPPV1_IMG]: {compressed: true, gl1: PVRTC},
  // [GL.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG]: {compressed: true, gl1: PVRTC},
  // [GL.COMPRESSED_RGB_PVRTC_2BPPV1_IMG]: {compressed: true, gl1: PVRTC},
  // [GL.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG]: {compressed: true, gl1: PVRTC},
 
  // WEBGL_compressed_texture_etc1
 
  // [GL.COMPRESSED_RGB_ETC1_WEBGL]: {compressed: true, gl1: ETC1},
 
  // WEBGL_compressed_texture_atc
 
  // [GL.COMPRESSED_RGB_ATC_WEBGL]: {compressed: true, gl1: ETC1},
  // [GL.COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL]: {compressed: true, gl1: ETC1},
  // [GL.COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL]: {compressed: true, gl1: ETC1}
}), _TEXTURE_FORMATS);
 
function isFormatSupported(gl, format) {
  __WEBPACK_IMPORTED_MODULE_7_assert___default()(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__context__["a" /* isWebGL */])(gl), __WEBPACK_IMPORTED_MODULE_2__context__["h" /* ERR_WEBGL */]);
  var info = TEXTURE_FORMATS[format];
  if (!info) {
    return false;
  }
  if (info.gl1 === undefined && info.gl2 === undefined) {
    // No info - always supported
    return true;
  }
  var value = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__context__["b" /* isWebGL2 */])(gl) ? info.gl2 || info.gl1 : info.gl1;
  return typeof value === 'string' ? gl.getExtension(value) : value;
}
 
function isLinearFilteringSupported(gl, format) {
  var info = TEXTURE_FORMATS[format];
  switch (info && info.types[0]) {
    // Both WebGL1 and WebGL2?
    case __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].FLOAT:
      return gl.getExtension('OES_texture_float_linear');
    // Not in WebGL2?
    case __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].HALF_FLOAT:
      return gl.getExtension('OES_texture_half_float_linear');
    default:
      return true;
  }
}
 
var Texture = /*#__PURE__*/function (_Resource) {
  _inherits(Texture, _Resource);
 
  _createClass(Texture, null, [{
    key: 'isSupported',
    value: function isSupported(gl) {
      var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
          format = _ref.format,
          linearFiltering = _ref.linearFiltering;
 
      __WEBPACK_IMPORTED_MODULE_7_assert___default()(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__context__["a" /* isWebGL */])(gl), __WEBPACK_IMPORTED_MODULE_2__context__["h" /* ERR_WEBGL */]);
      var supported = true;
      if (format) {
        supported = supported && isFormatSupported(gl, format);
        supported = supported && (!linearFiltering || isLinearFilteringSupported(gl, format));
      }
      return supported;
    }
 
    // target cannot be modified by bind:
    // textures are special because when you first bind them to a target,
    // they get special information. When you first bind a texture as a
    // GL_TEXTURE_2D, you are actually setting special state in the texture.
    // You are saying that this texture is a 2D texture.
    // And it will always be a 2D texture; this state cannot be changed ever.
    // If you have a texture that was first bound as a GL_TEXTURE_2D,
    // you must always bind it as a GL_TEXTURE_2D;
    // attempting to bind it as GL_TEXTURE_1D will give rise to an error
    // (while run-time).
 
  }]);
 
  function Texture(gl, opts) {
    _classCallCheck(this, Texture);
 
    var _opts$id = opts.id,
        id = _opts$id === undefined ? __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__utils__["d" /* uid */])('texture') : _opts$id,
        handle = opts.handle,
        target = opts.target;
 
    var _this = _possibleConstructorReturn(this, (Texture.__proto__ || Object.getPrototypeOf(Texture)).call(this, gl, { id: id, handle: handle }));
 
    _this.target = target;
    _this.hasFloatTexture = gl.getExtension('OES_texture_float');
    _this.textureUnit = undefined;
    return _this;
  }
 
  _createClass(Texture, [{
    key: 'toString',
    value: function toString() {
      return 'Texture(' + this.id + ',' + this.width + 'x' + this.height + ')';
    }
 
    /* eslint-disable max-len, max-statements */
 
  }, {
    key: 'initialize',
    value: function initialize() {
      var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
 
      var data = opts.data;
 
      var _opts$pixels = opts.pixels,
          pixels = _opts$pixels === undefined ? null : _opts$pixels,
          _opts$format = opts.format,
          format = _opts$format === undefined ? __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].RGBA : _opts$format,
          _opts$type = opts.type,
          type = _opts$type === undefined ? __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].UNSIGNED_BYTE : _opts$type,
          _opts$border = opts.border,
          border = _opts$border === undefined ? 0 : _opts$border,
          _opts$recreate = opts.recreate,
          recreate = _opts$recreate === undefined ? false : _opts$recreate,
          _opts$parameters = opts.parameters,
          parameters = _opts$parameters === undefined ? {} : _opts$parameters,
          _opts$pixelStore = opts.pixelStore,
          pixelStore = _opts$pixelStore === undefined ? {} : _opts$pixelStore,
          _opts$unpackFlipY = opts.unpackFlipY,
          unpackFlipY = _opts$unpackFlipY === undefined ? true : _opts$unpackFlipY;
      var _opts$mipmaps = opts.mipmaps,
          mipmaps = _opts$mipmaps === undefined ? true : _opts$mipmaps;
 
      // pixels variable is for API compatibility purpose
 
      if (!data) {
        // TODO - This looks backwards? Commenting out for now until we decide
        // which prop to use
        // log.deprecated('data', 'pixels');
        data = pixels;
      }
 
      var width = opts.width,
          height = opts.height,
          dataFormat = opts.dataFormat;
 
      // Deduce width and height
 
      // Store opts for accessors
      var _deduceParameters2 = this._deduceParameters({
        format: format, type: type, dataFormat: dataFormat, compressed: false, data: data, width: width, height: height
      });
 
      width = _deduceParameters2.width;
      height = _deduceParameters2.height;
      dataFormat = _deduceParameters2.dataFormat;
      this.width = width;
      this.height = height;
      this.format = format;
      this.type = type;
      this.dataFormat = dataFormat;
      this.border = border;
      this.mipmaps = mipmaps;
 
      // Note: luma.gl defaults to GL.UNPACK_FLIP_Y_WEBGL = true;
      // TODO - compare v4 and v3
      var DEFAULT_TEXTURE_SETTINGS = _defineProperty({}, __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].UNPACK_FLIP_Y_WEBGL, unpackFlipY);
      var glSettings = Object.assign({}, DEFAULT_TEXTURE_SETTINGS, pixelStore);
 
      if (this._isNPOT()) {
 
        __WEBPACK_IMPORTED_MODULE_6__utils__["b" /* log */].warn('texture: ' + this + ' is Non-Power-Of-Two, disabling mipmaping');
        mipmaps = false;
 
        this._updateForNPOT(parameters);
      }
 
      this.setImageData({ data: data, width: width, height: height, format: format, type: type, dataFormat: dataFormat, border: border, mipmaps: mipmaps, parameters: glSettings });
 
      if (mipmaps) {
        this.generateMipmap();
      }
 
      // Set texture sampler parameters
      this.setParameters(parameters);
 
      // TODO - Store data to enable auto recreate on context loss
      if (recreate) {
        this.data = data;
      }
    }
 
    // If size has changed, reinitializes with current format
    // note clears image and mipmaps
 
  }, {
    key: 'resize',
    value: function resize(_ref2) {
      var width = _ref2.width,
          height = _ref2.height;
 
      if (width !== this.width || height !== this.height) {
        return this.initialize({
          width: width,
          height: height,
          format: this.format,
          type: this.type,
          dataFormat: this.dataFormat,
          border: this.border,
          mipmaps: false
        });
      }
      return this;
    }
 
    // Call to regenerate mipmaps after modifying texture(s)
 
  }, {
    key: 'generateMipmap',
    value: function generateMipmap() {
      var _this2 = this;
 
      var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
 
      this.gl.bindTexture(this.target, this.handle);
      __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__context_state__["f" /* withParameters */])(this.gl, params, function () {
        _this2.gl.generateMipmap(_this2.target);
      });
      this.gl.bindTexture(this.target, null);
      return this;
    }
 
    /*
     * Allocates storage
     * @param {*} pixels -
     *  null - create empty texture of specified format
     *  Typed array - init from image data in typed array
     *  Buffer|WebGLBuffer - (WEBGL2) init from image data in WebGLBuffer
     *  HTMLImageElement|Image - Inits with content of image. Auto width/height
     *  HTMLCanvasElement - Inits with contents of canvas. Auto width/height
     *  HTMLVideoElement - Creates video texture. Auto width/height
     *
     * @param {GLint} width -
     * @param {GLint} height -
     * @param {GLint} mipMapLevel -
     * @param {GLenum} format - format of image data.
     * @param {GLenum} type
     *  - format of array (autodetect from type) or
     *  - (WEBGL2) format of buffer
     * @param {Number} offset - (WEBGL2) offset from start of buffer
     * @param {GLint} border - must be 0.
     * @parameters - temporary settings to be applied, can be used to supply pixel store settings.
     */
    /* eslint-disable max-len, max-statements, complexity */
 
  }, {
    key: 'setImageData',
    value: function setImageData(_ref3) {
      var _this3 = this;
 
      var _ref3$target = _ref3.target,
          target = _ref3$target === undefined ? this.target : _ref3$target,
          _ref3$pixels = _ref3.pixels,
          pixels = _ref3$pixels === undefined ? null : _ref3$pixels,
          _ref3$data = _ref3.data,
          data = _ref3$data === undefined ? null : _ref3$data,
          width = _ref3.width,
          height = _ref3.height,
          _ref3$level = _ref3.level,
          level = _ref3$level === undefined ? 0 : _ref3$level,
          _ref3$format = _ref3.format,
          format = _ref3$format === undefined ? __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].RGBA : _ref3$format,
          type = _ref3.type,
          dataFormat = _ref3.dataFormat,
          _ref3$offset = _ref3.offset,
          offset = _ref3$offset === undefined ? 0 : _ref3$offset,
          _ref3$border = _ref3.border,
          border = _ref3$border === undefined ? 0 : _ref3$border,
          _ref3$compressed = _ref3.compressed,
          compressed = _ref3$compressed === undefined ? false : _ref3$compressed,
          _ref3$parameters = _ref3.parameters,
          parameters = _ref3$parameters === undefined ? {} : _ref3$parameters;
 
      // pixels variable is  for API compatibility purpose
      if (!data) {
        data = pixels;
      }
 
      var _deduceParameters3 = this._deduceParameters({
        format: format, type: type, dataFormat: dataFormat, compressed: compressed, data: data, width: width, height: height });
 
      type = _deduceParameters3.type;
      dataFormat = _deduceParameters3.dataFormat;
      compressed = _deduceParameters3.compressed;
      width = _deduceParameters3.width;
      height = _deduceParameters3.height;
      var gl = this.gl;
 
      gl.bindTexture(this.target, this.handle);
 
      var dataType = null;
 
      var _getDataType2 = this._getDataType({ data: data, compressed: compressed });
 
      data = _getDataType2.data;
      dataType = _getDataType2.dataType;
 
 
      __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__context_state__["f" /* withParameters */])(this.gl, parameters, function () {
        switch (dataType) {
          case 'null':
            gl.texImage2D(target, level, format, width, height, border, dataFormat, type, data);
            break;
          case 'typed-array':
            // Looks like this assert is not necessary, as offset is ignored under WebGL1
            // assert((offset === 0 || isWebGL2(gl)), 'offset supported in WebGL2 only');
            gl.texImage2D(target, level, format, width, height, border, dataFormat, type, data, offset);
            break;
          case 'buffer':
            // WebGL2 enables creating textures directly from a WebGL buffer
            __WEBPACK_IMPORTED_MODULE_7_assert___default()(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__context__["b" /* isWebGL2 */])(gl), __WEBPACK_IMPORTED_MODULE_2__context__["i" /* ERR_WEBGL2 */]);
            gl.bindBuffer(__WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].PIXEL_UNPACK_BUFFER, data.handle || data);
            gl.texImage2D(target, level, format, width, height, border, format, type, offset);
            break;
          case 'browser-object':
            gl.texImage2D(target, level, format, format, type, data);
            break;
          case 'compressed':
            gl.compressedTexImage2D(_this3.target, level, format, width, height, border, data);
            break;
          default:
            __WEBPACK_IMPORTED_MODULE_7_assert___default()(false, 'Unknown image data type');
        }
      });
    }
    /* eslint-enable max-len, max-statements, complexity */
 
    /**
     * Redefines an area of an existing texture
     * Note: does not allocate storage
     */
    /*
     * Redefines an area of an existing texture
     * @param {*} pixels, data -
     *  null - create empty texture of specified format
     *  Typed array - init from image data in typed array
     *  Buffer|WebGLBuffer - (WEBGL2) init from image data in WebGLBuffer
     *  HTMLImageElement|Image - Inits with content of image. Auto width/height
     *  HTMLCanvasElement - Inits with contents of canvas. Auto width/height
     *  HTMLVideoElement - Creates video texture. Auto width/height
     *
     * @param {GLint} x - xOffset from where texture to be updated
     * @param {GLint} y - yOffset from where texture to be updated
     * @param {GLint} width - width of the sub image to be updated
     * @param {GLint} height - height of the sub image to be updated
     * @param {GLint} level - mip level to be updated
     * @param {GLenum} format - internal format of image data.
     * @param {GLenum} type
     *  - format of array (autodetect from type) or
     *  - (WEBGL2) format of buffer or ArrayBufferView
     * @param {GLenum} dataFormat - format of image data.
     * @param {Number} offset - (WEBGL2) offset from start of buffer
     * @param {GLint} border - must be 0.
     * @parameters - temporary settings to be applied, can be used to supply pixel store settings.
     */
 
  }, {
    key: 'setSubImageData',
    value: function setSubImageData(_ref4) {
      var _this4 = this;
 
      var _ref4$target = _ref4.target,
          target = _ref4$target === undefined ? this.target : _ref4$target,
          _ref4$pixels = _ref4.pixels,
          pixels = _ref4$pixels === undefined ? null : _ref4$pixels,
          _ref4$data = _ref4.data,
          data = _ref4$data === undefined ? null : _ref4$data,
          _ref4$x = _ref4.x,
          x = _ref4$x === undefined ? 0 : _ref4$x,
          _ref4$y = _ref4.y,
          y = _ref4$y === undefined ? 0 : _ref4$y,
          width = _ref4.width,
          height = _ref4.height,
          _ref4$level = _ref4.level,
          level = _ref4$level === undefined ? 0 : _ref4$level,
          _ref4$format = _ref4.format,
          format = _ref4$format === undefined ? __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].RGBA : _ref4$format,
          type = _ref4.type,
          dataFormat = _ref4.dataFormat,
          _ref4$compressed = _ref4.compressed,
          compressed = _ref4$compressed === undefined ? false : _ref4$compressed,
          _ref4$offset = _ref4.offset,
          offset = _ref4$offset === undefined ? 0 : _ref4$offset,
          _ref4$border = _ref4.border,
          border = _ref4$border === undefined ? 0 : _ref4$border,
          _ref4$parameters = _ref4.parameters,
          parameters = _ref4$parameters === undefined ? {} : _ref4$parameters;
 
      // pixels variable is  for API compatibility purpose
      var _deduceParameters4 = this._deduceParameters({
        format: format, type: type, dataFormat: dataFormat, compressed: compressed, data: data, width: width, height: height });
 
      type = _deduceParameters4.type;
      dataFormat = _deduceParameters4.dataFormat;
      compressed = _deduceParameters4.compressed;
      width = _deduceParameters4.width;
      height = _deduceParameters4.height;
      if (!data) {
        data = pixels;
      }
 
      // Support ndarrays
      if (data && data.data) {
        var ndarray = data;
        data = ndarray.data;
        width = ndarray.shape[0];
        height = ndarray.shape[1];
      }
 
      // Support buffers
      if (data instanceof __WEBPACK_IMPORTED_MODULE_5__buffer__["a" /* default */]) {
        data = data.handle;
      }
 
      this.gl.bindTexture(this.target, this.handle);
 
      __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__context_state__["f" /* withParameters */])(this.gl, parameters, function () {
        // TODO - x,y parameters
        if (compressed) {
          _this4.gl.compressedTexSubImage2D(target, level, x, y, width, height, format, data);
        } else if (data === null) {
          _this4.gl.texSubImage2D(target, level, format, width, height, border, dataFormat, type, null);
        } else if (ArrayBuffer.isView(data)) {
          _this4.gl.texSubImage2D(target, level, x, y, width, height, format, type, data, offset);
        } else if (data instanceof __WEBPACK_IMPORTED_MODULE_1__api__["e" /* WebGLBuffer */]) {
          // WebGL2 allows us to create texture directly from a WebGL buffer
          __WEBPACK_IMPORTED_MODULE_7_assert___default()(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__context__["b" /* isWebGL2 */])(_this4.gl), __WEBPACK_IMPORTED_MODULE_2__context__["i" /* ERR_WEBGL2 */]);
          // This texImage2D signature uses currently bound GL_PIXEL_UNPACK_BUFFER
          _this4.gl.bindBuffer(__WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].PIXEL_UNPACK_BUFFER, data);
          _this4.gl.texSubImage2D(target, level, format, width, height, border, format, type, offset);
          _this4.gl.bindBuffer(__WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].GL_PIXEL_UNPACK_BUFFER, null);
        } else {
          // Assume data is a browser supported object (ImageData, Canvas, ...)
          _this4.gl.texSubImage2D(target, level, x, y, format, type, data);
        }
      });
 
      this.gl.bindTexture(this.target, null);
    }
    /* eslint-enable max-len, max-statements, complexity */
 
    /**
     * Defines a two-dimensional texture image or cube-map texture image with
     * pixels from the current framebuffer (rather than from client memory).
     * (gl.copyTexImage2D wrapper)
     *
     * Note that binding a texture into a Framebuffer's color buffer and
     * rendering can be faster.
     */
 
  }, {
    key: 'copyFramebuffer',
    value: function copyFramebuffer(_ref5) {
      var _ref5$target = _ref5.target,
          target = _ref5$target === undefined ? this.target : _ref5$target,
          framebuffer = _ref5.framebuffer,
          _ref5$offset = _ref5.offset,
          offset = _ref5$offset === undefined ? 0 : _ref5$offset,
          _ref5$x = _ref5.x,
          x = _ref5$x === undefined ? 0 : _ref5$x,
          _ref5$y = _ref5.y,
          y = _ref5$y === undefined ? 0 : _ref5$y,
          width = _ref5.width,
          height = _ref5.height,
          _ref5$level = _ref5.level,
          level = _ref5$level === undefined ? 0 : _ref5$level,
          _ref5$internalFormat = _ref5.internalFormat,
          internalFormat = _ref5$internalFormat === undefined ? __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].RGBA : _ref5$internalFormat,
          _ref5$border = _ref5.border,
          border = _ref5$border === undefined ? 0 : _ref5$border;
 
      if (framebuffer) {
        framebuffer.bind();
      }
 
      // target
      this.bind();
      this.gl.copyTexImage2D(this.target, level, internalFormat, x, y, width, height, border);
      this.unbind();
 
      if (framebuffer) {
        framebuffer.unbind();
      }
    }
  }, {
    key: 'getActiveUnit',
    value: function getActiveUnit() {
      return this.gl.getParameter(__WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].ACTIVE_TEXTURE) - __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].TEXTURE0;
    }
 
    // target cannot be modified by bind:
    // textures are special because when you first bind them to a target,
    // they get special information. When you first bind a texture as a
    // GL_TEXTURE_2D, you are actually setting special state in the texture.
    // You are saying that this texture is a 2D texture.
    // And it will always be a 2D texture; this state cannot be changed ever.
    // If you have a texture that was first bound as a GL_TEXTURE_2D,
    // you must always bind it as a GL_TEXTURE_2D;
    // attempting to bind it as GL_TEXTURE_1D will give rise to an error
    // (while run-time).
 
  }, {
    key: 'bind',
    value: function bind() {
      var textureUnit = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.textureUnit;
 
      if (textureUnit === undefined) {
        throw new Error('Texture.bind: must specify texture unit');
      }
      this.textureUnit = textureUnit;
      this.gl.activeTexture(__WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].TEXTURE0 + textureUnit);
      this.gl.bindTexture(this.target, this.handle);
      return textureUnit;
    }
  }, {
    key: 'unbind',
    value: function unbind() {
      if (this.textureUnit === undefined) {
        throw new Error('Texture.unbind: texture unit not specified');
      }
      this.gl.activeTexture(__WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].TEXTURE0 + this.textureUnit);
      this.gl.bindTexture(this.target, null);
      return this.textureUnit;
    }
 
    // PRIVATE METHODS
 
  }, {
    key: '_getDataType',
    value: function _getDataType(_ref6) {
      var data = _ref6.data,
          _ref6$compressed = _ref6.compressed,
          compressed = _ref6$compressed === undefined ? false : _ref6$compressed;
 
      if (compressed) {
        return { data: data, dataType: 'compressed' };
      }
      if (data === null) {
        return { data: data, dataType: 'null' };
      }
      if (ArrayBuffer.isView(data)) {
        return { data: data, dataType: 'typed-array' };
      }
      if (data instanceof __WEBPACK_IMPORTED_MODULE_5__buffer__["a" /* default */]) {
        return { data: data.handle, dataType: 'buffer' };
      }
      if (data instanceof __WEBPACK_IMPORTED_MODULE_1__api__["e" /* WebGLBuffer */]) {
        return { data: data, dataType: 'buffer' };
      }
      // Assume data is a browser supported object (ImageData, Canvas, ...)
      return { data: data, dataType: 'browser-object' };
    }
 
    // Image 3D copies from Typed Array or WebGLBuffer
 
  }, {
    key: 'setImage3D',
    value: function setImage3D(_ref7) {
      var _ref7$level = _ref7.level,
          level = _ref7$level === undefined ? 0 : _ref7$level,
          _ref7$internalformat = _ref7.internalformat,
          internalformat = _ref7$internalformat === undefined ? __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].RGBA : _ref7$internalformat,
          width = _ref7.width,
          height = _ref7.height,
          _ref7$depth = _ref7.depth,
          depth = _ref7$depth === undefined ? 1 : _ref7$depth,
          _ref7$border = _ref7.border,
          border = _ref7$border === undefined ? 0 : _ref7$border,
          format = _ref7.format,
          _ref7$type = _ref7.type,
          type = _ref7$type === undefined ? __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].UNSIGNED_BYTE : _ref7$type,
          _ref7$offset = _ref7.offset,
          offset = _ref7$offset === undefined ? 0 : _ref7$offset,
          pixels = _ref7.pixels;
 
      if (ArrayBuffer.isView(pixels)) {
        this.gl.texImage3D(this.target, level, internalformat, width, height, depth, border, format, type, pixels);
        return this;
      }
 
      if (pixels instanceof __WEBPACK_IMPORTED_MODULE_5__buffer__["a" /* default */]) {
        this.gl.bindBuffer(__WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].PIXEL_UNPACK_BUFFER, pixels.handle);
        this.gl.texImage3D(this.target, level, internalformat, width, height, depth, border, format, type, offset);
      }
 
      return this;
    }
 
    /* Copied from texture-2d.js
    // WebGL2
    setPixels(opts = {}) {
      const {
        buffer,
        width = null,
        height = null,
        mipmapLevel = 0,
        format = GL.RGBA,
        type = GL.UNSIGNED_BYTE,
        border = 0
      } = opts;
       const {gl} = this;
       // This signature of texImage2D uses currently bound GL_PIXEL_UNPACK_BUFFER
      gl.bindBuffer(GL.PIXEL_UNPACK_BUFFER, buffer.target);
      // And as always, we must also bind the texture itself
      this.bind();
       gl.texImage2D(gl.TEXTURE_2D,
        mipmapLevel, format, width, height, border, format, type, buffer.target);
       this.unbind();
      gl.bindBuffer(GL.GL_PIXEL_UNPACK_BUFFER, null);
      return this;
    }
     setImageDataFromCompressedBuffer(opts) {
      const {
        buffer,
        // offset = 0,
        width = null,
        height = null,
        mipmapLevel = 0,
        internalFormat = GL.RGBA,
        // format = GL.RGBA,
        // type = GL.UNSIGNED_BYTE,
        border = 0
      } = opts;
       const {gl} = this;
      gl.compressedTexImage2D(this.target,
        mipmapLevel, internalFormat, width, height, border, buffer);
      // gl.compressedTexSubImage2D(target,
      //   level, xoffset, yoffset, width, height, format, ArrayBufferView? pixels);
      return this;
    }
     copySubImage(opts) {
      const {
        // pixels,
        // offset = 0,
        // x,
        // y,
        // width,
        // height,
        // mipmapLevel = 0,
        // internalFormat = GL.RGBA,
        // type = GL.UNSIGNED_BYTE,
        // border = 0
      } = opts;
       // if (pixels instanceof ArrayBufferView) {
      //   gl.texSubImage2D(target, level, x, y, width, height, format, type, pixels);
      // }
      // gl.texSubImage2D(target, level, x, y, format, type, ? pixels);
      // gl.texSubImage2D(target, level, x, y, format, type, HTMLImageElement pixels);
      // gl.texSubImage2D(target, level, x, y, format, type, HTMLCanvasElement pixels);
      // gl.texSubImage2D(target, level, x, y, format, type, HTMLVideoElement pixels);
      // // Additional signature in a WebGL 2 context:
      // gl.texSubImage2D(target, level, x, y, format, type, GLintptr offset);
    }
    */
 
    // HELPER METHODS
 
  }, {
    key: '_deduceParameters',
    value: function _deduceParameters(opts) {
      var format = opts.format,
          data = opts.data;
      var width = opts.width,
          height = opts.height,
          dataFormat = opts.dataFormat,
          type = opts.type,
          compressed = opts.compressed;
 
      // Deduce format and type from format
 
      var textureFormat = TEXTURE_FORMATS[format];
      dataFormat = dataFormat || textureFormat && textureFormat.dataFormat;
      type = type || textureFormat && textureFormat.types[0];
 
      // Deduce compression from format
      compressed = compressed || textureFormat && textureFormat.compressed;
 
      var _deduceImageSize2 = this._deduceImageSize({ data: data, width: width, height: height });
 
      width = _deduceImageSize2.width;
      height = _deduceImageSize2.height;
 
 
      return { dataFormat: dataFormat, type: type, compressed: compressed, width: width, height: height, format: format, data: data };
    }
 
    /* global ImageData, HTMLImageElement, HTMLCanvasElement, HTMLVideoElement */
 
  }, {
    key: '_deduceImageSize',
    value: function _deduceImageSize(_ref8) {
      var data = _ref8.data,
          width = _ref8.width,
          height = _ref8.height;
 
      var size = void 0;
 
      if (typeof ImageData !== 'undefined' && data instanceof ImageData) {
        size = { width: data.width, height: data.height };
      } else if (typeof HTMLImageElement !== 'undefined' && data instanceof HTMLImageElement) {
        size = { width: data.naturalWidth, height: data.naturalHeight };
      } else if (typeof HTMLCanvasElement !== 'undefined' && data instanceof HTMLCanvasElement) {
        size = { width: data.width, height: data.height };
      } else if (typeof HTMLVideoElement !== 'undefined' && data instanceof HTMLVideoElement) {
        size = { width: data.videoWidth, height: data.videoHeight };
      } else if (!data) {
        size = { width: width >= 0 ? width : 1, height: height >= 0 ? height : 1 };
      } else {
        size = { width: width, height: height };
      }
 
      __WEBPACK_IMPORTED_MODULE_7_assert___default()(size, 'Could not deduced texture size');
      __WEBPACK_IMPORTED_MODULE_7_assert___default()(width === undefined || size.width === width, 'Deduced texture width does not match supplied width');
      __WEBPACK_IMPORTED_MODULE_7_assert___default()(height === undefined || size.height === height, 'Deduced texture height does not match supplied height');
 
      return size;
    }
 
    // RESOURCE METHODS
 
  }, {
    key: '_createHandle',
    value: function _createHandle() {
      return this.gl.createTexture();
    }
  }, {
    key: '_deleteHandle',
    value: function _deleteHandle() {
      this.gl.deleteTexture(this.handle);
    }
  }, {
    key: '_getParameter',
    value: function _getParameter(pname) {
      switch (pname) {
        case __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].TEXTURE_WIDTH:
          return this.width;
        case __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].TEXTURE_HEIGHT:
          return this.height;
        default:
          this.gl.bindTexture(this.target, this.handle);
          var value = this.gl.getTexParameter(this.target, pname);
          this.gl.bindTexture(this.target, null);
          return value;
      }
    }
  }, {
    key: '_setParameter',
    value: function _setParameter(pname, param) {
      this.gl.bindTexture(this.target, this.handle);
 
      // NOTE: Apply NPOT workaround
      param = this._getNPOTParam(pname, param);
 
      // Apparently there are some integer/float conversion rules that made
      // the WebGL committe expose two parameter setting functions in JavaScript.
      // For now, pick the float version for parameters specified as GLfloat.
      switch (pname) {
        case __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].TEXTURE_MIN_LOD:
        case __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].TEXTURE_MAX_LOD:
          this.gl.texParameterf(this.handle, pname, param);
          break;
 
        case __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].TEXTURE_WIDTH:
        case __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].TEXTURE_HEIGHT:
          throw new Error('Cannot set emulated parameter');
 
        default:
          this.gl.texParameteri(this.target, pname, param);
          break;
      }
 
      this.gl.bindTexture(this.target, null);
      return this;
    }
  }, {
    key: '_isNPOT',
    value: function _isNPOT() {
      return !__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__context__["b" /* isWebGL2 */])(this.gl) && (!__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__utils__["e" /* isPowerOfTwo */])(this.width) || !__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__utils__["e" /* isPowerOfTwo */])(this.height));
    }
 
    // Update default settings which are not supported by NPOT textures.
 
  }, {
    key: '_updateForNPOT',
    value: function _updateForNPOT(parameters) {
      if (parameters[this.gl.TEXTURE_MIN_FILTER] === undefined) {
        __WEBPACK_IMPORTED_MODULE_6__utils__["b" /* log */].warn('texture: ' + this + ' is Non-Power-Of-Two, forcing TEXTURE_MIN_FILTER to LINEAR');
        parameters[this.gl.TEXTURE_MIN_FILTER] = this.gl.LINEAR;
      }
      if (parameters[this.gl.TEXTURE_WRAP_S] === undefined) {
        __WEBPACK_IMPORTED_MODULE_6__utils__["b" /* log */].warn('texture: ' + this + ' is Non-Power-Of-Two, forcing TEXTURE_WRAP_S to CLAMP_TO_EDGE');
        parameters[this.gl.TEXTURE_WRAP_S] = this.gl.CLAMP_TO_EDGE;
      }
      if (parameters[this.gl.TEXTURE_WRAP_T] === undefined) {
        __WEBPACK_IMPORTED_MODULE_6__utils__["b" /* log */].warn('texture: ' + this + ' is Non-Power-Of-Two, forcing TEXTURE_WRAP_T to CLAMP_TO_EDGE');
        parameters[this.gl.TEXTURE_WRAP_T] = this.gl.CLAMP_TO_EDGE;
      }
    }
  }, {
    key: '_getNPOTParam',
    value: function _getNPOTParam(pname, param) {
      if (this._isNPOT()) {
        switch (pname) {
          case __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].TEXTURE_MIN_FILTER:
            if (NPOT_MIN_FILTERS.indexOf(param) === -1) {
              __WEBPACK_IMPORTED_MODULE_6__utils__["b" /* log */].warn('texture: ' + this + ' is Non-Power-Of-Two, forcing TEXTURE_MIN_FILTER to LINEAR');
              param = __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].LINEAR;
            }
            break;
          case __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].TEXTURE_WRAP_S:
          case __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].TEXTURE_WRAP_T:
            if (param !== __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].CLAMP_TO_EDGE) {
              __WEBPACK_IMPORTED_MODULE_6__utils__["b" /* log */].warn('texture: ' + this + ' is Non-Power-Of-Two, ' + __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__gl_constants__["c" /* glKey */])(pname) + ' to CLAMP_TO_EDGE');
              param = __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].CLAMP_TO_EDGE;
            }
            break;
          default:
            break;
        }
      }
      return param;
    }
  }]);
 
  return Texture;
}(__WEBPACK_IMPORTED_MODULE_4__resource__["a" /* default */]);
 
/* harmony default export */ __webpack_exports__["a"] = (Texture);
//# sourceMappingURL=texture.js.map
 
/***/ }),
/* 63 */
/***/ (function(module, exports) {
 
module.exports = {};
 
 
/***/ }),
/* 64 */
/***/ (function(module, exports, __webpack_require__) {
 
var def = __webpack_require__(10).f;
var has = __webpack_require__(18);
var TAG = __webpack_require__(6)('toStringTag');
 
module.exports = function (it, tag, stat) {
  if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag });
};
 
 
/***/ }),
/* 65 */
/***/ (function(module, exports, __webpack_require__) {
 
var $export = __webpack_require__(0);
var defined = __webpack_require__(34);
var fails = __webpack_require__(4);
var spaces = __webpack_require__(148);
var space = '[' + spaces + ']';
var non = '\u200b\u0085';
var ltrim = RegExp('^' + space + space + '*');
var rtrim = RegExp(space + space + '*$');
 
var exporter = function (KEY, exec, ALIAS) {
  var exp = {};
  var FORCE = fails(function () {
    return !!spaces[KEY]() || non[KEY]() != non;
  });
  var fn = exp[KEY] = FORCE ? exec(trim) : spaces[KEY];
  if (ALIAS) exp[ALIAS] = fn;
  $export($export.P + $export.F * FORCE, 'String', exp);
};
 
// 1 -> String#trimLeft
// 2 -> String#trimRight
// 3 -> String#trim
var trim = exporter.trim = function (string, TYPE) {
  string = String(defined(string));
  if (TYPE & 1) string = string.replace(ltrim, '');
  if (TYPE & 2) string = string.replace(rtrim, '');
  return string;
};
 
module.exports = exporter;
 
 
/***/ }),
/* 66 */
/***/ (function(module, exports, __webpack_require__) {
 
var isObject = __webpack_require__(5);
module.exports = function (it, TYPE) {
  if (!isObject(it) || it._t !== TYPE) throw TypeError('Incompatible receiver, ' + TYPE + ' required!');
  return it;
};
 
 
/***/ }),
/* 67 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* unused harmony export BufferLayout */
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__api__ = __webpack_require__(38);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__context__ = __webpack_require__(7);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils_typed_array_utils__ = __webpack_require__(163);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__resource__ = __webpack_require__(30);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_assert__ = __webpack_require__(1);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_assert___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_assert__);
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
 
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
 
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
 
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
 
 
 
 
 
 
 
var ERR_BUFFER_PARAMS = 'Illegal or missing parameter to Buffer';
 
var GL_COPY_READ_BUFFER = 0x8F36;
var GL_COPY_WRITE_BUFFER = 0x8F37;
var GL_TRANSFORM_FEEDBACK_BUFFER = 0x8C8E;
 
var BufferLayout = /*#__PURE__*/
/**
 * @classdesc
 * Store characteristics of a data layout
 * This data can be used when updating vertex attributes with
 * the associated buffer, freeing the application from keeping
 * track of this metadata.
 *
 * @class
 * @param {GLuint} size - number of values per element (1-4)
 * @param {GLuint} type - type of values (e.g. gl.FLOAT)
 * @param {GLbool} normalized=false - normalize integers to [-1,1] or [0,1]
 * @param {GLuint} integer=false - WebGL2 only, int-to-float conversion
 * @param {GLuint} stride=0 - supports strided arrays
 * @param {GLuint} offset=0 - supports strided arrays
 */
function BufferLayout() {
  var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
      type = _ref.type,
      _ref$size = _ref.size,
      size = _ref$size === undefined ? 1 : _ref$size,
      _ref$offset = _ref.offset,
      offset = _ref$offset === undefined ? 0 : _ref$offset,
      _ref$stride = _ref.stride,
      stride = _ref$stride === undefined ? 0 : _ref$stride,
      _ref$normalized = _ref.normalized,
      normalized = _ref$normalized === undefined ? false : _ref$normalized,
      _ref$integer = _ref.integer,
      integer = _ref$integer === undefined ? false : _ref$integer,
      _ref$instanced = _ref.instanced,
      instanced = _ref$instanced === undefined ? 0 : _ref$instanced;
 
  _classCallCheck(this, BufferLayout);
 
  this.type = type;
  this.size = size;
  this.offset = offset;
  this.stride = stride;
  this.normalized = normalized;
  this.integer = integer;
  this.instanced = instanced;
};
 
var Buffer = /*#__PURE__*/function (_Resource) {
  _inherits(Buffer, _Resource);
 
  function Buffer(gl) {
    var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
 
    _classCallCheck(this, Buffer);
 
    // In WebGL1, we need to make sure we use GL.ELEMENT_ARRAY_BUFFER when
    // initializing element buffers, otherwise the buffer type will be locked
    // to a generic (non-element) buffer.
    // In WebGL2, we can use GL_COPY_READ_BUFFER which avoids locking the type here
    var _this = _possibleConstructorReturn(this, (Buffer.__proto__ || Object.getPrototypeOf(Buffer)).call(this, gl, opts));
 
    _this.target = opts.target || (_this.gl.webgl2 ? GL_COPY_READ_BUFFER : __WEBPACK_IMPORTED_MODULE_0__api__["a" /* default */].ARRAY_BUFFER);
    _this.index = null;
    _this.setData(opts);
    Object.seal(_this);
    return _this;
  }
 
  // Stores the layout of data with the buffer, makes it easy to e.g. set it as an attribute later
 
 
  _createClass(Buffer, [{
    key: 'setDataLayout',
    value: function setDataLayout(_ref2) {
      var layout = _ref2.layout,
          type = _ref2.type,
          _ref2$size = _ref2.size,
          size = _ref2$size === undefined ? 1 : _ref2$size,
          _ref2$offset = _ref2.offset,
          offset = _ref2$offset === undefined ? 0 : _ref2$offset,
          _ref2$stride = _ref2.stride,
          stride = _ref2$stride === undefined ? 0 : _ref2$stride,
          _ref2$normalized = _ref2.normalized,
          normalized = _ref2$normalized === undefined ? false : _ref2$normalized,
          _ref2$integer = _ref2.integer,
          integer = _ref2$integer === undefined ? false : _ref2$integer,
          _ref2$instanced = _ref2.instanced,
          instanced = _ref2$instanced === undefined ? 0 : _ref2$instanced;
 
      this.layout = layout || new BufferLayout({
        type: type || this.type, // Use autodeduced type if available
        size: size,
        offset: offset,
        stride: stride,
        normalized: normalized,
        integer: integer,
        instanced: instanced
      });
      return this;
    }
 
    // Creates and initializes the buffer object's data store.
 
  }, {
    key: 'initialize',
    value: function initialize() {
      var _ref3 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
          data = _ref3.data,
          bytes = _ref3.bytes,
          _ref3$usage = _ref3.usage,
          usage = _ref3$usage === undefined ? __WEBPACK_IMPORTED_MODULE_0__api__["a" /* default */].STATIC_DRAW : _ref3$usage,
          layout = _ref3.layout,
          type = _ref3.type,
          _ref3$size = _ref3.size,
          size = _ref3$size === undefined ? 1 : _ref3$size,
          _ref3$offset = _ref3.offset,
          offset = _ref3$offset === undefined ? 0 : _ref3$offset,
          _ref3$stride = _ref3.stride,
          stride = _ref3$stride === undefined ? 0 : _ref3$stride,
          _ref3$normalized = _ref3.normalized,
          normalized = _ref3$normalized === undefined ? false : _ref3$normalized,
          _ref3$integer = _ref3.integer,
          integer = _ref3$integer === undefined ? false : _ref3$integer,
          _ref3$instanced = _ref3.instanced,
          instanced = _ref3$instanced === undefined ? 0 : _ref3$instanced;
 
      var opts = arguments[0];
 
      if (!data) {
        type = type || __WEBPACK_IMPORTED_MODULE_0__api__["a" /* default */].FLOAT;
 
        // Workaround needed for Safari (#291):
        // gl.bufferData with size (second argument) equal to 0 crashes.
        // hence create zero sized array.
        if (!bytes || bytes === 0) {
          bytes = 0;
          data = new Float32Array(0);
        }
      } else {
        type = type || __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__utils_typed_array_utils__["b" /* getGLTypeFromTypedArray */])(data);
        bytes = data.byteLength;
        __WEBPACK_IMPORTED_MODULE_4_assert___default()(type, ERR_BUFFER_PARAMS);
      }
 
      this.bytes = bytes;
      this.bytesUsed = bytes;
      this.data = data;
      this.type = type;
      this.usage = usage;
 
      // Call after type is set
      this.setDataLayout(Object.assign(opts));
 
      // Create the buffer - binding it here for the first time locks the type
      // In WebGL2, use GL_COPY_WRITE_BUFFER to avoid locking the type
      var target = this.gl.webgl2 ? GL_COPY_WRITE_BUFFER : this.target;
      this.gl.bindBuffer(target, this.handle);
      this.gl.bufferData(target, data || bytes, usage);
      this.gl.bindBuffer(target, null);
 
      return this;
    }
 
    // DEPRECATED - Can we change to call `subData`?
 
  }, {
    key: 'setData',
    value: function setData(options) {
      return this.initialize(options);
    }
 
    // Updates a subset of a buffer object's data store.
 
  }, {
    key: 'subData',
    value: function subData() {
      var _ref4 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
          data = _ref4.data,
          _ref4$offset = _ref4.offset,
          offset = _ref4$offset === undefined ? 0 : _ref4$offset,
          _ref4$srcOffset = _ref4.srcOffset,
          srcOffset = _ref4$srcOffset === undefined ? 0 : _ref4$srcOffset,
          length = _ref4.length;
 
      __WEBPACK_IMPORTED_MODULE_4_assert___default()(data, ERR_BUFFER_PARAMS);
 
      // Create the buffer - binding it here for the first time locks the type
      // In WebGL2, use GL_COPY_WRITE_BUFFER to avoid locking the type
      var target = this.gl.webgl2 ? GL_COPY_WRITE_BUFFER : this.target;
      this.gl.bindBuffer(target, this.handle);
      // WebGL2: subData supports additional srcOffset and length parameters
      if (srcOffset !== 0 || length !== undefined) {
        __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__context__["g" /* assertWebGL2Context */])(this.gl);
        this.gl.bufferSubData(this.target, offset, data, srcOffset, length || 0);
      } else {
        this.gl.bufferSubData(target, offset, data);
      }
      this.gl.bindBuffer(target, null);
      return this;
    }
 
    // WEBGL2 ONLY: Copies part of the data of another buffer into this buffer
 
  }, {
    key: 'copyData',
    value: function copyData(_ref5) {
      var sourceBuffer = _ref5.sourceBuffer,
          _ref5$readOffset = _ref5.readOffset,
          readOffset = _ref5$readOffset === undefined ? 0 : _ref5$readOffset,
          _ref5$writeOffset = _ref5.writeOffset,
          writeOffset = _ref5$writeOffset === undefined ? 0 : _ref5$writeOffset,
          size = _ref5.size;
 
      __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__context__["g" /* assertWebGL2Context */])(this.gl);
 
      // Use GL_COPY_READ_BUFFER+GL_COPY_WRITE_BUFFER avoid disturbing other targets and locking type
      this.gl.bindBuffer(GL_COPY_READ_BUFFER, sourceBuffer.handle);
      this.gl.bindBuffer(GL_COPY_WRITE_BUFFER, this.handle);
 
      this.gl.copyBufferSubData(GL_COPY_READ_BUFFER, GL_COPY_WRITE_BUFFER, readOffset, writeOffset, size);
 
      this.gl.bindBuffer(GL_COPY_READ_BUFFER, null);
      this.gl.bindBuffer(GL_COPY_WRITE_BUFFER, null);
 
      return this;
    }
 
    // WEBGL2 ONLY: Reads data from buffer into an ArrayBufferView or SharedArrayBuffer.
 
  }, {
    key: 'getData',
    value: function getData() {
      var _ref6 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
          _ref6$dstData = _ref6.dstData,
          dstData = _ref6$dstData === undefined ? null : _ref6$dstData,
          _ref6$srcByteOffset = _ref6.srcByteOffset,
          srcByteOffset = _ref6$srcByteOffset === undefined ? 0 : _ref6$srcByteOffset,
          _ref6$dstOffset = _ref6.dstOffset,
          dstOffset = _ref6$dstOffset === undefined ? 0 : _ref6$dstOffset,
          _ref6$length = _ref6.length,
          length = _ref6$length === undefined ? 0 : _ref6$length;
 
      __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__context__["g" /* assertWebGL2Context */])(this.gl);
 
      var ArrayType = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__utils_typed_array_utils__["a" /* getTypedArrayFromGLType */])(this.type, { clamped: false });
      var sourceAvailableElementCount = this._getAvailableElementCount(srcByteOffset);
      var dstAvailableElementCount = void 0;
      var dstElementCount = void 0;
      var dstElementOffset = dstOffset;
      if (dstData) {
        dstElementCount = dstData.length;
        dstAvailableElementCount = dstElementCount - dstElementOffset;
      } else {
        // Allocate ArrayBufferView with enough size to copy all eligible data.
        dstAvailableElementCount = Math.min(sourceAvailableElementCount, length || sourceAvailableElementCount);
        dstElementCount = dstElementOffset + dstAvailableElementCount;
      }
 
      var copyElementCount = Math.min(sourceAvailableElementCount, dstAvailableElementCount);
      length = length || copyElementCount;
      __WEBPACK_IMPORTED_MODULE_4_assert___default()(length <= copyElementCount, 'Invalid srcByteOffset, dstOffset and length combination');
      dstData = dstData || new ArrayType(dstElementCount);
      // Use GL_COPY_READ_BUFFER to avoid disturbing other targets and locking type
      this.gl.bindBuffer(GL_COPY_READ_BUFFER, this.handle);
      this.gl.getBufferSubData(GL_COPY_READ_BUFFER, srcByteOffset, dstData, dstOffset, length);
      this.gl.bindBuffer(GL_COPY_READ_BUFFER, null);
      return dstData;
    }
 
    /**
     * Binds a buffer to a given binding point (target).
     *   GL_TRANSFORM_FEEDBACK_BUFFER and GL.UNIFORM_BUFFER take an index, and optionally a range.
     *
     * @param {Glenum} target - target for the bind operation.
     *
     * @param {GLuint} index= - the index of the target.
     *   - GL_TRANSFORM_FEEDBACK_BUFFER and GL.UNIFORM_BUFFER need an index to affect state
     * @param {GLuint} offset=0 - the index of the target.
     *   - GL.UNIFORM_BUFFER: `offset` must be aligned to GL.UNIFORM_BUFFER_OFFSET_ALIGNMENT.
     * @param {GLuint} size= - the index of the target.
     *   - GL.UNIFORM_BUFFER: `size` must be a minimum of GL.UNIFORM_BLOCK_SIZE_DATA.
     * @returns {Buffer} - Returns itself for chaining.
     */
 
  }, {
    key: 'bind',
    value: function bind() {
      var _ref7 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
          _ref7$target = _ref7.target,
          target = _ref7$target === undefined ? this.target : _ref7$target,
          _ref7$index = _ref7.index,
          index = _ref7$index === undefined ? this.index : _ref7$index,
          _ref7$offset = _ref7.offset,
          offset = _ref7$offset === undefined ? 0 : _ref7$offset,
          size = _ref7.size;
 
      // NOTE: While GL_TRANSFORM_FEEDBACK_BUFFER and GL.UNIFORM_BUFFER could
      // be used as direct binding points, they will not affect transform feedback or
      // uniform buffer state. Instead indexed bindings need to be made.
      var type = target === __WEBPACK_IMPORTED_MODULE_0__api__["a" /* default */].UNIFORM_BUFFER || target === GL_TRANSFORM_FEEDBACK_BUFFER ? size !== undefined ? 'ranged' : ' indexed' : 'non-indexed';
 
      switch (type) {
        case 'non-indexed':
          this.gl.bindBuffer(target, this.handle);
          break;
        case 'indexed':
          __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__context__["g" /* assertWebGL2Context */])(this.gl);
          __WEBPACK_IMPORTED_MODULE_4_assert___default()(offset === 0, ERR_BUFFER_PARAMS); // Make sure offset wasn't supplied
          this.gl.bindBufferBase(target, index, this.handle);
          break;
        case 'ranged':
          __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__context__["g" /* assertWebGL2Context */])(this.gl);
          this.gl.bindBufferRange(target, index, this.handle, offset, size);
          break;
        default:
          throw new Error(ERR_BUFFER_PARAMS);
      }
 
      return this;
    }
  }, {
    key: 'unbind',
    value: function unbind() {
      var _ref8 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
          _ref8$target = _ref8.target,
          target = _ref8$target === undefined ? this.target : _ref8$target,
          _ref8$index = _ref8.index,
          index = _ref8$index === undefined ? this.index : _ref8$index;
 
      var isIndexedBuffer = target === __WEBPACK_IMPORTED_MODULE_0__api__["a" /* default */].UNIFORM_BUFFER || target === GL_TRANSFORM_FEEDBACK_BUFFER;
      if (isIndexedBuffer) {
        this.gl.bindBufferBase(target, index, null);
      } else {
        this.gl.bindBuffer(target, null);
      }
      return this;
    }
 
    // TODO - is this the right place?
    // gl.TRANSFORM_FEEDBACK_BUFFER_BINDING: Returns a WebGLBuffer.
    // gl.TRANSFORM_FEEDBACK_BUFFER_SIZE: Returns a GLsizeiptr.
    // gl.TRANSFORM_FEEDBACK_BUFFER_START: Returns a GLintptr.
    // gl.UNIFORM_BUFFER_BINDING: Returns a WebGLBuffer.
    // gl.UNIFORM_BUFFER_SIZE: Returns a GLsizeiptr.
    // gl.UNIFORM_BUFFER_START: Returns a GLintptr.
 
  }, {
    key: 'getIndexedParameter',
    value: function getIndexedParameter(binding, index) {
      // Create the buffer - if binding it here for the first time, this locks the type
      // In WebGL2, use GL_COPY_READ_BUFFER to avoid locking the type
      var target = this.gl.webgl2 ? GL_COPY_READ_BUFFER : this.target;
      this.gl.bindBuffer(target, index);
      return this.gl.getIndexedParameter(binding, index);
    }
 
    // RESOURCE METHODS
 
  }, {
    key: '_createHandle',
    value: function _createHandle() {
      return this.gl.createBuffer();
    }
  }, {
    key: '_deleteHandle',
    value: function _deleteHandle() {
      this.gl.deleteBuffer(this.handle);
    }
  }, {
    key: '_getParameter',
    value: function _getParameter(pname) {
      this.gl.bindBuffer(this.target, this.handle);
      var value = this.gl.getBufferParameter(this.target, pname);
      this.gl.bindBuffer(this.target, null);
      return value;
    }
  }, {
    key: '_getAvailableElementCount',
    value: function _getAvailableElementCount(srcByteOffset) {
      var ArrayType = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__utils_typed_array_utils__["a" /* getTypedArrayFromGLType */])(this.type, { clamped: false });
      var sourceElementCount = this.bytes / ArrayType.BYTES_PER_ELEMENT;
      var sourceElementOffset = srcByteOffset / ArrayType.BYTES_PER_ELEMENT;
      return sourceElementCount - sourceElementOffset;
    }
  }]);
 
  return Buffer;
}(__WEBPACK_IMPORTED_MODULE_3__resource__["a" /* default */]);
 
/* harmony default export */ __webpack_exports__["a"] = (Buffer);
//# sourceMappingURL=buffer.js.map
 
/***/ }),
/* 68 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* unused harmony export LUMA_SETTERS */
/* harmony export (immutable) */ __webpack_exports__["e"] = setParameters;
/* harmony export (immutable) */ __webpack_exports__["f"] = withParameters;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__webgl_utils_constants__ = __webpack_require__(46);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__webgl_utils_track_context_state__ = __webpack_require__(164);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_assert__ = __webpack_require__(1);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_assert___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_assert__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__utils__ = __webpack_require__(8);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__webgl_utils_set_parameters__ = __webpack_require__(266);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_4__webgl_utils_set_parameters__["d"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return __WEBPACK_IMPORTED_MODULE_4__webgl_utils_set_parameters__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return __WEBPACK_IMPORTED_MODULE_4__webgl_utils_set_parameters__["e"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_4__webgl_utils_set_parameters__["f"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return __WEBPACK_IMPORTED_MODULE_4__webgl_utils_set_parameters__["g"]; });
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
 
function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
 
/* eslint-disable no-inline-comments, max-len */
 
 
 
 
 
 
 
// map of parameter setter function names, parameter constants, default values and types
// - Uses gl function names, except when setter function exist that are named differently
// - When the WebGL api offers <setter> and <setter>Separate (e.g. blendEquation and
//   blendEquationSeparate, we use non-separate name, but accept both non-separate and
//   separate arguments. Thus, a `getParameter` call will always return all the separate values
//   in an array, in a form that can be accepted by the setter.
var LUMA_SETTERS = {
  framebuffer: function framebuffer(gl, _framebuffer) {
    var handle = _framebuffer && _framebuffer.handle ? _framebuffer.handle : _framebuffer;
    return gl.bindFramebuffer(__WEBPACK_IMPORTED_MODULE_0__webgl_utils_constants__["a" /* default */].FRAMEBUFFER, handle);
  },
  blend: function blend(gl, value) {
    return value ? gl.enable(__WEBPACK_IMPORTED_MODULE_0__webgl_utils_constants__["a" /* default */].BLEND) : gl.disable(__WEBPACK_IMPORTED_MODULE_0__webgl_utils_constants__["a" /* default */].BLEND);
  },
  blendColor: function blendColor(gl, value) {
    return gl.blendColor.apply(gl, _toConsumableArray(value));
  },
  blendEquation: function blendEquation(gl, args) {
    args = isArray(args) ? args : [args, args];
    gl.blendEquationSeparate.apply(gl, _toConsumableArray(args));
  },
  blendFunc: function blendFunc(gl, args) {
    args = isArray(args) && args.length === 2 ? [].concat(_toConsumableArray(args), _toConsumableArray(args)) : args;
    gl.blendFuncSeparate.apply(gl, _toConsumableArray(args));
  },
 
  clearColor: function clearColor(gl, value) {
    return gl.clearColor.apply(gl, _toConsumableArray(value));
  },
  clearDepth: function clearDepth(gl, value) {
    return gl.clearDepth(value);
  },
  clearStencil: function clearStencil(gl, value) {
    return gl.clearStencil(value);
  },
 
  colorMask: function colorMask(gl, value) {
    return gl.colorMask.apply(gl, _toConsumableArray(value));
  },
 
  cull: function cull(gl, value) {
    return value ? gl.enable(__WEBPACK_IMPORTED_MODULE_0__webgl_utils_constants__["a" /* default */].CULL_FACE) : gl.disable(__WEBPACK_IMPORTED_MODULE_0__webgl_utils_constants__["a" /* default */].CULL_FACE);
  },
  cullFace: function cullFace(gl, value) {
    return gl.cullFace(value);
  },
 
  depthTest: function depthTest(gl, value) {
    return value ? gl.enable(__WEBPACK_IMPORTED_MODULE_0__webgl_utils_constants__["a" /* default */].DEPTH_TEST) : gl.disable(__WEBPACK_IMPORTED_MODULE_0__webgl_utils_constants__["a" /* default */].DEPTH_TEST);
  },
  depthFunc: function depthFunc(gl, value) {
    return gl.depthFunc(value);
  },
  depthMask: function depthMask(gl, value) {
    return gl.depthMask(value);
  },
  depthRange: function depthRange(gl, value) {
    return gl.depthRange.apply(gl, _toConsumableArray(value));
  },
 
  dither: function dither(gl, value) {
    return value ? gl.enable(__WEBPACK_IMPORTED_MODULE_0__webgl_utils_constants__["a" /* default */].DITHER) : gl.disable(__WEBPACK_IMPORTED_MODULE_0__webgl_utils_constants__["a" /* default */].DITHER);
  },
 
  derivativeHint: function derivativeHint(gl, value) {
    // gl1: 'OES_standard_derivatives'
    gl.hint(__WEBPACK_IMPORTED_MODULE_0__webgl_utils_constants__["a" /* default */].FRAGMENT_SHADER_DERIVATIVE_HINT, value);
  },
 
  frontFace: function frontFace(gl, value) {
    return gl.frontFace(value);
  },
 
  mipmapHint: function mipmapHint(gl, value) {
    return gl.hint(__WEBPACK_IMPORTED_MODULE_0__webgl_utils_constants__["a" /* default */].GENERATE_MIPMAP_HINT, value);
  },
 
  lineWidth: function lineWidth(gl, value) {
    return gl.lineWidth(value);
  },
 
  polygonOffsetFill: function polygonOffsetFill(gl, value) {
    return value ? gl.enable(__WEBPACK_IMPORTED_MODULE_0__webgl_utils_constants__["a" /* default */].POLYGON_OFFSET_FILL) : gl.disable(__WEBPACK_IMPORTED_MODULE_0__webgl_utils_constants__["a" /* default */].POLYGON_OFFSET_FILL);
  },
  polygonOffset: function polygonOffset(gl, value) {
    return gl.polygonOffset.apply(gl, _toConsumableArray(value));
  },
 
  sampleCoverage: function sampleCoverage(gl, value) {
    return gl.sampleCoverage.apply(gl, _toConsumableArray(value));
  },
 
  scissorTest: function scissorTest(gl, value) {
    return value ? gl.enable(__WEBPACK_IMPORTED_MODULE_0__webgl_utils_constants__["a" /* default */].SCISSOR_TEST) : gl.disable(__WEBPACK_IMPORTED_MODULE_0__webgl_utils_constants__["a" /* default */].SCISSOR_TEST);
  },
  scissor: function scissor(gl, value) {
    return gl.scissor.apply(gl, _toConsumableArray(value));
  },
 
  stencilTest: function stencilTest(gl, value) {
    return value ? gl.enable(__WEBPACK_IMPORTED_MODULE_0__webgl_utils_constants__["a" /* default */].STENCIL_TEST) : gl.disable(__WEBPACK_IMPORTED_MODULE_0__webgl_utils_constants__["a" /* default */].STENCIL_TEST);
  },
  stencilMask: function stencilMask(gl, value) {
    value = isArray(value) ? value : [value, value];
 
    var _value = value,
        _value2 = _slicedToArray(_value, 2),
        mask = _value2[0],
        backMask = _value2[1];
 
    gl.stencilMaskSeparate(__WEBPACK_IMPORTED_MODULE_0__webgl_utils_constants__["a" /* default */].FRONT, mask);
    gl.stencilMaskSeparate(__WEBPACK_IMPORTED_MODULE_0__webgl_utils_constants__["a" /* default */].BACK, backMask);
  },
  stencilFunc: function stencilFunc(gl, args) {
    args = isArray(args) && args.length === 3 ? [].concat(_toConsumableArray(args), _toConsumableArray(args)) : args;
 
    var _args = args,
        _args2 = _slicedToArray(_args, 6),
        func = _args2[0],
        ref = _args2[1],
        mask = _args2[2],
        backFunc = _args2[3],
        backRef = _args2[4],
        backMask = _args2[5];
 
    gl.stencilFuncSeparate(__WEBPACK_IMPORTED_MODULE_0__webgl_utils_constants__["a" /* default */].FRONT, func, ref, mask);
    gl.stencilFuncSeparate(__WEBPACK_IMPORTED_MODULE_0__webgl_utils_constants__["a" /* default */].BACK, backFunc, backRef, backMask);
  },
  stencilOp: function stencilOp(gl, args) {
    args = isArray(args) && args.length === 3 ? [].concat(_toConsumableArray(args), _toConsumableArray(args)) : args;
 
    var _args3 = args,
        _args4 = _slicedToArray(_args3, 6),
        sfail = _args4[0],
        dpfail = _args4[1],
        dppass = _args4[2],
        backSfail = _args4[3],
        backDpfail = _args4[4],
        backDppass = _args4[5];
 
    gl.stencilOpSeparate(__WEBPACK_IMPORTED_MODULE_0__webgl_utils_constants__["a" /* default */].FRONT, sfail, dpfail, dppass);
    gl.stencilOpSeparate(__WEBPACK_IMPORTED_MODULE_0__webgl_utils_constants__["a" /* default */].BACK, backSfail, backDpfail, backDppass);
  },
 
  viewport: function viewport(gl, value) {
    return gl.viewport.apply(gl, _toConsumableArray(value));
  }
};
 
// HELPERS
 
 
function isArray(array) {
  return Array.isArray(array) || ArrayBuffer.isView(array);
}
 
// GETTERS AND SETTERS
 
// Get the parameter value(s) from the context
 // from '../webgl-utils/set-parameters'
 
// Get the parameters from the context
 // from '../webgl-utils/set-parameters'
 
// Resets gl state to default values.
 // from '../webgl-utils/set-parameters'
 
// Resets gl state to default values.
 // from '../webgl-utils/set-parameters'
 
// Get a map of modified parameters
 
 
// Note: "setParameters" is given extra treatment below
 
// Set the parameter value(s) by key to the context
// Sets value with key to context.
// Value may be "normalized" (in case a short form is supported). In that case
// the normalized value is retured.
function setParameters(gl, parameters) {
  __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__webgl_utils_set_parameters__["c" /* setParameters */])(gl, parameters);
  for (var key in parameters) {
    var setter = LUMA_SETTERS[key];
    if (setter) {
      setter(gl, parameters[key], key);
    }
  }
}
 
// VERY LIMITED / BASIC GL STATE MANAGEMENT
// Executes a function with gl states temporarily set, exception safe
// Currently support pixelStorage, scissor test and framebuffer binding
function withParameters(gl, parameters, func) {
  // assertWebGLContext(gl);
 
  if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__utils__["f" /* isObjectEmpty */])(parameters)) {
    // Avoid setting state if no parameters provided. Just call and return
    return func(gl);
  }
 
  var _parameters$nocatch = parameters.nocatch,
      nocatch = _parameters$nocatch === undefined ? true : _parameters$nocatch;
  // frameBuffer not supported use framebuffer
 
  __WEBPACK_IMPORTED_MODULE_2_assert___default()(!parameters.frameBuffer);
 
  __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__webgl_utils_track_context_state__["b" /* pushContextState */])(gl);
  setParameters(gl, parameters);
 
  // Setup is done, call the function
  var value = void 0;
 
  if (nocatch) {
    // Avoid try catch to minimize stack size impact for safe execution paths
    value = func(gl);
    __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__webgl_utils_track_context_state__["c" /* popContextState */])(gl);
  } else {
    // Wrap in a try-catch to ensure that parameters are restored on exceptions
    try {
      value = func(gl);
    } finally {
      __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__webgl_utils_track_context_state__["c" /* popContextState */])(gl);
    }
  }
 
  return value;
}
//# sourceMappingURL=context-state.js.map
 
/***/ }),
/* 69 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__api__ = __webpack_require__(38);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__context__ = __webpack_require__(7);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__context_features__ = __webpack_require__(108);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__clear__ = __webpack_require__(107);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__resource__ = __webpack_require__(30);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__texture_2d__ = __webpack_require__(167);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__renderbuffer__ = __webpack_require__(110);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__utils_typed_array_utils__ = __webpack_require__(163);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__utils__ = __webpack_require__(8);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_assert__ = __webpack_require__(1);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_assert___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_assert__);
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
 
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
 
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
 
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
 
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
 
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
 
 
 
 
 
 
 
 
 
 
 
 
// Local constants - will collapse during minification
var GL_FRAMEBUFFER = 0x8D40;
var GL_DRAW_FRAMEBUFFER = 0x8CA8;
var GL_READ_FRAMEBUFFER = 0x8CA9;
 
var GL_COLOR_ATTACHMENT0 = 0x8CE0;
var GL_DEPTH_ATTACHMENT = 0x8D00;
var GL_STENCIL_ATTACHMENT = 0x8D20;
// const GL_DEPTH_STENCIL_ATTACHMENT = 0x821A;
 
var GL_RENDERBUFFER = 0x8D41;
 
var GL_TEXTURE_3D = 0x806F;
var GL_TEXTURE_2D_ARRAY = 0x8C1A;
var GL_TEXTURE_2D = 0x0DE1;
var GL_TEXTURE_CUBE_MAP = 0x8513;
 
var GL_TEXTURE_CUBE_MAP_POSITIVE_X = 0x8515;
 
var GL_DEPTH_BUFFER_BIT = 0x00000100;
var GL_STENCIL_BUFFER_BIT = 0x00000400;
var GL_COLOR_BUFFER_BIT = 0x00004000;
 
var ERR_MULTIPLE_RENDERTARGETS = 'Multiple render targets not supported';
 
var Framebuffer = /*#__PURE__*/function (_Resource) {
  _inherits(Framebuffer, _Resource);
 
  _createClass(Framebuffer, [{
    key: 'MAX_COLOR_ATTACHMENTS',
    get: function get() {
      return this.gl.getParameter(this.gl.MAX_COLOR_ATTACHMENTS);
    }
  }, {
    key: 'MAX_DRAW_BUFFERS',
    get: function get() {
      return this.gl.getParameter(this.gl.MAX_DRAW_BUFFERS);
    }
  }], [{
    key: 'isSupported',
    value: function isSupported(gl) {
      var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
          colorBufferFloat = _ref.colorBufferFloat,
          colorBufferHalfFloat = _ref.colorBufferHalfFloat;
 
      var supported = true;
      supported = colorBufferFloat && gl.getExtension(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__context__["b" /* isWebGL2 */])(gl) ? 'EXT_color_buffer_float' : 'WEBGL_color_buffer_float');
      supported = colorBufferHalfFloat && gl.getExtension(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__context__["b" /* isWebGL2 */])(gl) ? 'EXT_color_buffer_float' : 'EXT_color_buffer_half_float');
      return supported;
    }
 
    // Create a Framebuffer wrapper for the default framebuffer (target === null)
 
  }, {
    key: 'getDefaultFramebuffer',
    value: function getDefaultFramebuffer(gl) {
      gl.luma = gl.luma || {};
      if (!gl.luma.defaultFramebuffer) {
        gl.luma.defaultFramebuffer = new Framebuffer(gl, { handle: null, attachments: {} });
      }
      // TODO - can we query for and get a handle to the GL.FRONT renderbuffer?
      return gl.luma.defaultFramebuffer;
    }
  }]);
 
  function Framebuffer(gl) {
    var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
 
    _classCallCheck(this, Framebuffer);
 
    // Public members
    var _this = _possibleConstructorReturn(this, (Framebuffer.__proto__ || Object.getPrototypeOf(Framebuffer)).call(this, gl, opts));
 
    _this.width = null;
    _this.height = null;
    _this.attachments = {};
    _this.readBuffer = GL_COLOR_ATTACHMENT0;
    _this.drawBuffers = [GL_COLOR_ATTACHMENT0];
    _this.initialize(opts);
 
    Object.seal(_this);
    return _this;
  }
 
  _createClass(Framebuffer, [{
    key: 'initialize',
    value: function initialize(_ref2) {
      var _ref2$width = _ref2.width,
          width = _ref2$width === undefined ? 1 : _ref2$width,
          _ref2$height = _ref2.height,
          height = _ref2$height === undefined ? 1 : _ref2$height,
          _ref2$attachments = _ref2.attachments,
          attachments = _ref2$attachments === undefined ? null : _ref2$attachments,
          _ref2$color = _ref2.color,
          color = _ref2$color === undefined ? true : _ref2$color,
          _ref2$depth = _ref2.depth,
          depth = _ref2$depth === undefined ? true : _ref2$depth,
          _ref2$stencil = _ref2.stencil,
          stencil = _ref2$stencil === undefined ? false : _ref2$stencil,
          _ref2$check = _ref2.check,
          check = _ref2$check === undefined ? true : _ref2$check,
          readBuffer = _ref2.readBuffer,
          drawBuffers = _ref2.drawBuffers;
 
      __WEBPACK_IMPORTED_MODULE_9_assert___default()(width >= 0 && height >= 0, 'Width and height need to be integers');
 
      // Store actual width and height for diffing
      this.width = width;
      this.height = height;
 
      // Resize any provided attachments - note that resize only resizes if needed
      // Note: A framebuffer has no separate size, it is defined by its attachments (which must agree)
      if (attachments) {
        for (var attachment in attachments) {
          var target = attachments[attachment];
          var object = Array.isArray(target) ? target[0] : target;
          object.resize({ width: width, height: height });
        }
      } else {
        // Create any requested default attachments
        attachments = this._createDefaultAttachments({ color: color, depth: depth, stencil: stencil, width: width, height: height });
      }
 
      this.update({ clearAttachments: true, attachments: attachments, readBuffer: readBuffer, drawBuffers: drawBuffers });
 
      // Checks that framebuffer was properly set up, if not, throws an explanatory error
      if (attachments && check) {
        this.checkStatus();
      }
    }
  }, {
    key: 'update',
    value: function update(_ref3) {
      var _ref3$attachments = _ref3.attachments,
          attachments = _ref3$attachments === undefined ? {} : _ref3$attachments,
          readBuffer = _ref3.readBuffer,
          drawBuffers = _ref3.drawBuffers,
          _ref3$clearAttachment = _ref3.clearAttachments,
          clearAttachments = _ref3$clearAttachment === undefined ? false : _ref3$clearAttachment;
 
      this.attach(attachments, { clearAttachments: clearAttachments });
 
      var gl = this.gl;
      // Multiple render target support, set read buffer and draw buffers
 
      var prevHandle = gl.bindFramebuffer(GL_FRAMEBUFFER, this.handle);
      if (readBuffer) {
        this._setReadBuffer(readBuffer);
      }
      if (drawBuffers) {
        this._setDrawBuffers(drawBuffers);
      }
      gl.bindFramebuffer(GL_FRAMEBUFFER, prevHandle);
 
      return this;
    }
 
    // Attachment resize is expected to be a noop if size is same
 
  }, {
    key: 'resize',
    value: function resize() {
      var _ref4 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
          width = _ref4.width,
          height = _ref4.height;
 
      // for default framebuffer, just update the stored size
      if (this.handle === null) {
        __WEBPACK_IMPORTED_MODULE_9_assert___default()(width === undefined && height === undefined);
        this.width = this.gl.drawingBufferWidth;
        this.height = this.gl.drawingBufferHeight;
        return this;
      }
 
      if (width === undefined) {
        width = this.gl.drawingBufferWidth;
      }
      if (height === undefined) {
        height = this.gl.drawingBufferHeight;
      }
 
      if (width !== this.width && height !== this.height) {
        __WEBPACK_IMPORTED_MODULE_8__utils__["b" /* log */].log(2, 'Resizing framebuffer ' + this.id + ' to ' + width + 'x' + height);
      }
      for (var attachmentPoint in this.attachments) {
        this.attachments[attachmentPoint].resize({ width: width, height: height });
      }
      this.width = width;
      this.height = height;
      return this;
    }
 
    // Attach from a map of attachments
 
  }, {
    key: 'attach',
    value: function attach(attachments) {
      var _this2 = this;
 
      var _ref5 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
          _ref5$clearAttachment = _ref5.clearAttachments,
          clearAttachments = _ref5$clearAttachment === undefined ? false : _ref5$clearAttachment;
 
      var newAttachments = {};
 
      // Any current attachments need to be removed, add null values to map
      if (clearAttachments) {
        Object.keys(this.attachments).forEach(function (key) {
          newAttachments[key] = null;
        });
      }
 
      // Overlay the new attachments
      Object.assign(newAttachments, attachments);
 
      var prevHandle = this.gl.bindFramebuffer(GL_FRAMEBUFFER, this.handle);
 
      // Walk the attachments
      for (var attachment in newAttachments) {
        // Ensure key is not undefined
        __WEBPACK_IMPORTED_MODULE_9_assert___default()(attachment !== 'undefined', 'Misspelled framebuffer binding point?');
 
        var descriptor = newAttachments[attachment];
        var object = descriptor;
        if (!object) {
          this._unattach({ attachment: attachment });
        } else if (object instanceof __WEBPACK_IMPORTED_MODULE_6__renderbuffer__["a" /* default */]) {
          this._attachRenderbuffer({ attachment: attachment, renderbuffer: object });
        } else if (Array.isArray(descriptor)) {
          var _descriptor = _slicedToArray(descriptor, 3),
              texture = _descriptor[0],
              _descriptor$ = _descriptor[1],
              layer = _descriptor$ === undefined ? 0 : _descriptor$,
              _descriptor$2 = _descriptor[2],
              level = _descriptor$2 === undefined ? 0 : _descriptor$2;
 
          object = texture;
          this._attachTexture({ attachment: attachment, texture: texture, layer: layer, level: level });
        } else {
          this._attachTexture({ attachment: attachment, texture: object, layer: 0, level: 0 });
        }
 
        // Resize objects
        if (object) {
          object.resize({ width: this.width, height: this.height });
        }
      }
 
      this.gl.bindFramebuffer(GL_FRAMEBUFFER, prevHandle);
 
      // Assign to attachments and remove any nulls to get a clean attachment map
      Object.assign(this.attachments, attachments);
      Object.keys(this.attachments).filter(function (key) {
        return !_this2.attachments[key];
      }).forEach(function (key) {
        delete _this2.attachments[key];
      });
    }
  }, {
    key: 'checkStatus',
    value: function checkStatus() {
      var gl = this.gl;
 
      var prevHandle = gl.bindFramebuffer(GL_FRAMEBUFFER, this.handle);
      var status = gl.checkFramebufferStatus(GL_FRAMEBUFFER);
      gl.bindFramebuffer(GL_FRAMEBUFFER, prevHandle);
      if (status !== gl.FRAMEBUFFER_COMPLETE) {
        throw new Error(_getFrameBufferStatus(status));
      }
      return this;
    }
  }, {
    key: 'clear',
    value: function clear() {
      var _ref6 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
          color = _ref6.color,
          depth = _ref6.depth,
          stencil = _ref6.stencil,
          _ref6$drawBuffers = _ref6.drawBuffers,
          drawBuffers = _ref6$drawBuffers === undefined ? [] : _ref6$drawBuffers;
 
      // Bind framebuffer and delegate to global clear functions
      var prevHandle = this.gl.bindFramebuffer(GL_FRAMEBUFFER, this.handle);
 
      if (color || depth || stencil) {
        __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__clear__["a" /* clear */])(this.gl, { color: color, depth: depth, stencil: stencil });
      }
 
      drawBuffers.forEach(function (value, drawBuffer) {
        __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__clear__["b" /* clearBuffer */])({ drawBuffer: drawBuffer, value: value });
      });
 
      this.gl.bindFramebuffer(GL_FRAMEBUFFER, prevHandle);
 
      return this;
    }
 
    // NOTE: Slow requires roundtrip to GPU
    // App can provide pixelArray or have it auto allocated by this method
    // @returns {Uint8Array|Uint16Array|FloatArray} - pixel array,
    //  newly allocated by this method unless provided by app.
 
  }, {
    key: 'readPixels',
    value: function readPixels(_ref7) {
      var _ref7$x = _ref7.x,
          x = _ref7$x === undefined ? 0 : _ref7$x,
          _ref7$y = _ref7.y,
          y = _ref7$y === undefined ? 0 : _ref7$y,
          _ref7$width = _ref7.width,
          width = _ref7$width === undefined ? this.width : _ref7$width,
          _ref7$height = _ref7.height,
          height = _ref7$height === undefined ? this.height : _ref7$height,
          _ref7$format = _ref7.format,
          format = _ref7$format === undefined ? __WEBPACK_IMPORTED_MODULE_0__api__["a" /* default */].RGBA : _ref7$format,
          type = _ref7.type,
          _ref7$pixelArray = _ref7.pixelArray,
          pixelArray = _ref7$pixelArray === undefined ? null : _ref7$pixelArray,
          _ref7$attachment = _ref7.attachment,
          attachment = _ref7$attachment === undefined ? GL_COLOR_ATTACHMENT0 : _ref7$attachment;
      var gl = this.gl;
 
      // TODO - Set and unset gl.readBuffer
 
      if (attachment === __WEBPACK_IMPORTED_MODULE_0__api__["a" /* default */].COLOR_ATTACHMENT0 && this.handle === null) {
        attachment = __WEBPACK_IMPORTED_MODULE_0__api__["a" /* default */].FRONT;
      }
 
      // Deduce type and allocated pixelArray if needed
      if (!pixelArray) {
        // Allocate pixel array if not already available, using supplied type
        type = type || gl.UNSIGNED_BYTE;
        var ArrayType = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_7__utils_typed_array_utils__["a" /* getTypedArrayFromGLType */])(type, { clamped: false });
        var components = glFormatToComponents(format);
        // TODO - check for composite type (components = 1).
        pixelArray = pixelArray || new ArrayType(width * height * components);
      }
 
      // Pixel array available, if necessary, deduce type from it.
      type = type || __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_7__utils_typed_array_utils__["b" /* getGLTypeFromTypedArray */])(pixelArray);
 
      var prevHandle = this.gl.bindFramebuffer(GL_FRAMEBUFFER, this.handle);
      this.gl.readPixels(x, y, width, height, format, type, pixelArray);
      this.gl.bindFramebuffer(GL_FRAMEBUFFER, prevHandle);
 
      return pixelArray;
    }
 
    // Reads pixels as a dataUrl
 
  }, {
    key: 'copyToDataUrl',
    value: function copyToDataUrl() {
      var _ref8 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
          _ref8$attachment = _ref8.attachment,
          attachment = _ref8$attachment === undefined ? GL_COLOR_ATTACHMENT0 : _ref8$attachment,
          _ref8$maxHeight = _ref8.maxHeight,
          maxHeight = _ref8$maxHeight === undefined ? Number.MAX_SAFE_INTEGER : _ref8$maxHeight;
 
      var data = this.readPixels({ attachment: attachment });
 
      // Scale down
      var width = this.width,
          height = this.height;
 
      while (height > maxHeight) {
        var _scalePixels = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_8__utils__["g" /* scalePixels */])({ data: data, width: width, height: height });
 
        data = _scalePixels.data;
        width = _scalePixels.width;
        height = _scalePixels.height;
      }
 
      // Flip to top down coordinate system
      __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_8__utils__["h" /* flipRows */])({ data: data, width: width, height: height });
 
      /* global document */
      var canvas = document.createElement('canvas');
      canvas.width = width;
      canvas.height = height;
      var context = canvas.getContext('2d');
 
      // Copy the pixels to a 2D canvas
      var imageData = context.createImageData(width, height);
      imageData.data.set(data);
      context.putImageData(imageData, 0, 0);
 
      return canvas.toDataURL();
    }
 
    // Reads pixels into an HTML Image
 
  }, {
    key: 'copyToImage',
    value: function copyToImage() {
      var _ref9 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
          _ref9$image = _ref9.image,
          image = _ref9$image === undefined ? null : _ref9$image,
          _ref9$attachment = _ref9.attachment,
          attachment = _ref9$attachment === undefined ? GL_COLOR_ATTACHMENT0 : _ref9$attachment,
          _ref9$maxHeight = _ref9.maxHeight,
          maxHeight = _ref9$maxHeight === undefined ? Number.MAX_SAFE_INTEGER : _ref9$maxHeight;
 
      /* global Image */
      var dataUrl = this.readDataUrl({ attachment: attachment });
      image = image || new Image();
      image.src = dataUrl;
      return image;
    }
 
    // copyToFramebuffer({width, height}) {
    //   const scaleX = width / this.width;
    //   const scaleY = height / this.height;
    //   const scale = Math.min(scaleX, scaleY);
    //   width = width * scale;
    //   height = height * scale;
    //   const scaledFramebuffer = new Framebuffer(this.gl, {width, height});
    //   this.blit();
    // }
 
    // Copy a rectangle from a framebuffer attachment into a texture (at an offset)
 
  }, {
    key: 'copyToTexture',
    value: function copyToTexture(_ref10) {
      var texture = _ref10.texture,
          target = _ref10.target,
          _ref10$xoffset = _ref10.xoffset,
          xoffset = _ref10$xoffset === undefined ? 0 : _ref10$xoffset,
          _ref10$yoffset = _ref10.yoffset,
          yoffset = _ref10$yoffset === undefined ? 0 : _ref10$yoffset,
          _ref10$zoffset = _ref10.zoffset,
          zoffset = _ref10$zoffset === undefined ? 0 : _ref10$zoffset,
          _ref10$mipmapLevel = _ref10.mipmapLevel,
          mipmapLevel = _ref10$mipmapLevel === undefined ? 0 : _ref10$mipmapLevel,
          _ref10$attachment = _ref10.attachment,
          attachment = _ref10$attachment === undefined ? GL_COLOR_ATTACHMENT0 : _ref10$attachment,
          _ref10$x = _ref10.x,
          x = _ref10$x === undefined ? 0 : _ref10$x,
          _ref10$y = _ref10.y,
          y = _ref10$y === undefined ? 0 : _ref10$y,
          width = _ref10.width,
          height = _ref10.height;
      var gl = this.gl;
 
      var prevHandle = gl.bindFramebuffer(GL_FRAMEBUFFER, this.handle);
      var prevBuffer = gl.readBuffer(attachment);
 
      width = Number.isFinite(width) ? width : texture.width;
      height = Number.isFinite(height) ? height : texture.height;
 
      // target
      switch (texture.target) {
        case GL_TEXTURE_2D:
        case GL_TEXTURE_CUBE_MAP:
          gl.copyTexSubImage2D(target || texture.target, mipmapLevel, xoffset, yoffset, x, y, width, height);
          break;
        case GL_TEXTURE_2D_ARRAY:
        case GL_TEXTURE_3D:
          gl.copyTexSubImage3D(target || texture.target, mipmapLevel, xoffset, yoffset, zoffset, x, y, width, height);
          break;
        default:
      }
 
      gl.readBuffer(prevBuffer);
      gl.bindFramebuffer(GL_FRAMEBUFFER, prevHandle);
      return texture;
    }
 
    // WEBGL2 INTERFACE
 
    // Copies a rectangle of pixels between framebuffers
 
  }, {
    key: 'blit',
    value: function blit(_ref11) {
      var srcFramebuffer = _ref11.srcFramebuffer,
          _ref11$attachment = _ref11.attachment,
          attachment = _ref11$attachment === undefined ? GL_COLOR_ATTACHMENT0 : _ref11$attachment,
          _ref11$srcX = _ref11.srcX0,
          srcX0 = _ref11$srcX === undefined ? 0 : _ref11$srcX,
          _ref11$srcY = _ref11.srcY0,
          srcY0 = _ref11$srcY === undefined ? 0 : _ref11$srcY,
          srcX1 = _ref11.srcX1,
          srcY1 = _ref11.srcY1,
          _ref11$dstX = _ref11.dstX0,
          dstX0 = _ref11$dstX === undefined ? 0 : _ref11$dstX,
          _ref11$dstY = _ref11.dstY0,
          dstY0 = _ref11$dstY === undefined ? 0 : _ref11$dstY,
          dstX1 = _ref11.dstX1,
          dstY1 = _ref11.dstY1,
          _ref11$color = _ref11.color,
          color = _ref11$color === undefined ? true : _ref11$color,
          _ref11$depth = _ref11.depth,
          depth = _ref11$depth === undefined ? false : _ref11$depth,
          _ref11$stencil = _ref11.stencil,
          stencil = _ref11$stencil === undefined ? false : _ref11$stencil,
          _ref11$mask = _ref11.mask,
          mask = _ref11$mask === undefined ? 0 : _ref11$mask,
          _ref11$filter = _ref11.filter,
          filter = _ref11$filter === undefined ? __WEBPACK_IMPORTED_MODULE_0__api__["a" /* default */].NEAREST : _ref11$filter;
      var gl = this.gl;
 
      __WEBPACK_IMPORTED_MODULE_9_assert___default()(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__context__["b" /* isWebGL2 */])(gl), __WEBPACK_IMPORTED_MODULE_1__context__["i" /* ERR_WEBGL2 */]);
 
      if (!srcFramebuffer.handle && attachment === GL_COLOR_ATTACHMENT0) {
        attachment = __WEBPACK_IMPORTED_MODULE_0__api__["a" /* default */].FRONT;
      }
 
      if (color) {
        mask |= GL_COLOR_BUFFER_BIT;
      }
      if (depth) {
        mask |= GL_DEPTH_BUFFER_BIT;
      }
      if (stencil) {
        mask |= GL_STENCIL_BUFFER_BIT;
      }
      __WEBPACK_IMPORTED_MODULE_9_assert___default()(mask);
 
      srcX1 = srcX1 === undefined ? srcFramebuffer.width : srcX1;
      srcY1 = srcY1 === undefined ? srcFramebuffer.height : srcY1;
      dstX1 = dstX1 === undefined ? this.width : dstX1;
      dstY1 = dstY1 === undefined ? this.height : dstY1;
 
      var prevDrawHandle = gl.bindFramebuffer(GL_DRAW_FRAMEBUFFER, this.handle);
      var prevReadHandle = gl.bindFramebuffer(GL_READ_FRAMEBUFFER, srcFramebuffer.handle);
      var prevReadBuffer = gl.readBuffer(attachment);
      gl.blitFramebuffer(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter);
      gl.readBuffer(prevReadBuffer);
      gl.bindFramebuffer(GL_READ_FRAMEBUFFER, prevReadHandle);
      gl.bindFramebuffer(GL_DRAW_FRAMEBUFFER, prevDrawHandle);
 
      return this;
    }
 
    // signals to the GL that it need not preserve all pixels of a specified region
    // of the framebuffer
 
  }, {
    key: 'invalidate',
    value: function invalidate(_ref12) {
      var _ref12$attachments = _ref12.attachments,
          attachments = _ref12$attachments === undefined ? [] : _ref12$attachments,
          _ref12$x = _ref12.x,
          x = _ref12$x === undefined ? 0 : _ref12$x,
          _ref12$y = _ref12.y,
          y = _ref12$y === undefined ? 0 : _ref12$y,
          width = _ref12.width,
          height = _ref12.height;
      var gl = this.gl;
 
      __WEBPACK_IMPORTED_MODULE_9_assert___default()(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__context__["b" /* isWebGL2 */])(gl, __WEBPACK_IMPORTED_MODULE_1__context__["i" /* ERR_WEBGL2 */]));
      var prevHandle = gl.bindFramebuffer(GL_READ_FRAMEBUFFER, this.handle);
      var invalidateAll = x === 0 && y === 0 && width === undefined && height === undefined;
      if (invalidateAll) {
        gl.invalidateFramebuffer(GL_READ_FRAMEBUFFER, attachments);
      } else {
        gl.invalidateFramebuffer(GL_READ_FRAMEBUFFER, attachments, x, y, width, height);
      }
      gl.bindFramebuffer(GL_READ_FRAMEBUFFER, prevHandle);
      return this;
    }
 
    // Return the value for `pname` of the specified attachment.
    // The type returned is the type of the requested pname
 
  }, {
    key: 'getAttachmentParameter',
    value: function getAttachmentParameter() {
      var _ref13 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
          _ref13$attachment = _ref13.attachment,
          attachment = _ref13$attachment === undefined ? GL_COLOR_ATTACHMENT0 : _ref13$attachment,
          pname = _ref13.pname;
 
      var value = this._getAttachmentParameterFallback(pname);
      if (value === null) {
        this.gl.bindTexture(GL_FRAMEBUFFER, this.handle);
        value = this.gl.getFramebufferAttachmentParameter(GL_FRAMEBUFFER, attachment, pname);
        this.gl.bindTexture(GL_FRAMEBUFFER, null);
      }
      return value;
    }
  }, {
    key: 'getAttachmentParameters',
    value: function getAttachmentParameters() {
      var attachment = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : GL_COLOR_ATTACHMENT0;
      var parameters = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.constructor.ATTACHMENT_PARAMETERS || {};
 
      var values = {};
      for (var pname in parameters) {
        values[pname] = this.getAttachmentParameter(pname);
      }
      return this;
    }
 
    // DEBUG
 
    // Note: Will only work when called in an event handler
 
  }, {
    key: 'show',
    value: function show() {
      /* global window */
      if (typeof window !== 'undefined') {
        window.open(this.copyToDataUrl(), 'luma-debug-texture');
      }
      return this;
    }
  }, {
    key: 'log',
    value: function log() {
      var _ref14 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
          _ref14$priority = _ref14.priority,
          priority = _ref14$priority === undefined ? 0 : _ref14$priority,
          _ref14$message = _ref14.message,
          message = _ref14$message === undefined ? '' : _ref14$message;
 
      if (priority > __WEBPACK_IMPORTED_MODULE_8__utils__["b" /* log */].priority || typeof window === 'undefined') {
        return this;
      }
      message = message || 'Framebuffer ' + this.id;
      var image = this.copyToDataUrl({ maxHeight: 100 });
      __WEBPACK_IMPORTED_MODULE_8__utils__["b" /* log */].image({ priority: priority, message: message, image: image }, message);
      return this;
    }
 
    // WEBGL INTERFACE
 
  }, {
    key: 'bind',
    value: function bind() {
      var _ref15 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
          _ref15$target = _ref15.target,
          target = _ref15$target === undefined ? GL_FRAMEBUFFER : _ref15$target;
 
      this.gl.bindFramebuffer(target, this.handle);
      return this;
    }
  }, {
    key: 'unbind',
    value: function unbind() {
      var _ref16 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
          _ref16$target = _ref16.target,
          target = _ref16$target === undefined ? GL_FRAMEBUFFER : _ref16$target;
 
      this.gl.bindFramebuffer(target, null);
      return this;
    }
 
    // PRIVATE METHODS
 
  }, {
    key: '_createDefaultAttachments',
    value: function _createDefaultAttachments(_ref17) {
      var color = _ref17.color,
          depth = _ref17.depth,
          stencil = _ref17.stencil,
          width = _ref17.width,
          height = _ref17.height;
 
      var defaultAttachments = null;
 
      // Add a color buffer if requested and not supplied
      if (color) {
        var _parameters;
 
        defaultAttachments = defaultAttachments || {};
        defaultAttachments[GL_COLOR_ATTACHMENT0] = new __WEBPACK_IMPORTED_MODULE_5__texture_2d__["a" /* default */](this.gl, {
          pixels: null, // reserves texture memory, but texels are undefined
          format: __WEBPACK_IMPORTED_MODULE_0__api__["a" /* default */].RGBA,
          type: __WEBPACK_IMPORTED_MODULE_0__api__["a" /* default */].UNSIGNED_BYTE,
          width: width,
          height: height,
          // Note: Mipmapping can be disabled by texture resource when we resize the texture
          // to a non-power-of-two dimenstion (NPOT texture) under WebGL1. To have consistant
          // behavior we always disable mipmaps.
          mipmaps: false,
          // Set MIN and MAG filtering parameters so mipmaps are not used in sampling.
          // Set WRAP modes that support NPOT textures too.
          parameters: (_parameters = {}, _defineProperty(_parameters, __WEBPACK_IMPORTED_MODULE_0__api__["a" /* default */].TEXTURE_MIN_FILTER, __WEBPACK_IMPORTED_MODULE_0__api__["a" /* default */].NEAREST), _defineProperty(_parameters, __WEBPACK_IMPORTED_MODULE_0__api__["a" /* default */].TEXTURE_MAG_FILTER, __WEBPACK_IMPORTED_MODULE_0__api__["a" /* default */].NEAREST), _defineProperty(_parameters, __WEBPACK_IMPORTED_MODULE_0__api__["a" /* default */].TEXTURE_WRAP_S, __WEBPACK_IMPORTED_MODULE_0__api__["a" /* default */].CLAMP_TO_EDGE), _defineProperty(_parameters, __WEBPACK_IMPORTED_MODULE_0__api__["a" /* default */].TEXTURE_WRAP_T, __WEBPACK_IMPORTED_MODULE_0__api__["a" /* default */].CLAMP_TO_EDGE), _parameters)
        });
      }
 
      // Add a depth buffer if requested and not supplied
      if (depth) {
        defaultAttachments = defaultAttachments || {};
        defaultAttachments[GL_DEPTH_ATTACHMENT] = new __WEBPACK_IMPORTED_MODULE_6__renderbuffer__["a" /* default */](this.gl, { format: __WEBPACK_IMPORTED_MODULE_0__api__["a" /* default */].DEPTH_COMPONENT16, width: width, height: height });
      }
 
      // TODO - handle stencil and combined depth and stencil
 
      return defaultAttachments;
    }
  }, {
    key: '_unattach',
    value: function _unattach(_ref18) {
      var attachment = _ref18.attachment;
 
      this.gl.bindRenderbuffer(GL_RENDERBUFFER, this.handle);
      this.gl.framebufferRenderbuffer(GL_FRAMEBUFFER, attachment, GL_RENDERBUFFER, null);
      delete this.attachments[attachment];
    }
  }, {
    key: '_attachRenderbuffer',
    value: function _attachRenderbuffer(_ref19) {
      var _ref19$attachment = _ref19.attachment,
          attachment = _ref19$attachment === undefined ? GL_COLOR_ATTACHMENT0 : _ref19$attachment,
          renderbuffer = _ref19.renderbuffer;
      var gl = this.gl;
      // TODO - is the bind needed?
      // gl.bindRenderbuffer(GL_RENDERBUFFER, renderbuffer.handle);
 
      gl.framebufferRenderbuffer(GL_FRAMEBUFFER, attachment, GL_RENDERBUFFER, renderbuffer.handle);
      // TODO - is the unbind needed?
      // gl.bindRenderbuffer(GL_RENDERBUFFER, null);
 
      this.attachments[attachment] = renderbuffer;
    }
 
    // layer = 0 - index into Texture2DArray and Texture3D or face for `TextureCubeMap`
    // level = 0 - mipmapLevel (must be 0 in WebGL1)
 
  }, {
    key: '_attachTexture',
    value: function _attachTexture(_ref20) {
      var _ref20$attachment = _ref20.attachment,
          attachment = _ref20$attachment === undefined ? GL_COLOR_ATTACHMENT0 : _ref20$attachment,
          texture = _ref20.texture,
          layer = _ref20.layer,
          level = _ref20.level;
      var gl = this.gl;
 
      gl.bindTexture(texture.target, texture.handle);
 
      switch (texture.target) {
        case GL_TEXTURE_2D_ARRAY:
        case GL_TEXTURE_3D:
          gl.framebufferTextureLayer(GL_FRAMEBUFFER, attachment, texture.target, level, layer);
          break;
 
        case GL_TEXTURE_CUBE_MAP:
          // layer must be a cubemap face (or if index, converted to cube map face)
          var face = mapIndexToCubeMapFace(layer);
          gl.framebufferTexture2D(GL_FRAMEBUFFER, attachment, face, texture.handle, level);
          break;
 
        case GL_TEXTURE_2D:
          gl.framebufferTexture2D(GL_FRAMEBUFFER, attachment, GL_TEXTURE_2D, texture.handle, level);
          break;
 
        default:
          __WEBPACK_IMPORTED_MODULE_9_assert___default()(false, 'Illegal texture type');
      }
 
      gl.bindTexture(texture.target, null);
      this.attachments[attachment] = texture;
    }
 
    // Expects framebuffer to be bound
 
  }, {
    key: '_setReadBuffer',
    value: function _setReadBuffer(gl, readBuffer) {
      if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__context__["b" /* isWebGL2 */])(gl)) {
        gl.readBuffer(readBuffer);
      } else {
        // Setting to color attachment 0 is a noop, so allow it in WebGL1
        __WEBPACK_IMPORTED_MODULE_9_assert___default()(readBuffer === GL_COLOR_ATTACHMENT0 || readBuffer === __WEBPACK_IMPORTED_MODULE_0__api__["a" /* default */].BACK, ERR_MULTIPLE_RENDERTARGETS);
      }
      this.readBuffer = readBuffer;
    }
 
    // Expects framebuffer to be bound
 
  }, {
    key: '_setDrawBuffers',
    value: function _setDrawBuffers(gl, drawBuffers) {
      if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__context__["b" /* isWebGL2 */])(gl)) {
        gl.drawBuffers(drawBuffers);
      } else {
        var ext = gl.getExtension('WEBGL_draw_buffers');
        if (ext) {
          ext.drawBuffersWEBGL(drawBuffers);
        } else {
          // Setting a single draw buffer to color attachment 0 is a noop, allow in WebGL1
          __WEBPACK_IMPORTED_MODULE_9_assert___default()(drawBuffers.length === 1 && (drawBuffers[0] === GL_COLOR_ATTACHMENT0 || drawBuffers[0] === __WEBPACK_IMPORTED_MODULE_0__api__["a" /* default */].BACK), ERR_MULTIPLE_RENDERTARGETS);
        }
      }
      this.drawBuffers = drawBuffers;
    }
 
    // Attempt to provide workable defaults for WebGL2 symbols under WebGL1
    // null means OK to query
    /* eslint-disable complexity */
 
  }, {
    key: '_getAttachmentParameterFallback',
    value: function _getAttachmentParameterFallback(pname) {
      var caps = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__context_features__["d" /* getFeatures */])(this.gl);
 
      switch (pname) {
        case __WEBPACK_IMPORTED_MODULE_0__api__["a" /* default */].FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER:
          // GLint
          return !caps.webgl2 ? 0 : null;
        case __WEBPACK_IMPORTED_MODULE_0__api__["a" /* default */].FRAMEBUFFER_ATTACHMENT_RED_SIZE: // GLint
        case __WEBPACK_IMPORTED_MODULE_0__api__["a" /* default */].FRAMEBUFFER_ATTACHMENT_GREEN_SIZE: // GLint
        case __WEBPACK_IMPORTED_MODULE_0__api__["a" /* default */].FRAMEBUFFER_ATTACHMENT_BLUE_SIZE: // GLint
        case __WEBPACK_IMPORTED_MODULE_0__api__["a" /* default */].FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE: // GLint
        case __WEBPACK_IMPORTED_MODULE_0__api__["a" /* default */].FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE: // GLint
        case __WEBPACK_IMPORTED_MODULE_0__api__["a" /* default */].FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE:
          // GLint
          return !caps.webgl2 ? 8 : null;
        case __WEBPACK_IMPORTED_MODULE_0__api__["a" /* default */].FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE:
          // GLenum
          return !caps.webgl2 ? __WEBPACK_IMPORTED_MODULE_0__api__["a" /* default */].UNSIGNED_INT : null;
        case __WEBPACK_IMPORTED_MODULE_0__api__["a" /* default */].FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING:
          return !caps.webgl2 && !caps.EXT_sRGB ? __WEBPACK_IMPORTED_MODULE_0__api__["a" /* default */].LINEAR : null;
        default:
          return null;
      }
    }
    /* eslint-enable complexity */
 
    // RESOURCE METHODS
 
  }, {
    key: '_createHandle',
    value: function _createHandle() {
      return this.gl.createFramebuffer();
    }
  }, {
    key: '_deleteHandle',
    value: function _deleteHandle() {
      this.gl.deleteFramebuffer(this.handle);
    }
  }, {
    key: 'color',
    get: function get() {
      return this.attachments[GL_COLOR_ATTACHMENT0] || null;
    }
  }, {
    key: 'texture',
    get: function get() {
      return this.attachments[GL_COLOR_ATTACHMENT0] || null;
    }
  }, {
    key: 'depth',
    get: function get() {
      return this.attachments[GL_DEPTH_ATTACHMENT] || null;
    }
  }, {
    key: 'stencil',
    get: function get() {
      return this.attachments[GL_STENCIL_ATTACHMENT] || null;
    }
  }]);
 
  return Framebuffer;
}(__WEBPACK_IMPORTED_MODULE_4__resource__["a" /* default */]);
 
// PUBLIC METHODS
 
// Map an index to a cube map face constant
 
 
/* harmony default export */ __webpack_exports__["a"] = (Framebuffer);
function mapIndexToCubeMapFace(layer) {
  // TEXTURE_CUBE_MAP_POSITIVE_X is a big value (0x8515)
  // if smaller assume layer is index, otherwise assume it is already a cube map face constant
  return layer < GL_TEXTURE_CUBE_MAP_POSITIVE_X ? layer + GL_TEXTURE_CUBE_MAP_POSITIVE_X : layer;
}
 
// Returns number of components in a specific WebGL format
function glFormatToComponents(format) {
  switch (format) {
    case __WEBPACK_IMPORTED_MODULE_0__api__["a" /* default */].ALPHA:
      return 1;
    case __WEBPACK_IMPORTED_MODULE_0__api__["a" /* default */].RGB:
      return 3;
    case __WEBPACK_IMPORTED_MODULE_0__api__["a" /* default */].RGBA:
      return 4;
    default:
      throw new Error('Unknown format');
  }
}
 
// Get a string describing the framebuffer error if installed
function _getFrameBufferStatus(status) {
  // Use error mapping if installed
  var STATUS = Framebuffer.STATUS || {};
  return STATUS[status] || 'Framebuffer error ' + status;
}
//# sourceMappingURL=framebuffer.js.map
 
/***/ }),
/* 70 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
// Copyright (c) 2015 - 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
 
// Note: The numeric values here are matched by shader code in the
// "project" and "project64" shader modules. Both places need to be
// updated.
 
// TODO: Maybe "POSITIONS" would be a better name?
var COORDINATE_SYSTEM = exports.COORDINATE_SYSTEM = {
  // Positions are interpreted as [lng, lat, elevation]
  // lng lat are degrees, elevation is meters. distances as meters.
  LNGLAT: 1.0,
 
  // Positions are interpreted as meter offsets, distances as meters
  // Planned to deprecate in later versions
  METER_OFFSETS: 2.0,
  METERS: 2.0,
 
  // Positions are interpreted as lng lat offsets: [deltaLng, deltaLat, elevation]
  // deltaLng, deltaLat are delta degrees, elevation is meters.
  // distances as meters.
  LNGLAT_OFFSETS: 3.0,
 
  // Positions and distances are not transformed: [x, y, z] in unit coordinates
  IDENTITY: 0.0
};
 
var LIFECYCLE = exports.LIFECYCLE = {
  NO_STATE: 'Awaiting state',
  MATCHED: 'Matched. State transferred from previous layer',
  INITIALIZED: 'Intialized',
  AWAITING_GC: 'Discarded. Awaiting garbage collection',
  AWAITING_FINALIZATION: 'No longer matched. Awaiting garbage collection',
  FINALIZED: 'Finalized! Awaiting garbage collection'
};
 
/***/ }),
/* 71 */
/***/ (function(module, exports, __webpack_require__) {
 
// getting tag from 19.1.3.6 Object.prototype.toString()
var cof = __webpack_require__(27);
var TAG = __webpack_require__(6)('toStringTag');
// ES3 wrong here
var ARG = cof(function () { return arguments; }()) == 'Arguments';
 
// fallback for IE11 Script Access Denied error
var tryGet = function (it, key) {
  try {
    return it[key];
  } catch (e) { /* empty */ }
};
 
module.exports = function (it) {
  var O, T, B;
  return it === undefined ? 'Undefined' : it === null ? 'Null'
    // @@toStringTag case
    : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T
    // builtinTag case
    : ARG ? cof(O)
    // ES3 arguments fallback
    : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B;
};
 
 
/***/ }),
/* 72 */
/***/ (function(module, exports, __webpack_require__) {
 
// fallback for non-array-like ES3 and non-enumerable old V8 strings
var cof = __webpack_require__(27);
// eslint-disable-next-line no-prototype-builtins
module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) {
  return cof(it) == 'String' ? it.split('') : Object(it);
};
 
 
/***/ }),
/* 73 */
/***/ (function(module, exports) {
 
exports.f = {}.propertyIsEnumerable;
 
 
/***/ }),
/* 74 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
/**
 * Copyright (c) 2013-present, Facebook, Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 *
 * 
 */
 
function makeEmptyFunction(arg) {
  return function () {
    return arg;
  };
}
 
/**
 * This function accepts and discards inputs; it has no side effects. This is
 * primarily useful idiomatically for overridable function endpoints which
 * always need to be callable, since JS lacks a null-call idiom ala Cocoa.
 */
var emptyFunction = function emptyFunction() {};
 
emptyFunction.thatReturns = makeEmptyFunction;
emptyFunction.thatReturnsFalse = makeEmptyFunction(false);
emptyFunction.thatReturnsTrue = makeEmptyFunction(true);
emptyFunction.thatReturnsNull = makeEmptyFunction(null);
emptyFunction.thatReturnsThis = function () {
  return this;
};
emptyFunction.thatReturnsArgument = function (arg) {
  return arg;
};
 
module.exports = emptyFunction;
 
/***/ }),
/* 75 */
/***/ (function(module, exports) {
 
module.exports = multiply;
 
/**
 * Multiplies two mat4's
 *
 * @param {mat4} out the receiving matrix
 * @param {mat4} a the first operand
 * @param {mat4} b the second operand
 * @returns {mat4} out
 */
function multiply(out, a, b) {
    var a00 = a[0], a01 = a[1], a02 = a[2], a03 = a[3],
        a10 = a[4], a11 = a[5], a12 = a[6], a13 = a[7],
        a20 = a[8], a21 = a[9], a22 = a[10], a23 = a[11],
        a30 = a[12], a31 = a[13], a32 = a[14], a33 = a[15];
 
    // Cache only the current line of the second matrix
    var b0  = b[0], b1 = b[1], b2 = b[2], b3 = b[3];  
    out[0] = b0*a00 + b1*a10 + b2*a20 + b3*a30;
    out[1] = b0*a01 + b1*a11 + b2*a21 + b3*a31;
    out[2] = b0*a02 + b1*a12 + b2*a22 + b3*a32;
    out[3] = b0*a03 + b1*a13 + b2*a23 + b3*a33;
 
    b0 = b[4]; b1 = b[5]; b2 = b[6]; b3 = b[7];
    out[4] = b0*a00 + b1*a10 + b2*a20 + b3*a30;
    out[5] = b0*a01 + b1*a11 + b2*a21 + b3*a31;
    out[6] = b0*a02 + b1*a12 + b2*a22 + b3*a32;
    out[7] = b0*a03 + b1*a13 + b2*a23 + b3*a33;
 
    b0 = b[8]; b1 = b[9]; b2 = b[10]; b3 = b[11];
    out[8] = b0*a00 + b1*a10 + b2*a20 + b3*a30;
    out[9] = b0*a01 + b1*a11 + b2*a21 + b3*a31;
    out[10] = b0*a02 + b1*a12 + b2*a22 + b3*a32;
    out[11] = b0*a03 + b1*a13 + b2*a23 + b3*a33;
 
    b0 = b[12]; b1 = b[13]; b2 = b[14]; b3 = b[15];
    out[12] = b0*a00 + b1*a10 + b2*a20 + b3*a30;
    out[13] = b0*a01 + b1*a11 + b2*a21 + b3*a31;
    out[14] = b0*a02 + b1*a12 + b2*a22 + b3*a32;
    out[15] = b0*a03 + b1*a13 + b2*a23 + b3*a33;
    return out;
};
 
/***/ }),
/* 76 */
/***/ (function(module, exports) {
 
module.exports = perspective;
 
/**
 * Generates a perspective projection matrix with the given bounds
 *
 * @param {mat4} out mat4 frustum matrix will be written into
 * @param {number} fovy Vertical field of view in radians
 * @param {number} aspect Aspect ratio. typically viewport width/height
 * @param {number} near Near bound of the frustum
 * @param {number} far Far bound of the frustum
 * @returns {mat4} out
 */
function perspective(out, fovy, aspect, near, far) {
    var f = 1.0 / Math.tan(fovy / 2),
        nf = 1 / (near - far);
    out[0] = f / aspect;
    out[1] = 0;
    out[2] = 0;
    out[3] = 0;
    out[4] = 0;
    out[5] = f;
    out[6] = 0;
    out[7] = 0;
    out[8] = 0;
    out[9] = 0;
    out[10] = (far + near) * nf;
    out[11] = -1;
    out[12] = 0;
    out[13] = 0;
    out[14] = (2 * far * near) * nf;
    out[15] = 0;
    return out;
};
 
/***/ }),
/* 77 */
/***/ (function(module, exports) {
 
module.exports = scale;
 
/**
 * Scales the mat4 by the dimensions in the given vec3
 *
 * @param {mat4} out the receiving matrix
 * @param {mat4} a the matrix to scale
 * @param {vec3} v the vec3 to scale the matrix by
 * @returns {mat4} out
 **/
function scale(out, a, v) {
    var x = v[0], y = v[1], z = v[2];
 
    out[0] = a[0] * x;
    out[1] = a[1] * x;
    out[2] = a[2] * x;
    out[3] = a[3] * x;
    out[4] = a[4] * y;
    out[5] = a[5] * y;
    out[6] = a[6] * y;
    out[7] = a[7] * y;
    out[8] = a[8] * z;
    out[9] = a[9] * z;
    out[10] = a[10] * z;
    out[11] = a[11] * z;
    out[12] = a[12];
    out[13] = a[13];
    out[14] = a[14];
    out[15] = a[15];
    return out;
};
 
/***/ }),
/* 78 */
/***/ (function(module, exports) {
 
module.exports = translate;
 
/**
 * Translate a mat4 by the given vector
 *
 * @param {mat4} out the receiving matrix
 * @param {mat4} a the matrix to translate
 * @param {vec3} v vector to translate by
 * @returns {mat4} out
 */
function translate(out, a, v) {
    var x = v[0], y = v[1], z = v[2],
        a00, a01, a02, a03,
        a10, a11, a12, a13,
        a20, a21, a22, a23;
 
    if (a === out) {
        out[12] = a[0] * x + a[4] * y + a[8] * z + a[12];
        out[13] = a[1] * x + a[5] * y + a[9] * z + a[13];
        out[14] = a[2] * x + a[6] * y + a[10] * z + a[14];
        out[15] = a[3] * x + a[7] * y + a[11] * z + a[15];
    } else {
        a00 = a[0]; a01 = a[1]; a02 = a[2]; a03 = a[3];
        a10 = a[4]; a11 = a[5]; a12 = a[6]; a13 = a[7];
        a20 = a[8]; a21 = a[9]; a22 = a[10]; a23 = a[11];
 
        out[0] = a00; out[1] = a01; out[2] = a02; out[3] = a03;
        out[4] = a10; out[5] = a11; out[6] = a12; out[7] = a13;
        out[8] = a20; out[9] = a21; out[10] = a22; out[11] = a23;
 
        out[12] = a00 * x + a10 * y + a20 * z + a[12];
        out[13] = a01 * x + a11 * y + a21 * z + a[13];
        out[14] = a02 * x + a12 * y + a22 * z + a[14];
        out[15] = a03 * x + a13 * y + a23 * z + a[15];
    }
 
    return out;
};
 
/***/ }),
/* 79 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__web_mercator_viewport__ = __webpack_require__(81);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return __WEBPACK_IMPORTED_MODULE_0__web_mercator_viewport__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "WebMercatorViewport", function() { return __WEBPACK_IMPORTED_MODULE_0__web_mercator_viewport__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__fit_bounds__ = __webpack_require__(285);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "fitBounds", function() { return __WEBPACK_IMPORTED_MODULE_1__fit_bounds__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__normalize_viewport_props__ = __webpack_require__(686);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "normalizeViewportProps", function() { return __WEBPACK_IMPORTED_MODULE_2__normalize_viewport_props__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__fly_to_viewport__ = __webpack_require__(685);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "flyToViewport", function() { return __WEBPACK_IMPORTED_MODULE_3__fly_to_viewport__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__web_mercator_utils__ = __webpack_require__(80);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "lngLatToWorld", function() { return __WEBPACK_IMPORTED_MODULE_4__web_mercator_utils__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "worldToLngLat", function() { return __WEBPACK_IMPORTED_MODULE_4__web_mercator_utils__["b"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "worldToPixels", function() { return __WEBPACK_IMPORTED_MODULE_4__web_mercator_utils__["c"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "pixelsToWorld", function() { return __WEBPACK_IMPORTED_MODULE_4__web_mercator_utils__["d"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "getMeterZoom", function() { return __WEBPACK_IMPORTED_MODULE_4__web_mercator_utils__["e"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "getDistanceScales", function() { return __WEBPACK_IMPORTED_MODULE_4__web_mercator_utils__["f"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "getWorldPosition", function() { return __WEBPACK_IMPORTED_MODULE_4__web_mercator_utils__["g"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "getViewMatrix", function() { return __WEBPACK_IMPORTED_MODULE_4__web_mercator_utils__["h"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "getProjectionMatrix", function() { return __WEBPACK_IMPORTED_MODULE_4__web_mercator_utils__["i"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "PerspectiveMercatorViewport", function() { return __WEBPACK_IMPORTED_MODULE_0__web_mercator_viewport__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "getUncenteredViewMatrix", function() { return __WEBPACK_IMPORTED_MODULE_4__web_mercator_utils__["h"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "projectFlat", function() { return __WEBPACK_IMPORTED_MODULE_4__web_mercator_utils__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "unprojectFlat", function() { return __WEBPACK_IMPORTED_MODULE_4__web_mercator_utils__["b"]; });
// Classic web-mercator-project
 
 
 
 
 
 
 
 
 
// Deprecated
 
 
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9pbmRleC5qcyJdLCJuYW1lcyI6WyJkZWZhdWx0IiwiV2ViTWVyY2F0b3JWaWV3cG9ydCIsImZpdEJvdW5kcyIsIm5vcm1hbGl6ZVZpZXdwb3J0UHJvcHMiLCJmbHlUb1ZpZXdwb3J0IiwibG5nTGF0VG9Xb3JsZCIsIndvcmxkVG9MbmdMYXQiLCJ3b3JsZFRvUGl4ZWxzIiwicGl4ZWxzVG9Xb3JsZCIsImdldE1ldGVyWm9vbSIsImdldERpc3RhbmNlU2NhbGVzIiwiZ2V0V29ybGRQb3NpdGlvbiIsImdldFZpZXdNYXRyaXgiLCJnZXRQcm9qZWN0aW9uTWF0cml4IiwiUGVyc3BlY3RpdmVNZXJjYXRvclZpZXdwb3J0IiwiZ2V0VW5jZW50ZXJlZFZpZXdNYXRyaXgiLCJwcm9qZWN0RmxhdCIsInVucHJvamVjdEZsYXQiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0EsU0FBUUEsT0FBUixRQUFpQyx5QkFBakM7QUFDQSxTQUFRQSxXQUFXQyxtQkFBbkIsUUFBNkMseUJBQTdDOztBQUVBLFNBQVFELFdBQVdFLFNBQW5CLFFBQW1DLGNBQW5DO0FBQ0EsU0FBUUYsV0FBV0csc0JBQW5CLFFBQWdELDRCQUFoRDtBQUNBLFNBQVFILFdBQVdJLGFBQW5CLFFBQXVDLG1CQUF2Qzs7QUFFQSxTQUNFQyxhQURGLEVBRUVDLGFBRkYsRUFHRUMsYUFIRixFQUlFQyxhQUpGLEVBS0VDLFlBTEYsRUFNRUMsaUJBTkYsRUFPRUMsZ0JBUEYsRUFRRUMsYUFSRixFQVNFQyxtQkFURixRQVVPLHNCQVZQOztBQVlBO0FBQ0EsU0FBUWIsV0FBV2MsMkJBQW5CLFFBQXFELHlCQUFyRDtBQUNBLFNBQ0VGLGlCQUFpQkcsdUJBRG5CLEVBRUVWLGlCQUFpQlcsV0FGbkIsRUFHRVYsaUJBQWlCVyxhQUhuQixRQUlPLHNCQUpQIiwiZmlsZSI6ImluZGV4LmpzIiwic291cmNlc0NvbnRlbnQiOlsiLy8gQ2xhc3NpYyB3ZWItbWVyY2F0b3ItcHJvamVjdFxuZXhwb3J0IHtkZWZhdWx0IGFzIGRlZmF1bHR9IGZyb20gJy4vd2ViLW1lcmNhdG9yLXZpZXdwb3J0JztcbmV4cG9ydCB7ZGVmYXVsdCBhcyBXZWJNZXJjYXRvclZpZXdwb3J0fSBmcm9tICcuL3dlYi1tZXJjYXRvci12aWV3cG9ydCc7XG5cbmV4cG9ydCB7ZGVmYXVsdCBhcyBmaXRCb3VuZHN9IGZyb20gJy4vZml0LWJvdW5kcyc7XG5leHBvcnQge2RlZmF1bHQgYXMgbm9ybWFsaXplVmlld3BvcnRQcm9wc30gZnJvbSAnLi9ub3JtYWxpemUtdmlld3BvcnQtcHJvcHMnO1xuZXhwb3J0IHtkZWZhdWx0IGFzIGZseVRvVmlld3BvcnR9IGZyb20gJy4vZmx5LXRvLXZpZXdwb3J0JztcblxuZXhwb3J0IHtcbiAgbG5nTGF0VG9Xb3JsZCxcbiAgd29ybGRUb0xuZ0xhdCxcbiAgd29ybGRUb1BpeGVscyxcbiAgcGl4ZWxzVG9Xb3JsZCxcbiAgZ2V0TWV0ZXJab29tLFxuICBnZXREaXN0YW5jZVNjYWxlcyxcbiAgZ2V0V29ybGRQb3NpdGlvbixcbiAgZ2V0Vmlld01hdHJpeCxcbiAgZ2V0UHJvamVjdGlvbk1hdHJpeFxufSBmcm9tICcuL3dlYi1tZXJjYXRvci11dGlscyc7XG5cbi8vIERlcHJlY2F0ZWRcbmV4cG9ydCB7ZGVmYXVsdCBhcyBQZXJzcGVjdGl2ZU1lcmNhdG9yVmlld3BvcnR9IGZyb20gJy4vd2ViLW1lcmNhdG9yLXZpZXdwb3J0JztcbmV4cG9ydCB7XG4gIGdldFZpZXdNYXRyaXggYXMgZ2V0VW5jZW50ZXJlZFZpZXdNYXRyaXgsXG4gIGxuZ0xhdFRvV29ybGQgYXMgcHJvamVjdEZsYXQsXG4gIHdvcmxkVG9MbmdMYXQgYXMgdW5wcm9qZWN0RmxhdFxufSBmcm9tICcuL3dlYi1tZXJjYXRvci11dGlscyc7XG4iXX0=
 
/***/ }),
/* 80 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["j"] = zoomToScale;
/* harmony export (immutable) */ __webpack_exports__["k"] = scaleToZoom;
/* harmony export (immutable) */ __webpack_exports__["a"] = lngLatToWorld;
/* harmony export (immutable) */ __webpack_exports__["b"] = worldToLngLat;
/* harmony export (immutable) */ __webpack_exports__["e"] = getMeterZoom;
/* harmony export (immutable) */ __webpack_exports__["f"] = getDistanceScales;
/* harmony export (immutable) */ __webpack_exports__["g"] = getWorldPosition;
/* harmony export (immutable) */ __webpack_exports__["h"] = getViewMatrix;
/* harmony export (immutable) */ __webpack_exports__["i"] = getProjectionMatrix;
/* harmony export (immutable) */ __webpack_exports__["c"] = worldToPixels;
/* harmony export (immutable) */ __webpack_exports__["d"] = pixelsToWorld;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_math_gl__ = __webpack_require__(16);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__math_utils__ = __webpack_require__(118);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_gl_mat4_perspective__ = __webpack_require__(76);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_gl_mat4_perspective___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_gl_mat4_perspective__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_gl_mat4_scale__ = __webpack_require__(77);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_gl_mat4_scale___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_gl_mat4_scale__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_gl_mat4_translate__ = __webpack_require__(78);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_gl_mat4_translate___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_gl_mat4_translate__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_gl_mat4_rotateX__ = __webpack_require__(157);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_gl_mat4_rotateX___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_gl_mat4_rotateX__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_gl_mat4_rotateZ__ = __webpack_require__(158);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_gl_mat4_rotateZ___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_gl_mat4_rotateZ__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_gl_vec2_lerp__ = __webpack_require__(238);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_gl_vec2_lerp___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_gl_vec2_lerp__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_assert__ = __webpack_require__(1);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_assert___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_assert__);
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
 
// TODO - THE UTILITIES IN THIS FILE SHOULD BE IMPORTED FROM WEB-MERCATOR-VIEWPORT MODULE
 
 
 
 
 
 
 
 
 
 
 
 
// CONSTANTS
var PI = Math.PI;
var PI_4 = PI / 4;
var DEGREES_TO_RADIANS = PI / 180;
var RADIANS_TO_DEGREES = 180 / PI;
var TILE_SIZE = 512;
// Average circumference (40075 km equatorial, 40007 km meridional)
var EARTH_CIRCUMFERENCE = 40.03e6;
 
/** Util functions **/
function zoomToScale(zoom) {
  return Math.pow(2, zoom);
}
 
function scaleToZoom(scale) {
  return Math.log2(scale);
}
 
/**
 * Project [lng,lat] on sphere onto [x,y] on 512*512 Mercator Zoom 0 tile.
 * Performs the nonlinear part of the web mercator projection.
 * Remaining projection is done with 4x4 matrices which also handles
 * perspective.
 *
 * @param {Array} lngLat - [lng, lat] coordinates
 *   Specifies a point on the sphere to project onto the map.
 * @return {Array} [x,y] coordinates.
 */
function lngLatToWorld(_ref, scale,isGeographicCoordinateSystem) {
  var _ref2 = _slicedToArray(_ref, 2),
      lng = _ref2[0],
      lat = _ref2[1];
 
  scale *= TILE_SIZE;
  var lambda2 = lng * DEGREES_TO_RADIANS;
  var phi2 = lat * DEGREES_TO_RADIANS;
  var x = scale * (lambda2 + PI) / (2 * PI);
  var y ;
  if(isGeographicCoordinateSystem===true){
    y =  scale * (PI - phi2) / (2 * PI);
  }else{
    y = scale * (PI - Math.log(Math.tan(PI_4 + phi2 * 0.5))) / (2 * PI);
  }
  // y =  scale * (PI - phi2) / (2 * PI);
  //iclient
  return [x, y];
}
 
/**
 * Unproject world point [x,y] on map onto {lat, lon} on sphere
 *
 * @param {object|Vector} xy - object with {x,y} members
 *  representing point on projected map plane
 * @return {GeoCoordinates} - object with {lat,lon} of point on sphere.
 *   Has toArray method if you need a GeoJSON Array.
 *   Per cartographic tradition, lat and lon are specified as degrees.
 */
function worldToLngLat(_ref3, scale,isGeographicCoordinateSystem) {
  var _ref4 = _slicedToArray(_ref3, 2),
      x = _ref4[0],
      y = _ref4[1];
 
  scale *= TILE_SIZE; 
  var lambda2 = x / scale * (2 * PI) - PI;
  var phi2;
  if(isGeographicCoordinateSystem===true){
    phi2=PI- (y*2*PI/scale);
  }else{
    phi2 = 2 * (Math.atan(Math.exp(PI - y / scale * (2 * PI))) - PI_4);//90-y*360/scale;
  }
  
  //var phi2 =(PI/2)- y / scale*(2 * PI);
  //var phi2 =2 * (Math.atan(Math.exp(PI - y / scale * (2 * PI))) - PI_4);
  return [lambda2 * RADIANS_TO_DEGREES, phi2* RADIANS_TO_DEGREES ];
}
 
// Returns the zoom level that gives a 1 meter pixel at a certain latitude
// S=C*cos(y)/2^(z+8)
function getMeterZoom(_ref5) {
  var latitude = _ref5.latitude;
 
  __WEBPACK_IMPORTED_MODULE_8_assert___default()(Number.isFinite(latitude));
  var latCosine = Math.cos(latitude * DEGREES_TO_RADIANS);
  return scaleToZoom(EARTH_CIRCUMFERENCE * latCosine) - 8;
}
 
/**
 * Calculate distance scales in meters around current lat/lon, both for
 * degrees and pixels.
 * In mercator projection mode, the distance scales vary significantly
 * with latitude.
 */
function getDistanceScales(_ref6) {
  var latitude = _ref6.latitude,
      longitude = _ref6.longitude,
      zoom = _ref6.zoom,
      scale = _ref6.scale,
      _ref6$highPrecision = _ref6.highPrecision,
      isGeographicCoordinateSystem = _ref6.isGeographicCoordinateSystem,
      highPrecision = _ref6$highPrecision === undefined ? false : _ref6$highPrecision;
 
  // Calculate scale from zoom if not provided
  scale = scale !== undefined ? scale : zoomToScale(zoom);
 
  __WEBPACK_IMPORTED_MODULE_8_assert___default()(Number.isFinite(latitude) && Number.isFinite(longitude) && Number.isFinite(scale));
 
  var result = {};
  var worldSize = TILE_SIZE * scale;
  var latCosine =Math.cos(latitude * DEGREES_TO_RADIANS);
 
  /**
   * Number of pixels occupied by one degree longitude around current lat/lon:
     pixelsPerDegreeX = d(lngLatToWorld([lng, lat])[0])/d(lng)
       = scale * TILE_SIZE * DEGREES_TO_RADIANS / (2 * PI)
     pixelsPerDegreeY = d(lngLatToWorld([lng, lat])[1])/d(lat)
       = -scale * TILE_SIZE * DEGREES_TO_RADIANS / cos(lat * DEGREES_TO_RADIANS)  / (2 * PI)
   */
  var pixelsPerDegreeX = worldSize / 360;
  var pixelsPerDegreeY = pixelsPerDegreeX / latCosine;
 
  /**
   * Number of pixels occupied by one meter around current lat/lon:
   */
  var altPixelsPerMeter = worldSize / EARTH_CIRCUMFERENCE / latCosine;
 
  result.pixelsPerMeter = [altPixelsPerMeter, altPixelsPerMeter, altPixelsPerMeter];
  result.metersPerPixel = [1 / altPixelsPerMeter, 1 / altPixelsPerMeter, 1 / altPixelsPerMeter];
 
  result.pixelsPerDegree = [pixelsPerDegreeX, pixelsPerDegreeY, altPixelsPerMeter];
  result.degreesPerPixel = [1 / pixelsPerDegreeX, 1 / pixelsPerDegreeY, 1 / altPixelsPerMeter];
 
  /**
   * Taylor series 2nd order for 1/latCosine
     f'(a) * (x - a)
       = d(1/cos(lat * DEGREES_TO_RADIANS))/d(lat) * dLat
       = DEGREES_TO_RADIANS * tan(lat * DEGREES_TO_RADIANS) / cos(lat * DEGREES_TO_RADIANS) * dLat
   */
  if (highPrecision) {
    var latCosine2 = DEGREES_TO_RADIANS * Math.tan(latitude * DEGREES_TO_RADIANS) / latCosine;
    var pixelsPerDegreeY2 = pixelsPerDegreeX * latCosine2 / 2;
    var altPixelsPerDegree2 = worldSize / EARTH_CIRCUMFERENCE * latCosine2;
    var altPixelsPerMeter2 = altPixelsPerDegree2 / pixelsPerDegreeY * altPixelsPerMeter;
 
    result.pixelsPerDegree2 = [0, pixelsPerDegreeY2, altPixelsPerDegree2];
    result.pixelsPerMeter2 = [altPixelsPerMeter2, 0, altPixelsPerMeter2];
  }
  //iclient
  result.isGeographicCoordinateSystem=isGeographicCoordinateSystem;
 
  // Main results, used for converting meters to latlng deltas and scaling offsets
  return result;
}
 
/**
 * Calculates a mercator world position ("pixels" in given zoom level)
 * from a lng/lat and meterOffset
 */
function getWorldPosition(_ref7) {
  var longitude = _ref7.longitude,
      latitude = _ref7.latitude,
      zoom = _ref7.zoom,
      scale = _ref7.scale,
      meterOffset = _ref7.meterOffset,
      _ref7$distanceScales = _ref7.distanceScales,
      distanceScales = _ref7$distanceScales === undefined ? null : _ref7$distanceScales;
 
  // Calculate scale from zoom if not provided
  scale = scale !== undefined ? scale : zoomToScale(zoom);
 
  // Make a centered version of the matrix for projection modes without an offset
  var center2d = lngLatToWorld([longitude, latitude], scale,distanceScales?distanceScales.isGeographicCoordinateSystem:false);
  var center = new __WEBPACK_IMPORTED_MODULE_0_math_gl__["Vector3"](center2d[0], center2d[1], 0);
 
  if (meterOffset) {
    // Calculate distance scales if lng/lat/zoom are provided
    distanceScales = distanceScales || getDistanceScales({ latitude: latitude, longitude: longitude, scale: scale });
 
    var pixelPosition = new __WEBPACK_IMPORTED_MODULE_0_math_gl__["Vector3"](meterOffset)
    // Convert to pixels in current zoom
    .scale(distanceScales.pixelsPerMeter)
    // We want positive Y to represent an offset towards north,
    // but web mercator world coordinates is top-left
    .scale([1, -1, 1]);
    center.add(pixelPosition);
  }
 
  return center;
}
 
// ATTRIBUTION:
// view and projection matrix creation is intentionally kept compatible with
// mapbox-gl's implementation to ensure that seamless interoperation
// with mapbox and react-map-gl. See: https://github.com/mapbox/mapbox-gl-js
 
// Variable fov (in radians)
function getFov(_ref8) {
  var height = _ref8.height,
      altitude = _ref8.altitude;
 
  return 2 * Math.atan(height / 2 / altitude);
}
 
function getClippingPlanes(_ref9) {
  var altitude = _ref9.altitude,
      pitch = _ref9.pitch;
 
  // Find the distance from the center point to the center top
  // in altitude units using law of sines.
  var pitchRadians = pitch * DEGREES_TO_RADIANS;
  var halfFov = Math.atan(0.5 / altitude);
  var topHalfSurfaceDistance = Math.sin(halfFov) * altitude / Math.sin(Math.PI / 2 - pitchRadians - halfFov);
 
  // Calculate z value of the farthest fragment that should be rendered.
  var farZ = Math.cos(Math.PI / 2 - pitchRadians) * topHalfSurfaceDistance + altitude;
 
  return { farZ: farZ, nearZ: 0.1 };
}
 
function getViewMatrix(_ref10) {
  var height = _ref10.height,
      pitch = _ref10.pitch,
      bearing = _ref10.bearing,
      altitude = _ref10.altitude,
      _ref10$center = _ref10.center,
      center = _ref10$center === undefined ? null : _ref10$center,
      _ref10$flipY = _ref10.flipY,
      flipY = _ref10$flipY === undefined ? false : _ref10$flipY;
 
 
  // VIEW MATRIX: PROJECTS MERCATOR WORLD COORDINATES
  // Note that mercator world coordinates typically need to be flipped
  //
  // Note: As usual, matrix operation orders should be read in reverse
  // since vectors will be multiplied from the right during transformation
  var vm = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__math_utils__["a" /* createMat4 */])();
 
  // Move camera to altitude (along the pitch & bearing direction)
  __WEBPACK_IMPORTED_MODULE_4_gl_mat4_translate___default()(vm, vm, [0, 0, -altitude]);
 
  // After the rotateX, z values are in pixel units. Convert them to
  // altitude units. 1 altitude unit = the screen height.
  __WEBPACK_IMPORTED_MODULE_3_gl_mat4_scale___default()(vm, vm, [1, 1, 1 / height]);
 
  // Rotate by bearing, and then by pitch (which tilts the view)
  __WEBPACK_IMPORTED_MODULE_5_gl_mat4_rotateX___default()(vm, vm, -pitch * DEGREES_TO_RADIANS);
  __WEBPACK_IMPORTED_MODULE_6_gl_mat4_rotateZ___default()(vm, vm, bearing * DEGREES_TO_RADIANS);
 
  if (flipY) {
    __WEBPACK_IMPORTED_MODULE_3_gl_mat4_scale___default()(vm, vm, [1, -1, 1]);
  }
 
  if (center) {
    __WEBPACK_IMPORTED_MODULE_4_gl_mat4_translate___default()(vm, vm, new __WEBPACK_IMPORTED_MODULE_0_math_gl__["Vector3"](center).negate());
  }
 
  return vm;
}
 
// PROJECTION MATRIX: PROJECTS FROM CAMERA (VIEW) SPACE TO CLIPSPACE
// This is a "Mapbox" projection matrix - matches mapbox exactly if farZMultiplier === 1
function getProjectionMatrix(_ref11) {
  var width = _ref11.width,
      height = _ref11.height,
      pitch = _ref11.pitch,
      altitude = _ref11.altitude,
      _ref11$farZMultiplier = _ref11.farZMultiplier,
      farZMultiplier = _ref11$farZMultiplier === undefined ? 10 : _ref11$farZMultiplier;
 
  var _getClippingPlanes = getClippingPlanes({ altitude: altitude, pitch: pitch }),
      nearZ = _getClippingPlanes.nearZ,
      farZ = _getClippingPlanes.farZ;
 
  var fov = getFov({ height: height, altitude: altitude });
 
  var projectionMatrix = __WEBPACK_IMPORTED_MODULE_2_gl_mat4_perspective___default()([], fov, // fov in radians
  width / height, // aspect ratio
  nearZ, // near plane
  farZ * farZMultiplier // far plane
  );
 
  return projectionMatrix;
}
 
/**
 * Project flat coordinates to pixels on screen.
 *
 * @param {Array} xyz - flat coordinate on 512*512 Mercator Zoom 0 tile
 * @param {Matrix4} pixelProjectionMatrix - projection matrix
 * @return {Array} [x, y, depth] pixel coordinate on screen.
 */
function worldToPixels(xyz, pixelProjectionMatrix) {
  var _xyz = _slicedToArray(xyz, 3),
      x = _xyz[0],
      y = _xyz[1],
      _xyz$ = _xyz[2],
      z = _xyz$ === undefined ? 0 : _xyz$;
 
  __WEBPACK_IMPORTED_MODULE_8_assert___default()(Number.isFinite(x) && Number.isFinite(y) && Number.isFinite(z));
 
  return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__math_utils__["b" /* transformVector */])(pixelProjectionMatrix, [x, y, z, 1]);
}
 
/**
 * Unproject pixels on screen to flat coordinates.
 *
 * @param {Array} xyz - pixel coordinate on screen.
 * @param {Matrix4} pixelUnprojectionMatrix - unprojection matrix
 * @param {Number} targetZ - if pixel coordinate does not have a 3rd component (depth),
 *    targetZ is used as the elevation plane to unproject onto
 * @return {Array} [x, y, Z] flat coordinates on 512*512 Mercator Zoom 0 tile.
 */
function pixelsToWorld(xyz, pixelUnprojectionMatrix) {
  var targetZ = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
 
  var _xyz2 = _slicedToArray(xyz, 3),
      x = _xyz2[0],
      y = _xyz2[1],
      z = _xyz2[2];
 
  __WEBPACK_IMPORTED_MODULE_8_assert___default()(Number.isFinite(x) && Number.isFinite(y));
 
  if (Number.isFinite(z)) {
    // Has depth component
    var coord = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__math_utils__["b" /* transformVector */])(pixelUnprojectionMatrix, [x, y, z, 1]);
    return coord;
  }
 
  // since we don't know the correct projected z value for the point,
  // unproject two points to get a line and then find the point on that line with z=0
  var coord0 = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__math_utils__["b" /* transformVector */])(pixelUnprojectionMatrix, [x, y, 0, 1]);
  var coord1 = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__math_utils__["b" /* transformVector */])(pixelUnprojectionMatrix, [x, y, 1, 1]);
 
  var z0 = coord0[2];
  var z1 = coord1[2];
 
  var t = z0 === z1 ? 0 : ((targetZ || 0) - z0) / (z1 - z0);
  return __WEBPACK_IMPORTED_MODULE_7_gl_vec2_lerp___default()([], coord0, coord1, t);
}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy93ZWItbWVyY2F0b3ItdXRpbHMuanMiXSwibmFtZXMiOlsiVmVjdG9yMyIsImNyZWF0ZU1hdDQiLCJ0cmFuc2Zvcm1WZWN0b3IiLCJtYXQ0X3BlcnNwZWN0aXZlIiwibWF0NF9zY2FsZSIsIm1hdDRfdHJhbnNsYXRlIiwibWF0NF9yb3RhdGVYIiwibWF0NF9yb3RhdGVaIiwidmVjMl9sZXJwIiwiYXNzZXJ0IiwiUEkiLCJNYXRoIiwiUElfNCIsIkRFR1JFRVNfVE9fUkFESUFOUyIsIlJBRElBTlNfVE9fREVHUkVFUyIsIlRJTEVfU0laRSIsIkVBUlRIX0NJUkNVTUZFUkVOQ0UiLCJ6b29tVG9TY2FsZSIsInpvb20iLCJwb3ciLCJzY2FsZVRvWm9vbSIsInNjYWxlIiwibG9nMiIsImxuZ0xhdFRvV29ybGQiLCJsbmciLCJsYXQiLCJsYW1iZGEyIiwicGhpMiIsIngiLCJ5IiwibG9nIiwidGFuIiwid29ybGRUb0xuZ0xhdCIsImF0YW4iLCJleHAiLCJnZXRNZXRlclpvb20iLCJsYXRpdHVkZSIsIk51bWJlciIsImlzRmluaXRlIiwibGF0Q29zaW5lIiwiY29zIiwiZ2V0RGlzdGFuY2VTY2FsZXMiLCJsb25naXR1ZGUiLCJoaWdoUHJlY2lzaW9uIiwidW5kZWZpbmVkIiwicmVzdWx0Iiwid29ybGRTaXplIiwicGl4ZWxzUGVyRGVncmVlWCIsInBpeGVsc1BlckRlZ3JlZVkiLCJhbHRQaXhlbHNQZXJNZXRlciIsInBpeGVsc1Blck1ldGVyIiwibWV0ZXJzUGVyUGl4ZWwiLCJwaXhlbHNQZXJEZWdyZWUiLCJkZWdyZWVzUGVyUGl4ZWwiLCJsYXRDb3NpbmUyIiwicGl4ZWxzUGVyRGVncmVlWTIiLCJhbHRQaXhlbHNQZXJEZWdyZWUyIiwiYWx0UGl4ZWxzUGVyTWV0ZXIyIiwicGl4ZWxzUGVyRGVncmVlMiIsInBpeGVsc1Blck1ldGVyMiIsImdldFdvcmxkUG9zaXRpb24iLCJtZXRlck9mZnNldCIsImRpc3RhbmNlU2NhbGVzIiwiY2VudGVyMmQiLCJjZW50ZXIiLCJwaXhlbFBvc2l0aW9uIiwiYWRkIiwiZ2V0Rm92IiwiaGVpZ2h0IiwiYWx0aXR1ZGUiLCJnZXRDbGlwcGluZ1BsYW5lcyIsInBpdGNoIiwicGl0Y2hSYWRpYW5zIiwiaGFsZkZvdiIsInRvcEhhbGZTdXJmYWNlRGlzdGFuY2UiLCJzaW4iLCJmYXJaIiwibmVhcloiLCJnZXRWaWV3TWF0cml4IiwiYmVhcmluZyIsImZsaXBZIiwidm0iLCJuZWdhdGUiLCJnZXRQcm9qZWN0aW9uTWF0cml4Iiwid2lkdGgiLCJmYXJaTXVsdGlwbGllciIsImZvdiIsInByb2plY3Rpb25NYXRyaXgiLCJ3b3JsZFRvUGl4ZWxzIiwieHl6IiwicGl4ZWxQcm9qZWN0aW9uTWF0cml4IiwieiIsInBpeGVsc1RvV29ybGQiLCJwaXhlbFVucHJvamVjdGlvbk1hdHJpeCIsInRhcmdldFoiLCJjb29yZCIsImNvb3JkMCIsImNvb3JkMSIsInowIiwiejEiLCJ0Il0sIm1hcHBpbmdzIjoiOztBQUFBOztBQUVBLFNBQVFBLE9BQVIsUUFBc0IsU0FBdEI7QUFDQSxTQUFRQyxVQUFSLEVBQW9CQyxlQUFwQixRQUEwQyxjQUExQzs7QUFFQSxPQUFPQyxnQkFBUCxNQUE2QixxQkFBN0I7QUFDQSxPQUFPQyxVQUFQLE1BQXVCLGVBQXZCO0FBQ0EsT0FBT0MsY0FBUCxNQUEyQixtQkFBM0I7QUFDQSxPQUFPQyxZQUFQLE1BQXlCLGlCQUF6QjtBQUNBLE9BQU9DLFlBQVAsTUFBeUIsaUJBQXpCO0FBQ0EsT0FBT0MsU0FBUCxNQUFzQixjQUF0QjtBQUNBLE9BQU9DLE1BQVAsTUFBbUIsUUFBbkI7O0FBRUE7QUFDQSxJQUFNQyxLQUFLQyxLQUFLRCxFQUFoQjtBQUNBLElBQU1FLE9BQU9GLEtBQUssQ0FBbEI7QUFDQSxJQUFNRyxxQkFBcUJILEtBQUssR0FBaEM7QUFDQSxJQUFNSSxxQkFBcUIsTUFBTUosRUFBakM7QUFDQSxJQUFNSyxZQUFZLEdBQWxCO0FBQ0E7QUFDQSxJQUFNQyxzQkFBc0IsT0FBNUI7O0FBRUE7QUFDQSxPQUFPLFNBQVNDLFdBQVQsQ0FBcUJDLElBQXJCLEVBQTJCO0FBQ2hDLFNBQU9QLEtBQUtRLEdBQUwsQ0FBUyxDQUFULEVBQVlELElBQVosQ0FBUDtBQUNEOztBQUVELE9BQU8sU0FBU0UsV0FBVCxDQUFxQkMsS0FBckIsRUFBNEI7QUFDakMsU0FBT1YsS0FBS1csSUFBTCxDQUFVRCxLQUFWLENBQVA7QUFDRDs7QUFFRDs7Ozs7Ozs7OztBQVVBLE9BQU8sU0FBU0UsYUFBVCxPQUFtQ0YsS0FBbkMsRUFBMEM7QUFBQTtBQUFBLE1BQWxCRyxHQUFrQjtBQUFBLE1BQWJDLEdBQWE7O0FBQy9DSixXQUFTTixTQUFUO0FBQ0EsTUFBTVcsVUFBVUYsTUFBTVgsa0JBQXRCO0FBQ0EsTUFBTWMsT0FBT0YsTUFBTVosa0JBQW5CO0FBQ0EsTUFBTWUsSUFBSVAsU0FBU0ssVUFBVWhCLEVBQW5CLEtBQTBCLElBQUlBLEVBQTlCLENBQVY7QUFDQSxNQUFNbUIsSUFBSVIsU0FBU1gsS0FBS0MsS0FBS21CLEdBQUwsQ0FBU25CLEtBQUtvQixHQUFMLENBQVNuQixPQUFPZSxPQUFPLEdBQXZCLENBQVQsQ0FBZCxLQUF3RCxJQUFJakIsRUFBNUQsQ0FBVjtBQUNBLFNBQU8sQ0FBQ2tCLENBQUQsRUFBSUMsQ0FBSixDQUFQO0FBQ0Q7O0FBRUQ7Ozs7Ozs7OztBQVNBLE9BQU8sU0FBU0csYUFBVCxRQUErQlgsS0FBL0IsRUFBc0M7QUFBQTtBQUFBLE1BQWRPLENBQWM7QUFBQSxNQUFYQyxDQUFXOztBQUMzQ1IsV0FBU04sU0FBVDtBQUNBLE1BQU1XLFVBQVdFLElBQUlQLEtBQUwsSUFBZSxJQUFJWCxFQUFuQixJQUF5QkEsRUFBekM7QUFDQSxNQUFNaUIsT0FBTyxLQUFLaEIsS0FBS3NCLElBQUwsQ0FBVXRCLEtBQUt1QixHQUFMLENBQVN4QixLQUFNbUIsSUFBSVIsS0FBTCxJQUFlLElBQUlYLEVBQW5CLENBQWQsQ0FBVixJQUFtREUsSUFBeEQsQ0FBYjtBQUNBLFNBQU8sQ0FBQ2MsVUFBVVosa0JBQVgsRUFBK0JhLE9BQU9iLGtCQUF0QyxDQUFQO0FBQ0Q7O0FBRUQ7QUFDQTtBQUNBLE9BQU8sU0FBU3FCLFlBQVQsUUFBa0M7QUFBQSxNQUFYQyxRQUFXLFNBQVhBLFFBQVc7O0FBQ3ZDM0IsU0FBTzRCLE9BQU9DLFFBQVAsQ0FBZ0JGLFFBQWhCLENBQVA7QUFDQSxNQUFNRyxZQUFZNUIsS0FBSzZCLEdBQUwsQ0FBU0osV0FBV3ZCLGtCQUFwQixDQUFsQjtBQUNBLFNBQU9PLFlBQVlKLHNCQUFzQnVCLFNBQWxDLElBQStDLENBQXREO0FBQ0Q7O0FBRUQ7Ozs7OztBQU1BLE9BQU8sU0FBU0UsaUJBQVQsUUFBc0Y7QUFBQSxNQUExREwsUUFBMEQsU0FBMURBLFFBQTBEO0FBQUEsTUFBaERNLFNBQWdELFNBQWhEQSxTQUFnRDtBQUFBLE1BQXJDeEIsSUFBcUMsU0FBckNBLElBQXFDO0FBQUEsTUFBL0JHLEtBQStCLFNBQS9CQSxLQUErQjtBQUFBLGtDQUF4QnNCLGFBQXdCO0FBQUEsTUFBeEJBLGFBQXdCLHVDQUFSLEtBQVE7O0FBQzNGO0FBQ0F0QixVQUFRQSxVQUFVdUIsU0FBVixHQUFzQnZCLEtBQXRCLEdBQThCSixZQUFZQyxJQUFaLENBQXRDOztBQUVBVCxTQUFPNEIsT0FBT0MsUUFBUCxDQUFnQkYsUUFBaEIsS0FBNkJDLE9BQU9DLFFBQVAsQ0FBZ0JJLFNBQWhCLENBQTdCLElBQTJETCxPQUFPQyxRQUFQLENBQWdCakIsS0FBaEIsQ0FBbEU7O0FBRUEsTUFBTXdCLFNBQVMsRUFBZjtBQUNBLE1BQU1DLFlBQVkvQixZQUFZTSxLQUE5QjtBQUNBLE1BQU1rQixZQUFZNUIsS0FBSzZCLEdBQUwsQ0FBU0osV0FBV3ZCLGtCQUFwQixDQUFsQjs7QUFFQTs7Ozs7OztBQU9BLE1BQU1rQyxtQkFBbUJELFlBQVksR0FBckM7QUFDQSxNQUFNRSxtQkFBbUJELG1CQUFtQlIsU0FBNUM7O0FBRUE7OztBQUdBLE1BQU1VLG9CQUFvQkgsWUFBWTlCLG1CQUFaLEdBQWtDdUIsU0FBNUQ7O0FBRUFNLFNBQU9LLGNBQVAsR0FBd0IsQ0FBQ0QsaUJBQUQsRUFBb0JBLGlCQUFwQixFQUF1Q0EsaUJBQXZDLENBQXhCO0FBQ0FKLFNBQU9NLGNBQVAsR0FBd0IsQ0FBQyxJQUFJRixpQkFBTCxFQUF3QixJQUFJQSxpQkFBNUIsRUFBK0MsSUFBSUEsaUJBQW5ELENBQXhCOztBQUVBSixTQUFPTyxlQUFQLEdBQXlCLENBQUNMLGdCQUFELEVBQW1CQyxnQkFBbkIsRUFBcUNDLGlCQUFyQyxDQUF6QjtBQUNBSixTQUFPUSxlQUFQLEdBQXlCLENBQUMsSUFBSU4sZ0JBQUwsRUFBdUIsSUFBSUMsZ0JBQTNCLEVBQTZDLElBQUlDLGlCQUFqRCxDQUF6Qjs7QUFFQTs7Ozs7O0FBTUEsTUFBSU4sYUFBSixFQUFtQjtBQUNqQixRQUFNVyxhQUFhekMscUJBQXFCRixLQUFLb0IsR0FBTCxDQUFTSyxXQUFXdkIsa0JBQXBCLENBQXJCLEdBQStEMEIsU0FBbEY7QUFDQSxRQUFNZ0Isb0JBQW9CUixtQkFBbUJPLFVBQW5CLEdBQWdDLENBQTFEO0FBQ0EsUUFBTUUsc0JBQXNCVixZQUFZOUIsbUJBQVosR0FBa0NzQyxVQUE5RDtBQUNBLFFBQU1HLHFCQUFxQkQsc0JBQXNCUixnQkFBdEIsR0FBeUNDLGlCQUFwRTs7QUFFQUosV0FBT2EsZ0JBQVAsR0FBMEIsQ0FBQyxDQUFELEVBQUlILGlCQUFKLEVBQXVCQyxtQkFBdkIsQ0FBMUI7QUFDQVgsV0FBT2MsZUFBUCxHQUF5QixDQUFDRixrQkFBRCxFQUFxQixDQUFyQixFQUF3QkEsa0JBQXhCLENBQXpCO0FBQ0Q7O0FBRUQ7QUFDQSxTQUFPWixNQUFQO0FBQ0Q7O0FBRUQ7Ozs7QUFJQSxPQUFPLFNBQVNlLGdCQUFULFFBT0o7QUFBQSxNQU5EbEIsU0FNQyxTQU5EQSxTQU1DO0FBQUEsTUFMRE4sUUFLQyxTQUxEQSxRQUtDO0FBQUEsTUFKRGxCLElBSUMsU0FKREEsSUFJQztBQUFBLE1BSERHLEtBR0MsU0FIREEsS0FHQztBQUFBLE1BRkR3QyxXQUVDLFNBRkRBLFdBRUM7QUFBQSxtQ0FEREMsY0FDQztBQUFBLE1BRERBLGNBQ0Msd0NBRGdCLElBQ2hCOztBQUNEO0FBQ0F6QyxVQUFRQSxVQUFVdUIsU0FBVixHQUFzQnZCLEtBQXRCLEdBQThCSixZQUFZQyxJQUFaLENBQXRDOztBQUVBO0FBQ0EsTUFBTTZDLFdBQVd4QyxjQUFjLENBQUNtQixTQUFELEVBQVlOLFFBQVosQ0FBZCxFQUFxQ2YsS0FBckMsQ0FBakI7QUFDQSxNQUFNMkMsU0FBUyxJQUFJaEUsT0FBSixDQUFZK0QsU0FBUyxDQUFULENBQVosRUFBeUJBLFNBQVMsQ0FBVCxDQUF6QixFQUFzQyxDQUF0QyxDQUFmOztBQUVBLE1BQUlGLFdBQUosRUFBaUI7QUFDZjtBQUNBQyxxQkFBaUJBLGtCQUFrQnJCLGtCQUFrQixFQUFDTCxrQkFBRCxFQUFXTSxvQkFBWCxFQUFzQnJCLFlBQXRCLEVBQWxCLENBQW5DOztBQUVBLFFBQU00QyxnQkFBZ0IsSUFBSWpFLE9BQUosQ0FBWTZELFdBQVo7QUFDcEI7QUFEb0IsS0FFbkJ4QyxLQUZtQixDQUVieUMsZUFBZVosY0FGRjtBQUdwQjtBQUNBO0FBSm9CLEtBS25CN0IsS0FMbUIsQ0FLYixDQUFDLENBQUQsRUFBSSxDQUFDLENBQUwsRUFBUSxDQUFSLENBTGEsQ0FBdEI7QUFNQTJDLFdBQU9FLEdBQVAsQ0FBV0QsYUFBWDtBQUNEOztBQUVELFNBQU9ELE1BQVA7QUFDRDs7QUFFRDtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBLFNBQVNHLE1BQVQsUUFBb0M7QUFBQSxNQUFuQkMsTUFBbUIsU0FBbkJBLE1BQW1CO0FBQUEsTUFBWEMsUUFBVyxTQUFYQSxRQUFXOztBQUNsQyxTQUFPLElBQUkxRCxLQUFLc0IsSUFBTCxDQUFXbUMsU0FBUyxDQUFWLEdBQWVDLFFBQXpCLENBQVg7QUFDRDs7QUFFRCxTQUFTQyxpQkFBVCxRQUE4QztBQUFBLE1BQWxCRCxRQUFrQixTQUFsQkEsUUFBa0I7QUFBQSxNQUFSRSxLQUFRLFNBQVJBLEtBQVE7O0FBQzVDO0FBQ0E7QUFDQSxNQUFNQyxlQUFlRCxRQUFRMUQsa0JBQTdCO0FBQ0EsTUFBTTRELFVBQVU5RCxLQUFLc0IsSUFBTCxDQUFVLE1BQU1vQyxRQUFoQixDQUFoQjtBQUNBLE1BQU1LLHlCQUNKL0QsS0FBS2dFLEdBQUwsQ0FBU0YsT0FBVCxJQUFvQkosUUFBcEIsR0FBK0IxRCxLQUFLZ0UsR0FBTCxDQUFTaEUsS0FBS0QsRUFBTCxHQUFVLENBQVYsR0FBYzhELFlBQWQsR0FBNkJDLE9BQXRDLENBRGpDOztBQUdBO0FBQ0EsTUFBTUcsT0FBT2pFLEtBQUs2QixHQUFMLENBQVM3QixLQUFLRCxFQUFMLEdBQVUsQ0FBVixHQUFjOEQsWUFBdkIsSUFBdUNFLHNCQUF2QyxHQUFnRUwsUUFBN0U7O0FBRUEsU0FBTyxFQUFDTyxVQUFELEVBQU9DLE9BQU8sR0FBZCxFQUFQO0FBQ0Q7O0FBRUQsT0FBTyxTQUFTQyxhQUFULFNBVUo7QUFBQSxNQVJEVixNQVFDLFVBUkRBLE1BUUM7QUFBQSxNQVBERyxLQU9DLFVBUERBLEtBT0M7QUFBQSxNQU5EUSxPQU1DLFVBTkRBLE9BTUM7QUFBQSxNQUxEVixRQUtDLFVBTERBLFFBS0M7QUFBQSw2QkFIREwsTUFHQztBQUFBLE1BSERBLE1BR0MsaUNBSFEsSUFHUjtBQUFBLDRCQUREZ0IsS0FDQztBQUFBLE1BRERBLEtBQ0MsZ0NBRE8sS0FDUDs7O0FBRUQ7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLE1BQU1DLEtBQUtoRixZQUFYOztBQUVBO0FBQ0FJLGlCQUFlNEUsRUFBZixFQUFtQkEsRUFBbkIsRUFBdUIsQ0FBQyxDQUFELEVBQUksQ0FBSixFQUFPLENBQUNaLFFBQVIsQ0FBdkI7O0FBRUE7QUFDQTtBQUNBakUsYUFBVzZFLEVBQVgsRUFBZUEsRUFBZixFQUFtQixDQUFDLENBQUQsRUFBSSxDQUFKLEVBQU8sSUFBSWIsTUFBWCxDQUFuQjs7QUFFQTtBQUNBOUQsZUFBYTJFLEVBQWIsRUFBaUJBLEVBQWpCLEVBQXFCLENBQUNWLEtBQUQsR0FBUzFELGtCQUE5QjtBQUNBTixlQUFhMEUsRUFBYixFQUFpQkEsRUFBakIsRUFBcUJGLFVBQVVsRSxrQkFBL0I7O0FBRUEsTUFBSW1FLEtBQUosRUFBVztBQUNUNUUsZUFBVzZFLEVBQVgsRUFBZUEsRUFBZixFQUFtQixDQUFDLENBQUQsRUFBSSxDQUFDLENBQUwsRUFBUSxDQUFSLENBQW5CO0FBQ0Q7O0FBRUQsTUFBSWpCLE1BQUosRUFBWTtBQUNWM0QsbUJBQWU0RSxFQUFmLEVBQW1CQSxFQUFuQixFQUF1QixJQUFJakYsT0FBSixDQUFZZ0UsTUFBWixFQUFvQmtCLE1BQXBCLEVBQXZCO0FBQ0Q7O0FBRUQsU0FBT0QsRUFBUDtBQUNEOztBQUVEO0FBQ0E7QUFDQSxPQUFPLFNBQVNFLG1CQUFULFNBTUo7QUFBQSxNQUxEQyxLQUtDLFVBTERBLEtBS0M7QUFBQSxNQUpEaEIsTUFJQyxVQUpEQSxNQUlDO0FBQUEsTUFIREcsS0FHQyxVQUhEQSxLQUdDO0FBQUEsTUFGREYsUUFFQyxVQUZEQSxRQUVDO0FBQUEscUNBRERnQixjQUNDO0FBQUEsTUFEREEsY0FDQyx5Q0FEZ0IsRUFDaEI7O0FBQUEsMkJBQ3FCZixrQkFBa0IsRUFBQ0Qsa0JBQUQsRUFBV0UsWUFBWCxFQUFsQixDQURyQjtBQUFBLE1BQ01NLEtBRE4sc0JBQ01BLEtBRE47QUFBQSxNQUNhRCxJQURiLHNCQUNhQSxJQURiOztBQUVELE1BQU1VLE1BQU1uQixPQUFPLEVBQUNDLGNBQUQsRUFBU0Msa0JBQVQsRUFBUCxDQUFaOztBQUVBLE1BQU1rQixtQkFBbUJwRixpQkFDdkIsRUFEdUIsRUFFdkJtRixHQUZ1QixFQUVMO0FBQ2xCRixVQUFRaEIsTUFIZSxFQUdMO0FBQ2xCUyxPQUp1QixFQUlMO0FBQ2xCRCxTQUFPUyxjQUxnQixDQUtEO0FBTEMsR0FBekI7O0FBUUEsU0FBT0UsZ0JBQVA7QUFDRDs7QUFFRDs7Ozs7OztBQU9BLE9BQU8sU0FBU0MsYUFBVCxDQUF1QkMsR0FBdkIsRUFBNEJDLHFCQUE1QixFQUFtRDtBQUFBLDRCQUNsQ0QsR0FEa0M7QUFBQSxNQUNqRDdELENBRGlEO0FBQUEsTUFDOUNDLENBRDhDO0FBQUE7QUFBQSxNQUMzQzhELENBRDJDLHlCQUN2QyxDQUR1Qzs7QUFFeERsRixTQUFPNEIsT0FBT0MsUUFBUCxDQUFnQlYsQ0FBaEIsS0FBc0JTLE9BQU9DLFFBQVAsQ0FBZ0JULENBQWhCLENBQXRCLElBQTRDUSxPQUFPQyxRQUFQLENBQWdCcUQsQ0FBaEIsQ0FBbkQ7O0FBRUEsU0FBT3pGLGdCQUFnQndGLHFCQUFoQixFQUF1QyxDQUFDOUQsQ0FBRCxFQUFJQyxDQUFKLEVBQU84RCxDQUFQLEVBQVUsQ0FBVixDQUF2QyxDQUFQO0FBQ0Q7O0FBRUQ7Ozs7Ozs7OztBQVNBLE9BQU8sU0FBU0MsYUFBVCxDQUF1QkgsR0FBdkIsRUFBNEJJLHVCQUE1QixFQUFrRTtBQUFBLE1BQWJDLE9BQWEsdUVBQUgsQ0FBRzs7QUFBQSw2QkFDckRMLEdBRHFEO0FBQUEsTUFDaEU3RCxDQURnRTtBQUFBLE1BQzdEQyxDQUQ2RDtBQUFBLE1BQzFEOEQsQ0FEMEQ7O0FBRXZFbEYsU0FBTzRCLE9BQU9DLFFBQVAsQ0FBZ0JWLENBQWhCLEtBQXNCUyxPQUFPQyxRQUFQLENBQWdCVCxDQUFoQixDQUE3Qjs7QUFFQSxNQUFJUSxPQUFPQyxRQUFQLENBQWdCcUQsQ0FBaEIsQ0FBSixFQUF3QjtBQUN0QjtBQUNBLFFBQU1JLFFBQVE3RixnQkFBZ0IyRix1QkFBaEIsRUFBeUMsQ0FBQ2pFLENBQUQsRUFBSUMsQ0FBSixFQUFPOEQsQ0FBUCxFQUFVLENBQVYsQ0FBekMsQ0FBZDtBQUNBLFdBQU9JLEtBQVA7QUFDRDs7QUFFRDtBQUNBO0FBQ0EsTUFBTUMsU0FBUzlGLGdCQUFnQjJGLHVCQUFoQixFQUF5QyxDQUFDakUsQ0FBRCxFQUFJQyxDQUFKLEVBQU8sQ0FBUCxFQUFVLENBQVYsQ0FBekMsQ0FBZjtBQUNBLE1BQU1vRSxTQUFTL0YsZ0JBQWdCMkYsdUJBQWhCLEVBQXlDLENBQUNqRSxDQUFELEVBQUlDLENBQUosRUFBTyxDQUFQLEVBQVUsQ0FBVixDQUF6QyxDQUFmOztBQUVBLE1BQU1xRSxLQUFLRixPQUFPLENBQVAsQ0FBWDtBQUNBLE1BQU1HLEtBQUtGLE9BQU8sQ0FBUCxDQUFYOztBQUVBLE1BQU1HLElBQUlGLE9BQU9DLEVBQVAsR0FBWSxDQUFaLEdBQWdCLENBQUMsQ0FBQ0wsV0FBVyxDQUFaLElBQWlCSSxFQUFsQixLQUF5QkMsS0FBS0QsRUFBOUIsQ0FBMUI7QUFDQSxTQUFPMUYsVUFBVSxFQUFWLEVBQWN3RixNQUFkLEVBQXNCQyxNQUF0QixFQUE4QkcsQ0FBOUIsQ0FBUDtBQUNEIiwiZmlsZSI6IndlYi1tZXJjYXRvci11dGlscy5qcyIsInNvdXJjZXNDb250ZW50IjpbIi8vIFRPRE8gLSBUSEUgVVRJTElUSUVTIElOIFRISVMgRklMRSBTSE9VTEQgQkUgSU1QT1JURUQgRlJPTSBXRUItTUVSQ0FUT1ItVklFV1BPUlQgTU9EVUxFXG5cbmltcG9ydCB7VmVjdG9yM30gZnJvbSAnbWF0aC5nbCc7XG5pbXBvcnQge2NyZWF0ZU1hdDQsIHRyYW5zZm9ybVZlY3Rvcn0gZnJvbSAnLi9tYXRoLXV0aWxzJztcblxuaW1wb3J0IG1hdDRfcGVyc3BlY3RpdmUgZnJvbSAnZ2wtbWF0NC9wZXJzcGVjdGl2ZSc7XG5pbXBvcnQgbWF0NF9zY2FsZSBmcm9tICdnbC1tYXQ0L3NjYWxlJztcbmltcG9ydCBtYXQ0X3RyYW5zbGF0ZSBmcm9tICdnbC1tYXQ0L3RyYW5zbGF0ZSc7XG5pbXBvcnQgbWF0NF9yb3RhdGVYIGZyb20gJ2dsLW1hdDQvcm90YXRlWCc7XG5pbXBvcnQgbWF0NF9yb3RhdGVaIGZyb20gJ2dsLW1hdDQvcm90YXRlWic7XG5pbXBvcnQgdmVjMl9sZXJwIGZyb20gJ2dsLXZlYzIvbGVycCc7XG5pbXBvcnQgYXNzZXJ0IGZyb20gJ2Fzc2VydCc7XG5cbi8vIENPTlNUQU5UU1xuY29uc3QgUEkgPSBNYXRoLlBJO1xuY29uc3QgUElfNCA9IFBJIC8gNDtcbmNvbnN0IERFR1JFRVNfVE9fUkFESUFOUyA9IFBJIC8gMTgwO1xuY29uc3QgUkFESUFOU19UT19ERUdSRUVTID0gMTgwIC8gUEk7XG5jb25zdCBUSUxFX1NJWkUgPSA1MTI7XG4vLyBBdmVyYWdlIGNpcmN1bWZlcmVuY2UgKDQwMDc1IGttIGVxdWF0b3JpYWwsIDQwMDA3IGttIG1lcmlkaW9uYWwpXG5jb25zdCBFQVJUSF9DSVJDVU1GRVJFTkNFID0gNDAuMDNlNjtcblxuLyoqIFV0aWwgZnVuY3Rpb25zICoqL1xuZXhwb3J0IGZ1bmN0aW9uIHpvb21Ub1NjYWxlKHpvb20pIHtcbiAgcmV0dXJuIE1hdGgucG93KDIsIHpvb20pO1xufVxuXG5leHBvcnQgZnVuY3Rpb24gc2NhbGVUb1pvb20oc2NhbGUpIHtcbiAgcmV0dXJuIE1hdGgubG9nMihzY2FsZSk7XG59XG5cbi8qKlxuICogUHJvamVjdCBbbG5nLGxhdF0gb24gc3BoZXJlIG9udG8gW3gseV0gb24gNTEyKjUxMiBNZXJjYXRvciBab29tIDAgdGlsZS5cbiAqIFBlcmZvcm1zIHRoZSBub25saW5lYXIgcGFydCBvZiB0aGUgd2ViIG1lcmNhdG9yIHByb2plY3Rpb24uXG4gKiBSZW1haW5pbmcgcHJvamVjdGlvbiBpcyBkb25lIHdpdGggNHg0IG1hdHJpY2VzIHdoaWNoIGFsc28gaGFuZGxlc1xuICogcGVyc3BlY3RpdmUuXG4gKlxuICogQHBhcmFtIHtBcnJheX0gbG5nTGF0IC0gW2xuZywgbGF0XSBjb29yZGluYXRlc1xuICogICBTcGVjaWZpZXMgYSBwb2ludCBvbiB0aGUgc3BoZXJlIHRvIHByb2plY3Qgb250byB0aGUgbWFwLlxuICogQHJldHVybiB7QXJyYXl9IFt4LHldIGNvb3JkaW5hdGVzLlxuICovXG5leHBvcnQgZnVuY3Rpb24gbG5nTGF0VG9Xb3JsZChbbG5nLCBsYXRdLCBzY2FsZSkge1xuICBzY2FsZSAqPSBUSUxFX1NJWkU7XG4gIGNvbnN0IGxhbWJkYTIgPSBsbmcgKiBERUdSRUVTX1RPX1JBRElBTlM7XG4gIGNvbnN0IHBoaTIgPSBsYXQgKiBERUdSRUVTX1RPX1JBRElBTlM7XG4gIGNvbnN0IHggPSBzY2FsZSAqIChsYW1iZGEyICsgUEkpIC8gKDIgKiBQSSk7XG4gIGNvbnN0IHkgPSBzY2FsZSAqIChQSSAtIE1hdGgubG9nKE1hdGgudGFuKFBJXzQgKyBwaGkyICogMC41KSkpIC8gKDIgKiBQSSk7XG4gIHJldHVybiBbeCwgeV07XG59XG5cbi8qKlxuICogVW5wcm9qZWN0IHdvcmxkIHBvaW50IFt4LHldIG9uIG1hcCBvbnRvIHtsYXQsIGxvbn0gb24gc3BoZXJlXG4gKlxuICogQHBhcmFtIHtvYmplY3R8VmVjdG9yfSB4eSAtIG9iamVjdCB3aXRoIHt4LHl9IG1lbWJlcnNcbiAqICByZXByZXNlbnRpbmcgcG9pbnQgb24gcHJvamVjdGVkIG1hcCBwbGFuZVxuICogQHJldHVybiB7R2VvQ29vcmRpbmF0ZXN9IC0gb2JqZWN0IHdpdGgge2xhdCxsb259IG9mIHBvaW50IG9uIHNwaGVyZS5cbiAqICAgSGFzIHRvQXJyYXkgbWV0aG9kIGlmIHlvdSBuZWVkIGEgR2VvSlNPTiBBcnJheS5cbiAqICAgUGVyIGNhcnRvZ3JhcGhpYyB0cmFkaXRpb24sIGxhdCBhbmQgbG9uIGFyZSBzcGVjaWZpZWQgYXMgZGVncmVlcy5cbiAqL1xuZXhwb3J0IGZ1bmN0aW9uIHdvcmxkVG9MbmdMYXQoW3gsIHldLCBzY2FsZSkge1xuICBzY2FsZSAqPSBUSUxFX1NJWkU7XG4gIGNvbnN0IGxhbWJkYTIgPSAoeCAvIHNjYWxlKSAqICgyICogUEkpIC0gUEk7XG4gIGNvbnN0IHBoaTIgPSAyICogKE1hdGguYXRhbihNYXRoLmV4cChQSSAtICh5IC8gc2NhbGUpICogKDIgKiBQSSkpKSAtIFBJXzQpO1xuICByZXR1cm4gW2xhbWJkYTIgKiBSQURJQU5TX1RPX0RFR1JFRVMsIHBoaTIgKiBSQURJQU5TX1RPX0RFR1JFRVNdO1xufVxuXG4vLyBSZXR1cm5zIHRoZSB6b29tIGxldmVsIHRoYXQgZ2l2ZXMgYSAxIG1ldGVyIHBpeGVsIGF0IGEgY2VydGFpbiBsYXRpdHVkZVxuLy8gUz1DKmNvcyh5KS8yXih6KzgpXG5leHBvcnQgZnVuY3Rpb24gZ2V0TWV0ZXJab29tKHtsYXRpdHVkZX0pIHtcbiAgYXNzZXJ0KE51bWJlci5pc0Zpbml0ZShsYXRpdHVkZSkpO1xuICBjb25zdCBsYXRDb3NpbmUgPSBNYXRoLmNvcyhsYXRpdHVkZSAqIERFR1JFRVNfVE9fUkFESUFOUyk7XG4gIHJldHVybiBzY2FsZVRvWm9vbShFQVJUSF9DSVJDVU1GRVJFTkNFICogbGF0Q29zaW5lKSAtIDg7XG59XG5cbi8qKlxuICogQ2FsY3VsYXRlIGRpc3RhbmNlIHNjYWxlcyBpbiBtZXRlcnMgYXJvdW5kIGN1cnJlbnQgbGF0L2xvbiwgYm90aCBmb3JcbiAqIGRlZ3JlZXMgYW5kIHBpeGVscy5cbiAqIEluIG1lcmNhdG9yIHByb2plY3Rpb24gbW9kZSwgdGhlIGRpc3RhbmNlIHNjYWxlcyB2YXJ5IHNpZ25pZmljYW50bHlcbiAqIHdpdGggbGF0aXR1ZGUuXG4gKi9cbmV4cG9ydCBmdW5jdGlvbiBnZXREaXN0YW5jZVNjYWxlcyh7bGF0aXR1ZGUsIGxvbmdpdHVkZSwgem9vbSwgc2NhbGUsIGhpZ2hQcmVjaXNpb24gPSBmYWxzZX0pIHtcbiAgLy8gQ2FsY3VsYXRlIHNjYWxlIGZyb20gem9vbSBpZiBub3QgcHJvdmlkZWRcbiAgc2NhbGUgPSBzY2FsZSAhPT0gdW5kZWZpbmVkID8gc2NhbGUgOiB6b29tVG9TY2FsZSh6b29tKTtcblxuICBhc3NlcnQoTnVtYmVyLmlzRmluaXRlKGxhdGl0dWRlKSAmJiBOdW1iZXIuaXNGaW5pdGUobG9uZ2l0dWRlKSAmJiBOdW1iZXIuaXNGaW5pdGUoc2NhbGUpKTtcblxuICBjb25zdCByZXN1bHQgPSB7fTtcbiAgY29uc3Qgd29ybGRTaXplID0gVElMRV9TSVpFICogc2NhbGU7XG4gIGNvbnN0IGxhdENvc2luZSA9IE1hdGguY29zKGxhdGl0dWRlICogREVHUkVFU19UT19SQURJQU5TKTtcblxuICAvKipcbiAgICogTnVtYmVyIG9mIHBpeGVscyBvY2N1cGllZCBieSBvbmUgZGVncmVlIGxvbmdpdHVkZSBhcm91bmQgY3VycmVudCBsYXQvbG9uOlxuICAgICBwaXhlbHNQZXJEZWdyZWVYID0gZChsbmdMYXRUb1dvcmxkKFtsbmcsIGxhdF0pWzBdKS9kKGxuZylcbiAgICAgICA9IHNjYWxlICogVElMRV9TSVpFICogREVHUkVFU19UT19SQURJQU5TIC8gKDIgKiBQSSlcbiAgICAgcGl4ZWxzUGVyRGVncmVlWSA9IGQobG5nTGF0VG9Xb3JsZChbbG5nLCBsYXRdKVsxXSkvZChsYXQpXG4gICAgICAgPSAtc2NhbGUgKiBUSUxFX1NJWkUgKiBERUdSRUVTX1RPX1JBRElBTlMgLyBjb3MobGF0ICogREVHUkVFU19UT19SQURJQU5TKSAgLyAoMiAqIFBJKVxuICAgKi9cbiAgY29uc3QgcGl4ZWxzUGVyRGVncmVlWCA9IHdvcmxkU2l6ZSAvIDM2MDtcbiAgY29uc3QgcGl4ZWxzUGVyRGVncmVlWSA9IHBpeGVsc1BlckRlZ3JlZVggLyBsYXRDb3NpbmU7XG5cbiAgLyoqXG4gICAqIE51bWJlciBvZiBwaXhlbHMgb2NjdXBpZWQgYnkgb25lIG1ldGVyIGFyb3VuZCBjdXJyZW50IGxhdC9sb246XG4gICAqL1xuICBjb25zdCBhbHRQaXhlbHNQZXJNZXRlciA9IHdvcmxkU2l6ZSAvIEVBUlRIX0NJUkNVTUZFUkVOQ0UgLyBsYXRDb3NpbmU7XG5cbiAgcmVzdWx0LnBpeGVsc1Blck1ldGVyID0gW2FsdFBpeGVsc1Blck1ldGVyLCBhbHRQaXhlbHNQZXJNZXRlciwgYWx0UGl4ZWxzUGVyTWV0ZXJdO1xuICByZXN1bHQubWV0ZXJzUGVyUGl4ZWwgPSBbMSAvIGFsdFBpeGVsc1Blck1ldGVyLCAxIC8gYWx0UGl4ZWxzUGVyTWV0ZXIsIDEgLyBhbHRQaXhlbHNQZXJNZXRlcl07XG5cbiAgcmVzdWx0LnBpeGVsc1BlckRlZ3JlZSA9IFtwaXhlbHNQZXJEZWdyZWVYLCBwaXhlbHNQZXJEZWdyZWVZLCBhbHRQaXhlbHNQZXJNZXRlcl07XG4gIHJlc3VsdC5kZWdyZWVzUGVyUGl4ZWwgPSBbMSAvIHBpeGVsc1BlckRlZ3JlZVgsIDEgLyBwaXhlbHNQZXJEZWdyZWVZLCAxIC8gYWx0UGl4ZWxzUGVyTWV0ZXJdO1xuXG4gIC8qKlxuICAgKiBUYXlsb3Igc2VyaWVzIDJuZCBvcmRlciBmb3IgMS9sYXRDb3NpbmVcbiAgICAgZicoYSkgKiAoeCAtIGEpXG4gICAgICAgPSBkKDEvY29zKGxhdCAqIERFR1JFRVNfVE9fUkFESUFOUykpL2QobGF0KSAqIGRMYXRcbiAgICAgICA9IERFR1JFRVNfVE9fUkFESUFOUyAqIHRhbihsYXQgKiBERUdSRUVTX1RPX1JBRElBTlMpIC8gY29zKGxhdCAqIERFR1JFRVNfVE9fUkFESUFOUykgKiBkTGF0XG4gICAqL1xuICBpZiAoaGlnaFByZWNpc2lvbikge1xuICAgIGNvbnN0IGxhdENvc2luZTIgPSBERUdSRUVTX1RPX1JBRElBTlMgKiBNYXRoLnRhbihsYXRpdHVkZSAqIERFR1JFRVNfVE9fUkFESUFOUykgLyBsYXRDb3NpbmU7XG4gICAgY29uc3QgcGl4ZWxzUGVyRGVncmVlWTIgPSBwaXhlbHNQZXJEZWdyZWVYICogbGF0Q29zaW5lMiAvIDI7XG4gICAgY29uc3QgYWx0UGl4ZWxzUGVyRGVncmVlMiA9IHdvcmxkU2l6ZSAvIEVBUlRIX0NJUkNVTUZFUkVOQ0UgKiBsYXRDb3NpbmUyO1xuICAgIGNvbnN0IGFsdFBpeGVsc1Blck1ldGVyMiA9IGFsdFBpeGVsc1BlckRlZ3JlZTIgLyBwaXhlbHNQZXJEZWdyZWVZICogYWx0UGl4ZWxzUGVyTWV0ZXI7XG5cbiAgICByZXN1bHQucGl4ZWxzUGVyRGVncmVlMiA9IFswLCBwaXhlbHNQZXJEZWdyZWVZMiwgYWx0UGl4ZWxzUGVyRGVncmVlMl07XG4gICAgcmVzdWx0LnBpeGVsc1Blck1ldGVyMiA9IFthbHRQaXhlbHNQZXJNZXRlcjIsIDAsIGFsdFBpeGVsc1Blck1ldGVyMl07XG4gIH1cblxuICAvLyBNYWluIHJlc3VsdHMsIHVzZWQgZm9yIGNvbnZlcnRpbmcgbWV0ZXJzIHRvIGxhdGxuZyBkZWx0YXMgYW5kIHNjYWxpbmcgb2Zmc2V0c1xuICByZXR1cm4gcmVzdWx0O1xufVxuXG4vKipcbiAqIENhbGN1bGF0ZXMgYSBtZXJjYXRvciB3b3JsZCBwb3NpdGlvbiAoXCJwaXhlbHNcIiBpbiBnaXZlbiB6b29tIGxldmVsKVxuICogZnJvbSBhIGxuZy9sYXQgYW5kIG1ldGVyT2Zmc2V0XG4gKi9cbmV4cG9ydCBmdW5jdGlvbiBnZXRXb3JsZFBvc2l0aW9uKHtcbiAgbG9uZ2l0dWRlLFxuICBsYXRpdHVkZSxcbiAgem9vbSxcbiAgc2NhbGUsXG4gIG1ldGVyT2Zmc2V0LFxuICBkaXN0YW5jZVNjYWxlcyA9IG51bGxcbn0pIHtcbiAgLy8gQ2FsY3VsYXRlIHNjYWxlIGZyb20gem9vbSBpZiBub3QgcHJvdmlkZWRcbiAgc2NhbGUgPSBzY2FsZSAhPT0gdW5kZWZpbmVkID8gc2NhbGUgOiB6b29tVG9TY2FsZSh6b29tKTtcblxuICAvLyBNYWtlIGEgY2VudGVyZWQgdmVyc2lvbiBvZiB0aGUgbWF0cml4IGZvciBwcm9qZWN0aW9uIG1vZGVzIHdpdGhvdXQgYW4gb2Zmc2V0XG4gIGNvbnN0IGNlbnRlcjJkID0gbG5nTGF0VG9Xb3JsZChbbG9uZ2l0dWRlLCBsYXRpdHVkZV0sIHNjYWxlKTtcbiAgY29uc3QgY2VudGVyID0gbmV3IFZlY3RvcjMoY2VudGVyMmRbMF0sIGNlbnRlcjJkWzFdLCAwKTtcblxuICBpZiAobWV0ZXJPZmZzZXQpIHtcbiAgICAvLyBDYWxjdWxhdGUgZGlzdGFuY2Ugc2NhbGVzIGlmIGxuZy9sYXQvem9vbSBhcmUgcHJvdmlkZWRcbiAgICBkaXN0YW5jZVNjYWxlcyA9IGRpc3RhbmNlU2NhbGVzIHx8IGdldERpc3RhbmNlU2NhbGVzKHtsYXRpdHVkZSwgbG9uZ2l0dWRlLCBzY2FsZX0pO1xuXG4gICAgY29uc3QgcGl4ZWxQb3NpdGlvbiA9IG5ldyBWZWN0b3IzKG1ldGVyT2Zmc2V0KVxuICAgICAgLy8gQ29udmVydCB0byBwaXhlbHMgaW4gY3VycmVudCB6b29tXG4gICAgICAuc2NhbGUoZGlzdGFuY2VTY2FsZXMucGl4ZWxzUGVyTWV0ZXIpXG4gICAgICAvLyBXZSB3YW50IHBvc2l0aXZlIFkgdG8gcmVwcmVzZW50IGFuIG9mZnNldCB0b3dhcmRzIG5vcnRoLFxuICAgICAgLy8gYnV0IHdlYiBtZXJjYXRvciB3b3JsZCBjb29yZGluYXRlcyBpcyB0b3AtbGVmdFxuICAgICAgLnNjYWxlKFsxLCAtMSwgMV0pO1xuICAgIGNlbnRlci5hZGQocGl4ZWxQb3NpdGlvbik7XG4gIH1cblxuICByZXR1cm4gY2VudGVyO1xufVxuXG4vLyBBVFRSSUJVVElPTjpcbi8vIHZpZXcgYW5kIHByb2plY3Rpb24gbWF0cml4IGNyZWF0aW9uIGlzIGludGVudGlvbmFsbHkga2VwdCBjb21wYXRpYmxlIHdpdGhcbi8vIG1hcGJveC1nbCdzIGltcGxlbWVudGF0aW9uIHRvIGVuc3VyZSB0aGF0IHNlYW1sZXNzIGludGVyb3BlcmF0aW9uXG4vLyB3aXRoIG1hcGJveCBhbmQgcmVhY3QtbWFwLWdsLiBTZWU6IGh0dHBzOi8vZ2l0aHViLmNvbS9tYXBib3gvbWFwYm94LWdsLWpzXG5cbi8vIFZhcmlhYmxlIGZvdiAoaW4gcmFkaWFucylcbmZ1bmN0aW9uIGdldEZvdih7aGVpZ2h0LCBhbHRpdHVkZX0pIHtcbiAgcmV0dXJuIDIgKiBNYXRoLmF0YW4oKGhlaWdodCAvIDIpIC8gYWx0aXR1ZGUpO1xufVxuXG5mdW5jdGlvbiBnZXRDbGlwcGluZ1BsYW5lcyh7YWx0aXR1ZGUsIHBpdGNofSkge1xuICAvLyBGaW5kIHRoZSBkaXN0YW5jZSBmcm9tIHRoZSBjZW50ZXIgcG9pbnQgdG8gdGhlIGNlbnRlciB0b3BcbiAgLy8gaW4gYWx0aXR1ZGUgdW5pdHMgdXNpbmcgbGF3IG9mIHNpbmVzLlxuICBjb25zdCBwaXRjaFJhZGlhbnMgPSBwaXRjaCAqIERFR1JFRVNfVE9fUkFESUFOUztcbiAgY29uc3QgaGFsZkZvdiA9IE1hdGguYXRhbigwLjUgLyBhbHRpdHVkZSk7XG4gIGNvbnN0IHRvcEhhbGZTdXJmYWNlRGlzdGFuY2UgPVxuICAgIE1hdGguc2luKGhhbGZGb3YpICogYWx0aXR1ZGUgLyBNYXRoLnNpbihNYXRoLlBJIC8gMiAtIHBpdGNoUmFkaWFucyAtIGhhbGZGb3YpO1xuXG4gIC8vIENhbGN1bGF0ZSB6IHZhbHVlIG9mIHRoZSBmYXJ0aGVzdCBmcmFnbWVudCB0aGF0IHNob3VsZCBiZSByZW5kZXJlZC5cbiAgY29uc3QgZmFyWiA9IE1hdGguY29zKE1hdGguUEkgLyAyIC0gcGl0Y2hSYWRpYW5zKSAqIHRvcEhhbGZTdXJmYWNlRGlzdGFuY2UgKyBhbHRpdHVkZTtcblxuICByZXR1cm4ge2ZhclosIG5lYXJaOiAwLjF9O1xufVxuXG5leHBvcnQgZnVuY3Rpb24gZ2V0Vmlld01hdHJpeCh7XG4gIC8vIFZpZXdwb3J0IHByb3BzXG4gIGhlaWdodCxcbiAgcGl0Y2gsXG4gIGJlYXJpbmcsXG4gIGFsdGl0dWRlLFxuICAvLyBQcmUtY2FsY3VsYXRlZCBwYXJhbWV0ZXJzXG4gIGNlbnRlciA9IG51bGwsXG4gIC8vIE9wdGlvbnNcbiAgZmxpcFkgPSBmYWxzZVxufSkge1xuXG4gIC8vIFZJRVcgTUFUUklYOiBQUk9KRUNUUyBNRVJDQVRPUiBXT1JMRCBDT09SRElOQVRFU1xuICAvLyBOb3RlIHRoYXQgbWVyY2F0b3Igd29ybGQgY29vcmRpbmF0ZXMgdHlwaWNhbGx5IG5lZWQgdG8gYmUgZmxpcHBlZFxuICAvL1xuICAvLyBOb3RlOiBBcyB1c3VhbCwgbWF0cml4IG9wZXJhdGlvbiBvcmRlcnMgc2hvdWxkIGJlIHJlYWQgaW4gcmV2ZXJzZVxuICAvLyBzaW5jZSB2ZWN0b3JzIHdpbGwgYmUgbXVsdGlwbGllZCBmcm9tIHRoZSByaWdodCBkdXJpbmcgdHJhbnNmb3JtYXRpb25cbiAgY29uc3Qgdm0gPSBjcmVhdGVNYXQ0KCk7XG5cbiAgLy8gTW92ZSBjYW1lcmEgdG8gYWx0aXR1ZGUgKGFsb25nIHRoZSBwaXRjaCAmIGJlYXJpbmcgZGlyZWN0aW9uKVxuICBtYXQ0X3RyYW5zbGF0ZSh2bSwgdm0sIFswLCAwLCAtYWx0aXR1ZGVdKTtcblxuICAvLyBBZnRlciB0aGUgcm90YXRlWCwgeiB2YWx1ZXMgYXJlIGluIHBpeGVsIHVuaXRzLiBDb252ZXJ0IHRoZW0gdG9cbiAgLy8gYWx0aXR1ZGUgdW5pdHMuIDEgYWx0aXR1ZGUgdW5pdCA9IHRoZSBzY3JlZW4gaGVpZ2h0LlxuICBtYXQ0X3NjYWxlKHZtLCB2bSwgWzEsIDEsIDEgLyBoZWlnaHRdKTtcblxuICAvLyBSb3RhdGUgYnkgYmVhcmluZywgYW5kIHRoZW4gYnkgcGl0Y2ggKHdoaWNoIHRpbHRzIHRoZSB2aWV3KVxuICBtYXQ0X3JvdGF0ZVgodm0sIHZtLCAtcGl0Y2ggKiBERUdSRUVTX1RPX1JBRElBTlMpO1xuICBtYXQ0X3JvdGF0ZVoodm0sIHZtLCBiZWFyaW5nICogREVHUkVFU19UT19SQURJQU5TKTtcblxuICBpZiAoZmxpcFkpIHtcbiAgICBtYXQ0X3NjYWxlKHZtLCB2bSwgWzEsIC0xLCAxXSk7XG4gIH1cblxuICBpZiAoY2VudGVyKSB7XG4gICAgbWF0NF90cmFuc2xhdGUodm0sIHZtLCBuZXcgVmVjdG9yMyhjZW50ZXIpLm5lZ2F0ZSgpKTtcbiAgfVxuXG4gIHJldHVybiB2bTtcbn1cblxuLy8gUFJPSkVDVElPTiBNQVRSSVg6IFBST0pFQ1RTIEZST00gQ0FNRVJBIChWSUVXKSBTUEFDRSBUTyBDTElQU1BBQ0Vcbi8vIFRoaXMgaXMgYSBcIk1hcGJveFwiIHByb2plY3Rpb24gbWF0cml4IC0gbWF0Y2hlcyBtYXBib3ggZXhhY3RseSBpZiBmYXJaTXVsdGlwbGllciA9PT0gMVxuZXhwb3J0IGZ1bmN0aW9uIGdldFByb2plY3Rpb25NYXRyaXgoe1xuICB3aWR0aCxcbiAgaGVpZ2h0LFxuICBwaXRjaCxcbiAgYWx0aXR1ZGUsXG4gIGZhclpNdWx0aXBsaWVyID0gMTBcbn0pIHtcbiAgY29uc3Qge25lYXJaLCBmYXJafSA9IGdldENsaXBwaW5nUGxhbmVzKHthbHRpdHVkZSwgcGl0Y2h9KTtcbiAgY29uc3QgZm92ID0gZ2V0Rm92KHtoZWlnaHQsIGFsdGl0dWRlfSk7XG5cbiAgY29uc3QgcHJvamVjdGlvbk1hdHJpeCA9IG1hdDRfcGVyc3BlY3RpdmUoXG4gICAgW10sXG4gICAgZm92LCAgICAgICAgICAgICAgLy8gZm92IGluIHJhZGlhbnNcbiAgICB3aWR0aCAvIGhlaWdodCwgICAvLyBhc3BlY3QgcmF0aW9cbiAgICBuZWFyWiwgICAgICAgICAgICAvLyBuZWFyIHBsYW5lXG4gICAgZmFyWiAqIGZhclpNdWx0aXBsaWVyIC8vIGZhciBwbGFuZVxuICApO1xuXG4gIHJldHVybiBwcm9qZWN0aW9uTWF0cml4O1xufVxuXG4vKipcbiAqIFByb2plY3QgZmxhdCBjb29yZGluYXRlcyB0byBwaXhlbHMgb24gc2NyZWVuLlxuICpcbiAqIEBwYXJhbSB7QXJyYXl9IHh5eiAtIGZsYXQgY29vcmRpbmF0ZSBvbiA1MTIqNTEyIE1lcmNhdG9yIFpvb20gMCB0aWxlXG4gKiBAcGFyYW0ge01hdHJpeDR9IHBpeGVsUHJvamVjdGlvbk1hdHJpeCAtIHByb2plY3Rpb24gbWF0cml4XG4gKiBAcmV0dXJuIHtBcnJheX0gW3gsIHksIGRlcHRoXSBwaXhlbCBjb29yZGluYXRlIG9uIHNjcmVlbi5cbiAqL1xuZXhwb3J0IGZ1bmN0aW9uIHdvcmxkVG9QaXhlbHMoeHl6LCBwaXhlbFByb2plY3Rpb25NYXRyaXgpIHtcbiAgY29uc3QgW3gsIHksIHogPSAwXSA9IHh5ejtcbiAgYXNzZXJ0KE51bWJlci5pc0Zpbml0ZSh4KSAmJiBOdW1iZXIuaXNGaW5pdGUoeSkgJiYgTnVtYmVyLmlzRmluaXRlKHopKTtcblxuICByZXR1cm4gdHJhbnNmb3JtVmVjdG9yKHBpeGVsUHJvamVjdGlvbk1hdHJpeCwgW3gsIHksIHosIDFdKTtcbn1cblxuLyoqXG4gKiBVbnByb2plY3QgcGl4ZWxzIG9uIHNjcmVlbiB0byBmbGF0IGNvb3JkaW5hdGVzLlxuICpcbiAqIEBwYXJhbSB7QXJyYXl9IHh5eiAtIHBpeGVsIGNvb3JkaW5hdGUgb24gc2NyZWVuLlxuICogQHBhcmFtIHtNYXRyaXg0fSBwaXhlbFVucHJvamVjdGlvbk1hdHJpeCAtIHVucHJvamVjdGlvbiBtYXRyaXhcbiAqIEBwYXJhbSB7TnVtYmVyfSB0YXJnZXRaIC0gaWYgcGl4ZWwgY29vcmRpbmF0ZSBkb2VzIG5vdCBoYXZlIGEgM3JkIGNvbXBvbmVudCAoZGVwdGgpLFxuICogICAgdGFyZ2V0WiBpcyB1c2VkIGFzIHRoZSBlbGV2YXRpb24gcGxhbmUgdG8gdW5wcm9qZWN0IG9udG9cbiAqIEByZXR1cm4ge0FycmF5fSBbeCwgeSwgWl0gZmxhdCBjb29yZGluYXRlcyBvbiA1MTIqNTEyIE1lcmNhdG9yIFpvb20gMCB0aWxlLlxuICovXG5leHBvcnQgZnVuY3Rpb24gcGl4ZWxzVG9Xb3JsZCh4eXosIHBpeGVsVW5wcm9qZWN0aW9uTWF0cml4LCB0YXJnZXRaID0gMCkge1xuICBjb25zdCBbeCwgeSwgel0gPSB4eXo7XG4gIGFzc2VydChOdW1iZXIuaXNGaW5pdGUoeCkgJiYgTnVtYmVyLmlzRmluaXRlKHkpKTtcblxuICBpZiAoTnVtYmVyLmlzRmluaXRlKHopKSB7XG4gICAgLy8gSGFzIGRlcHRoIGNvbXBvbmVudFxuICAgIGNvbnN0IGNvb3JkID0gdHJhbnNmb3JtVmVjdG9yKHBpeGVsVW5wcm9qZWN0aW9uTWF0cml4LCBbeCwgeSwgeiwgMV0pO1xuICAgIHJldHVybiBjb29yZDtcbiAgfVxuXG4gIC8vIHNpbmNlIHdlIGRvbid0IGtub3cgdGhlIGNvcnJlY3QgcHJvamVjdGVkIHogdmFsdWUgZm9yIHRoZSBwb2ludCxcbiAgLy8gdW5wcm9qZWN0IHR3byBwb2ludHMgdG8gZ2V0IGEgbGluZSBhbmQgdGhlbiBmaW5kIHRoZSBwb2ludCBvbiB0aGF0IGxpbmUgd2l0aCB6PTBcbiAgY29uc3QgY29vcmQwID0gdHJhbnNmb3JtVmVjdG9yKHBpeGVsVW5wcm9qZWN0aW9uTWF0cml4LCBbeCwgeSwgMCwgMV0pO1xuICBjb25zdCBjb29yZDEgPSB0cmFuc2Zvcm1WZWN0b3IocGl4ZWxVbnByb2plY3Rpb25NYXRyaXgsIFt4LCB5LCAxLCAxXSk7XG5cbiAgY29uc3QgejAgPSBjb29yZDBbMl07XG4gIGNvbnN0IHoxID0gY29vcmQxWzJdO1xuXG4gIGNvbnN0IHQgPSB6MCA9PT0gejEgPyAwIDogKCh0YXJnZXRaIHx8IDApIC0gejApIC8gKHoxIC0gejApO1xuICByZXR1cm4gdmVjMl9sZXJwKFtdLCBjb29yZDAsIGNvb3JkMSwgdCk7XG59XG4iXX0=
 
/***/ }),
/* 81 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__viewport__ = __webpack_require__(687);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__web_mercator_utils__ = __webpack_require__(80);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__fit_bounds__ = __webpack_require__(285);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_gl_vec2_add__ = __webpack_require__(159);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_gl_vec2_add___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_gl_vec2_add__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_gl_vec2_negate__ = __webpack_require__(160);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_gl_vec2_negate___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_gl_vec2_negate__);
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
 
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
 
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
 
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
 
// View and Projection Matrix calculations for mapbox-js style map view properties
 
 
 
 
 
 
 
 
var WebMercatorViewport = function (_Viewport) {
  _inherits(WebMercatorViewport, _Viewport);
 
  /**
   * @classdesc
   * Creates view/projection matrices from mercator params
   * Note: The Viewport is immutable in the sense that it only has accessors.
   * A new viewport instance should be created if any parameters have changed.
   *
   * @class
   * @param {Object} opt - options
   *
   * @param {Number} opt.width=1 - Width of "viewport" or window
   * @param {Number} opt.height=1 - Height of "viewport" or window
   * @param {Number} opt.scale=1 - Either use scale or zoom
   * @param {Number} opt.pitch=0 - Camera angle in degrees (0 is straight down)
   * @param {Number} opt.bearing=0 - Map rotation in degrees (0 means north is up)
   * @param {Number} opt.altitude= - Altitude of camera in screen units
   *
   * Web mercator projection short-hand parameters
   * @param {Number} opt.latitude - Center of viewport on map (alternative to opt.center)
   * @param {Number} opt.longitude - Center of viewport on map (alternative to opt.center)
   * @param {Number} opt.zoom - Scale = Math.pow(2,zoom) on map (alternative to opt.scale)
    * Notes:
   *  - Only one of center or [latitude, longitude] can be specified
   *  - [latitude, longitude] can only be specified when "mercator" is true
   *  - Altitude has a default value that matches assumptions in mapbox-gl
   *  - width and height are forced to 1 if supplied as 0, to avoid
   *    division by zero. This is intended to reduce the burden of apps to
   *    to check values before instantiating a Viewport.
   */
  /* eslint-disable complexity */
  function WebMercatorViewport() {
    var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
        width = _ref.width,
        height = _ref.height,
        _ref$latitude = _ref.latitude,
        latitude = _ref$latitude === undefined ? 0 : _ref$latitude,
        _ref$longitude = _ref.longitude,
        longitude = _ref$longitude === undefined ? 0 : _ref$longitude,
        _ref$zoom = _ref.zoom,
        zoom = _ref$zoom === undefined ? 0 : _ref$zoom,
        _ref$pitch = _ref.pitch,
        pitch = _ref$pitch === undefined ? 0 : _ref$pitch,
        _ref$bearing = _ref.bearing,
        bearing = _ref$bearing === undefined ? 0 : _ref$bearing,
        _ref$altitude = _ref.altitude,
        altitude = _ref$altitude === undefined ? 1.5 : _ref$altitude,
        //iclient
        isGeographicCoordinateSystem = _ref.isGeographicCoordinateSystem,
        farZMultiplier = _ref$farZMultiplier === undefined ? 10 : _ref$farZMultiplier;
        _ref$farZMultiplier = _ref.farZMultiplier,
        farZMultiplier = _ref$farZMultiplier === undefined ? 10 : _ref$farZMultiplier;
 
    _classCallCheck(this, WebMercatorViewport);
 
    // Silently allow apps to send in 0,0 to facilitate isomorphic render etc
    width = width || 1;
    height = height || 1;
 
    var scale = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__web_mercator_utils__["j" /* zoomToScale */])(zoom);
    // Altitude - prevent division by 0
    // TODO - just throw an Error instead?
    altitude = Math.max(0.75, altitude);
 
    var center = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__web_mercator_utils__["g" /* getWorldPosition */])({ longitude: longitude, latitude: latitude, scale: scale });
 
    var projectionMatrix = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__web_mercator_utils__["i" /* getProjectionMatrix */])({
      width: width,
      height: height,
      pitch: pitch,
      bearing: bearing,
      altitude: altitude,
      farZMultiplier: farZMultiplier
    });
 
    var viewMatrix = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__web_mercator_utils__["h" /* getViewMatrix */])({
      height: height,
      center: center,
      pitch: pitch,
      bearing: bearing,
      altitude: altitude,
      flipY: true
    });
 
    // Save parameters
    var _this = _possibleConstructorReturn(this, (WebMercatorViewport.__proto__ || Object.getPrototypeOf(WebMercatorViewport)).call(this, { width: width, height: height, viewMatrix: viewMatrix, projectionMatrix: projectionMatrix,isGeographicCoordinateSystem:isGeographicCoordinateSystem }));
 
    _this.latitude = latitude;
    _this.longitude = longitude;
    _this.zoom = zoom;
    _this.pitch = pitch;
    _this.bearing = bearing;
    _this.altitude = altitude;
 
    _this.scale = scale;
    _this.center = center;
 
    Object.freeze(_this);
    return _this;
  }
  /* eslint-enable complexity */
 
  /**
   * Project [lng,lat] on sphere onto [x,y] on 512*512 Mercator Zoom 0 tile.
   * Performs the nonlinear part of the web mercator projection.
   * Remaining projection is done with 4x4 matrices which also handles
   * perspective.
   *
   * @param {Array} lngLat - [lng, lat] coordinates
   *   Specifies a point on the sphere to project onto the map.
   * @return {Array} [x,y] coordinates.
   */
 
 
  _createClass(WebMercatorViewport, [{
    key: 'projectFlat',
    value: function projectFlat(lngLat) {
      var scale = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.scale;
 
      return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__web_mercator_utils__["a" /* lngLatToWorld */])(lngLat, scale);
    }
 
    /**
     * Unproject world point [x,y] on map onto {lat, lon} on sphere
     *
     * @param {object|Vector} xy - object with {x,y} members
     *  representing point on projected map plane
     * @return {GeoCoordinates} - object with {lat,lon} of point on sphere.
     *   Has toArray method if you need a GeoJSON Array.
     *   Per cartographic tradition, lat and lon are specified as degrees.
     */
 
  }, {
    key: 'unprojectFlat',
    value: function unprojectFlat(xy) {
      var scale = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.scale;
 
      return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__web_mercator_utils__["b" /* worldToLngLat */])(xy, scale);
    }
 
    /**
     * Get the map center that place a given [lng, lat] coordinate at screen
     * point [x, y]
     *
     * @param {Array} lngLat - [lng,lat] coordinates
     *   Specifies a point on the sphere.
     * @param {Array} pos - [x,y] coordinates
     *   Specifies a point on the screen.
     * @return {Array} [lng,lat] new map center.
     */
 
  }, {
    key: 'getMapCenterByLngLatPosition',
    value: function getMapCenterByLngLatPosition(_ref2) {
      var lngLat = _ref2.lngLat,
          pos = _ref2.pos;
 
      var fromLocation = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__web_mercator_utils__["d" /* pixelsToWorld */])(pos, this.pixelUnprojectionMatrix);
      var toLocation = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__web_mercator_utils__["a" /* lngLatToWorld */])(lngLat, this.scale);
 
      var translate = __WEBPACK_IMPORTED_MODULE_3_gl_vec2_add___default()([], toLocation, __WEBPACK_IMPORTED_MODULE_4_gl_vec2_negate___default()([], fromLocation));
      var newCenter = __WEBPACK_IMPORTED_MODULE_3_gl_vec2_add___default()([], this.center, translate);
 
      return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__web_mercator_utils__["b" /* worldToLngLat */])(newCenter, this.scale);
    }
 
    // Legacy method name
 
  }, {
    key: 'getLocationAtPoint',
    value: function getLocationAtPoint(_ref3) {
      var lngLat = _ref3.lngLat,
          pos = _ref3.pos;
 
      return this.getMapCenterByLngLatPosition({ lngLat: lngLat, pos: pos });
    }
 
    /**
     * Returns a new viewport that fit around the given rectangle.
     * Only supports non-perspective mode.
     * @param {Array} bounds - [[lon, lat], [lon, lat]]
     * @param {Number} [options.padding] - The amount of padding in pixels to add to the given bounds.
     * @param {Array} [options.offset] - The center of the given bounds relative to the map's center,
     *    [x, y] measured in pixels.
     * @returns {WebMercatorViewport}
     */
 
  }, {
    key: 'fitBounds',
    value: function fitBounds(bounds) {
      var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
      var width = this.width,
          height = this.height;
 
      var _fitBounds2 = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__fit_bounds__["a" /* default */])(Object.assign({ width: width, height: height, bounds: bounds }, options)),
          longitude = _fitBounds2.longitude,
          latitude = _fitBounds2.latitude,
          zoom = _fitBounds2.zoom;
 
      return new WebMercatorViewport({ width: width, height: height, longitude: longitude, latitude: latitude, zoom: zoom });
    }
  }]);
 
  return WebMercatorViewport;
}(__WEBPACK_IMPORTED_MODULE_0__viewport__["a" /* default */]);
 
/* harmony default export */ __webpack_exports__["a"] = (WebMercatorViewport);
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy93ZWItbWVyY2F0b3Itdmlld3BvcnQuanMiXSwibmFtZXMiOlsiVmlld3BvcnQiLCJ6b29tVG9TY2FsZSIsImdldFdvcmxkUG9zaXRpb24iLCJwaXhlbHNUb1dvcmxkIiwibG5nTGF0VG9Xb3JsZCIsIndvcmxkVG9MbmdMYXQiLCJnZXRQcm9qZWN0aW9uTWF0cml4IiwiZ2V0Vmlld01hdHJpeCIsImZpdEJvdW5kcyIsInZlYzJfYWRkIiwidmVjMl9uZWdhdGUiLCJXZWJNZXJjYXRvclZpZXdwb3J0Iiwid2lkdGgiLCJoZWlnaHQiLCJsYXRpdHVkZSIsImxvbmdpdHVkZSIsInpvb20iLCJwaXRjaCIsImJlYXJpbmciLCJhbHRpdHVkZSIsImZhclpNdWx0aXBsaWVyIiwic2NhbGUiLCJNYXRoIiwibWF4IiwiY2VudGVyIiwicHJvamVjdGlvbk1hdHJpeCIsInZpZXdNYXRyaXgiLCJmbGlwWSIsIk9iamVjdCIsImZyZWV6ZSIsImxuZ0xhdCIsInh5IiwicG9zIiwiZnJvbUxvY2F0aW9uIiwicGl4ZWxVbnByb2plY3Rpb25NYXRyaXgiLCJ0b0xvY2F0aW9uIiwidHJhbnNsYXRlIiwibmV3Q2VudGVyIiwiZ2V0TWFwQ2VudGVyQnlMbmdMYXRQb3NpdGlvbiIsImJvdW5kcyIsIm9wdGlvbnMiLCJhc3NpZ24iXSwibWFwcGluZ3MiOiI7Ozs7Ozs7O0FBQUE7QUFDQSxPQUFPQSxRQUFQLE1BQXFCLFlBQXJCOztBQUVBLFNBQ0VDLFdBREYsRUFFRUMsZ0JBRkYsRUFHRUMsYUFIRixFQUlFQyxhQUpGLEVBS0VDLGFBTEYsRUFNRUMsbUJBTkYsRUFPRUMsYUFQRixRQVFPLHNCQVJQO0FBU0EsT0FBT0MsVUFBUCxNQUFzQixjQUF0Qjs7QUFFQSxPQUFPQyxRQUFQLE1BQXFCLGFBQXJCO0FBQ0EsT0FBT0MsV0FBUCxNQUF3QixnQkFBeEI7O0lBRXFCQyxtQjs7O0FBQ25COzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBNkJBO0FBQ0EsaUNBV1E7QUFBQSxtRkFBSixFQUFJO0FBQUEsUUFUTkMsS0FTTSxRQVROQSxLQVNNO0FBQUEsUUFSTkMsTUFRTSxRQVJOQSxNQVFNO0FBQUEsNkJBUE5DLFFBT007QUFBQSxRQVBOQSxRQU9NLGlDQVBLLENBT0w7QUFBQSw4QkFOTkMsU0FNTTtBQUFBLFFBTk5BLFNBTU0sa0NBTk0sQ0FNTjtBQUFBLHlCQUxOQyxJQUtNO0FBQUEsUUFMTkEsSUFLTSw2QkFMQyxDQUtEO0FBQUEsMEJBSk5DLEtBSU07QUFBQSxRQUpOQSxLQUlNLDhCQUpFLENBSUY7QUFBQSw0QkFITkMsT0FHTTtBQUFBLFFBSE5BLE9BR00sZ0NBSEksQ0FHSjtBQUFBLDZCQUZOQyxRQUVNO0FBQUEsUUFGTkEsUUFFTSxpQ0FGSyxHQUVMO0FBQUEsbUNBRE5DLGNBQ007QUFBQSxRQUROQSxjQUNNLHVDQURXLEVBQ1g7O0FBQUE7O0FBQ047QUFDQVIsWUFBUUEsU0FBUyxDQUFqQjtBQUNBQyxhQUFTQSxVQUFVLENBQW5COztBQUVBLFFBQU1RLFFBQVFwQixZQUFZZSxJQUFaLENBQWQ7QUFDQTtBQUNBO0FBQ0FHLGVBQVdHLEtBQUtDLEdBQUwsQ0FBUyxJQUFULEVBQWVKLFFBQWYsQ0FBWDs7QUFFQSxRQUFNSyxTQUFTdEIsaUJBQWlCLEVBQUNhLG9CQUFELEVBQVlELGtCQUFaLEVBQXNCTyxZQUF0QixFQUFqQixDQUFmOztBQUVBLFFBQU1JLG1CQUFtQm5CLG9CQUFvQjtBQUMzQ00sa0JBRDJDO0FBRTNDQyxvQkFGMkM7QUFHM0NJLGtCQUgyQztBQUkzQ0Msc0JBSjJDO0FBSzNDQyx3QkFMMkM7QUFNM0NDO0FBTjJDLEtBQXBCLENBQXpCOztBQVNBLFFBQU1NLGFBQWFuQixjQUFjO0FBQy9CTSxvQkFEK0I7QUFFL0JXLG9CQUYrQjtBQUcvQlAsa0JBSCtCO0FBSS9CQyxzQkFKK0I7QUFLL0JDLHdCQUwrQjtBQU0vQlEsYUFBTztBQU53QixLQUFkLENBQW5COztBQVdBO0FBaENNLDBJQThCQSxFQUFDZixZQUFELEVBQVFDLGNBQVIsRUFBZ0JhLHNCQUFoQixFQUE0QkQsa0NBQTVCLEVBOUJBOztBQWlDTixVQUFLWCxRQUFMLEdBQWdCQSxRQUFoQjtBQUNBLFVBQUtDLFNBQUwsR0FBaUJBLFNBQWpCO0FBQ0EsVUFBS0MsSUFBTCxHQUFZQSxJQUFaO0FBQ0EsVUFBS0MsS0FBTCxHQUFhQSxLQUFiO0FBQ0EsVUFBS0MsT0FBTCxHQUFlQSxPQUFmO0FBQ0EsVUFBS0MsUUFBTCxHQUFnQkEsUUFBaEI7O0FBRUEsVUFBS0UsS0FBTCxHQUFhQSxLQUFiO0FBQ0EsVUFBS0csTUFBTCxHQUFjQSxNQUFkOztBQUVBSSxXQUFPQyxNQUFQO0FBM0NNO0FBNENQO0FBQ0Q7O0FBRUE7Ozs7Ozs7Ozs7Ozs7O2dDQVVZQyxNLEVBQTRCO0FBQUEsVUFBcEJULEtBQW9CLHVFQUFaLEtBQUtBLEtBQU87O0FBQ3RDLGFBQU9qQixjQUFjMEIsTUFBZCxFQUFzQlQsS0FBdEIsQ0FBUDtBQUNEOztBQUVEOzs7Ozs7Ozs7Ozs7a0NBU2NVLEUsRUFBd0I7QUFBQSxVQUFwQlYsS0FBb0IsdUVBQVosS0FBS0EsS0FBTzs7QUFDcEMsYUFBT2hCLGNBQWMwQixFQUFkLEVBQWtCVixLQUFsQixDQUFQO0FBQ0Q7O0FBRUQ7Ozs7Ozs7Ozs7Ozs7d0RBVTRDO0FBQUEsVUFBZFMsTUFBYyxTQUFkQSxNQUFjO0FBQUEsVUFBTkUsR0FBTSxTQUFOQSxHQUFNOztBQUMxQyxVQUFNQyxlQUFlOUIsY0FBYzZCLEdBQWQsRUFBbUIsS0FBS0UsdUJBQXhCLENBQXJCO0FBQ0EsVUFBTUMsYUFBYS9CLGNBQWMwQixNQUFkLEVBQXNCLEtBQUtULEtBQTNCLENBQW5COztBQUVBLFVBQU1lLFlBQVkzQixTQUFTLEVBQVQsRUFBYTBCLFVBQWIsRUFBeUJ6QixZQUFZLEVBQVosRUFBZ0J1QixZQUFoQixDQUF6QixDQUFsQjtBQUNBLFVBQU1JLFlBQVk1QixTQUFTLEVBQVQsRUFBYSxLQUFLZSxNQUFsQixFQUEwQlksU0FBMUIsQ0FBbEI7O0FBRUEsYUFBTy9CLGNBQWNnQyxTQUFkLEVBQXlCLEtBQUtoQixLQUE5QixDQUFQO0FBQ0Q7O0FBRUQ7Ozs7OENBQ2tDO0FBQUEsVUFBZFMsTUFBYyxTQUFkQSxNQUFjO0FBQUEsVUFBTkUsR0FBTSxTQUFOQSxHQUFNOztBQUNoQyxhQUFPLEtBQUtNLDRCQUFMLENBQWtDLEVBQUNSLGNBQUQsRUFBU0UsUUFBVCxFQUFsQyxDQUFQO0FBQ0Q7O0FBRUQ7Ozs7Ozs7Ozs7Ozs4QkFTVU8sTSxFQUFzQjtBQUFBLFVBQWRDLE9BQWMsdUVBQUosRUFBSTtBQUFBLFVBQ3ZCNUIsS0FEdUIsR0FDTixJQURNLENBQ3ZCQSxLQUR1QjtBQUFBLFVBQ2hCQyxNQURnQixHQUNOLElBRE0sQ0FDaEJBLE1BRGdCOztBQUFBLHdCQUVNTCxXQUFVb0IsT0FBT2EsTUFBUCxDQUFjLEVBQUM3QixZQUFELEVBQVFDLGNBQVIsRUFBZ0IwQixjQUFoQixFQUFkLEVBQXVDQyxPQUF2QyxDQUFWLENBRk47QUFBQSxVQUV2QnpCLFNBRnVCLGVBRXZCQSxTQUZ1QjtBQUFBLFVBRVpELFFBRlksZUFFWkEsUUFGWTtBQUFBLFVBRUZFLElBRkUsZUFFRkEsSUFGRTs7QUFHOUIsYUFBTyxJQUFJTCxtQkFBSixDQUF3QixFQUFDQyxZQUFELEVBQVFDLGNBQVIsRUFBZ0JFLG9CQUFoQixFQUEyQkQsa0JBQTNCLEVBQXFDRSxVQUFyQyxFQUF4QixDQUFQO0FBQ0Q7Ozs7RUExSjhDaEIsUTs7ZUFBNUJXLG1CIiwiZmlsZSI6IndlYi1tZXJjYXRvci12aWV3cG9ydC5qcyIsInNvdXJjZXNDb250ZW50IjpbIi8vIFZpZXcgYW5kIFByb2plY3Rpb24gTWF0cml4IGNhbGN1bGF0aW9ucyBmb3IgbWFwYm94LWpzIHN0eWxlIG1hcCB2aWV3IHByb3BlcnRpZXNcbmltcG9ydCBWaWV3cG9ydCBmcm9tICcuL3ZpZXdwb3J0JztcblxuaW1wb3J0IHtcbiAgem9vbVRvU2NhbGUsXG4gIGdldFdvcmxkUG9zaXRpb24sXG4gIHBpeGVsc1RvV29ybGQsXG4gIGxuZ0xhdFRvV29ybGQsXG4gIHdvcmxkVG9MbmdMYXQsXG4gIGdldFByb2plY3Rpb25NYXRyaXgsXG4gIGdldFZpZXdNYXRyaXhcbn0gZnJvbSAnLi93ZWItbWVyY2F0b3ItdXRpbHMnO1xuaW1wb3J0IGZpdEJvdW5kcyBmcm9tICcuL2ZpdC1ib3VuZHMnO1xuXG5pbXBvcnQgdmVjMl9hZGQgZnJvbSAnZ2wtdmVjMi9hZGQnO1xuaW1wb3J0IHZlYzJfbmVnYXRlIGZyb20gJ2dsLXZlYzIvbmVnYXRlJztcblxuZXhwb3J0IGRlZmF1bHQgY2xhc3MgV2ViTWVyY2F0b3JWaWV3cG9ydCBleHRlbmRzIFZpZXdwb3J0IHtcbiAgLyoqXG4gICAqIEBjbGFzc2Rlc2NcbiAgICogQ3JlYXRlcyB2aWV3L3Byb2plY3Rpb24gbWF0cmljZXMgZnJvbSBtZXJjYXRvciBwYXJhbXNcbiAgICogTm90ZTogVGhlIFZpZXdwb3J0IGlzIGltbXV0YWJsZSBpbiB0aGUgc2Vuc2UgdGhhdCBpdCBvbmx5IGhhcyBhY2Nlc3NvcnMuXG4gICAqIEEgbmV3IHZpZXdwb3J0IGluc3RhbmNlIHNob3VsZCBiZSBjcmVhdGVkIGlmIGFueSBwYXJhbWV0ZXJzIGhhdmUgY2hhbmdlZC5cbiAgICpcbiAgICogQGNsYXNzXG4gICAqIEBwYXJhbSB7T2JqZWN0fSBvcHQgLSBvcHRpb25zXG4gICAqXG4gICAqIEBwYXJhbSB7TnVtYmVyfSBvcHQud2lkdGg9MSAtIFdpZHRoIG9mIFwidmlld3BvcnRcIiBvciB3aW5kb3dcbiAgICogQHBhcmFtIHtOdW1iZXJ9IG9wdC5oZWlnaHQ9MSAtIEhlaWdodCBvZiBcInZpZXdwb3J0XCIgb3Igd2luZG93XG4gICAqIEBwYXJhbSB7TnVtYmVyfSBvcHQuc2NhbGU9MSAtIEVpdGhlciB1c2Ugc2NhbGUgb3Igem9vbVxuICAgKiBAcGFyYW0ge051bWJlcn0gb3B0LnBpdGNoPTAgLSBDYW1lcmEgYW5nbGUgaW4gZGVncmVlcyAoMCBpcyBzdHJhaWdodCBkb3duKVxuICAgKiBAcGFyYW0ge051bWJlcn0gb3B0LmJlYXJpbmc9MCAtIE1hcCByb3RhdGlvbiBpbiBkZWdyZWVzICgwIG1lYW5zIG5vcnRoIGlzIHVwKVxuICAgKiBAcGFyYW0ge051bWJlcn0gb3B0LmFsdGl0dWRlPSAtIEFsdGl0dWRlIG9mIGNhbWVyYSBpbiBzY3JlZW4gdW5pdHNcbiAgICpcbiAgICogV2ViIG1lcmNhdG9yIHByb2plY3Rpb24gc2hvcnQtaGFuZCBwYXJhbWV0ZXJzXG4gICAqIEBwYXJhbSB7TnVtYmVyfSBvcHQubGF0aXR1ZGUgLSBDZW50ZXIgb2Ygdmlld3BvcnQgb24gbWFwIChhbHRlcm5hdGl2ZSB0byBvcHQuY2VudGVyKVxuICAgKiBAcGFyYW0ge051bWJlcn0gb3B0LmxvbmdpdHVkZSAtIENlbnRlciBvZiB2aWV3cG9ydCBvbiBtYXAgKGFsdGVybmF0aXZlIHRvIG9wdC5jZW50ZXIpXG4gICAqIEBwYXJhbSB7TnVtYmVyfSBvcHQuem9vbSAtIFNjYWxlID0gTWF0aC5wb3coMix6b29tKSBvbiBtYXAgKGFsdGVybmF0aXZlIHRvIG9wdC5zY2FsZSlcblxuICAgKiBOb3RlczpcbiAgICogIC0gT25seSBvbmUgb2YgY2VudGVyIG9yIFtsYXRpdHVkZSwgbG9uZ2l0dWRlXSBjYW4gYmUgc3BlY2lmaWVkXG4gICAqICAtIFtsYXRpdHVkZSwgbG9uZ2l0dWRlXSBjYW4gb25seSBiZSBzcGVjaWZpZWQgd2hlbiBcIm1lcmNhdG9yXCIgaXMgdHJ1ZVxuICAgKiAgLSBBbHRpdHVkZSBoYXMgYSBkZWZhdWx0IHZhbHVlIHRoYXQgbWF0Y2hlcyBhc3N1bXB0aW9ucyBpbiBtYXBib3gtZ2xcbiAgICogIC0gd2lkdGggYW5kIGhlaWdodCBhcmUgZm9yY2VkIHRvIDEgaWYgc3VwcGxpZWQgYXMgMCwgdG8gYXZvaWRcbiAgICogICAgZGl2aXNpb24gYnkgemVyby4gVGhpcyBpcyBpbnRlbmRlZCB0byByZWR1Y2UgdGhlIGJ1cmRlbiBvZiBhcHBzIHRvXG4gICAqICAgIHRvIGNoZWNrIHZhbHVlcyBiZWZvcmUgaW5zdGFudGlhdGluZyBhIFZpZXdwb3J0LlxuICAgKi9cbiAgLyogZXNsaW50LWRpc2FibGUgY29tcGxleGl0eSAqL1xuICBjb25zdHJ1Y3Rvcih7XG4gICAgLy8gTWFwIHN0YXRlXG4gICAgd2lkdGgsXG4gICAgaGVpZ2h0LFxuICAgIGxhdGl0dWRlID0gMCxcbiAgICBsb25naXR1ZGUgPSAwLFxuICAgIHpvb20gPSAwLFxuICAgIHBpdGNoID0gMCxcbiAgICBiZWFyaW5nID0gMCxcbiAgICBhbHRpdHVkZSA9IDEuNSxcbiAgICBmYXJaTXVsdGlwbGllciA9IDEwXG4gIH0gPSB7fSkge1xuICAgIC8vIFNpbGVudGx5IGFsbG93IGFwcHMgdG8gc2VuZCBpbiAwLDAgdG8gZmFjaWxpdGF0ZSBpc29tb3JwaGljIHJlbmRlciBldGNcbiAgICB3aWR0aCA9IHdpZHRoIHx8IDE7XG4gICAgaGVpZ2h0ID0gaGVpZ2h0IHx8IDE7XG5cbiAgICBjb25zdCBzY2FsZSA9IHpvb21Ub1NjYWxlKHpvb20pO1xuICAgIC8vIEFsdGl0dWRlIC0gcHJldmVudCBkaXZpc2lvbiBieSAwXG4gICAgLy8gVE9ETyAtIGp1c3QgdGhyb3cgYW4gRXJyb3IgaW5zdGVhZD9cbiAgICBhbHRpdHVkZSA9IE1hdGgubWF4KDAuNzUsIGFsdGl0dWRlKTtcblxuICAgIGNvbnN0IGNlbnRlciA9IGdldFdvcmxkUG9zaXRpb24oe2xvbmdpdHVkZSwgbGF0aXR1ZGUsIHNjYWxlfSk7XG5cbiAgICBjb25zdCBwcm9qZWN0aW9uTWF0cml4ID0gZ2V0UHJvamVjdGlvbk1hdHJpeCh7XG4gICAgICB3aWR0aCxcbiAgICAgIGhlaWdodCxcbiAgICAgIHBpdGNoLFxuICAgICAgYmVhcmluZyxcbiAgICAgIGFsdGl0dWRlLFxuICAgICAgZmFyWk11bHRpcGxpZXJcbiAgICB9KTtcblxuICAgIGNvbnN0IHZpZXdNYXRyaXggPSBnZXRWaWV3TWF0cml4KHtcbiAgICAgIGhlaWdodCxcbiAgICAgIGNlbnRlcixcbiAgICAgIHBpdGNoLFxuICAgICAgYmVhcmluZyxcbiAgICAgIGFsdGl0dWRlLFxuICAgICAgZmxpcFk6IHRydWVcbiAgICB9KTtcblxuICAgIHN1cGVyKHt3aWR0aCwgaGVpZ2h0LCB2aWV3TWF0cml4LCBwcm9qZWN0aW9uTWF0cml4fSk7XG5cbiAgICAvLyBTYXZlIHBhcmFtZXRlcnNcbiAgICB0aGlzLmxhdGl0dWRlID0gbGF0aXR1ZGU7XG4gICAgdGhpcy5sb25naXR1ZGUgPSBsb25naXR1ZGU7XG4gICAgdGhpcy56b29tID0gem9vbTtcbiAgICB0aGlzLnBpdGNoID0gcGl0Y2g7XG4gICAgdGhpcy5iZWFyaW5nID0gYmVhcmluZztcbiAgICB0aGlzLmFsdGl0dWRlID0gYWx0aXR1ZGU7XG5cbiAgICB0aGlzLnNjYWxlID0gc2NhbGU7XG4gICAgdGhpcy5jZW50ZXIgPSBjZW50ZXI7XG5cbiAgICBPYmplY3QuZnJlZXplKHRoaXMpO1xuICB9XG4gIC8qIGVzbGludC1lbmFibGUgY29tcGxleGl0eSAqL1xuXG4gIC8qKlxuICAgKiBQcm9qZWN0IFtsbmcsbGF0XSBvbiBzcGhlcmUgb250byBbeCx5XSBvbiA1MTIqNTEyIE1lcmNhdG9yIFpvb20gMCB0aWxlLlxuICAgKiBQZXJmb3JtcyB0aGUgbm9ubGluZWFyIHBhcnQgb2YgdGhlIHdlYiBtZXJjYXRvciBwcm9qZWN0aW9uLlxuICAgKiBSZW1haW5pbmcgcHJvamVjdGlvbiBpcyBkb25lIHdpdGggNHg0IG1hdHJpY2VzIHdoaWNoIGFsc28gaGFuZGxlc1xuICAgKiBwZXJzcGVjdGl2ZS5cbiAgICpcbiAgICogQHBhcmFtIHtBcnJheX0gbG5nTGF0IC0gW2xuZywgbGF0XSBjb29yZGluYXRlc1xuICAgKiAgIFNwZWNpZmllcyBhIHBvaW50IG9uIHRoZSBzcGhlcmUgdG8gcHJvamVjdCBvbnRvIHRoZSBtYXAuXG4gICAqIEByZXR1cm4ge0FycmF5fSBbeCx5XSBjb29yZGluYXRlcy5cbiAgICovXG4gIHByb2plY3RGbGF0KGxuZ0xhdCwgc2NhbGUgPSB0aGlzLnNjYWxlKSB7XG4gICAgcmV0dXJuIGxuZ0xhdFRvV29ybGQobG5nTGF0LCBzY2FsZSk7XG4gIH1cblxuICAvKipcbiAgICogVW5wcm9qZWN0IHdvcmxkIHBvaW50IFt4LHldIG9uIG1hcCBvbnRvIHtsYXQsIGxvbn0gb24gc3BoZXJlXG4gICAqXG4gICAqIEBwYXJhbSB7b2JqZWN0fFZlY3Rvcn0geHkgLSBvYmplY3Qgd2l0aCB7eCx5fSBtZW1iZXJzXG4gICAqICByZXByZXNlbnRpbmcgcG9pbnQgb24gcHJvamVjdGVkIG1hcCBwbGFuZVxuICAgKiBAcmV0dXJuIHtHZW9Db29yZGluYXRlc30gLSBvYmplY3Qgd2l0aCB7bGF0LGxvbn0gb2YgcG9pbnQgb24gc3BoZXJlLlxuICAgKiAgIEhhcyB0b0FycmF5IG1ldGhvZCBpZiB5b3UgbmVlZCBhIEdlb0pTT04gQXJyYXkuXG4gICAqICAgUGVyIGNhcnRvZ3JhcGhpYyB0cmFkaXRpb24sIGxhdCBhbmQgbG9uIGFyZSBzcGVjaWZpZWQgYXMgZGVncmVlcy5cbiAgICovXG4gIHVucHJvamVjdEZsYXQoeHksIHNjYWxlID0gdGhpcy5zY2FsZSkge1xuICAgIHJldHVybiB3b3JsZFRvTG5nTGF0KHh5LCBzY2FsZSk7XG4gIH1cblxuICAvKipcbiAgICogR2V0IHRoZSBtYXAgY2VudGVyIHRoYXQgcGxhY2UgYSBnaXZlbiBbbG5nLCBsYXRdIGNvb3JkaW5hdGUgYXQgc2NyZWVuXG4gICAqIHBvaW50IFt4LCB5XVxuICAgKlxuICAgKiBAcGFyYW0ge0FycmF5fSBsbmdMYXQgLSBbbG5nLGxhdF0gY29vcmRpbmF0ZXNcbiAgICogICBTcGVjaWZpZXMgYSBwb2ludCBvbiB0aGUgc3BoZXJlLlxuICAgKiBAcGFyYW0ge0FycmF5fSBwb3MgLSBbeCx5XSBjb29yZGluYXRlc1xuICAgKiAgIFNwZWNpZmllcyBhIHBvaW50IG9uIHRoZSBzY3JlZW4uXG4gICAqIEByZXR1cm4ge0FycmF5fSBbbG5nLGxhdF0gbmV3IG1hcCBjZW50ZXIuXG4gICAqL1xuICBnZXRNYXBDZW50ZXJCeUxuZ0xhdFBvc2l0aW9uKHtsbmdMYXQsIHBvc30pIHtcbiAgICBjb25zdCBmcm9tTG9jYXRpb24gPSBwaXhlbHNUb1dvcmxkKHBvcywgdGhpcy5waXhlbFVucHJvamVjdGlvbk1hdHJpeCk7XG4gICAgY29uc3QgdG9Mb2NhdGlvbiA9IGxuZ0xhdFRvV29ybGQobG5nTGF0LCB0aGlzLnNjYWxlKTtcblxuICAgIGNvbnN0IHRyYW5zbGF0ZSA9IHZlYzJfYWRkKFtdLCB0b0xvY2F0aW9uLCB2ZWMyX25lZ2F0ZShbXSwgZnJvbUxvY2F0aW9uKSk7XG4gICAgY29uc3QgbmV3Q2VudGVyID0gdmVjMl9hZGQoW10sIHRoaXMuY2VudGVyLCB0cmFuc2xhdGUpO1xuXG4gICAgcmV0dXJuIHdvcmxkVG9MbmdMYXQobmV3Q2VudGVyLCB0aGlzLnNjYWxlKTtcbiAgfVxuXG4gIC8vIExlZ2FjeSBtZXRob2QgbmFtZVxuICBnZXRMb2NhdGlvbkF0UG9pbnQoe2xuZ0xhdCwgcG9zfSkge1xuICAgIHJldHVybiB0aGlzLmdldE1hcENlbnRlckJ5TG5nTGF0UG9zaXRpb24oe2xuZ0xhdCwgcG9zfSk7XG4gIH1cblxuICAvKipcbiAgICogUmV0dXJucyBhIG5ldyB2aWV3cG9ydCB0aGF0IGZpdCBhcm91bmQgdGhlIGdpdmVuIHJlY3RhbmdsZS5cbiAgICogT25seSBzdXBwb3J0cyBub24tcGVyc3BlY3RpdmUgbW9kZS5cbiAgICogQHBhcmFtIHtBcnJheX0gYm91bmRzIC0gW1tsb24sIGxhdF0sIFtsb24sIGxhdF1dXG4gICAqIEBwYXJhbSB7TnVtYmVyfSBbb3B0aW9ucy5wYWRkaW5nXSAtIFRoZSBhbW91bnQgb2YgcGFkZGluZyBpbiBwaXhlbHMgdG8gYWRkIHRvIHRoZSBnaXZlbiBib3VuZHMuXG4gICAqIEBwYXJhbSB7QXJyYXl9IFtvcHRpb25zLm9mZnNldF0gLSBUaGUgY2VudGVyIG9mIHRoZSBnaXZlbiBib3VuZHMgcmVsYXRpdmUgdG8gdGhlIG1hcCdzIGNlbnRlcixcbiAgICogICAgW3gsIHldIG1lYXN1cmVkIGluIHBpeGVscy5cbiAgICogQHJldHVybnMge1dlYk1lcmNhdG9yVmlld3BvcnR9XG4gICAqL1xuICBmaXRCb3VuZHMoYm91bmRzLCBvcHRpb25zID0ge30pIHtcbiAgICBjb25zdCB7d2lkdGgsIGhlaWdodH0gPSB0aGlzO1xuICAgIGNvbnN0IHtsb25naXR1ZGUsIGxhdGl0dWRlLCB6b29tfSA9IGZpdEJvdW5kcyhPYmplY3QuYXNzaWduKHt3aWR0aCwgaGVpZ2h0LCBib3VuZHN9LCBvcHRpb25zKSk7XG4gICAgcmV0dXJuIG5ldyBXZWJNZXJjYXRvclZpZXdwb3J0KHt3aWR0aCwgaGVpZ2h0LCBsb25naXR1ZGUsIGxhdGl0dWRlLCB6b29tfSk7XG4gIH1cblxufVxuIl19
 
/***/ }),
/* 82 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.MAPBOX_LIMITS = undefined;
 
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
 
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
 
var _viewState = __webpack_require__(180);
 
var _viewState2 = _interopRequireDefault(_viewState);
 
var _viewportMercatorProject = __webpack_require__(79);
 
var _viewportMercatorProject2 = _interopRequireDefault(_viewportMercatorProject);
 
var _assert = __webpack_require__(1);
 
var _assert2 = _interopRequireDefault(_assert);
 
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
 
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
 
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
 
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
 
// MAPBOX LIMITS
var MAPBOX_LIMITS = exports.MAPBOX_LIMITS = {
  minZoom: 0,
  maxZoom: 20,
  minPitch: 0,
  maxPitch: 60
};
 
var DEFAULT_STATE = {
  pitch: 0,
  bearing: 0,
  altitude: 1.5
};
 
/* Utils */
function clamp(value, min, max) {
  return value < min ? min : value > max ? max : value;
}
 
var MapState = function (_ViewState) {
  _inherits(MapState, _ViewState);
 
  function MapState() {
    var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
        width = _ref.width,
        height = _ref.height,
        latitude = _ref.latitude,
        longitude = _ref.longitude,
        zoom = _ref.zoom,
        _ref$bearing = _ref.bearing,
        bearing = _ref$bearing === undefined ? DEFAULT_STATE.bearing : _ref$bearing,
        _ref$pitch = _ref.pitch,
        pitch = _ref$pitch === undefined ? DEFAULT_STATE.pitch : _ref$pitch,
        _ref$altitude = _ref.altitude,
        altitude = _ref$altitude === undefined ? DEFAULT_STATE.altitude : _ref$altitude,
        _ref$maxZoom = _ref.maxZoom,
        maxZoom = _ref$maxZoom === undefined ? MAPBOX_LIMITS.maxZoom : _ref$maxZoom,
        _ref$minZoom = _ref.minZoom,
        minZoom = _ref$minZoom === undefined ? MAPBOX_LIMITS.minZoom : _ref$minZoom,
        _ref$maxPitch = _ref.maxPitch,
        maxPitch = _ref$maxPitch === undefined ? MAPBOX_LIMITS.maxPitch : _ref$maxPitch,
        _ref$minPitch = _ref.minPitch,
        minPitch = _ref$minPitch === undefined ? MAPBOX_LIMITS.minPitch : _ref$minPitch,
        startPanLngLat = _ref.startPanLngLat,
        startZoomLngLat = _ref.startZoomLngLat,
        startBearing = _ref.startBearing,
        startPitch = _ref.startPitch,
        startZoom = _ref.startZoom;
 
    _classCallCheck(this, MapState);
 
    (0, _assert2.default)(Number.isFinite(longitude), '`longitude` must be supplied');
    (0, _assert2.default)(Number.isFinite(latitude), '`latitude` must be supplied');
    (0, _assert2.default)(Number.isFinite(zoom), '`zoom` must be supplied');
 
    var _this = _possibleConstructorReturn(this, (MapState.__proto__ || Object.getPrototypeOf(MapState)).call(this, {
      width: width,
      height: height,
      latitude: latitude,
      longitude: longitude,
      zoom: zoom,
      bearing: bearing,
      pitch: pitch,
      altitude: altitude,
      maxZoom: maxZoom,
      minZoom: minZoom,
      maxPitch: maxPitch,
      minPitch: minPitch
    }));
 
    _this._interactiveState = {
      startPanLngLat: startPanLngLat,
      startZoomLngLat: startZoomLngLat,
      startBearing: startBearing,
      startPitch: startPitch,
      startZoom: startZoom
    };
    return _this;
  }
 
  /* Public API */
 
  _createClass(MapState, [{
    key: 'getViewportProps',
    value: function getViewportProps() {
      return this._viewportProps;
    }
  }, {
    key: 'getInteractiveState',
    value: function getInteractiveState() {
      return this._interactiveState;
    }
 
    /**
     * Start panning
     * @param {[Number, Number]} pos - position on screen where the pointer grabs
     */
 
  }, {
    key: 'panStart',
    value: function panStart(_ref2) {
      var pos = _ref2.pos;
 
      return this._getUpdatedState({
        startPanLngLat: this._unproject(pos)
      });
    }
 
    /**
     * Pan
     * @param {[Number, Number]} pos - position on screen where the pointer is
     * @param {[Number, Number], optional} startPos - where the pointer grabbed at
     *   the start of the operation. Must be supplied of `panStart()` was not called
     */
 
  }, {
    key: 'pan',
    value: function pan(_ref3) {
      var pos = _ref3.pos,
          startPos = _ref3.startPos;
 
      var startPanLngLat = this._interactiveState.startPanLngLat || this._unproject(startPos);
 
      if (!startPanLngLat) {
        return this;
      }
 
      var _calculateNewLngLat2 = this._calculateNewLngLat({ startPanLngLat: startPanLngLat, pos: pos }),
          _calculateNewLngLat3 = _slicedToArray(_calculateNewLngLat2, 2),
          longitude = _calculateNewLngLat3[0],
          latitude = _calculateNewLngLat3[1];
 
      return this._getUpdatedState({
        longitude: longitude,
        latitude: latitude
      });
    }
 
    /**
     * End panning
     * Must call if `panStart()` was called
     */
 
  }, {
    key: 'panEnd',
    value: function panEnd() {
      return this._getUpdatedState({
        startPanLngLat: null
      });
    }
 
    /**
     * Start rotating
     * @param {[Number, Number]} pos - position on screen where the center is
     */
 
  }, {
    key: 'rotateStart',
    value: function rotateStart(_ref4) {
      var pos = _ref4.pos;
 
      return this._getUpdatedState({
        startBearing: this._viewportProps.bearing,
        startPitch: this._viewportProps.pitch
      });
    }
 
    /**
     * Rotate
     * @param {Number} deltaScaleX - a number between [-1, 1] specifying the
     *   change to bearing.
     * @param {Number} deltaScaleY - a number between [-1, 1] specifying the
     *   change to pitch. -1 sets to minPitch and 1 sets to maxPitch.
     */
 
  }, {
    key: 'rotate',
    value: function rotate(_ref5) {
      var _ref5$deltaScaleX = _ref5.deltaScaleX,
          deltaScaleX = _ref5$deltaScaleX === undefined ? 0 : _ref5$deltaScaleX,
          _ref5$deltaScaleY = _ref5.deltaScaleY,
          deltaScaleY = _ref5$deltaScaleY === undefined ? 0 : _ref5$deltaScaleY;
      var _interactiveState = this._interactiveState,
          startBearing = _interactiveState.startBearing,
          startPitch = _interactiveState.startPitch;
 
 
      if (!Number.isFinite(startBearing) || !Number.isFinite(startPitch)) {
        return this;
      }
 
      var _calculateNewPitchAnd = this._calculateNewPitchAndBearing({
        deltaScaleX: deltaScaleX,
        deltaScaleY: deltaScaleY,
        startBearing: startBearing,
        startPitch: startPitch
      }),
          pitch = _calculateNewPitchAnd.pitch,
          bearing = _calculateNewPitchAnd.bearing;
 
      return this._getUpdatedState({
        bearing: bearing,
        pitch: pitch
      });
    }
 
    /**
     * End rotating
     * Must call if `rotateStart()` was called
     */
 
  }, {
    key: 'rotateEnd',
    value: function rotateEnd() {
      return this._getUpdatedState({
        startBearing: null,
        startPitch: null
      });
    }
 
    /**
     * Start zooming
     * @param {[Number, Number]} pos - position on screen where the center is
     */
 
  }, {
    key: 'zoomStart',
    value: function zoomStart(_ref6) {
      var pos = _ref6.pos;
 
      return this._getUpdatedState({
        startZoomLngLat: this._unproject(pos),
        startZoom: this._viewportProps.zoom
      });
    }
 
    /**
     * Zoom
     * @param {[Number, Number]} pos - position on screen where the current center is
     * @param {[Number, Number]} startPos - the center position at
     *   the start of the operation. Must be supplied of `zoomStart()` was not called
     * @param {Number} scale - a number between [0, 1] specifying the accumulated
     *   relative scale.
     */
 
  }, {
    key: 'zoom',
    value: function zoom(_ref7) {
      var pos = _ref7.pos,
          startPos = _ref7.startPos,
          scale = _ref7.scale;
 
      (0, _assert2.default)(scale > 0, '`scale` must be a positive number');
 
      // Make sure we zoom around the current mouse position rather than map center
      var _interactiveState2 = this._interactiveState,
          startZoom = _interactiveState2.startZoom,
          startZoomLngLat = _interactiveState2.startZoomLngLat;
 
 
      if (!Number.isFinite(startZoom)) {
        // We have two modes of zoom:
        // scroll zoom that are discrete events (transform from the current zoom level),
        // and pinch zoom that are continuous events (transform from the zoom level when
        // pinch started).
        // If startZoom state is defined, then use the startZoom state;
        // otherwise assume discrete zooming
        startZoom = this._viewportProps.zoom;
        startZoomLngLat = this._unproject(startPos) || this._unproject(pos);
      }
 
      // take the start lnglat and put it where the mouse is down.
      (0, _assert2.default)(startZoomLngLat, '`startZoomLngLat` prop is required ' + 'for zoom behavior to calculate where to position the map.');
 
      var zoom = this._calculateNewZoom({ scale: scale, startZoom: startZoom });
 
      var zoomedViewport = new _viewportMercatorProject2.default(Object.assign({}, this._viewportProps, { zoom: zoom }));
 
      var _zoomedViewport$getLo = zoomedViewport.getLocationAtPoint({ lngLat: startZoomLngLat, pos: pos }),
          _zoomedViewport$getLo2 = _slicedToArray(_zoomedViewport$getLo, 2),
          longitude = _zoomedViewport$getLo2[0],
          latitude = _zoomedViewport$getLo2[1];
 
      return this._getUpdatedState({
        zoom: zoom,
        longitude: longitude,
        latitude: latitude
      });
    }
 
    /**
     * End zooming
     * Must call if `zoomStart()` was called
     */
 
  }, {
    key: 'zoomEnd',
    value: function zoomEnd() {
      return this._getUpdatedState({
        startZoomLngLat: null,
        startZoom: null
      });
    }
  }, {
    key: 'zoomIn',
    value: function zoomIn() {
      return this._zoomFromCenter(2);
    }
  }, {
    key: 'zoomOut',
    value: function zoomOut() {
      return this._zoomFromCenter(0.5);
    }
  }, {
    key: 'moveLeft',
    value: function moveLeft() {
      return this._panFromCenter([100, 0]);
    }
  }, {
    key: 'moveRight',
    value: function moveRight() {
      return this._panFromCenter([-100, 0]);
    }
  }, {
    key: 'moveUp',
    value: function moveUp() {
      return this._panFromCenter([0, 100]);
    }
  }, {
    key: 'moveDown',
    value: function moveDown() {
      return this._panFromCenter([0, -100]);
    }
  }, {
    key: 'rotateLeft',
    value: function rotateLeft() {
      return this._getUpdatedState({
        bearing: this._viewportProps.bearing - 15
      });
    }
  }, {
    key: 'rotateRight',
    value: function rotateRight() {
      return this._getUpdatedState({
        bearing: this._viewportProps.bearing + 15
      });
    }
  }, {
    key: 'rotateUp',
    value: function rotateUp() {
      return this._getUpdatedState({
        pitch: this._viewportProps.pitch + 10
      });
    }
  }, {
    key: 'rotateDown',
    value: function rotateDown() {
      return this._getUpdatedState({
        pitch: this._viewportProps.pitch - 10
      });
    }
 
    /* Private methods */
 
  }, {
    key: '_zoomFromCenter',
    value: function _zoomFromCenter(scale) {
      var _viewportProps = this._viewportProps,
          width = _viewportProps.width,
          height = _viewportProps.height;
 
      return this.zoom({
        pos: [width / 2, height / 2],
        scale: scale
      });
    }
  }, {
    key: '_panFromCenter',
    value: function _panFromCenter(offset) {
      var _viewportProps2 = this._viewportProps,
          width = _viewportProps2.width,
          height = _viewportProps2.height;
 
      return this.pan({
        startPos: [width / 2, height / 2],
        pos: [width / 2 + offset[0], height / 2 + offset[1]]
      });
    }
  }, {
    key: '_getUpdatedState',
    value: function _getUpdatedState(newProps) {
      // Update _viewportProps
      return new MapState(Object.assign({}, this._viewportProps, this._interactiveState, newProps));
    }
 
    // Apply any constraints (mathematical or defined by _viewportProps) to map state
 
  }, {
    key: '_applyConstraints',
    value: function _applyConstraints(props) {
      // Ensure zoom is within specified range
      var maxZoom = props.maxZoom,
          minZoom = props.minZoom,
          zoom = props.zoom;
 
      props.zoom = clamp(zoom, minZoom, maxZoom);
 
      // Ensure pitch is within specified range
      var maxPitch = props.maxPitch,
          minPitch = props.minPitch,
          pitch = props.pitch;
 
      props.pitch = clamp(pitch, minPitch, maxPitch);
 
      Object.assign(props, (0, _viewportMercatorProject.normalizeViewportProps)(props));
 
      return props;
    }
  }, {
    key: '_unproject',
    value: function _unproject(pos) {
      var viewport = new _viewportMercatorProject2.default(this._viewportProps);
      return pos && viewport.unproject(pos);
    }
 
    // Calculate a new lnglat based on pixel dragging position
 
  }, {
    key: '_calculateNewLngLat',
    value: function _calculateNewLngLat(_ref8) {
      var startPanLngLat = _ref8.startPanLngLat,
          pos = _ref8.pos;
 
      var viewport = new _viewportMercatorProject2.default(this._viewportProps);
      return viewport.getMapCenterByLngLatPosition({ lngLat: startPanLngLat, pos: pos });
    }
 
    // Calculates new zoom
 
  }, {
    key: '_calculateNewZoom',
    value: function _calculateNewZoom(_ref9) {
      var scale = _ref9.scale,
          startZoom = _ref9.startZoom;
      var _viewportProps3 = this._viewportProps,
          maxZoom = _viewportProps3.maxZoom,
          minZoom = _viewportProps3.minZoom;
 
      var zoom = startZoom + Math.log2(scale);
      return clamp(zoom, minZoom, maxZoom);
    }
 
    // Calculates a new pitch and bearing from a position (coming from an event)
 
  }, {
    key: '_calculateNewPitchAndBearing',
    value: function _calculateNewPitchAndBearing(_ref10) {
      var deltaScaleX = _ref10.deltaScaleX,
          deltaScaleY = _ref10.deltaScaleY,
          startBearing = _ref10.startBearing,
          startPitch = _ref10.startPitch;
 
      // clamp deltaScaleY to [-1, 1] so that rotation is constrained between minPitch and maxPitch.
      // deltaScaleX does not need to be clamped as bearing does not have constraints.
      deltaScaleY = clamp(deltaScaleY, -1, 1);
 
      var _viewportProps4 = this._viewportProps,
          minPitch = _viewportProps4.minPitch,
          maxPitch = _viewportProps4.maxPitch;
 
 
      var bearing = startBearing + 180 * deltaScaleX;
      var pitch = startPitch;
      if (deltaScaleY > 0) {
        // Gradually increase pitch
        pitch = startPitch + deltaScaleY * (maxPitch - startPitch);
      } else if (deltaScaleY < 0) {
        // Gradually decrease pitch
        pitch = startPitch - deltaScaleY * (minPitch - startPitch);
      }
 
      return {
        pitch: pitch,
        bearing: bearing
      };
    }
  }]);
 
  return MapState;
}(_viewState2.default);
 
exports.default = MapState;
 
/***/ }),
/* 83 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
 
var _luma = __webpack_require__(12);
 
var _project = __webpack_require__(344);
 
var _project2 = _interopRequireDefault(_project);
 
var _projectDeprecated = __webpack_require__(334);
 
var _projectDeprecated2 = _interopRequireDefault(_projectDeprecated);
 
var _viewportUniforms = __webpack_require__(345);
 
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
 
// Copyright (c) 2015 - 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
 
var INITIAL_MODULE_OPTIONS = {};
 
function getUniforms() {
  var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : INITIAL_MODULE_OPTIONS;
 
  if (opts.viewport) {
    return (0, _viewportUniforms.getUniformsFromViewport)(opts);
  }
  return {};
}
 
exports.default = {
  name: 'project',
  dependencies: [_luma.fp32],
  vs: '' + _project2.default + _projectDeprecated2.default,
  getUniforms: getUniforms,
  deprecations: [
  // Removed custom picking uinforms
  // These don't really belong here but we need to check them for all shaders
  // the project module is by default included for all
  { type: 'uniform vec3', old: 'selectedPickingColor', new: "luma.gl's picking module" }, { type: 'uniform float', old: 'renderPickingBuffer', new: "luma.gl's picking module" }, { type: 'uniform float', old: 'pickingEnabled', new: "luma.gl's picking module" },
 
  // Removed project uniforms
  { type: 'uniform float', old: 'projectionMode', new: 'project_uCoordinateSystem' }, { type: 'uniform vec4', old: 'projectionCenter', new: 'project_uCenter' }, { type: 'uniform vec2', old: 'projectionOrigin' }, { type: 'uniform mat4', old: 'modelMatrix', new: 'project_uModelMatrix' }, { type: 'uniform mat4', old: 'viewMatrix' }, { type: 'uniform mat4', old: 'projectionMatrix', new: 'project_uViewProjectionMatrix' }, { type: 'uniform vec3', old: 'projectionPixelsPerUnit', new: 'project_uPixelsPerUnit' }, { type: 'uniform float', old: 'projectionScale', new: 'project_uScale' }, { type: 'uniform vec2', old: 'viewportSize', new: 'project_uViewportSize' }, { type: 'uniform float', old: 'devicePixelRatio', new: 'project_uDevicePixelRatio' }, { type: 'uniform vec3', old: 'cameraPos', new: 'project_uCameraPosition' },
 
  // Deprecated project functions
  { type: 'function', old: 'scale', new: 'project_scale', deprecated: 1 }, { type: 'function', old: 'preproject', new: 'project_position', deprecated: 1 }, { type: 'function', old: 'project', new: 'project_to_clipspace', deprecated: 1 }]
};
 
/***/ }),
/* 84 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.lerp = lerp;
exports.isValid = isValid;
exports.getEndValueByShortestPath = getEndValueByShortestPath;
exports.extractViewportFrom = extractViewportFrom;
 
var _mathUtils = __webpack_require__(127);
 
var VIEWPORT_PROPS = ['width', 'height', 'longitude', 'latitude', 'zoom', 'bearing', 'pitch', 'position'];
 
var WRAPPED_ANGULAR_PROPS = {
  longitude: 1,
  bearing: 1
};
 
function lerp(start, end, step) {
  if (Array.isArray(start)) {
    return start.map(function (element, index) {
      return lerp(element, end[index], step);
    });
  }
  return step * end + (1 - step) * start;
}
 
function isValid(prop) {
  return Number.isFinite(prop) || Array.isArray(prop);
}
 
function isWrappedAngularProp(propName) {
  return WRAPPED_ANGULAR_PROPS[propName];
}
 
function getEndValueByShortestPath(propName, startValue, endValue) {
  if (isWrappedAngularProp(propName) && Math.abs(endValue - startValue) > 180) {
    endValue = endValue < 0 ? endValue + 360 : endValue - 360;
  }
  return endValue;
}
 
// TODO/xiaoji: This should be merged with the controller's prop constraint system
function extractViewportFrom(props) {
  var viewport = {};
  VIEWPORT_PROPS.forEach(function (key) {
    var value = props[key];
    if (isValid(value)) {
      viewport[key] = value;
      // Normalize longitude and bearing into [-180, 180) range
      // This gurantees the props are in same range when they are interpolated.
      if (isWrappedAngularProp(key)) {
        viewport[key] = (0, _mathUtils.mod)(value + 180, 360) - 180;
      }
    }
  });
  return viewport;
}
 
/***/ }),
/* 85 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
 
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
 
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
 
var _viewport = __webpack_require__(42);
 
var _viewport2 = _interopRequireDefault(_viewport);
 
var _mathUtils = __webpack_require__(127);
 
var _multiply = __webpack_require__(75);
 
var _multiply2 = _interopRequireDefault(_multiply);
 
var _lookAt = __webpack_require__(102);
 
var _lookAt2 = _interopRequireDefault(_lookAt);
 
var _scale = __webpack_require__(77);
 
var _scale2 = _interopRequireDefault(_scale);
 
var _perspective = __webpack_require__(76);
 
var _perspective2 = _interopRequireDefault(_perspective);
 
var _translate = __webpack_require__(78);
 
var _translate2 = _interopRequireDefault(_translate);
 
var _rotateX = __webpack_require__(157);
 
var _rotateX2 = _interopRequireDefault(_rotateX);
 
var _rotateY = __webpack_require__(235);
 
var _rotateY2 = _interopRequireDefault(_rotateY);
 
var _rotateZ = __webpack_require__(158);
 
var _rotateZ2 = _interopRequireDefault(_rotateZ);
 
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
 
function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
 
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
 
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
 
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
 
var DEGREES_TO_RADIANS = Math.PI / 180;
 
/*
 * A deck.gl Viewport class used by OrbitController
 * Adds zoom and pixel translation on top of the PerspectiveViewport
 */
 
var OrbitViewport = function (_Viewport) {
  _inherits(OrbitViewport, _Viewport);
 
  function OrbitViewport(_ref) {
    var _ref$id = _ref.id,
        id = _ref$id === undefined ? 'orbit-viewport' : _ref$id,
        width = _ref.width,
        height = _ref.height,
        distance = _ref.distance,
        _ref$rotationX = _ref.rotationX,
        rotationX = _ref$rotationX === undefined ? 0 : _ref$rotationX,
        _ref$rotationOrbit = _ref.rotationOrbit,
        rotationOrbit = _ref$rotationOrbit === undefined ? 0 : _ref$rotationOrbit,
        _ref$orbitAxis = _ref.orbitAxis,
        orbitAxis = _ref$orbitAxis === undefined ? 'Z' : _ref$orbitAxis,
        _ref$lookAt = _ref.lookAt,
        lookAt = _ref$lookAt === undefined ? [0, 0, 0] : _ref$lookAt,
        _ref$up = _ref.up,
        up = _ref$up === undefined ? [0, 1, 0] : _ref$up,
        _ref$fov = _ref.fov,
        fov = _ref$fov === undefined ? 75 : _ref$fov,
        _ref$near = _ref.near,
        near = _ref$near === undefined ? 1 : _ref$near,
        _ref$far = _ref.far,
        far = _ref$far === undefined ? 100 : _ref$far,
        _ref$zoom = _ref.zoom,
        zoom = _ref$zoom === undefined ? 1 : _ref$zoom;
 
    _classCallCheck(this, OrbitViewport);
 
    var rotationMatrix = (0, _rotateX2.default)([], (0, _mathUtils.createMat4)(), -rotationX / 180 * Math.PI);
    if (orbitAxis === 'Z') {
      (0, _rotateZ2.default)(rotationMatrix, rotationMatrix, -rotationOrbit / 180 * Math.PI);
    } else {
      (0, _rotateY2.default)(rotationMatrix, rotationMatrix, -rotationOrbit / 180 * Math.PI);
    }
 
    var translateMatrix = (0, _mathUtils.createMat4)();
    (0, _scale2.default)(translateMatrix, translateMatrix, [zoom, zoom, zoom]);
    (0, _translate2.default)(translateMatrix, translateMatrix, [-lookAt[0], -lookAt[1], -lookAt[2]]);
 
    var viewMatrix = (0, _lookAt2.default)([], [0, 0, distance], [0, 0, 0], up);
    var fovRadians = fov * DEGREES_TO_RADIANS;
    var aspect = width / height;
    var perspectiveMatrix = (0, _perspective2.default)([], fovRadians, aspect, near, far);
 
    var _this = _possibleConstructorReturn(this, (OrbitViewport.__proto__ || Object.getPrototypeOf(OrbitViewport)).call(this, {
      id: id,
      viewMatrix: (0, _multiply2.default)(viewMatrix, viewMatrix, (0, _multiply2.default)(rotationMatrix, rotationMatrix, translateMatrix)),
      projectionMatrix: perspectiveMatrix,
      width: width,
      height: height
    }));
 
    _this.width = width;
    _this.height = height;
    _this.distance = distance;
    _this.rotationX = rotationX;
    _this.rotationOrbit = rotationOrbit;
    _this.orbitAxis = orbitAxis;
    _this.lookAt = lookAt;
    _this.up = up;
    _this.fov = fov;
    _this.near = near;
    _this.far = far;
    _this.zoom = zoom;
    return _this;
  }
 
  _createClass(OrbitViewport, [{
    key: 'project',
    value: function project(xyz) {
      var _ref2 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
          _ref2$topLeft = _ref2.topLeft,
          topLeft = _ref2$topLeft === undefined ? false : _ref2$topLeft;
 
      var v = (0, _mathUtils.transformVector)(this.pixelProjectionMatrix, [].concat(_toConsumableArray(xyz), [1]));
 
      var _v = _slicedToArray(v, 3),
          x = _v[0],
          y = _v[1],
          z = _v[2];
 
      var y2 = topLeft ? this.height - y : y;
      return [x, y2, z];
    }
  }, {
    key: 'unproject',
    value: function unproject(xyz) {
      var _ref3 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
          _ref3$topLeft = _ref3.topLeft,
          topLeft = _ref3$topLeft === undefined ? false : _ref3$topLeft;
 
      var _xyz = _slicedToArray(xyz, 3),
          x = _xyz[0],
          y = _xyz[1],
          z = _xyz[2];
 
      var y2 = topLeft ? this.height - y : y;
 
      return (0, _mathUtils.transformVector)(this.pixelUnprojectionMatrix, [x, y2, z, 1]);
    }
 
    /** Move camera to make a model bounding box centered at lookat position fit in the viewport.
     * @param {Array} sizes - [sizeX, sizeY, sizeZ]], define the dimensions of bounding box
     * @returns a new OrbitViewport object
     */
 
  }, {
    key: 'fitBounds',
    value: function fitBounds(sizes) {
      var width = this.width,
          height = this.height,
          rotationX = this.rotationX,
          rotationOrbit = this.rotationOrbit,
          orbitAxis = this.orbitAxis,
          lookAt = this.lookAt,
          up = this.up,
          fov = this.fov,
          near = this.near,
          far = this.far,
          zoom = this.zoom;
 
      var size = Math.max(sizes[0], sizes[1], sizes[2]) / 2;
      var newDistance = size;//size / Math.tan(fov / 180 * Math.PI / 2);
 
      return new OrbitViewport({
        width: width,
        height: height,
        rotationX: rotationX,
        rotationOrbit: rotationOrbit,
        orbitAxis: orbitAxis,
        up: up,
        fov: fov,
        near: near,
        far: far,
        zoom: zoom,
        lookAt: lookAt,
        distance: newDistance
      });
    }
  }]);
 
  return OrbitViewport;
}(_viewport2.default);
 
exports.default = OrbitViewport;
 
 
OrbitViewport.displayName = 'OrbitViewport';
 
/***/ }),
/* 86 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
 
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
 
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
 
var _viewport = __webpack_require__(42);
 
var _viewport2 = _interopRequireDefault(_viewport);
 
var _viewportMercatorProject = __webpack_require__(79);
 
var _add = __webpack_require__(159);
 
var _add2 = _interopRequireDefault(_add);
 
var _negate = __webpack_require__(160);
 
var _negate2 = _interopRequireDefault(_negate);
 
var _assert = __webpack_require__(1);
 
var _assert2 = _interopRequireDefault(_assert);
 
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
 
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
 
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
 
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // Copyright (c) 2015 - 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
 
// View and Projection Matrix calculations for mapbox-js style
// map view properties
 
 
// TODO - import from viewport-mercator-project
// import {fitBounds} from '../viewport-mercator-project/fit-bounds';
 
// TODO - import from math.gl
/* eslint-disable camelcase */
 
 
var ERR_ARGUMENT = 'Illegal argument to WebMercatorViewport';
 
var WebMercatorViewport = function (_Viewport) {
  _inherits(WebMercatorViewport, _Viewport);
 
  /**
   * @classdesc
   * Creates view/projection matrices from mercator params
   * Note: The Viewport is immutable in the sense that it only has accessors.
   * A new viewport instance should be created if any parameters have changed.
   */
  /* eslint-disable complexity, max-statements */
  function WebMercatorViewport() {
    var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
 
    _classCallCheck(this, WebMercatorViewport);
 
    var _opts$latitude = opts.latitude,
        latitude = _opts$latitude === undefined ? 0 : _opts$latitude,
        _opts$longitude = opts.longitude,
        longitude = _opts$longitude === undefined ? 0 : _opts$longitude,
        _opts$zoom = opts.zoom,
        zoom = _opts$zoom === undefined ? 11 : _opts$zoom,
        _opts$pitch = opts.pitch,
        pitch = _opts$pitch === undefined ? 0 : _opts$pitch,
        _opts$bearing = opts.bearing,
        bearing = _opts$bearing === undefined ? 0 : _opts$bearing,
        _opts$farZMultiplier = opts.farZMultiplier,
        farZMultiplier = _opts$farZMultiplier === undefined ? 10 : _opts$farZMultiplier;
    var width = opts.width,
        height = opts.height,
        _opts$altitude = opts.altitude,
        //iclient
        isGeographicCoordinateSystem= opts.isGeographicCoordinateSystem,
        altitude = _opts$altitude === undefined ? 1.5 : _opts$altitude;
 
    // Silently allow apps to send in 0,0 to facilitate isomorphic render etc
 
    width = width || 1;
    height = height || 1;
 
    // Altitude - prevent division by 0
    // TODO - just throw an Error instead?
    altitude = Math.max(0.75, altitude);
 
    var projectionMatrix = (0, _viewportMercatorProject.getProjectionMatrix)({
      width: width,
      height: height,
      pitch: pitch,
      altitude: altitude,
      farZMultiplier: farZMultiplier
    });
 
    // The uncentered matrix allows us two move the center addition to the
    // shader (cheap) which gives a coordinate system that has its center in
    // the layer's center position. This makes rotations and other modelMatrx
    // transforms much more useful.
    var viewMatrixUncentered = (0, _viewportMercatorProject.getViewMatrix)({
      height: height,
      pitch: pitch,
      bearing: bearing,
      altitude: altitude
    });
 
    // Save parameters
    var _this = _possibleConstructorReturn(this, (WebMercatorViewport.__proto__ || Object.getPrototypeOf(WebMercatorViewport)).call(this, Object.assign({}, opts, {
      // x, y, position, ...
      // TODO / hack - prevent vertical offsets if not FirstPersonViewport
      position: opts.position && [opts.position[0], opts.position[1], 0],
      width: width,
      height: height,
      viewMatrix: viewMatrixUncentered,
      longitude: longitude,
      latitude: latitude,
      zoom: zoom,
      projectionMatrix: projectionMatrix,
      //iclient
      isGeographicCoordinateSystem:isGeographicCoordinateSystem,
      focalDistance: 1 // Viewport is already carefully set up to "focus" on ground
    })));
 
    _this.latitude = latitude;
    _this.longitude = longitude;
    _this.zoom = zoom;
    _this.pitch = pitch;
    _this.bearing = bearing;
    _this.altitude = altitude;
 
    // Bind methods
    _this.metersToLngLatDelta = _this.metersToLngLatDelta.bind(_this);
    _this.lngLatDeltaToMeters = _this.lngLatDeltaToMeters.bind(_this);
    _this.addMetersToLngLat = _this.addMetersToLngLat.bind(_this);
 
    Object.freeze(_this);
    return _this;
  }
  /* eslint-enable complexity, max-statements */
 
  /**
   * Project [lng,lat] on sphere onto [x,y] on 512*512 Mercator Zoom 0 tile.
   * Performs the nonlinear part of the web mercator projection.
   * Remaining projection is done with 4x4 matrices which also handles
   * perspective.
   *
   * @param {Array} lngLat - [lng, lat] coordinates
   *   Specifies a point on the sphere to project onto the map.
   * @return {Array} [x,y] coordinates.
   */
 
 
  _createClass(WebMercatorViewport, [{
    key: '_projectFlat',
    value: function _projectFlat(lngLat) {
      var scale = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.scale;
 
      return (0, _viewportMercatorProject.lngLatToWorld)(lngLat, scale,this.isGeographicCoordinateSystem);
    }
 
    /**
     * Unproject world point [x,y] on map onto {lat, lon} on sphere
     *
     * @param {object|Vector} xy - object with {x,y} members
     *  representing point on projected map plane
     * @return {GeoCoordinates} - object with {lat,lon} of point on sphere.
     *   Has toArray method if you need a GeoJSON Array.
     *   Per cartographic tradition, lat and lon are specified as degrees.
     */
 
  }, {
    key: '_unprojectFlat',
    value: function _unprojectFlat(xy) {
      var scale = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.scale;
 
      return (0, _viewportMercatorProject.worldToLngLat)(xy, scale,this.isGeographicCoordinateSystem);
    }
 
    /**
     * Converts a meter offset to a lnglat offset
     *
     * Note: Uses simple linear approximation around the viewport center
     * Error increases with size of offset (roughly 1% per 100km)
     *
     * @param {[Number,Number]|[Number,Number,Number]) xyz - array of meter deltas
     * @return {[Number,Number]|[Number,Number,Number]) - array of [lng,lat,z] deltas
     */
 
  }, {
    key: 'metersToLngLatDelta',
    value: function metersToLngLatDelta(xyz) {
      var _xyz = _slicedToArray(xyz, 3),
          x = _xyz[0],
          y = _xyz[1],
          _xyz$ = _xyz[2],
          z = _xyz$ === undefined ? 0 : _xyz$;
 
      (0, _assert2.default)(Number.isFinite(x) && Number.isFinite(y) && Number.isFinite(z), ERR_ARGUMENT);
      var _distanceScales = this.distanceScales,
          pixelsPerMeter = _distanceScales.pixelsPerMeter,
          degreesPerPixel = _distanceScales.degreesPerPixel;
 
      var deltaLng = x * pixelsPerMeter[0] * degreesPerPixel[0];
      var deltaLat = y * pixelsPerMeter[1] * degreesPerPixel[1];
      return xyz.length === 2 ? [deltaLng, deltaLat] : [deltaLng, deltaLat, z];
    }
 
    /**
     * Converts a lnglat offset to a meter offset
     *
     * Note: Uses simple linear approximation around the viewport center
     * Error increases with size of offset (roughly 1% per 100km)
     *
     * @param {[Number,Number]|[Number,Number,Number]) deltaLngLatZ - array of [lng,lat,z] deltas
     * @return {[Number,Number]|[Number,Number,Number]) - array of meter deltas
     */
 
  }, {
    key: 'lngLatDeltaToMeters',
    value: function lngLatDeltaToMeters(deltaLngLatZ) {
      var _deltaLngLatZ = _slicedToArray(deltaLngLatZ, 3),
          deltaLng = _deltaLngLatZ[0],
          deltaLat = _deltaLngLatZ[1],
          _deltaLngLatZ$ = _deltaLngLatZ[2],
          deltaZ = _deltaLngLatZ$ === undefined ? 0 : _deltaLngLatZ$;
 
      (0, _assert2.default)(Number.isFinite(deltaLng) && Number.isFinite(deltaLat) && Number.isFinite(deltaZ), ERR_ARGUMENT);
      var _distanceScales2 = this.distanceScales,
          pixelsPerDegree = _distanceScales2.pixelsPerDegree,
          metersPerPixel = _distanceScales2.metersPerPixel;
 
      var deltaX = deltaLng * pixelsPerDegree[0] * metersPerPixel[0];
      var deltaY = deltaLat * pixelsPerDegree[1] * metersPerPixel[1];
      return deltaLngLatZ.length === 2 ? [deltaX, deltaY] : [deltaX, deltaY, deltaZ];
    }
 
    /**
     * Add a meter delta to a base lnglat coordinate, returning a new lnglat array
     *
     * Note: Uses simple linear approximation around the viewport center
     * Error increases with size of offset (roughly 1% per 100km)
     *
     * @param {[Number,Number]|[Number,Number,Number]) lngLatZ - base coordinate
     * @param {[Number,Number]|[Number,Number,Number]) xyz - array of meter deltas
     * @return {[Number,Number]|[Number,Number,Number]) array of [lng,lat,z] deltas
     */
 
  }, {
    key: 'addMetersToLngLat',
    value: function addMetersToLngLat(lngLatZ, xyz) {
      var _lngLatZ = _slicedToArray(lngLatZ, 3),
          lng = _lngLatZ[0],
          lat = _lngLatZ[1],
          _lngLatZ$ = _lngLatZ[2],
          Z = _lngLatZ$ === undefined ? 0 : _lngLatZ$;
 
      var _metersToLngLatDelta = this.metersToLngLatDelta(xyz),
          _metersToLngLatDelta2 = _slicedToArray(_metersToLngLatDelta, 3),
          deltaLng = _metersToLngLatDelta2[0],
          deltaLat = _metersToLngLatDelta2[1],
          _metersToLngLatDelta3 = _metersToLngLatDelta2[2],
          deltaZ = _metersToLngLatDelta3 === undefined ? 0 : _metersToLngLatDelta3;
 
      return lngLatZ.length === 2 ? [lng + deltaLng, lat + deltaLat] : [lng + deltaLng, lat + deltaLat, Z + deltaZ];
    }
 
    /**
     * Get the map center that place a given [lng, lat] coordinate at screen
     * point [x, y]
     *
     * @param {Array} lngLat - [lng,lat] coordinates
     *   Specifies a point on the sphere.
     * @param {Array} pos - [x,y] coordinates
     *   Specifies a point on the screen.
     * @return {Array} [lng,lat] new map center.
     */
 
  }, {
    key: 'getMapCenterByLngLatPosition',
    value: function getMapCenterByLngLatPosition(_ref) {
      var lngLat = _ref.lngLat,
          pos = _ref.pos;
 
      var fromLocation = (0, _viewportMercatorProject.pixelsToWorld)(pos, this.pixelUnprojectionMatrix);
      var toLocation = (0, _viewportMercatorProject.lngLatToWorld)(lngLat, this.scale);
 
      var translate = (0, _add2.default)([], toLocation, (0, _negate2.default)([], fromLocation));
      var newCenter = (0, _add2.default)([], this.center, translate);
 
      return (0, _viewportMercatorProject.worldToLngLat)(newCenter, this.scale,this.isGeographicCoordinateSystem);
    }
 
    // Legacy method name
 
  }, {
    key: 'getLocationAtPoint',
    value: function getLocationAtPoint(_ref2) {
      var lngLat = _ref2.lngLat,
          pos = _ref2.pos;
 
      return this.getMapCenterByLngLatPosition({ lngLat: lngLat, pos: pos });
    }
 
    /**
     * Returns a new viewport that fit around the given rectangle.
     * Only supports non-perspective mode.
     * @param {Array} bounds - [[lon, lat], [lon, lat]]
     * @param {Number} [options.padding] - The amount of padding in pixels to add to the given bounds.
     * @param {Array} [options.offset] - The center of the given bounds relative to the map's center,
     *    [x, y] measured in pixels.
     * @returns {WebMercatorViewport}
     */
 
  }, {
    key: 'fitBounds',
    value: function fitBounds(bounds) {
      var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
      var width = this.width,
          height = this.height;
 
      var _fitBounds2 = (0, _viewportMercatorProject.fitBounds)(Object.assign({ width: width, height: height, bounds: bounds }, options)),
          longitude = _fitBounds2.longitude,
          latitude = _fitBounds2.latitude,
          zoom = _fitBounds2.zoom;
 
      return new WebMercatorViewport({ width: width, height: height, longitude: longitude, latitude: latitude, zoom: zoom });
    }
 
    // TODO - should support user supplied constraints
 
  }, {
    key: 'isMapSynched',
    value: function isMapSynched() {
      var EPSILON = 0.000001;
      var MAPBOX_LIMITS = {
        pitch: 60,
        zoom: 40
      };
 
      var pitch = this.pitch,
          zoom = this.zoom;
 
 
      return pitch <= MAPBOX_LIMITS.pitch + EPSILON && zoom <= MAPBOX_LIMITS.zoom + EPSILON;
    }
  }]);
 
  return WebMercatorViewport;
}(_viewport2.default);
 
exports.default = WebMercatorViewport;
 
 
WebMercatorViewport.displayName = 'WebMercatorViewport';
 
/***/ }),
/* 87 */
/***/ (function(module, exports, __webpack_require__) {
 
// false -> Array#indexOf
// true  -> Array#includes
var toIObject = __webpack_require__(24);
var toLength = __webpack_require__(11);
var toAbsoluteIndex = __webpack_require__(57);
module.exports = function (IS_INCLUDES) {
  return function ($this, el, fromIndex) {
    var O = toIObject($this);
    var length = toLength(O.length);
    var index = toAbsoluteIndex(fromIndex, length);
    var value;
    // Array#includes uses SameValueZero equality algorithm
    // eslint-disable-next-line no-self-compare
    if (IS_INCLUDES && el != el) while (length > index) {
      value = O[index++];
      // eslint-disable-next-line no-self-compare
      if (value != value) return true;
    // Array#indexOf ignores holes, Array#includes - not
    } else for (;length > index; index++) if (IS_INCLUDES || index in O) {
      if (O[index] === el) return IS_INCLUDES || index || 0;
    } return !IS_INCLUDES && -1;
  };
};
 
 
/***/ }),
/* 88 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var global = __webpack_require__(3);
var $export = __webpack_require__(0);
var redefine = __webpack_require__(20);
var redefineAll = __webpack_require__(55);
var meta = __webpack_require__(44);
var forOf = __webpack_require__(49);
var anInstance = __webpack_require__(48);
var isObject = __webpack_require__(5);
var fails = __webpack_require__(4);
var $iterDetect = __webpack_require__(93);
var setToStringTag = __webpack_require__(64);
var inheritIfRequired = __webpack_require__(135);
 
module.exports = function (NAME, wrapper, methods, common, IS_MAP, IS_WEAK) {
  var Base = global[NAME];
  var C = Base;
  var ADDER = IS_MAP ? 'set' : 'add';
  var proto = C && C.prototype;
  var O = {};
  var fixMethod = function (KEY) {
    var fn = proto[KEY];
    redefine(proto, KEY,
      KEY == 'delete' ? function (a) {
        return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a);
      } : KEY == 'has' ? function has(a) {
        return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a);
      } : KEY == 'get' ? function get(a) {
        return IS_WEAK && !isObject(a) ? undefined : fn.call(this, a === 0 ? 0 : a);
      } : KEY == 'add' ? function add(a) { fn.call(this, a === 0 ? 0 : a); return this; }
        : function set(a, b) { fn.call(this, a === 0 ? 0 : a, b); return this; }
    );
  };
  if (typeof C != 'function' || !(IS_WEAK || proto.forEach && !fails(function () {
    new C().entries().next();
  }))) {
    // create collection constructor
    C = common.getConstructor(wrapper, NAME, IS_MAP, ADDER);
    redefineAll(C.prototype, methods);
    meta.NEED = true;
  } else {
    var instance = new C();
    // early implementations not supports chaining
    var HASNT_CHAINING = instance[ADDER](IS_WEAK ? {} : -0, 1) != instance;
    // V8 ~  Chromium 40- weak-collections throws on primitives, but should return false
    var THROWS_ON_PRIMITIVES = fails(function () { instance.has(1); });
    // most early implementations doesn't supports iterables, most modern - not close it correctly
    var ACCEPT_ITERABLES = $iterDetect(function (iter) { new C(iter); }); // eslint-disable-line no-new
    // for early implementations -0 and +0 not the same
    var BUGGY_ZERO = !IS_WEAK && fails(function () {
      // V8 ~ Chromium 42- fails only with 5+ elements
      var $instance = new C();
      var index = 5;
      while (index--) $instance[ADDER](index, index);
      return !$instance.has(-0);
    });
    if (!ACCEPT_ITERABLES) {
      C = wrapper(function (target, iterable) {
        anInstance(target, C, NAME);
        var that = inheritIfRequired(new Base(), target, C);
        if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that);
        return that;
      });
      C.prototype = proto;
      proto.constructor = C;
    }
    if (THROWS_ON_PRIMITIVES || BUGGY_ZERO) {
      fixMethod('delete');
      fixMethod('has');
      IS_MAP && fixMethod('get');
    }
    if (BUGGY_ZERO || HASNT_CHAINING) fixMethod(ADDER);
    // weak collections should not contains .clear method
    if (IS_WEAK && proto.clear) delete proto.clear;
  }
 
  setToStringTag(C, NAME);
 
  O[NAME] = C;
  $export($export.G + $export.W + $export.F * (C != Base), O);
 
  if (!IS_WEAK) common.setStrong(C, NAME, IS_MAP);
 
  return C;
};
 
 
/***/ }),
/* 89 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var hide = __webpack_require__(19);
var redefine = __webpack_require__(20);
var fails = __webpack_require__(4);
var defined = __webpack_require__(34);
var wks = __webpack_require__(6);
 
module.exports = function (KEY, length, exec) {
  var SYMBOL = wks(KEY);
  var fns = exec(defined, SYMBOL, ''[KEY]);
  var strfn = fns[0];
  var rxfn = fns[1];
  if (fails(function () {
    var O = {};
    O[SYMBOL] = function () { return 7; };
    return ''[KEY](O) != 7;
  })) {
    redefine(String.prototype, KEY, strfn);
    hide(RegExp.prototype, SYMBOL, length == 2
      // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue)
      // 21.2.5.11 RegExp.prototype[@@split](string, limit)
      ? function (string, arg) { return rxfn.call(string, this, arg); }
      // 21.2.5.6 RegExp.prototype[@@match](string)
      // 21.2.5.9 RegExp.prototype[@@search](string)
      : function (string) { return rxfn.call(string, this); }
    );
  }
};
 
 
/***/ }),
/* 90 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
// 21.2.5.3 get RegExp.prototype.flags
var anObject = __webpack_require__(2);
module.exports = function () {
  var that = anObject(this);
  var result = '';
  if (that.global) result += 'g';
  if (that.ignoreCase) result += 'i';
  if (that.multiline) result += 'm';
  if (that.unicode) result += 'u';
  if (that.sticky) result += 'y';
  return result;
};
 
 
/***/ }),
/* 91 */
/***/ (function(module, exports, __webpack_require__) {
 
// 7.2.2 IsArray(argument)
var cof = __webpack_require__(27);
module.exports = Array.isArray || function isArray(arg) {
  return cof(arg) == 'Array';
};
 
 
/***/ }),
/* 92 */
/***/ (function(module, exports, __webpack_require__) {
 
// 7.2.8 IsRegExp(argument)
var isObject = __webpack_require__(5);
var cof = __webpack_require__(27);
var MATCH = __webpack_require__(6)('match');
module.exports = function (it) {
  var isRegExp;
  return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : cof(it) == 'RegExp');
};
 
 
/***/ }),
/* 93 */
/***/ (function(module, exports, __webpack_require__) {
 
var ITERATOR = __webpack_require__(6)('iterator');
var SAFE_CLOSING = false;
 
try {
  var riter = [7][ITERATOR]();
  riter['return'] = function () { SAFE_CLOSING = true; };
  // eslint-disable-next-line no-throw-literal
  Array.from(riter, function () { throw 2; });
} catch (e) { /* empty */ }
 
module.exports = function (exec, skipClosing) {
  if (!skipClosing && !SAFE_CLOSING) return false;
  var safe = false;
  try {
    var arr = [7];
    var iter = arr[ITERATOR]();
    iter.next = function () { return { done: safe = true }; };
    arr[ITERATOR] = function () { return iter; };
    exec(arr);
  } catch (e) { /* empty */ }
  return safe;
};
 
 
/***/ }),
/* 94 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
// Forced replacement prototype accessors methods
module.exports = __webpack_require__(50) || !__webpack_require__(4)(function () {
  var K = Math.random();
  // In FF throws only define methods
  // eslint-disable-next-line no-undef, no-useless-call
  __defineSetter__.call(null, K, function () { /* empty */ });
  delete __webpack_require__(3)[K];
});
 
 
/***/ }),
/* 95 */
/***/ (function(module, exports) {
 
exports.f = Object.getOwnPropertySymbols;
 
 
/***/ }),
/* 96 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
// https://tc39.github.io/proposal-setmap-offrom/
var $export = __webpack_require__(0);
var aFunction = __webpack_require__(15);
var ctx = __webpack_require__(28);
var forOf = __webpack_require__(49);
 
module.exports = function (COLLECTION) {
  $export($export.S, COLLECTION, { from: function from(source /* , mapFn, thisArg */) {
    var mapFn = arguments[1];
    var mapping, A, n, cb;
    aFunction(this);
    mapping = mapFn !== undefined;
    if (mapping) aFunction(mapFn);
    if (source == undefined) return new this();
    A = [];
    if (mapping) {
      n = 0;
      cb = ctx(mapFn, arguments[2], 2);
      forOf(source, false, function (nextItem) {
        A.push(cb(nextItem, n++));
      });
    } else {
      forOf(source, false, A.push, A);
    }
    return new this(A);
  } });
};
 
 
/***/ }),
/* 97 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
// https://tc39.github.io/proposal-setmap-offrom/
var $export = __webpack_require__(0);
 
module.exports = function (COLLECTION) {
  $export($export.S, COLLECTION, { of: function of() {
    var length = arguments.length;
    var A = new Array(length);
    while (length--) A[length] = arguments[length];
    return new this(A);
  } });
};
 
 
/***/ }),
/* 98 */
/***/ (function(module, exports, __webpack_require__) {
 
var global = __webpack_require__(3);
var SHARED = '__core-js_shared__';
var store = global[SHARED] || (global[SHARED] = {});
module.exports = function (key) {
  return store[key] || (store[key] = {});
};
 
 
/***/ }),
/* 99 */
/***/ (function(module, exports, __webpack_require__) {
 
// 7.3.20 SpeciesConstructor(O, defaultConstructor)
var anObject = __webpack_require__(2);
var aFunction = __webpack_require__(15);
var SPECIES = __webpack_require__(6)('species');
module.exports = function (O, D) {
  var C = anObject(O).constructor;
  var S;
  return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S);
};
 
 
/***/ }),
/* 100 */
/***/ (function(module, exports, __webpack_require__) {
 
var global = __webpack_require__(3);
var hide = __webpack_require__(19);
var uid = __webpack_require__(58);
var TYPED = uid('typed_array');
var VIEW = uid('view');
var ABV = !!(global.ArrayBuffer && global.DataView);
var CONSTR = ABV;
var i = 0;
var l = 9;
var Typed;
 
var TypedArrayConstructors = (
  'Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array'
).split(',');
 
while (i < l) {
  if (Typed = global[TypedArrayConstructors[i++]]) {
    hide(Typed.prototype, TYPED, true);
    hide(Typed.prototype, VIEW, true);
  } else CONSTR = false;
}
 
module.exports = {
  ABV: ABV,
  CONSTR: CONSTR,
  TYPED: TYPED,
  VIEW: VIEW
};
 
 
/***/ }),
/* 101 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
/* WEBPACK VAR INJECTION */(function(process) {/**
 * Copyright (c) 2013-present, Facebook, Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 *
 */
 
 
 
/**
 * Use invariant() to assert state which your program assumes to be true.
 *
 * Provide sprintf-style format (only %s is supported) and arguments
 * to provide information about what broke and what you were
 * expecting.
 *
 * The invariant message will be stripped in production, but the invariant
 * will remain to ensure logic does not differ in production.
 */
 
var validateFormat = function validateFormat(format) {};
 
if (process.env.NODE_ENV !== 'production') {
  validateFormat = function validateFormat(format) {
    if (format === undefined) {
      throw new Error('invariant requires an error message argument');
    }
  };
}
 
function invariant(condition, format, a, b, c, d, e, f) {
  validateFormat(format);
 
  if (!condition) {
    var error;
    if (format === undefined) {
      error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');
    } else {
      var args = [a, b, c, d, e, f];
      var argIndex = 0;
      error = new Error(format.replace(/%s/g, function () {
        return args[argIndex++];
      }));
      error.name = 'Invariant Violation';
    }
 
    error.framesToPop = 1; // we don't care about invariant's own frame
    throw error;
  }
}
 
module.exports = invariant;
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(26)))
 
/***/ }),
/* 102 */
/***/ (function(module, exports, __webpack_require__) {
 
var identity = __webpack_require__(572);
 
module.exports = lookAt;
 
/**
 * Generates a look-at matrix with the given eye position, focal point, and up axis
 *
 * @param {mat4} out mat4 frustum matrix will be written into
 * @param {vec3} eye Position of the viewer
 * @param {vec3} center Point the viewer is looking at
 * @param {vec3} up vec3 pointing up
 * @returns {mat4} out
 */
function lookAt(out, eye, center, up) {
    var x0, x1, x2, y0, y1, y2, z0, z1, z2, len,
        eyex = eye[0],
        eyey = eye[1],
        eyez = eye[2],
        upx = up[0],
        upy = up[1],
        upz = up[2],
        centerx = center[0],
        centery = center[1],
        centerz = center[2];
 
    if (Math.abs(eyex - centerx) < 0.000001 &&
        Math.abs(eyey - centery) < 0.000001 &&
        Math.abs(eyez - centerz) < 0.000001) {
        return identity(out);
    }
 
    z0 = eyex - centerx;
    z1 = eyey - centery;
    z2 = eyez - centerz;
 
    len = 1 / Math.sqrt(z0 * z0 + z1 * z1 + z2 * z2);
    z0 *= len;
    z1 *= len;
    z2 *= len;
 
    x0 = upy * z2 - upz * z1;
    x1 = upz * z0 - upx * z2;
    x2 = upx * z1 - upy * z0;
    len = Math.sqrt(x0 * x0 + x1 * x1 + x2 * x2);
    if (!len) {
        x0 = 0;
        x1 = 0;
        x2 = 0;
    } else {
        len = 1 / len;
        x0 *= len;
        x1 *= len;
        x2 *= len;
    }
 
    y0 = z1 * x2 - z2 * x1;
    y1 = z2 * x0 - z0 * x2;
    y2 = z0 * x1 - z1 * x0;
 
    len = Math.sqrt(y0 * y0 + y1 * y1 + y2 * y2);
    if (!len) {
        y0 = 0;
        y1 = 0;
        y2 = 0;
    } else {
        len = 1 / len;
        y0 *= len;
        y1 *= len;
        y2 *= len;
    }
 
    out[0] = x0;
    out[1] = y0;
    out[2] = z0;
    out[3] = 0;
    out[4] = x1;
    out[5] = y1;
    out[6] = z1;
    out[7] = 0;
    out[8] = x2;
    out[9] = y2;
    out[10] = z2;
    out[11] = 0;
    out[12] = -(x0 * eyex + x1 * eyey + x2 * eyez);
    out[13] = -(y0 * eyex + y1 * eyey + y2 * eyez);
    out[14] = -(z0 * eyex + z1 * eyey + z2 * eyez);
    out[15] = 1;
 
    return out;
};
 
/***/ }),
/* 103 */
/***/ (function(module, exports) {
 
module.exports = transformMat4
 
/**
 * Transforms the vec4 with a mat4.
 *
 * @param {vec4} out the receiving vector
 * @param {vec4} a the vector to transform
 * @param {mat4} m matrix to transform with
 * @returns {vec4} out
 */
function transformMat4 (out, a, m) {
  var x = a[0], y = a[1], z = a[2], w = a[3]
  out[0] = m[0] * x + m[4] * y + m[8] * z + m[12] * w
  out[1] = m[1] * x + m[5] * y + m[9] * z + m[13] * w
  out[2] = m[2] * x + m[6] * y + m[10] * z + m[14] * w
  out[3] = m[3] * x + m[7] * y + m[11] * z + m[15] * w
  return out
}
 
 
/***/ }),
/* 104 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__webgl__ = __webpack_require__(61);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__webgl_uniforms__ = __webpack_require__(168);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__geometry_geometry__ = __webpack_require__(45);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__core_object_3d__ = __webpack_require__(250);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__utils__ = __webpack_require__(8);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__shadertools_shaders__ = __webpack_require__(657);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__shadertools__ = __webpack_require__(642);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__debug_seer_integration__ = __webpack_require__(628);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__webgl_query__ = __webpack_require__(273);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_assert__ = __webpack_require__(1);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_assert___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_assert__);
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
 
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
 
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
 
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
 
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
 
/* eslint quotes: ["error", "single", { "allowTemplateLiterals": true }]*/
// A scenegraph object node
 
// import {withParameters} from '../webgl/context-state';
 
 
 
 
 
 
 
 
 
 
 
 
var MSG_INSTANCED_PARAM_DEPRECATED = 'Warning: Model constructor: parameter "instanced" renamed to "isInstanced".\nThis will become a hard error in a future version of luma.gl.';
 
var ERR_MODEL_PARAMS = 'Model needs drawMode and vertexCount';
 
var LOG_DRAW_PRIORITY = 2;
 
// These old picking uniforms should be avoided and we should use picking module
// and set uniforms using Model class 'updateModuleSettings()'
var DEPRECATED_PICKING_UNIFORMS = ['renderPickingBuffer', 'pickingEnabled'];
 
// Model abstract O3D Class
 
var Model = /*#__PURE__*/function (_Object3D) {
  _inherits(Model, _Object3D);
 
  function Model(gl) {
    var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
 
    _classCallCheck(this, Model);
 
    var _this = _possibleConstructorReturn(this, (Model.__proto__ || Object.getPrototypeOf(Model)).call(this, opts));
 
    __WEBPACK_IMPORTED_MODULE_9_assert___default()(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__webgl__["isWebGL"])(gl));
    _this.gl = gl;
    _this.init(opts);
    return _this;
  }
 
  /* eslint-disable max-statements  */
  /* eslint-disable complexity  */
 
 
  _createClass(Model, [{
    key: 'init',
    value: function init() {
      var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
          _ref$vs = _ref.vs,
          vs = _ref$vs === undefined ? null : _ref$vs,
          _ref$fs = _ref.fs,
          fs = _ref$fs === undefined ? null : _ref$fs,
          _ref$modules = _ref.modules,
          modules = _ref$modules === undefined ? null : _ref$modules,
          _ref$defines = _ref.defines,
          defines = _ref$defines === undefined ? {} : _ref$defines,
          _ref$moduleSettings = _ref.moduleSettings,
          moduleSettings = _ref$moduleSettings === undefined ? {} : _ref$moduleSettings,
          defaultUniforms = _ref.defaultUniforms,
          _ref$program = _ref.program,
          program = _ref$program === undefined ? null : _ref$program,
          _ref$shaderCache = _ref.shaderCache,
          shaderCache = _ref$shaderCache === undefined ? null : _ref$shaderCache,
          _ref$isInstanced = _ref.isInstanced,
          isInstanced = _ref$isInstanced === undefined ? false : _ref$isInstanced,
          instanced = _ref.instanced,
          _ref$vertexCount = _ref.vertexCount,
          vertexCount = _ref$vertexCount === undefined ? undefined : _ref$vertexCount,
          _ref$instanceCount = _ref.instanceCount,
          instanceCount = _ref$instanceCount === undefined ? 0 : _ref$instanceCount,
          drawMode = _ref.drawMode,
          _ref$uniforms = _ref.uniforms,
          uniforms = _ref$uniforms === undefined ? {} : _ref$uniforms,
          _ref$attributes = _ref.attributes,
          attributes = _ref$attributes === undefined ? {} : _ref$attributes,
          _ref$geometry = _ref.geometry,
          geometry = _ref$geometry === undefined ? null : _ref$geometry,
          _ref$pickable = _ref.pickable,
          pickable = _ref$pickable === undefined ? true : _ref$pickable,
          _ref$pick = _ref.pick,
          pick = _ref$pick === undefined ? null : _ref$pick,
          _ref$render = _ref.render,
          render = _ref$render === undefined ? null : _ref$render,
          _ref$onBeforeRender = _ref.onBeforeRender,
          onBeforeRender = _ref$onBeforeRender === undefined ? function () {} : _ref$onBeforeRender,
          _ref$onAfterRender = _ref.onAfterRender,
          onAfterRender = _ref$onAfterRender === undefined ? function () {} : _ref$onAfterRender,
          _ref$varyings = _ref.varyings,
          varyings = _ref$varyings === undefined ? null : _ref$varyings,
          _ref$bufferMode = _ref.bufferMode,
          bufferMode = _ref$bufferMode === undefined ? __WEBPACK_IMPORTED_MODULE_0__webgl__["GL"].SEPARATE_ATTRIBS : _ref$bufferMode,
          _ref$timerQueryEnable = _ref.timerQueryEnabled,
          timerQueryEnabled = _ref$timerQueryEnable === undefined ? false : _ref$timerQueryEnable;
 
      this._initializeProgram({
        vs: vs,
        fs: fs,
        modules: modules,
        defines: defines,
        moduleSettings: moduleSettings,
        defaultUniforms: defaultUniforms,
        program: program,
        shaderCache: shaderCache,
        varyings: varyings,
        bufferMode: bufferMode
      });
 
      this.uniforms = {};
 
      // Make sure we have some reasonable default uniforms in place
      uniforms = Object.assign({}, this.program.defaultUniforms, uniforms);
      this.setUniforms(uniforms);
      // Get all default uniforms
      this.setUniforms(this.getModuleUniforms());
      // Get unforms for supplied parameters
      this.setUniforms(this.getModuleUniforms(moduleSettings));
 
      if (instanced) {
        /* global console */
        /* eslint-disable no-console */
        console.warn(MSG_INSTANCED_PARAM_DEPRECATED);
        isInstanced = isInstanced || instanced;
      }
 
      // TODO - remove?
      this.buffers = {};
      this.samplers = {};
      this.userData = {};
      this.drawParams = {};
      this.dynamic = false;
      this.needsRedraw = true;
 
      // Attributes and buffers
      if (geometry) {
        this.setGeometry(geometry);
      }
 
      this.attributes = {};
      this.setAttributes(attributes);
 
      // geometry might have set drawMode and vertexCount
      if (drawMode !== undefined) {
        this.drawMode = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__geometry_geometry__["b" /* getDrawMode */])(drawMode);
      }
      if (vertexCount !== undefined) {
        this.vertexCount = vertexCount;
      }
      this.isInstanced = isInstanced;
      this.instanceCount = instanceCount;
 
      // picking options
      this.pickable = Boolean(pickable);
      this.pick = pick || function () {
        return false;
      };
 
      this.onBeforeRender = onBeforeRender;
      this.onAfterRender = onAfterRender;
 
      // assert(program || program instanceof Program);
      __WEBPACK_IMPORTED_MODULE_9_assert___default()(this.drawMode !== undefined && Number.isFinite(this.vertexCount), ERR_MODEL_PARAMS);
 
      this.timerQueryEnabled = timerQueryEnabled && __WEBPACK_IMPORTED_MODULE_8__webgl_query__["a" /* default */].isSupported(this.gl, { timer: true });
      this.timeElapsedQuery = undefined;
      this.lastQueryReturned = true;
 
      this.stats = {
        accumulatedFrameTime: 0,
        averageFrameTime: 0,
        profileFrameCount: 0
      };
    }
    /* eslint-enable max-statements */
 
  }, {
    key: 'delete',
    value: function _delete() {
      this.program.delete();
      __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_7__debug_seer_integration__["a" /* removeModel */])(this.id);
    }
  }, {
    key: 'destroy',
    value: function destroy() {
      this.delete();
    }
  }, {
    key: 'setNeedsRedraw',
    value: function setNeedsRedraw() {
      var redraw = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
 
      this.needsRedraw = redraw;
      return this;
    }
  }, {
    key: 'getNeedsRedraw',
    value: function getNeedsRedraw() {
      var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
          _ref2$clearRedrawFlag = _ref2.clearRedrawFlags,
          clearRedrawFlags = _ref2$clearRedrawFlag === undefined ? false : _ref2$clearRedrawFlag;
 
      var redraw = false;
      redraw = redraw || this.needsRedraw;
      this.needsRedraw = this.needsRedraw && !clearRedrawFlags;
      redraw = redraw || this.geometry.getNeedsRedraw({ clearRedrawFlags: clearRedrawFlags });
      return redraw;
    }
  }, {
    key: 'setDrawMode',
    value: function setDrawMode(drawMode) {
      this.drawMode = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__geometry_geometry__["b" /* getDrawMode */])(drawMode);
      return this;
    }
  }, {
    key: 'getDrawMode',
    value: function getDrawMode() {
      return this.drawMode;
    }
  }, {
    key: 'setVertexCount',
    value: function setVertexCount(vertexCount) {
      __WEBPACK_IMPORTED_MODULE_9_assert___default()(Number.isFinite(vertexCount));
      this.vertexCount = vertexCount;
      return this;
    }
  }, {
    key: 'getVertexCount',
    value: function getVertexCount() {
      return this.vertexCount;
    }
  }, {
    key: 'setInstanceCount',
    value: function setInstanceCount(instanceCount) {
      __WEBPACK_IMPORTED_MODULE_9_assert___default()(Number.isFinite(instanceCount));
      this.instanceCount = instanceCount;
      return this;
    }
  }, {
    key: 'getInstanceCount',
    value: function getInstanceCount() {
      return this.instanceCount;
    }
  }, {
    key: 'getProgram',
    value: function getProgram() {
      return this.program;
    }
  }, {
    key: 'setGeometry',
 
 
    // TODO - just set attributes, don't hold on to geometry
    value: function setGeometry(geometry) {
      this.geometry = geometry;
      this.vertexCount = geometry.getVertexCount();
      this.drawMode = geometry.drawMode;
      this._createBuffersFromAttributeDescriptors(this.geometry.getAttributes());
      this.setNeedsRedraw();
      return this;
    }
  }, {
    key: 'getAttributes',
    value: function getAttributes() {
      return this.attributes;
    }
  }, {
    key: 'setAttributes',
    value: function setAttributes() {
      var attributes = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
 
      // Reutrn early if no attributes to set.
      if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__utils__["f" /* isObjectEmpty */])(attributes)) {
        return this;
      }
 
      Object.assign(this.attributes, attributes);
      this._createBuffersFromAttributeDescriptors(attributes);
      this.setNeedsRedraw();
 
      return this;
    }
  }, {
    key: 'getUniforms',
    value: function getUniforms() {
      return this.uniforms;
    }
 
    // TODO - should actually set the uniforms
 
  }, {
    key: 'setUniforms',
    value: function setUniforms() {
      var uniforms = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
 
      // TODO: we are still setting these uniforms in deck.gl so we don't break any external
      // application, these are marked deprecated in 5.0, remove them in deck.gl in 6.0.
      // Disabling since it gets too noisy in console, these are documented as deprecated.
      // this._checkForDeprecatedUniforms(uniforms);
      var somethingChanged = false;
      for (var key in uniforms) {
        if (!__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__webgl_uniforms__["d" /* areUniformsEqual */])(this.uniforms[key], uniforms[key])) {
          somethingChanged = true;
          break;
        }
      }
 
      if (somethingChanged) {
        __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__webgl__["checkUniformValues"])(uniforms, this.id);
        Object.assign(this.uniforms, uniforms);
        this.setNeedsRedraw();
      }
      return this;
    }
 
    // getModuleUniforms (already on object)
 
  }, {
    key: 'updateModuleSettings',
    value: function updateModuleSettings(opts) {
      var uniforms = this.getModuleUniforms(opts);
      return this.setUniforms(uniforms);
    }
  }, {
    key: 'draw',
    value: function draw() {
      var _ref3 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
          _ref3$moduleSettings = _ref3.moduleSettings,
          moduleSettings = _ref3$moduleSettings === undefined ? null : _ref3$moduleSettings,
          _ref3$uniforms = _ref3.uniforms,
          uniforms = _ref3$uniforms === undefined ? {} : _ref3$uniforms,
          _ref3$attributes = _ref3.attributes,
          attributes = _ref3$attributes === undefined ? {} : _ref3$attributes,
          _ref3$samplers = _ref3.samplers,
          samplers = _ref3$samplers === undefined ? {} : _ref3$samplers,
          _ref3$parameters = _ref3.parameters,
          parameters = _ref3$parameters === undefined ? {} : _ref3$parameters,
          settings = _ref3.settings,
          _ref3$framebuffer = _ref3.framebuffer,
          framebuffer = _ref3$framebuffer === undefined ? null : _ref3$framebuffer,
          _ref3$vertexArray = _ref3.vertexArray,
          vertexArray = _ref3$vertexArray === undefined ? null : _ref3$vertexArray,
          _ref3$transformFeedba = _ref3.transformFeedback,
          transformFeedback = _ref3$transformFeedba === undefined ? null : _ref3$transformFeedba;
 
      if (settings) {
        __WEBPACK_IMPORTED_MODULE_4__utils__["b" /* log */].deprecated('settings', 'parameters');
        parameters = settings;
      }
 
      if (moduleSettings) {
        this.updateModuleSettings(moduleSettings);
      }
 
      if (framebuffer) {
        parameters = Object.assign(parameters, { framebuffer: framebuffer });
      }
 
      this.render(uniforms, attributes, samplers, transformFeedback, parameters, vertexArray);
 
      if (framebuffer) {
        framebuffer.log({ priority: LOG_DRAW_PRIORITY, message: 'Rendered to ' + framebuffer.id });
      }
 
      return this;
    }
 
    /* eslint-disable max-params  */
 
  }, {
    key: 'render',
    value: function render() {
      var uniforms = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
      var attributes = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
      var samplers = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
      var transformFeedback = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
      var parameters = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};
      var vertexArray = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : null;
 
      __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_7__debug_seer_integration__["b" /* addModel */])(this);
 
      var resolvedUniforms = this.addViewUniforms(uniforms);
      __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_7__debug_seer_integration__["c" /* getOverrides */])(this.id, resolvedUniforms);
 
      this.setUniforms(resolvedUniforms);
      this.setAttributes(attributes);
      Object.assign(this.samplers, samplers);
 
      __WEBPACK_IMPORTED_MODULE_4__utils__["b" /* log */].group(LOG_DRAW_PRIORITY, '>>> RENDERING MODEL ' + this.id, { collapsed: __WEBPACK_IMPORTED_MODULE_4__utils__["b" /* log */].priority <= 2 });
 
      this.setProgramState({ vertexArray: vertexArray });
 
      this._logAttributesAndUniforms(2, resolvedUniforms);
 
      this.onBeforeRender();
 
      var drawParams = this.drawParams;
      if (drawParams.isInstanced && !this.isInstanced) {
        __WEBPACK_IMPORTED_MODULE_4__utils__["b" /* log */].warn('Found instanced attributes on non-instanced model');
      }
      var isIndexed = drawParams.isIndexed,
          indexType = drawParams.indexType;
      var isInstanced = this.isInstanced,
          instanceCount = this.instanceCount;
 
 
      this._timerQueryStart();
 
      this.program.draw({
        parameters: parameters,
        drawMode: this.getDrawMode(),
        vertexCount: this.getVertexCount(),
        vertexArray: vertexArray,
        transformFeedback: transformFeedback,
        isIndexed: isIndexed,
        indexType: indexType,
        isInstanced: isInstanced,
        instanceCount: instanceCount
      });
 
      this._timerQueryEnd();
 
      this.onAfterRender();
 
      this.unsetProgramState();
 
      this.setNeedsRedraw(false);
 
      __WEBPACK_IMPORTED_MODULE_4__utils__["b" /* log */].groupEnd(LOG_DRAW_PRIORITY, '>>> RENDERING MODEL ' + this.id);
 
      return this;
    }
    /* eslint-enable max-params  */
 
  }, {
    key: 'setProgramState',
    value: function setProgramState() {
      var _ref4 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
          _ref4$vertexArray = _ref4.vertexArray,
          vertexArray = _ref4$vertexArray === undefined ? null : _ref4$vertexArray;
 
      var program = this.program;
 
      program.use();
      this.drawParams = {};
      program.setBuffers(this.buffers, { drawParams: this.drawParams });
      program.checkAttributeBindings({ vertexArray: vertexArray });
      program.setUniforms(this.uniforms, this.samplers);
      return this;
    }
  }, {
    key: 'unsetProgramState',
    value: function unsetProgramState() {
      // Ensures all vertex attributes are disabled and ELEMENT_ARRAY_BUFFER
      // is unbound
      this.program.unsetBuffers();
      return this;
    }
 
    // DEPRECATED METHODS
 
    // TODO - uniform names are too strongly linked camera <=> default shaders
    // At least all special handling is collected here.
 
  }, {
    key: 'addViewUniforms',
    value: function addViewUniforms(uniforms) {
      // TODO - special treatment of these parameters should be removed
      var camera = uniforms.camera,
          viewMatrix = uniforms.viewMatrix,
          modelMatrix = uniforms.modelMatrix;
      // Camera exposes uniforms that can be used directly in shaders
 
      var cameraUniforms = camera ? camera.getUniforms() : {};
 
      var viewUniforms = viewMatrix ? this.getCoordinateUniforms(viewMatrix, modelMatrix) : {};
 
      return Object.assign({}, uniforms, cameraUniforms, viewUniforms);
    }
 
    // PRIVATE METHODS
 
  }, {
    key: '_initializeProgram',
    value: function _initializeProgram(_ref5) {
      var vs = _ref5.vs,
          fs = _ref5.fs,
          modules = _ref5.modules,
          defines = _ref5.defines,
          moduleSettings = _ref5.moduleSettings,
          defaultUniforms = _ref5.defaultUniforms,
          program = _ref5.program,
          shaderCache = _ref5.shaderCache,
          varyings = _ref5.varyings,
          bufferMode = _ref5.bufferMode;
 
 
      this.getModuleUniforms = function (x) {};
 
      if (!program) {
        // Assign default shaders if none are provided
        if (!vs) {
          vs = __WEBPACK_IMPORTED_MODULE_5__shadertools_shaders__["a" /* MODULAR_SHADERS */].vs;
        }
        if (!fs) {
          fs = __WEBPACK_IMPORTED_MODULE_5__shadertools_shaders__["a" /* MODULAR_SHADERS */].fs;
        }
 
        var assembleResult = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__shadertools__["a" /* assembleShaders */])(this.gl, { vs: vs, fs: fs, modules: modules, defines: defines });
        vs = assembleResult.vs;
        fs = assembleResult.fs;
 
 
        if (shaderCache) {
          program = shaderCache.getProgram(this.gl, { vs: vs, fs: fs, id: this.id });
        } else {
          program = new __WEBPACK_IMPORTED_MODULE_0__webgl__["Program"](this.gl, { vs: vs, fs: fs, varyings: varyings, bufferMode: bufferMode });
        }
 
        var getUniforms = assembleResult.getUniforms;
 
        this.getModuleUniforms = getUniforms || function (x) {};
      }
 
      this.program = program;
      __WEBPACK_IMPORTED_MODULE_9_assert___default()(this.program instanceof __WEBPACK_IMPORTED_MODULE_0__webgl__["Program"], 'Model needs a program');
    }
    /* eslint-enable complexity */
 
  }, {
    key: '_checkForDeprecatedUniforms',
    value: function _checkForDeprecatedUniforms(uniforms) {
      // deprecated picking uniforms
      DEPRECATED_PICKING_UNIFORMS.forEach(function (uniform) {
        if (uniform in uniforms) {
          __WEBPACK_IMPORTED_MODULE_4__utils__["b" /* log */].deprecated(uniform, 'use picking shader module and Model class updateModuleSettings()');
        }
      });
    }
  }, {
    key: '_timerQueryStart',
    value: function _timerQueryStart() {
      if (this.timerQueryEnabled === true) {
        if (!this.timeElapsedQuery) {
          this.timeElapsedQuery = new __WEBPACK_IMPORTED_MODULE_8__webgl_query__["a" /* default */](this.gl);
        }
        if (this.lastQueryReturned) {
          this.lastQueryReturned = false;
          this.timeElapsedQuery.beginTimeElapsedQuery();
        }
      }
    }
  }, {
    key: '_timerQueryEnd',
    value: function _timerQueryEnd() {
      if (this.timerQueryEnabled === true) {
        this.timeElapsedQuery.end();
        // TODO: Skip results if 'gl.getParameter(this.ext.GPU_DISJOINT_EXT)' returns false
        // should this be incorporated into Query object?
        if (this.timeElapsedQuery.isResultAvailable()) {
          this.lastQueryReturned = true;
          var elapsedTime = this.timeElapsedQuery.getResult();
 
          // Update stats (e.g. for seer)
          this.stats.lastFrameTime = elapsedTime;
          this.stats.accumulatedFrameTime += elapsedTime;
          this.stats.profileFrameCount++;
          this.stats.averageFrameTime = this.stats.accumulatedFrameTime / this.stats.profileFrameCount;
 
          // Log stats
          __WEBPACK_IMPORTED_MODULE_4__utils__["b" /* log */].log(LOG_DRAW_PRIORITY, 'GPU time ' + this.program.id + ': ' + this.stats.lastFrameTime + 'ms average ' + this.stats.averageFrameTime + 'ms accumulated: ' + this.stats.accumulatedFrameTime + 'ms count: ' + this.stats.profileFrameCount);
        }
      }
    }
 
    // Makes sure buffers are created for all attributes
    // and that the program is updated with those buffers
    // TODO - do we need the separation between "attributes" and "buffers"
    // couldn't apps just create buffers directly?
 
  }, {
    key: '_createBuffersFromAttributeDescriptors',
    value: function _createBuffersFromAttributeDescriptors(attributes) {
      var gl = this.program.gl;
 
 
      for (var attributeName in attributes) {
        var attribute = attributes[attributeName];
 
        if (attribute instanceof __WEBPACK_IMPORTED_MODULE_0__webgl__["Buffer"]) {
          this.buffers[attributeName] = attribute;
        } else if (attribute.isGeneric) {
          this.buffers[attributeName] = attribute.value;
        } else {
          // Autocreate a buffer
          this.buffers[attributeName] = this.buffers[attributeName] || new __WEBPACK_IMPORTED_MODULE_0__webgl__["Buffer"](gl, {
            target: attribute.isIndexed ? __WEBPACK_IMPORTED_MODULE_0__webgl__["GL"].ELEMENT_ARRAY_BUFFER : __WEBPACK_IMPORTED_MODULE_0__webgl__["GL"].ARRAY_BUFFER
          });
 
          var buffer = this.buffers[attributeName];
          buffer.setData({ data: attribute.value }).setDataLayout(attribute);
        }
      }
 
      return this;
    }
  }, {
    key: '_logAttributesAndUniforms',
    value: function _logAttributesAndUniforms(priority) {
      var uniforms = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
 
      if (__WEBPACK_IMPORTED_MODULE_4__utils__["b" /* log */].priority >= priority) {
        var attributeTable = this._getAttributesTable({
          header: this.id + ' attributes',
          program: this.program,
          attributes: Object.assign({}, this.geometry.attributes, this.attributes)
        });
        __WEBPACK_IMPORTED_MODULE_4__utils__["b" /* log */].table(priority, attributeTable);
 
        var _getUniformsTable = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__webgl_uniforms__["e" /* getUniformsTable */])({
          header: this.id + ' uniforms',
          program: this.program,
          uniforms: Object.assign({}, this.uniforms, uniforms)
        }),
            table = _getUniformsTable.table,
            unusedTable = _getUniformsTable.unusedTable,
            unusedCount = _getUniformsTable.unusedCount;
 
        __WEBPACK_IMPORTED_MODULE_4__utils__["b" /* log */].table(priority, table);
        __WEBPACK_IMPORTED_MODULE_4__utils__["b" /* log */].log(priority, (unusedCount || 'No') + ' unused uniforms ', unusedTable);
      } else {
        // Always log missing uniforms
        var _getUniformsTable2 = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__webgl_uniforms__["e" /* getUniformsTable */])({
          header: this.id + ' uniforms',
          program: this.program,
          uniforms: Object.assign({}, this.uniforms, uniforms),
          undefinedOnly: true
        }),
            _table = _getUniformsTable2.table,
            count = _getUniformsTable2.count;
 
        if (count > 0) {
          __WEBPACK_IMPORTED_MODULE_4__utils__["b" /* log */].table(priority, _table);
        }
      }
 
      __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_7__debug_seer_integration__["d" /* logModel */])(this, uniforms);
    }
 
    // Todo move to attributes manager
 
  }, {
    key: '_getAttributesTable',
    value: function _getAttributesTable() {
      var _ref6 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
          attributes = _ref6.attributes,
          _ref6$header = _ref6.header,
          header = _ref6$header === undefined ? 'Attributes' : _ref6$header,
          instanced = _ref6.instanced,
          program = _ref6.program;
 
      __WEBPACK_IMPORTED_MODULE_9_assert___default()(program);
      var attributeLocations = program._attributeLocations;
      var table = {}; // {[header]: {}};
 
      // Add used attributes
      for (var attributeName in attributeLocations) {
        var attribute = attributes[attributeName];
        var location = attributeLocations[attributeName];
        table[attributeName] = this._getAttributeEntry(attribute, location, header);
      }
 
      // Add any unused attributes
      for (var _attributeName in attributes) {
        var _attribute = attributes[_attributeName];
        if (!table[_attributeName]) {
          table[_attributeName] = this._getAttributeEntry(_attribute, null, header);
        }
      }
 
      return table;
    }
  }, {
    key: '_getAttributeEntry',
    value: function _getAttributeEntry(attribute, location, header) {
      var round = function round(num) {
        return Math.round(num * 10) / 10;
      };
 
      var type = 'NOT PROVIDED';
      var instanced = 0;
      var size = 'N/A';
      var verts = 'N/A';
      var bytes = 'N/A';
      var value = 'N/A';
 
      if (attribute && location === null) {
        location = attribute.isIndexed ? 'ELEMENT_ARRAY_BUFFER' : 'NOT USED';
      }
 
      if (attribute instanceof __WEBPACK_IMPORTED_MODULE_0__webgl__["Buffer"]) {
        var buffer = attribute;
        type = buffer.layout.type;
        instanced = buffer.layout.instanced;
        size = buffer.layout.size;
        verts = round(buffer.data.length / buffer.layout.size);
        bytes = buffer.data.length * buffer.data.BYTES_PER_ELEMENT;
      } else if (attribute) {
        type = attribute.value.constructor.name;
        instanced = attribute.instanced;
        size = attribute.size;
        verts = round(attribute.value.length / attribute.size);
        bytes = attribute.value.length * attribute.value.BYTES_PER_ELEMENT;
        value = attribute.value;
      }
 
      // Generate a type name by dropping Array from Float32Array etc.
      type = String(type).replace('Array', '');
      // Look for 'nt' to detect integer types, e.g. Int32Array, Uint32Array
      var isInteger = type.indexOf('nt') !== -1;
 
      return _defineProperty({
        'Inst/Verts/Comps/Bytes/Type/Loc': (instanced ? 'I ' : 'P ') + ' ' + verts + ' (x' + size + '=' + bytes + ' ' + type + ') loc=' + location
      }, header, __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__utils__["c" /* formatValue */])(value, { size: size, isInteger: isInteger }));
    }
 
    // DEPRECATED / REMOVED
 
  }, {
    key: 'isPickable',
    value: function isPickable() {
      return this.pickable;
    }
  }, {
    key: 'setPickable',
    value: function setPickable() {
      var pickable = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
 
      this.pickable = Boolean(pickable);
      return this;
    }
  }, {
    key: 'getGeometry',
    value: function getGeometry() {
      return this.geometry;
    }
  }, {
    key: 'varyingMap',
    get: function get() {
      return this.program.varyingMap;
    }
  }]);
 
  return Model;
}(__WEBPACK_IMPORTED_MODULE_3__core_object_3d__["a" /* default */]);
 
/* harmony default export */ __webpack_exports__["a"] = (Model);
//# sourceMappingURL=model.js.map
 
/***/ }),
/* 105 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__geometry__ = __webpack_require__(45);
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
 
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
 
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
 
 
 
var TruncatedConeGeometry = /*#__PURE__*/function (_Geometry) {
  _inherits(TruncatedConeGeometry, _Geometry);
 
  // Primitives inspired by TDL http://code.google.com/p/webglsamples/,
  // copyright 2011 Google Inc. new BSD License
  // (http://www.opensource.org/licenses/bsd-license.php).
  /* eslint-disable max-statements, complexity */
  function TruncatedConeGeometry() {
    var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
 
    _classCallCheck(this, TruncatedConeGeometry);
 
    var _opts$bottomRadius = opts.bottomRadius,
        bottomRadius = _opts$bottomRadius === undefined ? 0 : _opts$bottomRadius,
        _opts$topRadius = opts.topRadius,
        topRadius = _opts$topRadius === undefined ? 0 : _opts$topRadius,
        _opts$height = opts.height,
        height = _opts$height === undefined ? 1 : _opts$height,
        _opts$nradial = opts.nradial,
        nradial = _opts$nradial === undefined ? 10 : _opts$nradial,
        _opts$nvertical = opts.nvertical,
        nvertical = _opts$nvertical === undefined ? 10 : _opts$nvertical,
        _opts$topCap = opts.topCap,
        topCap = _opts$topCap === undefined ? false : _opts$topCap,
        _opts$bottomCap = opts.bottomCap,
        bottomCap = _opts$bottomCap === undefined ? false : _opts$bottomCap;
 
 
    var extra = (topCap ? 2 : 0) + (bottomCap ? 2 : 0);
    var numVertices = (nradial + 1) * (nvertical + 1 + extra);
 
    var slant = Math.atan2(bottomRadius - topRadius, height);
    var msin = Math.sin;
    var mcos = Math.cos;
    var mpi = Math.PI;
    var cosSlant = mcos(slant);
    var sinSlant = msin(slant);
    var start = topCap ? -2 : 0;
    var end = nvertical + (bottomCap ? 2 : 0);
    var vertsAroundEdge = nradial + 1;
 
    var positions = new Float32Array(numVertices * 3);
    var normals = new Float32Array(numVertices * 3);
    var texCoords = new Float32Array(numVertices * 2);
    var indices = new Uint16Array(nradial * (nvertical + extra) * 6);
 
    var i3 = 0;
    var i2 = 0;
    for (var i = start; i <= end; i++) {
      var v = i / nvertical;
      var y = height * v;
      var ringRadius = void 0;
 
      if (i < 0) {
        y = 0;
        v = 1;
        ringRadius = bottomRadius;
      } else if (i > nvertical) {
        y = height;
        v = 1;
        ringRadius = topRadius;
      } else {
        ringRadius = bottomRadius + (topRadius - bottomRadius) * (i / nvertical);
      }
      if (i === -2 || i === nvertical + 2) {
        ringRadius = 0;
        v = 0;
      }
      y -= height / 2;
      for (var j = 0; j < vertsAroundEdge; j++) {
        var sin = msin(j * mpi * 2 / nradial);
        var cos = mcos(j * mpi * 2 / nradial);
 
        positions[i3 + 0] = sin * ringRadius;
        positions[i3 + 1] = y;
        positions[i3 + 2] = cos * ringRadius;
 
        normals[i3 + 0] = i < 0 || i > nvertical ? 0 : sin * cosSlant;
        normals[i3 + 1] = i < 0 ? -1 : i > nvertical ? 1 : sinSlant;
        normals[i3 + 2] = i < 0 || i > nvertical ? 0 : cos * cosSlant;
 
        texCoords[i2 + 0] = j / nradial;
        texCoords[i2 + 1] = v;
 
        i2 += 2;
        i3 += 3;
      }
    }
 
    for (var _i = 0; _i < nvertical + extra; _i++) {
      for (var _j = 0; _j < nradial; _j++) {
        var index = (_i * nradial + _j) * 6;
        indices[index + 0] = vertsAroundEdge * (_i + 0) + 0 + _j;
        indices[index + 1] = vertsAroundEdge * (_i + 0) + 1 + _j;
        indices[index + 2] = vertsAroundEdge * (_i + 1) + 1 + _j;
        indices[index + 3] = vertsAroundEdge * (_i + 0) + 0 + _j;
        indices[index + 4] = vertsAroundEdge * (_i + 1) + 1 + _j;
        indices[index + 5] = vertsAroundEdge * (_i + 1) + 0 + _j;
      }
    }
 
    return _possibleConstructorReturn(this, (TruncatedConeGeometry.__proto__ || Object.getPrototypeOf(TruncatedConeGeometry)).call(this, Object.assign({}, opts, {
      attributes: {
        positions: positions,
        normals: normals,
        texCoords: texCoords,
        indices: indices
      }
    })));
  }
 
  return TruncatedConeGeometry;
}(__WEBPACK_IMPORTED_MODULE_0__geometry__["a" /* default */]);
 
/* harmony default export */ __webpack_exports__["a"] = (TruncatedConeGeometry);
//# sourceMappingURL=truncated-cone-geometry.js.map
 
/***/ }),
/* 106 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils_is_browser__ = __webpack_require__(262);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__utils_globals__ = __webpack_require__(261);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils_log__ = __webpack_require__(263);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "global", function() { return __WEBPACK_IMPORTED_MODULE_1__utils_globals__["b"]; });
 
 
 
// Version detection using babel plugin
/* global __VERSION__ */
var VERSION =  true ? '5.1.4' : 'untranspiled source';
 
var STARTUP_MESSAGE = 'set luma.log.priority=1 (or higher) to trace rendering';
// Assign luma.log.priority in console to control logging: \
// 0: none, 1: minimal, 2: verbose, 3: attribute/uniforms, 4: gl logs
// luma.log.break[], set to gl funcs, luma.log.profile[] set to model names`;
 
if (__WEBPACK_IMPORTED_MODULE_1__utils_globals__["b" /* global */].luma && __WEBPACK_IMPORTED_MODULE_1__utils_globals__["b" /* global */].luma.VERSION !== VERSION) {
  throw new Error('luma.gl - multiple VERSIONs detected: ' + __WEBPACK_IMPORTED_MODULE_1__utils_globals__["b" /* global */].luma.VERSION + ' vs ' + VERSION);
}
 
if (!__WEBPACK_IMPORTED_MODULE_1__utils_globals__["b" /* global */].luma) {
  /* global console */
  /* eslint-disable no-console */
  if (__WEBPACK_IMPORTED_MODULE_0__utils_is_browser__["a" /* isBrowser */]) {
    console.log('luma.gl ' + VERSION + ' - ' + STARTUP_MESSAGE);
  }
 
  __WEBPACK_IMPORTED_MODULE_1__utils_globals__["b" /* global */].luma = __WEBPACK_IMPORTED_MODULE_1__utils_globals__["b" /* global */].luma || {
    VERSION: VERSION,
    version: VERSION,
    log: __WEBPACK_IMPORTED_MODULE_2__utils_log__["a" /* default */],
 
    // A global stats object that various components can add information to
    // E.g. see webgl/resource.js
    stats: {},
 
    // Keep some luma globals in a sub-object
    // This allows us to dynamically detect if certain modules have been
    // included (such as IO and headless) and enable related functionality,
    // without unconditionally requiring and thus bundling big dependencies
    // into the app.
    globals: {
      headlessGL: null,
      headlessTypes: null,
      modules: {},
      nodeIO: {}
    }
  };
}
 
 
/* harmony default export */ __webpack_exports__["default"] = (__WEBPACK_IMPORTED_MODULE_1__utils_globals__["b" /* global */].luma);
//# sourceMappingURL=init.js.map
 
/***/ }),
/* 107 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = clear;
/* harmony export (immutable) */ __webpack_exports__["b"] = clearBuffer;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__context__ = __webpack_require__(7);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__context_state__ = __webpack_require__(68);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_assert__ = __webpack_require__(1);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_assert___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_assert__);
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
 
 
 
 
 
// Should collapse during minification
var GL_DEPTH_BUFFER_BIT = 0x00000100;
var GL_STENCIL_BUFFER_BIT = 0x00000400;
var GL_COLOR_BUFFER_BIT = 0x00004000;
 
var GL_COLOR = 0x1800;
var GL_DEPTH = 0x1801;
var GL_STENCIL = 0x1802;
var GL_DEPTH_STENCIL = 0x84F9;
 
// Should disappear if asserts are removed
var ERR_ARGUMENTS = 'clear: bad arguments';
 
// Optionally clears depth, color and stencil buffers
function clear(gl) {
  var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
      _ref$framebuffer = _ref.framebuffer,
      framebuffer = _ref$framebuffer === undefined ? null : _ref$framebuffer,
      _ref$color = _ref.color,
      color = _ref$color === undefined ? null : _ref$color,
      _ref$depth = _ref.depth,
      depth = _ref$depth === undefined ? null : _ref$depth,
      _ref$stencil = _ref.stencil,
      stencil = _ref$stencil === undefined ? null : _ref$stencil;
 
  var parameters = {};
 
  if (framebuffer) {
    parameters.framebuffer = framebuffer;
  }
 
  var clearFlags = 0;
 
  if (color) {
    clearFlags |= GL_COLOR_BUFFER_BIT;
    if (color !== true) {
      parameters.clearColor = color;
    }
  }
 
  if (depth) {
    clearFlags |= GL_DEPTH_BUFFER_BIT;
    if (depth !== true) {
      parameters.clearDepth = depth;
    }
  }
 
  if (stencil) {
    clearFlags |= GL_STENCIL_BUFFER_BIT;
    if (depth !== true) {
      parameters.clearStencil = depth;
    }
  }
 
  __WEBPACK_IMPORTED_MODULE_2_assert___default()(clearFlags !== 0, ERR_ARGUMENTS);
 
  // Temporarily set any clear "colors" and call clear
  __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__context_state__["f" /* withParameters */])(gl, parameters, function () {
    gl.clear(clearFlags);
  });
}
 
// WebGL2 - clear a specific drawing buffer
function clearBuffer(gl) {
  var _ref2 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
      _ref2$framebuffer = _ref2.framebuffer,
      framebuffer = _ref2$framebuffer === undefined ? null : _ref2$framebuffer,
      _ref2$buffer = _ref2.buffer,
      buffer = _ref2$buffer === undefined ? GL_COLOR : _ref2$buffer,
      _ref2$drawBuffer = _ref2.drawBuffer,
      drawBuffer = _ref2$drawBuffer === undefined ? 0 : _ref2$drawBuffer,
      _ref2$value = _ref2.value,
      value = _ref2$value === undefined ? [0, 0, 0, 0] : _ref2$value;
 
  __WEBPACK_IMPORTED_MODULE_2_assert___default()(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__context__["b" /* isWebGL2 */])(gl), __WEBPACK_IMPORTED_MODULE_0__context__["i" /* ERR_WEBGL2 */]);
 
  __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__context_state__["f" /* withParameters */])(gl, { framebuffer: framebuffer }, function () {
 
    // Method selection per OpenGL ES 3 docs
    switch (buffer) {
      case GL_COLOR:
        switch (value.constructor) {
          case Int32Array:
            gl.clearBufferiv(buffer, drawBuffer, value);
            break;
          case Uint32Array:
            gl.clearBufferuiv(buffer, drawBuffer, value);
            break;
          case Float32Array:
          default:
            gl.clearBufferfv(buffer, drawBuffer, value);
        }
        break;
 
      case GL_DEPTH:
        gl.clearBufferfv(GL_DEPTH, 0, [value]);
        break;
 
      case GL_STENCIL:
        gl.clearBufferiv(GL_STENCIL, 0, [value]);
        break;
 
      case GL_DEPTH_STENCIL:
        var _value = _slicedToArray(value, 2),
            depth = _value[0],
            stencil = _value[1];
 
        gl.clearBufferfi(GL_DEPTH_STENCIL, 0, depth, stencil);
        break;
 
      default:
        __WEBPACK_IMPORTED_MODULE_2_assert___default()(false, ERR_ARGUMENTS);
    }
  });
}
//# sourceMappingURL=clear.js.map
 
/***/ }),
/* 108 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return FEATURES; });
/* harmony export (immutable) */ __webpack_exports__["b"] = hasFeature;
/* harmony export (immutable) */ __webpack_exports__["c"] = hasFeatures;
/* harmony export (immutable) */ __webpack_exports__["d"] = getFeatures;
/* unused harmony export TEST_EXPORTS */
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__context__ = __webpack_require__(7);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_assert__ = __webpack_require__(1);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_assert___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_assert__);
// Feature detection for WebGL
//
// Provides a function that enables simple checking of which WebGL features are
// available in an WebGL1 or WebGL2 environment.
 
/* eslint-disable no-inline-comments, max-len */
 
 
 
// Defines luma.gl "feature" names and semantics
var WEBGL_FEATURES = {
  // API SUPPORT
  VERTEX_ARRAY_OBJECT: ['OES_vertex_array_object', true],
  TIMER_QUERY: ['EXT_disjoint_timer_query', 'EXT_disjoint_timer_query_webgl2'],
  INSTANCED_RENDERING: ['ANGLE_instanced_arrays', true],
  MULTIPLE_RENDER_TARGETS: ['WEBGL_draw_buffers', true],
 
  // FEATURES
  ELEMENT_INDEX_UINT32: ['OES_element_index_uint', true],
  BLEND_EQUATION_MINMAX: ['EXT_blend_minmax', true],
 
  // TEXTURES, RENDERBUFFERS
  COLOR_ENCODING_SRGB: ['EXT_sRGB', true],
 
  // TEXTURES
  TEXTURE_DEPTH: ['WEBGL_depth_texture', true],
  TEXTURE_FLOAT: ['OES_texture_float', true],
  TEXTURE_HALF_FLOAT: ['OES_texture_half_float', true],
 
  TEXTURE_FILTER_LINEAR_FLOAT: ['OES_texture_float_linear'],
  TEXTURE_FILTER_LINEAR_HALF_FLOAT: ['OES_texture_half_float_linear'],
  TEXTURE_FILTER_ANISOTROPIC: ['EXT_texture_filter_anisotropic'],
 
  // FRAMEBUFFERS, TEXTURES AND RENDERBUFFERS
  COLOR_ATTACHMENT_RGBA32F: ['WEBGL_color_buffer_float', 'EXT_color_buffer_float'],
  COLOR_ATTACHMENT_FLOAT: [false, 'EXT_color_buffer_float'],
  COLOR_ATTACHMENT_HALF_FLOAT: [false, 'EXT_color_buffer_half_float'],
 
  // GLSL extensions
  GLSL_FRAG_DATA: ['WEBGL_draw_buffers', true],
  GLSL_FRAG_DEPTH: ['EXT_frag_depth', true],
  GLSL_DERIVATIVES: ['OES_standard_derivatives', true],
  GLSL_TEXTURE_LOD: ['EXT_shader_texture_lod', true]
};
 
// Create a key-mirrored FEATURES array
var FEATURES = {};
Object.keys(WEBGL_FEATURES).forEach(function (key) {
  FEATURES[key] = key;
});
 
 
// TODO - cache the value
function getFeature(gl, cap) {
  var feature = WEBGL_FEATURES[cap];
  __WEBPACK_IMPORTED_MODULE_1_assert___default()(feature, cap);
 
  // Get extension name from table
  var extensionName = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__context__["b" /* isWebGL2 */])(gl) ? feature[1] || feature[0] : feature[0];
 
  // Check if the value is dependent on checking an extension
  var value = typeof extensionName === 'string' ? Boolean(gl.getExtension(extensionName)) : extensionName;
 
  __WEBPACK_IMPORTED_MODULE_1_assert___default()(value === false || value === true);
 
  return value;
}
 
// capability can be a WebGL extension name or a luma capability name
function hasFeature(gl, feature) {
  return hasFeatures(gl, feature);
}
 
function hasFeatures(gl, features) {
  features = Array.isArray(features) ? features : [features];
  return features.every(function (feature) {
    return getFeature(gl, feature);
  });
}
 
function getFeatures(gl) {
  gl.luma = gl.luma || {};
 
  if (!gl.luma.caps) {
    gl.luma.caps = {};
    gl.luma.caps.webgl2 = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__context__["b" /* isWebGL2 */])(gl);
    for (var cap in WEBGL_FEATURES) {
      gl.luma.caps[cap] = getFeature(gl, cap);
    }
  }
  return gl.luma.caps;
}
 
var TEST_EXPORTS = {
  WEBGL_FEATURES: WEBGL_FEATURES
};
//# sourceMappingURL=context-features.js.map
 
/***/ }),
/* 109 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* unused harmony export getUniformDescriptors */
/* unused harmony export getVaryingMap */
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__api__ = __webpack_require__(38);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__context__ = __webpack_require__(7);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__context_state__ = __webpack_require__(68);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__vertex_array__ = __webpack_require__(169);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__resource__ = __webpack_require__(30);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__texture__ = __webpack_require__(62);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__framebuffer__ = __webpack_require__(69);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__transform_feedback__ = __webpack_require__(276);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__uniforms__ = __webpack_require__(168);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__shader__ = __webpack_require__(111);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__buffer__ = __webpack_require__(67);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__utils__ = __webpack_require__(8);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12_assert__ = __webpack_require__(1);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12_assert___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_12_assert__);
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
 
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
 
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
 
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
 
/* eslint-disable no-inline-comments */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
var LOG_PROGRAM_PERF_PRIORITY = 3;
 
// const GL_TRANSFORM_FEEDBACK_BUFFER_MODE = 0x8C7F;
// const GL_TRANSFORM_FEEDBACK_VARYINGS = 0x8C83;
// MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS : 0x8C80,
// TRANSFORM_FEEDBACK_BUFFER_START: 0x8C84,
// TRANSFORM_FEEDBACK_BUFFER_SIZE : 0x8C85,
// TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN: 0x8C88,
// MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS: 0x8C8A,
// MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS: 0x8C8B,
// INTERLEAVED_ATTRIBS: 0x8C8C,
// SEPARATE_ATTRIBS : 0x8C8D,
 
var Program = /*#__PURE__*/function (_Resource) {
  _inherits(Program, _Resource);
 
  function Program(gl) {
    var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
 
    _classCallCheck(this, Program);
 
    var _this = _possibleConstructorReturn(this, (Program.__proto__ || Object.getPrototypeOf(Program)).call(this, gl, opts));
 
    _this.initialize(opts);
    _this.vertexAttributes = __WEBPACK_IMPORTED_MODULE_3__vertex_array__["a" /* default */].getDefaultArray(gl);
    Object.seal(_this);
 
    _this._setId(opts.id);
    return _this;
  }
 
  _createClass(Program, [{
    key: 'initialize',
    value: function initialize() {
      var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
          vs = _ref.vs,
          fs = _ref.fs,
          defaultUniforms = _ref.defaultUniforms,
          varyings = _ref.varyings,
          _ref$bufferMode = _ref.bufferMode,
          bufferMode = _ref$bufferMode === undefined ? __WEBPACK_IMPORTED_MODULE_0__api__["a" /* default */].SEPARATE_ATTRIBS : _ref$bufferMode;
 
      // Create shaders if needed
      this.vs = typeof vs === 'string' ? new __WEBPACK_IMPORTED_MODULE_9__shader__["b" /* VertexShader */](this.gl, vs) : vs;
      this.fs = typeof fs === 'string' ? new __WEBPACK_IMPORTED_MODULE_9__shader__["c" /* FragmentShader */](this.gl, fs) : fs;
 
      __WEBPACK_IMPORTED_MODULE_12_assert___default()(this.vs instanceof __WEBPACK_IMPORTED_MODULE_9__shader__["b" /* VertexShader */], 'Program: bad vertex shader');
      __WEBPACK_IMPORTED_MODULE_12_assert___default()(this.fs instanceof __WEBPACK_IMPORTED_MODULE_9__shader__["c" /* FragmentShader */], 'Program: bad fragment shader');
 
      this.defaultUniforms = defaultUniforms;
 
      // Setup varyings if supplied
      if (varyings) {
        __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__context__["g" /* assertWebGL2Context */])(this.gl);
        this.varyings = varyings;
        this.gl.transformFeedbackVaryings(this.handle, varyings, bufferMode);
        this.varyingMap = getVaryingMap(varyings, bufferMode);
      } else {
        this.varyingMap = {};
      }
 
      this._compileAndLink();
 
      return this;
    }
 
    // Generates warning if a vertex shader attribute is not setup.
 
  }, {
    key: 'checkAttributeBindings',
    value: function checkAttributeBindings(_ref2) {
      var vertexArray = _ref2.vertexArray;
 
      var filledLocations = vertexArray ? vertexArray.filledLocations : this.vertexAttributes.filledLocations;
      for (var attributeName in this._attributeToLocationMap) {
        var location = this._attributeToLocationMap[attributeName];
        if (!filledLocations[location] && !this._warnedLocations[location]) {
          // throw new Error(`Program ${this.id}: ` +
          //   `Attribute ${location}:${attributeName} not supplied`);
          __WEBPACK_IMPORTED_MODULE_11__utils__["b" /* log */].warn('Program ' + this.id + ': Attribute ' + location + ':' + attributeName + ' not supplied');
          this._warnedLocations[location] = true;
        }
      }
      return this;
    }
  }, {
    key: 'reset',
    value: function reset() {
      this.unsetBuffers();
      // TODO - reset uniforms and attributes to initial state
    }
  }, {
    key: 'use',
    value: function use() {
      this.gl.useProgram(this.handle);
      return this;
    }
 
    // A good thing about webGL is that there are so many ways to draw things,
    // e.g. depending on whether data is indexed and/or isInstanced.
    // This function unifies those into a single call with simple parameters
    // that have sane defaults.
 
  }, {
    key: 'draw',
    value: function draw(_ref3) {
      var _this2 = this;
 
      var _ref3$drawMode = _ref3.drawMode,
          drawMode = _ref3$drawMode === undefined ? __WEBPACK_IMPORTED_MODULE_0__api__["a" /* default */].TRIANGLES : _ref3$drawMode,
          vertexCount = _ref3.vertexCount,
          _ref3$offset = _ref3.offset,
          offset = _ref3$offset === undefined ? 0 : _ref3$offset,
          start = _ref3.start,
          end = _ref3.end,
          _ref3$isIndexed = _ref3.isIndexed,
          isIndexed = _ref3$isIndexed === undefined ? false : _ref3$isIndexed,
          _ref3$indexType = _ref3.indexType,
          indexType = _ref3$indexType === undefined ? __WEBPACK_IMPORTED_MODULE_0__api__["a" /* default */].UNSIGNED_SHORT : _ref3$indexType,
          _ref3$isInstanced = _ref3.isInstanced,
          isInstanced = _ref3$isInstanced === undefined ? false : _ref3$isInstanced,
          _ref3$instanceCount = _ref3.instanceCount,
          instanceCount = _ref3$instanceCount === undefined ? 0 : _ref3$instanceCount,
          _ref3$vertexArray = _ref3.vertexArray,
          vertexArray = _ref3$vertexArray === undefined ? null : _ref3$vertexArray,
          _ref3$transformFeedba = _ref3.transformFeedback,
          transformFeedback = _ref3$transformFeedba === undefined ? null : _ref3$transformFeedba,
          _ref3$uniforms = _ref3.uniforms,
          uniforms = _ref3$uniforms === undefined ? {} : _ref3$uniforms,
          _ref3$samplers = _ref3.samplers,
          samplers = _ref3$samplers === undefined ? {} : _ref3$samplers,
          _ref3$parameters = _ref3.parameters,
          parameters = _ref3$parameters === undefined ? {} : _ref3$parameters;
 
      vertexArray = vertexArray || __WEBPACK_IMPORTED_MODULE_3__vertex_array__["a" /* default */].getDefaultArray(this.gl);
      vertexArray.bind(function () {
 
        _this2.gl.useProgram(_this2.handle);
 
        if (transformFeedback) {
          var primitiveMode = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_7__transform_feedback__["b" /* getTransformFeedbackMode */])({ drawMode: drawMode });
          transformFeedback.begin(primitiveMode);
        }
 
        _this2.setUniforms(uniforms, samplers);
 
        __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__context_state__["f" /* withParameters */])(_this2.gl, parameters, function () {
          // TODO - Use polyfilled WebGL2RenderingContext instead of ANGLE extension
          if (isIndexed && isInstanced) {
            _this2.ext.drawElementsInstanced(drawMode, vertexCount, indexType, offset, instanceCount);
          } else if (isIndexed && __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__context__["b" /* isWebGL2 */])(_this2.gl) && !isNaN(start) && !isNaN(end)) {
            _this2.gl.drawElementsRange(drawMode, start, end, vertexCount, indexType, offset);
          } else if (isIndexed) {
            _this2.gl.drawElements(drawMode, vertexCount, indexType, offset);
          } else if (isInstanced) {
            _this2.ext.drawArraysInstanced(drawMode, offset, vertexCount, instanceCount);
          } else {
            _this2.gl.drawArrays(drawMode, offset, vertexCount);
          }
        });
 
        // this.gl.useProgram(null);
 
        if (transformFeedback) {
          transformFeedback.end();
        }
      });
 
      return this;
    }
 
    /**
     * Attach a map of Buffers values to a program
     * Only attributes with names actually present in the linked program
     * will be updated. Other supplied buffers will be ignored.
     *
     * @param {Object} buffers - An object map with attribute names being keys
     *  and values are expected to be instances of Buffer.
     * @returns {Program} Returns itself for chaining.
     */
    /* eslint-disable max-statements */
 
  }, {
    key: 'setBuffers',
    value: function setBuffers(buffers) {
      var _ref4 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
          _ref4$clear = _ref4.clear,
          clear = _ref4$clear === undefined ? true : _ref4$clear,
          _ref4$drawParams = _ref4.drawParams,
          drawParams = _ref4$drawParams === undefined ? {} : _ref4$drawParams;
 
      if (clear) {
        this.vertexAttributes.clearBindings();
      }
 
      // indexing is autodetected - buffer with target gl.ELEMENT_ARRAY_BUFFER
      // index type is saved for drawElement calls
      drawParams.isInstanced = false;
      drawParams.isIndexed = false;
      drawParams.indexType = null;
 
      var _sortBuffersByLocatio = this._sortBuffersByLocation(buffers),
          locations = _sortBuffersByLocatio.locations,
          elements = _sortBuffersByLocatio.elements;
 
      // Process locations in order
 
 
      for (var location = 0; location < locations.length; ++location) {
        var bufferName = locations[location];
        var buffer = buffers[bufferName];
        // DISABLE MISSING ATTRIBUTE
        if (!buffer) {
          this.vertexAttributes.disable(location);
        } else if (buffer instanceof __WEBPACK_IMPORTED_MODULE_10__buffer__["a" /* default */]) {
          var divisor = buffer.layout.instanced ? 1 : 0;
          this.vertexAttributes.setBuffer({ location: location, buffer: buffer });
          this.vertexAttributes.setDivisor(location, divisor);
          drawParams.isInstanced = buffer.layout.instanced > 0;
          this.vertexAttributes.enable(location);
        } else {
          this.vertexAttributes.setGeneric({ location: location, array: buffer });
          this.vertexAttributes.disable(location, true);
        }
      }
 
      // SET ELEMENTS ARRAY BUFFER
      if (elements) {
        var _buffer = buffers[elements];
        _buffer.bind();
        drawParams.isIndexed = true;
        drawParams.indexType = _buffer.layout.type;
      }
 
      return this;
    }
    /* eslint-enable max-statements */
 
    /*
     * @returns {Program} Returns itself for chaining.
     */
 
  }, {
    key: 'unsetBuffers',
    value: function unsetBuffers() {
      var length = this._attributeCount;
      for (var i = 1; i < length; ++i) {
        // this.vertexAttributes.setDivisor(i, 0);
        this.vertexAttributes.disable(i);
      }
 
      // Clear elements buffer
      this.gl.bindBuffer(__WEBPACK_IMPORTED_MODULE_0__api__["a" /* default */].ELEMENT_ARRAY_BUFFER, null);
      return this;
    }
 
    /**
     * Apply a set of uniform values to a program
     * Only uniforms with names actually present in the linked program
     * will be updated.
     * other uniforms will be ignored
     *
     * @param {Object} uniformMap - An object with names being keys
     * @returns {Program} - returns itself for chaining.
     */
    /* eslint-disable max-depth */
 
  }, {
    key: 'setUniforms',
    value: function setUniforms(uniforms) {
      var samplers = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
 
      for (var uniformName in uniforms) {
        var uniform = uniforms[uniformName];
        var uniformSetter = this._uniformSetters[uniformName];
        var sampler = samplers[uniformName];
 
        if (uniformSetter) {
          if (uniform instanceof __WEBPACK_IMPORTED_MODULE_6__framebuffer__["a" /* default */]) {
            uniform = uniform.texture;
          }
          if (uniform instanceof __WEBPACK_IMPORTED_MODULE_5__texture__["a" /* default */]) {
            if (uniformSetter.textureIndex === undefined) {
              uniformSetter.textureIndex = this._textureIndexCounter++;
            }
 
            // Bind texture to index
            var texture = uniform;
            var textureIndex = uniformSetter.textureIndex;
 
 
            texture.bind(textureIndex);
 
            // Bind a sampler (if supplied) to index
            if (sampler) {
              sampler.bind(textureIndex);
            }
 
            // Set the uniform sampler to the texture index
            uniformSetter(textureIndex);
          } else {
            // Just set the value
            uniformSetter(uniform);
          }
        }
      }
 
      return this;
    }
    /* eslint-enable max-depth */
 
    // setTransformFeedbackBuffers(buffers) {
    //   for (const buffer of buffers) {
    //     buffer.bindBase()
    //   }
    // }
 
    /**
     * ATTRIBUTES API
     * (Locations are numeric indices)
     * @return {Number} count
     */
 
  }, {
    key: 'getAttributeCount',
    value: function getAttributeCount() {
      return this._getParameter(__WEBPACK_IMPORTED_MODULE_0__api__["a" /* default */].ACTIVE_ATTRIBUTES);
    }
 
    /**
     * Returns location (index) of a name
     * @param {String} attributeName - name of an attribute
     *   (matches name in a linked shader)
     * @returns {Number} - // array of actual attribute names from shader linking
     */
 
  }, {
    key: 'getAttributeLocation',
    value: function getAttributeLocation(attributeName) {
      return this.gl.getAttribLocation(this.handle, attributeName);
    }
 
    /**
     * Returns an object with info about attribute at index "location"/
     * @param {int} location - index of an attribute
     * @returns {WebGLActiveInfo} - info about an active attribute
     *   fields: {name, size, type}
     */
 
  }, {
    key: 'getAttributeInfo',
    value: function getAttributeInfo(location) {
      return this.gl.getActiveAttrib(this.handle, location);
    }
 
    /**
     * UNIFORMS API
     * (Locations are numeric indices)
     * @return {Number} count
     */
 
  }, {
    key: 'getUniformCount',
    value: function getUniformCount() {
      return this._getParameter(__WEBPACK_IMPORTED_MODULE_0__api__["a" /* default */].ACTIVE_UNIFORMS);
    }
 
    /*
     * @returns {WebGLActiveInfo} - object with {name, size, type}
     */
 
  }, {
    key: 'getUniformInfo',
    value: function getUniformInfo(index) {
      return this.gl.getActiveUniform(this.handle, index);
    }
 
    /*
     * @returns {WebGLUniformLocation} - opaque object representing location
     * of uniform, used by setter methods
     */
 
  }, {
    key: 'getUniformLocation',
    value: function getUniformLocation(name) {
      return this.gl.getUniformLocation(this.handle, name);
    }
  }, {
    key: 'getUniformValue',
    value: function getUniformValue(location) {
      return this.gl.getUniform(this.handle, location);
    }
 
    // WebGL2
    /**
     * @param {GLuint} index
     * @return {WebGLActiveInfo} - object with {name, size, type}
     */
 
  }, {
    key: 'getVarying',
    value: function getVarying(program, index) {
      var result = this.gl.getTransformFeedbackVarying(program, index);
      return result;
    }
 
    // Retrieves the assigned color number binding for the user-defined varying
    // out variable name for program. program must have previously been linked.
 
  }, {
    key: 'getFragDataLocation',
    value: function getFragDataLocation(varyingName) {
      __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__context__["g" /* assertWebGL2Context */])(this.gl);
      return this.gl.getFragDataLocation(this.handle, varyingName);
    }
 
    // @returns {WebGLShader[]} - array of attached WebGLShader objects
 
  }, {
    key: 'getAttachedShaders',
    value: function getAttachedShaders() {
      return this.gl.getAttachedShaders(this.handle);
    }
 
    // PRIVATE METHODS
 
  }, {
    key: '_compileAndLink',
    value: function _compileAndLink() {
      var gl = this.gl;
 
      gl.attachShader(this.handle, this.vs.handle);
      gl.attachShader(this.handle, this.fs.handle);
      __WEBPACK_IMPORTED_MODULE_11__utils__["b" /* log */].time(LOG_PROGRAM_PERF_PRIORITY, 'linkProgram for ' + this._getName());
      gl.linkProgram(this.handle);
      __WEBPACK_IMPORTED_MODULE_11__utils__["b" /* log */].timeEnd(LOG_PROGRAM_PERF_PRIORITY, 'linkProgram for ' + this._getName());
 
      // Avoid checking program linking error in production
      if (gl.debug || __WEBPACK_IMPORTED_MODULE_11__utils__["b" /* log */].priority > 0) {
        gl.validateProgram(this.handle);
        var linked = gl.getProgramParameter(this.handle, gl.LINK_STATUS);
        if (!linked) {
          throw new Error('Error linking ' + gl.getProgramInfoLog(this.handle));
        }
      }
 
      this._queryAttributeLocations();
      this._queryUniformLocations();
    }
  }, {
    key: '_sortBuffersByLocation',
    value: function _sortBuffersByLocation(buffers) {
      var elements = null;
      var locations = [];
 
      // Reutrn early if no buffers to be bound.
      if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_11__utils__["f" /* isObjectEmpty */])(buffers)) {
        return { locations: locations, elements: elements };
      }
 
      locations = new Array(this._attributeCount);
      for (var bufferName in buffers) {
        var buffer = buffers[bufferName];
        var location = this._attributeToLocationMap[bufferName];
        if (location === undefined) {
          if (buffer.target === __WEBPACK_IMPORTED_MODULE_0__api__["a" /* default */].ELEMENT_ARRAY_BUFFER && elements) {
            throw new Error(this._print(bufferName) + ' duplicate GL.ELEMENT_ARRAY_BUFFER');
          } else if (buffer.target === __WEBPACK_IMPORTED_MODULE_0__api__["a" /* default */].ELEMENT_ARRAY_BUFFER) {
            elements = bufferName;
          } else if (!this._warnedLocations[location]) {
            __WEBPACK_IMPORTED_MODULE_11__utils__["b" /* log */].log(2, this._print(bufferName) + ' not used');
            this._warnedLocations[location] = true;
          }
        } else {
          if (buffer.target === __WEBPACK_IMPORTED_MODULE_0__api__["a" /* default */].ELEMENT_ARRAY_BUFFER) {
            throw new Error(this._print(bufferName) + ':' + location + ' ' + 'has both location and type gl.ELEMENT_ARRAY_BUFFER');
          }
          locations[location] = bufferName;
        }
      }
      return { locations: locations, elements: elements };
    }
 
    // Check that all active attributes are enabled
 
  }, {
    key: '_areAllAttributesEnabled',
    value: function _areAllAttributesEnabled() {
      var length = this._attributeCount;
      for (var i = 0; i < length; ++i) {
        if (!this.vertexAttributes.isEnabled(i)) {
          return false;
        }
      }
      return true;
    }
  }, {
    key: '_print',
    value: function _print(bufferName) {
      return 'Program ' + this.id + ': Attribute ' + bufferName;
    }
  }, {
    key: '_createHandle',
    value: function _createHandle() {
      return this.gl.createProgram();
    }
  }, {
    key: '_deleteHandle',
    value: function _deleteHandle() {
      this.gl.deleteProgram(this.handle);
    }
  }, {
    key: '_getName',
    value: function _getName() {
      var programName = this.vs.getName() || this.fs.getName();
      programName = programName.replace(/shader/i, '');
      programName = programName ? programName + '-program' : 'program';
      return programName;
    }
  }, {
    key: '_getOptionsFromHandle',
    value: function _getOptionsFromHandle(handle) {
      var shaderHandles = this.gl.getAttachedShaders(handle);
      var opts = {};
      var _iteratorNormalCompletion = true;
      var _didIteratorError = false;
      var _iteratorError = undefined;
 
      try {
        for (var _iterator = shaderHandles[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
          var shaderHandle = _step.value;
 
          var type = this.gl.getShaderParameter(this.handle, __WEBPACK_IMPORTED_MODULE_0__api__["a" /* default */].SHADER_TYPE);
          switch (type) {
            case __WEBPACK_IMPORTED_MODULE_0__api__["a" /* default */].VERTEX_SHADER:
              opts.vs = new __WEBPACK_IMPORTED_MODULE_9__shader__["b" /* VertexShader */]({ handle: shaderHandle });
              break;
            case __WEBPACK_IMPORTED_MODULE_0__api__["a" /* default */].FRAGMENT_SHADER:
              opts.fs = new __WEBPACK_IMPORTED_MODULE_9__shader__["c" /* FragmentShader */]({ handle: shaderHandle });
              break;
            default:
          }
        }
      } catch (err) {
        _didIteratorError = true;
        _iteratorError = err;
      } finally {
        try {
          if (!_iteratorNormalCompletion && _iterator.return) {
            _iterator.return();
          }
        } finally {
          if (_didIteratorError) {
            throw _iteratorError;
          }
        }
      }
 
      return opts;
    }
  }, {
    key: '_getParameter',
    value: function _getParameter(pname) {
      return this.gl.getProgramParameter(this.handle, pname);
    }
 
    // query attribute locations and build name to location map.
 
  }, {
    key: '_queryAttributeLocations',
    value: function _queryAttributeLocations() {
      this._attributeToLocationMap = {};
      this._attributeCount = this.getAttributeCount();
      for (var location = 0; location < this._attributeCount; location++) {
        var name = this.getAttributeInfo(location).name;
        this._attributeToLocationMap[name] = this.getAttributeLocation(name);
      }
      this._warnedLocations = {};
    }
 
    // query uniform locations and build name to setter map.
 
  }, {
    key: '_queryUniformLocations',
    value: function _queryUniformLocations() {
      var gl = this.gl;
 
      this._uniformSetters = {};
      this._uniformCount = this.getUniformCount();
      for (var i = 0; i < this._uniformCount; i++) {
        var info = this.getUniformInfo(i);
        var parsedName = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_8__uniforms__["a" /* parseUniformName */])(info.name);
        var location = this.getUniformLocation(parsedName.name);
        this._uniformSetters[parsedName.name] = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_8__uniforms__["b" /* getUniformSetter */])(gl, location, info, parsedName.isArray);
      }
      this._textureIndexCounter = 0;
    }
  }, {
    key: '_setId',
    value: function _setId(id) {
      // If program is not named, name it after shader names
      if (!id) {
        var programName = this._getName();
        // TODO - this.id will already have been initialized
        this.id = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_11__utils__["d" /* uid */])(programName);
      }
    }
  }]);
 
  return Program;
}(__WEBPACK_IMPORTED_MODULE_4__resource__["a" /* default */]);
 
// create uniform setters
// Map of uniform names to setter functions
 
 
/* harmony default export */ __webpack_exports__["a"] = (Program);
function getUniformDescriptors(gl, program) {
  var uniformDescriptors = {};
  var length = program.getUniformCount();
  for (var i = 0; i < length; i++) {
    var info = program.getUniformInfo(i);
    var location = program.getUniformLocation(info.name);
    var descriptor = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_8__uniforms__["b" /* getUniformSetter */])(gl, location, info);
    uniformDescriptors[descriptor.name] = descriptor;
  }
  return uniformDescriptors;
}
 
// Get a map of buffer indices
function getVaryingMap(varyings, bufferMode) {
  var varyingMap = {};
  var index = 0;
  __WEBPACK_IMPORTED_MODULE_12_assert___default()(bufferMode === __WEBPACK_IMPORTED_MODULE_0__api__["a" /* default */].SEPARATE_ATTRIBS || bufferMode === __WEBPACK_IMPORTED_MODULE_0__api__["a" /* default */].INTERLEAVED_ATTRIBS);
  var indexIncrement = bufferMode === __WEBPACK_IMPORTED_MODULE_0__api__["a" /* default */].SEPARATE_ATTRIBS ? 1 : 0;
  var _iteratorNormalCompletion2 = true;
  var _didIteratorError2 = false;
  var _iteratorError2 = undefined;
 
  try {
    for (var _iterator2 = varyings[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
      var varying = _step2.value;
 
      varyingMap[varying] = index;
      index += indexIncrement;
    }
  } catch (err) {
    _didIteratorError2 = true;
    _iteratorError2 = err;
  } finally {
    try {
      if (!_iteratorNormalCompletion2 && _iterator2.return) {
        _iterator2.return();
      }
    } finally {
      if (_didIteratorError2) {
        throw _iteratorError2;
      }
    }
  }
 
  return varyingMap;
}
//# sourceMappingURL=program.js.map
 
/***/ }),
/* 110 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* unused harmony export RENDERBUFFER_FORMATS */
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__gl_constants__ = __webpack_require__(25);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__context__ = __webpack_require__(7);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__resource__ = __webpack_require__(30);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_assert__ = __webpack_require__(1);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_assert___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_assert__);
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
 
var _RENDERBUFFER_FORMATS;
 
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
 
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
 
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
 
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
 
/* eslint-disable no-inline-comments */
 
 
 
 
 
// Define local GL constants to optimize minification
var GL_RENDERBUFFER = 0x8D41;
var GL_SAMPLES = 0x80A9;
var GL_RENDERBUFFER_WIDTH = 0x8D42;
var GL_RENDERBUFFER_HEIGHT = 0x8D43;
var GL_RENDERBUFFER_INTERNAL_FORMAT = 0x8D44;
var GL_RENDERBUFFER_SAMPLES = 0x8CAB;
 
// Define local extension strings to optimize minification
// const SRGB = 'EXT_sRGB';
// const CB_FLOAT_WEBGL1 = 'WEBGL_color_buffer_float';
var CB_FLOAT_WEBGL2 = 'EXT_color_buffer_float';
// const CB_HALF_FLOAT_WEBGL1 = 'EXT_color_buffer_half_float';
 
var RENDERBUFFER_FORMATS = (_RENDERBUFFER_FORMATS = {}, _defineProperty(_RENDERBUFFER_FORMATS, __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].DEPTH_COMPONENT16, {}), _defineProperty(_RENDERBUFFER_FORMATS, __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].DEPTH_COMPONENT24, { gl2: true }), _defineProperty(_RENDERBUFFER_FORMATS, __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].DEPTH_COMPONENT32F, { gl2: true }), _defineProperty(_RENDERBUFFER_FORMATS, __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].STENCIL_INDEX8, {}), _defineProperty(_RENDERBUFFER_FORMATS, __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].DEPTH_STENCIL, {}), _defineProperty(_RENDERBUFFER_FORMATS, __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].DEPTH24_STENCIL8, { gl2: true }), _defineProperty(_RENDERBUFFER_FORMATS, __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].DEPTH32F_STENCIL8, { gl2: true }), _defineProperty(_RENDERBUFFER_FORMATS, __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].RGBA4, {}), _defineProperty(_RENDERBUFFER_FORMATS, __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].RGB565, {}), _defineProperty(_RENDERBUFFER_FORMATS, __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].RGB5_A1, {}), _defineProperty(_RENDERBUFFER_FORMATS, __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].R8, { gl2: true }), _defineProperty(_RENDERBUFFER_FORMATS, __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].R8UI, { gl2: true }), _defineProperty(_RENDERBUFFER_FORMATS, __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].R8I, { gl2: true }), _defineProperty(_RENDERBUFFER_FORMATS, __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].R16UI, { gl2: true }), _defineProperty(_RENDERBUFFER_FORMATS, __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].R16I, { gl2: true }), _defineProperty(_RENDERBUFFER_FORMATS, __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].R32UI, { gl2: true }), _defineProperty(_RENDERBUFFER_FORMATS, __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].R32I, { gl2: true }), _defineProperty(_RENDERBUFFER_FORMATS, __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].RG8, { gl2: true }), _defineProperty(_RENDERBUFFER_FORMATS, __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].RG8UI, { gl2: true }), _defineProperty(_RENDERBUFFER_FORMATS, __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].RG8I, { gl2: true }), _defineProperty(_RENDERBUFFER_FORMATS, __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].RG16UI, { gl2: true }), _defineProperty(_RENDERBUFFER_FORMATS, __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].RG16I, { gl2: true }), _defineProperty(_RENDERBUFFER_FORMATS, __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].RG32UI, { gl2: true }), _defineProperty(_RENDERBUFFER_FORMATS, __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].RG32I, { gl2: true }), _defineProperty(_RENDERBUFFER_FORMATS, __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].RGB8, { gl2: true }), _defineProperty(_RENDERBUFFER_FORMATS, __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].RGBA8, { gl2: true }), _defineProperty(_RENDERBUFFER_FORMATS, __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].RGB10_A2, { gl2: true }), _defineProperty(_RENDERBUFFER_FORMATS, __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].RGBA8UI, { gl2: true }), _defineProperty(_RENDERBUFFER_FORMATS, __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].RGBA8I, { gl2: true }), _defineProperty(_RENDERBUFFER_FORMATS, __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].RGB10_A2UI, { gl2: true }), _defineProperty(_RENDERBUFFER_FORMATS, __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].RGBA16UI, { gl2: true }), _defineProperty(_RENDERBUFFER_FORMATS, __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].RGBA16I, { gl2: true }), _defineProperty(_RENDERBUFFER_FORMATS, __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].RGBA32I, { gl2: true }), _defineProperty(_RENDERBUFFER_FORMATS, __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].RGBA32UI, { gl2: true }), _defineProperty(_RENDERBUFFER_FORMATS, __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].R16F, { gl2: CB_FLOAT_WEBGL2 }), _defineProperty(_RENDERBUFFER_FORMATS, __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].RG16F, { gl2: CB_FLOAT_WEBGL2 }), _defineProperty(_RENDERBUFFER_FORMATS, __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].RGBA16F, { gl2: CB_FLOAT_WEBGL2 }), _defineProperty(_RENDERBUFFER_FORMATS, __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].R32F, { gl2: CB_FLOAT_WEBGL2 }), _defineProperty(_RENDERBUFFER_FORMATS, __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].RG32F, { gl2: CB_FLOAT_WEBGL2 }), _defineProperty(_RENDERBUFFER_FORMATS, __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].RGBA32F, { gl2: CB_FLOAT_WEBGL2 }), _defineProperty(_RENDERBUFFER_FORMATS, __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].R11F_G11F_B10F, { gl2: CB_FLOAT_WEBGL2 }), _RENDERBUFFER_FORMATS);
 
function isFormatSupported(gl, format, formats) {
  // assert(isWebGL(gl), ERR_WEBGL);
  var info = formats[format];
  if (!info) {
    return false;
  }
  var value = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__context__["b" /* isWebGL2 */])(gl) ? info.gl2 || info.gl1 : info.gl1;
  if (typeof value === 'string') {
    return gl.getExtension(value);
  }
  return value;
}
 
var Renderbuffer = /*#__PURE__*/function (_Resource) {
  _inherits(Renderbuffer, _Resource);
 
  _createClass(Renderbuffer, null, [{
    key: 'isSupported',
    value: function isSupported(gl) {
      var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
          format = _ref.format;
 
      return !format || isFormatSupported(gl, format, RENDERBUFFER_FORMATS);
    }
  }, {
    key: 'getSamplesForFormat',
    value: function getSamplesForFormat(gl, _ref2) {
      var format = _ref2.format;
 
      // Polyfilled to return [0] under WebGL1
      return gl.getInternalformatParameter(GL_RENDERBUFFER, format, GL_SAMPLES);
    }
  }]);
 
  function Renderbuffer(gl) {
    var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
 
    _classCallCheck(this, Renderbuffer);
 
    var _this = _possibleConstructorReturn(this, (Renderbuffer.__proto__ || Object.getPrototypeOf(Renderbuffer)).call(this, gl, opts));
 
    _this.initialize(opts);
    Object.seal(_this);
    return _this;
  }
 
  // Creates and initializes a renderbuffer object's data store
 
 
  _createClass(Renderbuffer, [{
    key: 'initialize',
    value: function initialize(_ref3) {
      var format = _ref3.format,
          _ref3$width = _ref3.width,
          width = _ref3$width === undefined ? 1 : _ref3$width,
          _ref3$height = _ref3.height,
          height = _ref3$height === undefined ? 1 : _ref3$height,
          _ref3$samples = _ref3.samples,
          samples = _ref3$samples === undefined ? 0 : _ref3$samples;
 
      __WEBPACK_IMPORTED_MODULE_3_assert___default()(format, 'Needs format');
      this.gl.bindRenderbuffer(GL_RENDERBUFFER, this.handle);
 
      if (samples !== 0 && __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__context__["b" /* isWebGL2 */])(this.gl)) {
        this.gl.renderbufferStorageMultisample(GL_RENDERBUFFER, samples, format, width, height);
      } else {
        this.gl.renderbufferStorage(GL_RENDERBUFFER, format, width, height);
      }
 
      // this.gl.bindRenderbuffer(GL_RENDERBUFFER, null);
 
      this.format = format;
      this.width = width;
      this.height = height;
      this.samples = samples;
 
      return this;
    }
  }, {
    key: 'resize',
    value: function resize(_ref4) {
      var width = _ref4.width,
          height = _ref4.height;
 
      // Don't resize if width/height haven't changed
      if (width !== this.width || height !== this.height) {
        return this.initialize({ width: width, height: height, format: this.format, samples: this.samples });
      }
      return this;
    }
 
    // PRIVATE METHODS
 
  }, {
    key: '_createHandle',
    value: function _createHandle() {
      return this.gl.createRenderbuffer();
    }
  }, {
    key: '_deleteHandle',
    value: function _deleteHandle() {
      this.gl.deleteRenderbuffer(this.handle);
    }
  }, {
    key: '_syncHandle',
    value: function _syncHandle(handle) {
      this.format = this.getParameter(GL_RENDERBUFFER_INTERNAL_FORMAT);
      this.width = this.getParameter(GL_RENDERBUFFER_WIDTH);
      this.height = this.getParameter(GL_RENDERBUFFER_HEIGHT);
      this.samples = this.getParameter(GL_RENDERBUFFER_SAMPLES);
    }
 
    // @param {Boolean} opt.autobind=true - method call will bind/unbind object
    // @returns {GLenum|GLint} - depends on pname
 
  }, {
    key: '_getParameter',
    value: function _getParameter(pname) {
      this.gl.bindRenderbuffer(GL_RENDERBUFFER, this.handle);
      var value = this.gl.getRenderbufferParameter(GL_RENDERBUFFER, pname);
      // this.gl.bindRenderbuffer(GL_RENDERBUFFER, null);
      return value;
    }
  }]);
 
  return Renderbuffer;
}(__WEBPACK_IMPORTED_MODULE_2__resource__["a" /* default */]);
 
/* harmony default export */ __webpack_exports__["a"] = (Renderbuffer);
//# sourceMappingURL=renderbuffer.js.map
 
/***/ }),
/* 111 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Shader; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return VertexShader; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return FragmentShader; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__webgl_utils__ = __webpack_require__(60);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__context__ = __webpack_require__(7);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__resource__ = __webpack_require__(30);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__utils__ = __webpack_require__(8);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_assert__ = __webpack_require__(1);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_assert___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_assert__);
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
 
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
 
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
 
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
 
 
 
 
 
 
 
var ERR_SOURCE = 'Shader: GLSL source code must be a JavaScript string';
 
var GL_FRAGMENT_SHADER = 0x8B30;
var GL_VERTEX_SHADER = 0x8B31;
var GL_COMPILE_STATUS = 0x8B81;
var GL_SHADER_TYPE = 0x8B4F;
 
// For now this is an internal class
var Shader = /*#__PURE__*/function (_Resource) {
  _inherits(Shader, _Resource);
 
  _createClass(Shader, null, [{
    key: 'getTypeName',
    value: function getTypeName(shaderType) {
      switch (shaderType) {
        case GL_VERTEX_SHADER:
          return 'vertex-shader';
        case GL_FRAGMENT_SHADER:
          return 'fragment-shader';
        default:
          __WEBPACK_IMPORTED_MODULE_4_assert___default()(false);return 'unknown';
      }
    }
 
    /* eslint-disable max-statements */
 
  }]);
 
  function Shader(gl, source, shaderType) {
    _classCallCheck(this, Shader);
 
    __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__context__["j" /* assertWebGLContext */])(gl);
    __WEBPACK_IMPORTED_MODULE_4_assert___default()(typeof source === 'string', ERR_SOURCE);
 
    var _this = _possibleConstructorReturn(this, (Shader.__proto__ || Object.getPrototypeOf(Shader)).call(this, gl, { id: __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__webgl_utils__["i" /* getShaderName */])(source) || __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__utils__["d" /* uid */])(Shader.getTypeName(shaderType)) }));
 
    _this.shaderType = shaderType;
    _this.source = source;
 
    _this.opts.source = source;
    _this.initialize(_this.opts);
    return _this;
  }
 
  _createClass(Shader, [{
    key: 'initialize',
    value: function initialize(_ref) {
      var source = _ref.source;
 
      var shaderName = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__webgl_utils__["i" /* getShaderName */])(source);
      if (shaderName) {
        this.id = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__utils__["d" /* uid */])(shaderName);
      }
      this._compile(source);
      this.opts.source = source;
    }
 
    // Accessors
 
  }, {
    key: 'getParameter',
    value: function getParameter(pname) {
      return this.gl.getShaderParameter(this.handle, pname);
    }
  }, {
    key: 'toString',
    value: function toString() {
      return this.getTypeName(this.shaderType) + ':' + this.id;
    }
  }, {
    key: 'getName',
    value: function getName() {
      return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__webgl_utils__["i" /* getShaderName */])(this.opts.source) || 'unnamed-shader';
    }
  }, {
    key: 'getSource',
    value: function getSource() {
      return this.gl.getShaderSource(this.handle);
    }
 
    // Debug method - Returns translated source if available
 
  }, {
    key: 'getTranslatedSource',
    value: function getTranslatedSource() {
      var extension = this.gl.getExtension('WEBGL_debug_shaders');
      return extension ? extension.getTranslatedShaderSource(this.handle) : 'No translated source available. WEBGL_debug_shaders not implemented';
    }
 
    // PRIVATE METHODS
 
  }, {
    key: '_compile',
    value: function _compile() {
      this.gl.shaderSource(this.handle, this.source);
      this.gl.compileShader(this.handle);
 
      // TODO - For performance reasons, avoid checking shader compilation errors on production?
      // TODO - Load log even when no error reported, to catch warnings?
      // https://gamedev.stackexchange.com/questions/30429/how-to-detect-glsl-warnings
      var compileStatus = this.getParameter(GL_COMPILE_STATUS);
      if (!compileStatus) {
        var infoLog = this.gl.getShaderInfoLog(this.handle);
 
        var _parseGLSLCompilerErr = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__webgl_utils__["j" /* parseGLSLCompilerError */])(infoLog, this.source, this.shaderType),
            shaderName = _parseGLSLCompilerErr.shaderName,
            errors = _parseGLSLCompilerErr.errors,
            warnings = _parseGLSLCompilerErr.warnings;
 
        __WEBPACK_IMPORTED_MODULE_3__utils__["b" /* log */].error('GLSL compilation errors in ' + shaderName + '\n' + errors);
        __WEBPACK_IMPORTED_MODULE_3__utils__["b" /* log */].warn('GLSL compilation warnings in ' + shaderName + '\n' + warnings);
        throw new Error('GLSL compilation errors in ' + shaderName);
      }
    }
  }, {
    key: '_deleteHandle',
    value: function _deleteHandle() {
      this.gl.deleteShader(this.handle);
    }
  }, {
    key: '_getOptsFromHandle',
    value: function _getOptsFromHandle() {
      return {
        type: this.getParameter(GL_SHADER_TYPE),
        source: this.getSource()
      };
    }
  }]);
 
  return Shader;
}(__WEBPACK_IMPORTED_MODULE_2__resource__["a" /* default */]);
 
var VertexShader = /*#__PURE__*/function (_Shader) {
  _inherits(VertexShader, _Shader);
 
  function VertexShader(gl, source) {
    _classCallCheck(this, VertexShader);
 
    return _possibleConstructorReturn(this, (VertexShader.__proto__ || Object.getPrototypeOf(VertexShader)).call(this, gl, source, GL_VERTEX_SHADER));
  }
 
  // PRIVATE METHODS
 
 
  _createClass(VertexShader, [{
    key: '_createHandle',
    value: function _createHandle() {
      return this.gl.createShader(GL_VERTEX_SHADER);
    }
  }]);
 
  return VertexShader;
}(Shader);
 
var FragmentShader = /*#__PURE__*/function (_Shader2) {
  _inherits(FragmentShader, _Shader2);
 
  function FragmentShader(gl, source) {
    _classCallCheck(this, FragmentShader);
 
    return _possibleConstructorReturn(this, (FragmentShader.__proto__ || Object.getPrototypeOf(FragmentShader)).call(this, gl, source, GL_FRAGMENT_SHADER));
  }
 
  // PRIVATE METHODS
 
 
  _createClass(FragmentShader, [{
    key: '_createHandle',
    value: function _createHandle() {
      return this.gl.createShader(GL_FRAGMENT_SHADER);
    }
  }]);
 
  return FragmentShader;
}(Shader);
//# sourceMappingURL=shader.js.map
 
/***/ }),
/* 112 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__common__ = __webpack_require__(31);
var _createClass=function(){function defineProperties(target,props){for(var descriptor,i=0;i<props.length;i++)descriptor=props[i],descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,'value'in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}();function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError('Cannot call a class as a function')}function _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError('this hasn\'t been initialised - super() hasn\'t been called');return call&&('object'==typeof call||'function'==typeof call)?call:self}function _inherits(subClass,superClass){if('function'!=typeof superClass&&null!==superClass)throw new TypeError('Super expression must either be null or a function, not '+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass)}function _extendableBuiltin(cls){function ExtendableBuiltin(){var instance=Reflect.construct(cls,Array.from(arguments));return Object.setPrototypeOf(instance,Object.getPrototypeOf(this)),instance}return ExtendableBuiltin.prototype=Object.create(cls.prototype,{constructor:{value:cls,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf?Object.setPrototypeOf(ExtendableBuiltin,cls):ExtendableBuiltin.__proto__=cls,ExtendableBuiltin}var MathArray=function(_extendableBuiltin2){function MathArray(){return _classCallCheck(this,MathArray),_possibleConstructorReturn(this,(MathArray.__proto__||Object.getPrototypeOf(MathArray)).apply(this,arguments))}return _inherits(MathArray,_extendableBuiltin2),_createClass(MathArray,[{key:'clone',value:function(){var Subclass=this.constructor,clone=new Subclass().copy(this);return clone.check(),clone}},{key:'copy',value:function copy(array){for(var i=0;i<this.ELEMENTS;++i)this[i]=array[i];return this.check()}},{key:'set',value:function set(){for(var _len=arguments.length,args=Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];for(var i=0;i<this.ELEMENTS;++i)this[i]=args[i]||0;return this.check()}},{key:'fromArray',value:function fromArray(array){for(var offset=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,i=0;i<this.ELEMENTS;++i)this[i]=array[i+offset];return this.check()}},{key:'toString',value:function toString(){return this.formatString(__WEBPACK_IMPORTED_MODULE_0__common__["a" /* config */])}},{key:'formatString',value:function formatString(opts){for(var string='',i=0;i<this.ELEMENTS;++i)string+=(0<i?', ':'')+__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__common__["b" /* formatValue */])(this[i],opts);return(opts.printTypes?this.constructor.name:'')+'['+string+']'}},{key:'toArray',value:function toArray(){for(var array=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[],offset=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,i=0;i<this.ELEMENTS;++i)array[offset+i]=this[i];return array}},{key:'toFloat32Array',value:function toFloat32Array(){return new Float32Array(this)}},{key:'equals',value:function equals(array){if(!array||this.length!==array.length)return!1;for(var i=0;i<this.ELEMENTS;++i)if(!__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__common__["c" /* equals */])(this[i],array[i]))return!1;return!0}},{key:'exactEquals',value:function exactEquals(array){if(!array||this.length!==array.length)return!1;for(var i=0;i<this.ELEMENTS;++i)if(this[i]!==array[i])return!1;return!0}},{key:'negate',value:function negate(){for(var i=0;i<this.ELEMENTS;++i)this[i]=-this[i];return this.check()}},{key:'inverse',value:function inverse(){for(var i=0;i<this.ELEMENTS;++i)this[i]=1/this[i];return this.check()}},{key:'lerp',value:function lerp(vector,coeff){for(var coord,i=0;i<this.ELEMENTS;++i)coord=this[i],this[i]=coord+coeff*(vector[0]-coord);return this.check()}},{key:'validate',value:function validate(){for(var array=0<arguments.length&&void 0!==arguments[0]?arguments[0]:this,valid=array&&array.length===this.ELEMENTS,i=0;i<this.ELEMENTS;++i)valid=valid&&Number.isFinite(array[i]);return valid}},{key:'check',value:function check(){var array=0<arguments.length&&void 0!==arguments[0]?arguments[0]:this;if(__WEBPACK_IMPORTED_MODULE_0__common__["a" /* config */].debug&&!this.validate(array))throw new Error('Invalid '+this.constructor.name);return this}}]),MathArray}(_extendableBuiltin(Array));/* harmony default export */ __webpack_exports__["a"] = (MathArray);
//# sourceMappingURL=math-array.js.map
 
/***/ }),
/* 113 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["b"] = validateVector3;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__vector__ = __webpack_require__(170);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__common__ = __webpack_require__(31);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_gl_vec3_set__ = __webpack_require__(613);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_gl_vec3_set___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_gl_vec3_set__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_gl_vec3_angle__ = __webpack_require__(604);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_gl_vec3_angle___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_gl_vec3_angle__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_gl_vec3_add__ = __webpack_require__(603);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_gl_vec3_add___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_gl_vec3_add__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_gl_vec3_subtract__ = __webpack_require__(614);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_gl_vec3_subtract___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_gl_vec3_subtract__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_gl_vec3_multiply__ = __webpack_require__(607);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_gl_vec3_multiply___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_gl_vec3_multiply__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_gl_vec3_divide__ = __webpack_require__(605);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_gl_vec3_divide___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_gl_vec3_divide__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_gl_vec3_scale__ = __webpack_require__(611);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_gl_vec3_scale___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_gl_vec3_scale__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_gl_vec3_scaleAndAdd__ = __webpack_require__(612);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_gl_vec3_scaleAndAdd___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_gl_vec3_scaleAndAdd__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10_gl_vec3_cross__ = __webpack_require__(239);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10_gl_vec3_cross___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_10_gl_vec3_cross__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11_gl_vec3_rotateX__ = __webpack_require__(608);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11_gl_vec3_rotateX___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_11_gl_vec3_rotateX__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12_gl_vec3_rotateY__ = __webpack_require__(609);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12_gl_vec3_rotateY___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_12_gl_vec3_rotateY__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13_gl_vec3_rotateZ__ = __webpack_require__(610);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13_gl_vec3_rotateZ___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_13_gl_vec3_rotateZ__);
var _createClass=function(){function defineProperties(target,props){for(var descriptor,i=0;i<props.length;i++)descriptor=props[i],descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,'value'in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}();function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError('Cannot call a class as a function')}function _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError('this hasn\'t been initialised - super() hasn\'t been called');return call&&('object'==typeof call||'function'==typeof call)?call:self}function _inherits(subClass,superClass){if('function'!=typeof superClass&&null!==superClass)throw new TypeError('Super expression must either be null or a function, not '+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass)}var ORIGIN=[0,0,0];function validateVector3(v){var _NumberisFinite=Number.isFinite;return 3===v.length&&_NumberisFinite(v[0])&&_NumberisFinite(v[1])&&_NumberisFinite(v[2])}var Vector3=function(_Vector){function Vector3(){var x=0<arguments.length&&void 0!==arguments[0]?arguments[0]:0,y=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,z=2<arguments.length&&void 0!==arguments[2]?arguments[2]:0;_classCallCheck(this,Vector3);var _this=_possibleConstructorReturn(this,(Vector3.__proto__||Object.getPrototypeOf(Vector3)).call(this));return Array.isArray(x)&&1===arguments.length?_this.copy(x):_this.set(x,y,z),_this}return _inherits(Vector3,_Vector),_createClass(Vector3,[{key:'set',value:function set(x,y,z){return __WEBPACK_IMPORTED_MODULE_2_gl_vec3_set___default()(this,x,y,z),this.check()}},{key:'angle',value:function angle(vector){return __WEBPACK_IMPORTED_MODULE_3_gl_vec3_angle___default()(this,vector)}},{key:'add',value:function add(){for(var _len=arguments.length,vectors=Array(_len),_key=0;_key<_len;_key++)vectors[_key]=arguments[_key];var _iteratorNormalCompletion=!0,_didIteratorError=!1,_iteratorError=void 0;try{for(var _step,vector,_iterator=vectors[Symbol.iterator]();!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=!0)vector=_step.value,__WEBPACK_IMPORTED_MODULE_4_gl_vec3_add___default()(this,this,vector)}catch(err){_didIteratorError=!0,_iteratorError=err}finally{try{!_iteratorNormalCompletion&&_iterator.return&&_iterator.return()}finally{if(_didIteratorError)throw _iteratorError}}return this.check()}},{key:'subtract',value:function subtract(){for(var _len2=arguments.length,vectors=Array(_len2),_key2=0;_key2<_len2;_key2++)vectors[_key2]=arguments[_key2];var _iteratorNormalCompletion2=!0,_didIteratorError2=!1,_iteratorError2=void 0;try{for(var _step2,vector,_iterator2=vectors[Symbol.iterator]();!(_iteratorNormalCompletion2=(_step2=_iterator2.next()).done);_iteratorNormalCompletion2=!0)vector=_step2.value,__WEBPACK_IMPORTED_MODULE_5_gl_vec3_subtract___default()(this,this,vector)}catch(err){_didIteratorError2=!0,_iteratorError2=err}finally{try{!_iteratorNormalCompletion2&&_iterator2.return&&_iterator2.return()}finally{if(_didIteratorError2)throw _iteratorError2}}return this.check()}},{key:'multiply',value:function multiply(){for(var _len3=arguments.length,vectors=Array(_len3),_key3=0;_key3<_len3;_key3++)vectors[_key3]=arguments[_key3];var _iteratorNormalCompletion3=!0,_didIteratorError3=!1,_iteratorError3=void 0;try{for(var _step3,vector,_iterator3=vectors[Symbol.iterator]();!(_iteratorNormalCompletion3=(_step3=_iterator3.next()).done);_iteratorNormalCompletion3=!0)vector=_step3.value,__WEBPACK_IMPORTED_MODULE_6_gl_vec3_multiply___default()(this,this,vector)}catch(err){_didIteratorError3=!0,_iteratorError3=err}finally{try{!_iteratorNormalCompletion3&&_iterator3.return&&_iterator3.return()}finally{if(_didIteratorError3)throw _iteratorError3}}return this.check()}},{key:'scale',value:function scale(_scale){return Number.isFinite(_scale)?__WEBPACK_IMPORTED_MODULE_8_gl_vec3_scale___default()(this,this,_scale):__WEBPACK_IMPORTED_MODULE_6_gl_vec3_multiply___default()(this,this,_scale),this.check()}},{key:'cross',value:function cross(vector){return __WEBPACK_IMPORTED_MODULE_10_gl_vec3_cross___default()(this,this,vector),this.check()}},{key:'rotateX',value:function rotateX(_ref){var radians=_ref.radians,_ref$origin=_ref.origin,origin=void 0===_ref$origin?ORIGIN:_ref$origin;return __WEBPACK_IMPORTED_MODULE_11_gl_vec3_rotateX___default()(this,this,origin,radians),this.check()}},{key:'rotateY',value:function rotateY(_ref2){var radians=_ref2.radians,_ref2$origin=_ref2.origin,origin=void 0===_ref2$origin?ORIGIN:_ref2$origin;return __WEBPACK_IMPORTED_MODULE_12_gl_vec3_rotateY___default()(this,this,origin,radians),this.check()}},{key:'rotateZ',value:function rotateZ(_ref3){var radians=_ref3.radians,_ref3$origin=_ref3.origin,origin=void 0===_ref3$origin?ORIGIN:_ref3$origin;return __WEBPACK_IMPORTED_MODULE_13_gl_vec3_rotateZ___default()(this,this,origin,radians),this.check()}},{key:'operation',value:function operation(_operation){for(var _len4=arguments.length,args=Array(1<_len4?_len4-1:0),_key4=1;_key4<_len4;_key4++)args[_key4-1]=arguments[_key4];return _operation.apply(void 0,[this,this].concat(args)),this.check()}},{key:'divide',value:function divide(){for(var _len5=arguments.length,vectors=Array(_len5),_key5=0;_key5<_len5;_key5++)vectors[_key5]=arguments[_key5];var _iteratorNormalCompletion4=!0,_didIteratorError4=!1,_iteratorError4=void 0;try{for(var _step4,vector,_iterator4=vectors[Symbol.iterator]();!(_iteratorNormalCompletion4=(_step4=_iterator4.next()).done);_iteratorNormalCompletion4=!0)vector=_step4.value,__WEBPACK_IMPORTED_MODULE_7_gl_vec3_divide___default()(this,this,vector)}catch(err){_didIteratorError4=!0,_iteratorError4=err}finally{try{!_iteratorNormalCompletion4&&_iterator4.return&&_iterator4.return()}finally{if(_didIteratorError4)throw _iteratorError4}}return this.check()}},{key:'scaleAndAdd',value:function scaleAndAdd(vector,scale){return __WEBPACK_IMPORTED_MODULE_9_gl_vec3_scaleAndAdd___default()(this,this,vector,scale),this.check()}},{key:'ELEMENTS',get:function get(){return 3}},{key:'x',get:function get(){return this[0]},set:function set(value){return this[0]=__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__common__["g" /* checkNumber */])(value)}},{key:'y',get:function get(){return this[1]},set:function set(value){return this[1]=__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__common__["g" /* checkNumber */])(value)}},{key:'z',get:function get(){return this[2]},set:function set(value){return this[2]=__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__common__["g" /* checkNumber */])(value)}}]),Vector3}(__WEBPACK_IMPORTED_MODULE_0__vector__["a" /* default */]);/* harmony default export */ __webpack_exports__["a"] = (Vector3);
//# sourceMappingURL=vector3.js.map
 
/***/ }),
/* 114 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return RECOGNIZERS; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return RECOGNIZER_COMPATIBLE_MAP; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return RECOGNIZER_FALLBACK_MAP; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return BASIC_EVENT_ALIASES; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return INPUT_EVENT_TYPES; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return EVENT_RECOGNIZER_MAP; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return GESTURE_EVENT_ALIASES; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils_hammer__ = __webpack_require__(283);
// Copyright (c) 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
 
 
 
// This module contains constants that must be conditionally required
// due to `window`/`document` references downstream.
var RECOGNIZERS = __WEBPACK_IMPORTED_MODULE_0__utils_hammer__["b" /* default */] ? [[__WEBPACK_IMPORTED_MODULE_0__utils_hammer__["b" /* default */].Rotate, { enable: false }], [__WEBPACK_IMPORTED_MODULE_0__utils_hammer__["b" /* default */].Pinch, { enable: false }], [__WEBPACK_IMPORTED_MODULE_0__utils_hammer__["b" /* default */].Swipe, { enable: false }], [__WEBPACK_IMPORTED_MODULE_0__utils_hammer__["b" /* default */].Pan, { threshold: 0, enable: false }], [__WEBPACK_IMPORTED_MODULE_0__utils_hammer__["b" /* default */].Press, { enable: false }], [__WEBPACK_IMPORTED_MODULE_0__utils_hammer__["b" /* default */].Tap, { event: 'doubletap', taps: 2, enable: false }], [__WEBPACK_IMPORTED_MODULE_0__utils_hammer__["b" /* default */].Tap, { enable: false }]] : null;
 
// Recognize the following gestures even if a given recognizer succeeds
var RECOGNIZER_COMPATIBLE_MAP = {
  rotate: ['pinch']
};
 
// Recognize the folling gestures only if a given recognizer fails
var RECOGNIZER_FALLBACK_MAP = {
  doubletap: ['tap']
};
 
/**
 * Only one set of basic input events will be fired by Hammer.js:
 * either pointer, touch, or mouse, depending on system support.
 * In order to enable an application to be agnostic of system support,
 * alias basic input events into "classes" of events: down, move, and up.
 * See `_onBasicInput()` for usage of these aliases.
 */
var BASIC_EVENT_ALIASES = {
  pointerdown: 'pointerdown',
  pointermove: 'pointermove',
  pointerup: 'pointerup',
  touchstart: 'pointerdown',
  touchmove: 'pointermove',
  touchend: 'pointerup',
  mousedown: 'pointerdown',
  mousemove: 'pointermove',
  mouseup: 'pointerup'
};
 
var INPUT_EVENT_TYPES = {
  KEY_EVENTS: ['keydown', 'keyup'],
  MOUSE_EVENTS: ['mousedown', 'mousemove', 'mouseup', 'mouseleave'],
  WHEEL_EVENTS: [
  // Chrome, Safari
  'wheel',
  // IE
  'mousewheel',
  // legacy Firefox
  'DOMMouseScroll']
};
 
/**
 * "Gestural" events are those that have semantic meaning beyond the basic input event,
 * e.g. a click or tap is a sequence of `down` and `up` events with no `move` event in between.
 * Hammer.js handles these with its Recognizer system;
 * this block maps event names to the Recognizers required to detect the events.
 */
var EVENT_RECOGNIZER_MAP = {
  tap: 'tap',
  doubletap: 'doubletap',
  press: 'press',
  pinch: 'pinch',
  pinchin: 'pinch',
  pinchout: 'pinch',
  pinchstart: 'pinch',
  pinchmove: 'pinch',
  pinchend: 'pinch',
  pinchcancel: 'pinch',
  rotate: 'rotate',
  rotatestart: 'rotate',
  rotatemove: 'rotate',
  rotateend: 'rotate',
  rotatecancel: 'rotate',
  pan: 'pan',
  panstart: 'pan',
  panmove: 'pan',
  panup: 'pan',
  pandown: 'pan',
  panleft: 'pan',
  panright: 'pan',
  panend: 'pan',
  pancancel: 'pan',
  swipe: 'swipe',
  swipeleft: 'swipe',
  swiperight: 'swipe',
  swipeup: 'swipe',
  swipedown: 'swipe'
};
 
/**
 * Map gestural events typically provided by browsers
 * that are not reported in 'hammer.input' events
 * to corresponding Hammer.js gestures.
 */
var GESTURE_EVENT_ALIASES = {
  click: 'tap',
  dblclick: 'doubletap',
  mousedown: 'pointerdown',
  mousemove: 'pointermove',
  mouseup: 'pointerup',
  mouseleave: 'pointerleave'
};
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9jb25zdGFudHMuanMiXSwibmFtZXMiOlsiSGFtbWVyIiwiUkVDT0dOSVpFUlMiLCJSb3RhdGUiLCJlbmFibGUiLCJQaW5jaCIsIlN3aXBlIiwiUGFuIiwidGhyZXNob2xkIiwiUHJlc3MiLCJUYXAiLCJldmVudCIsInRhcHMiLCJSRUNPR05JWkVSX0NPTVBBVElCTEVfTUFQIiwicm90YXRlIiwiUkVDT0dOSVpFUl9GQUxMQkFDS19NQVAiLCJkb3VibGV0YXAiLCJCQVNJQ19FVkVOVF9BTElBU0VTIiwicG9pbnRlcmRvd24iLCJwb2ludGVybW92ZSIsInBvaW50ZXJ1cCIsInRvdWNoc3RhcnQiLCJ0b3VjaG1vdmUiLCJ0b3VjaGVuZCIsIm1vdXNlZG93biIsIm1vdXNlbW92ZSIsIm1vdXNldXAiLCJJTlBVVF9FVkVOVF9UWVBFUyIsIktFWV9FVkVOVFMiLCJNT1VTRV9FVkVOVFMiLCJXSEVFTF9FVkVOVFMiLCJFVkVOVF9SRUNPR05JWkVSX01BUCIsInRhcCIsInByZXNzIiwicGluY2giLCJwaW5jaGluIiwicGluY2hvdXQiLCJwaW5jaHN0YXJ0IiwicGluY2htb3ZlIiwicGluY2hlbmQiLCJwaW5jaGNhbmNlbCIsInJvdGF0ZXN0YXJ0Iiwicm90YXRlbW92ZSIsInJvdGF0ZWVuZCIsInJvdGF0ZWNhbmNlbCIsInBhbiIsInBhbnN0YXJ0IiwicGFubW92ZSIsInBhbnVwIiwicGFuZG93biIsInBhbmxlZnQiLCJwYW5yaWdodCIsInBhbmVuZCIsInBhbmNhbmNlbCIsInN3aXBlIiwic3dpcGVsZWZ0Iiwic3dpcGVyaWdodCIsInN3aXBldXAiLCJzd2lwZWRvd24iLCJHRVNUVVJFX0VWRU5UX0FMSUFTRVMiLCJjbGljayIsImRibGNsaWNrIiwibW91c2VsZWF2ZSJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUEsT0FBT0EsTUFBUCxNQUFtQixnQkFBbkI7O0FBRUE7QUFDQTtBQUNBLE9BQU8sSUFBTUMsY0FBY0QsU0FBUyxDQUNsQyxDQUFDQSxPQUFPRSxNQUFSLEVBQWdCLEVBQUNDLFFBQVEsS0FBVCxFQUFoQixDQURrQyxFQUVsQyxDQUFDSCxPQUFPSSxLQUFSLEVBQWUsRUFBQ0QsUUFBUSxLQUFULEVBQWYsQ0FGa0MsRUFHbEMsQ0FBQ0gsT0FBT0ssS0FBUixFQUFlLEVBQUNGLFFBQVEsS0FBVCxFQUFmLENBSGtDLEVBSWxDLENBQUNILE9BQU9NLEdBQVIsRUFBYSxFQUFDQyxXQUFXLENBQVosRUFBZUosUUFBUSxLQUF2QixFQUFiLENBSmtDLEVBS2xDLENBQUNILE9BQU9RLEtBQVIsRUFBZSxFQUFDTCxRQUFRLEtBQVQsRUFBZixDQUxrQyxFQU1sQyxDQUFDSCxPQUFPUyxHQUFSLEVBQWEsRUFBQ0MsT0FBTyxXQUFSLEVBQXFCQyxNQUFNLENBQTNCLEVBQThCUixRQUFRLEtBQXRDLEVBQWIsQ0FOa0MsRUFPbEMsQ0FBQ0gsT0FBT1MsR0FBUixFQUFhLEVBQUNOLFFBQVEsS0FBVCxFQUFiLENBUGtDLENBQVQsR0FRdkIsSUFSRzs7QUFVUDtBQUNBLE9BQU8sSUFBTVMsNEJBQTRCO0FBQ3ZDQyxVQUFRLENBQUMsT0FBRDtBQUQrQixDQUFsQzs7QUFJUDtBQUNBLE9BQU8sSUFBTUMsMEJBQTBCO0FBQ3JDQyxhQUFXLENBQUMsS0FBRDtBQUQwQixDQUFoQzs7QUFJUDs7Ozs7OztBQU9BLE9BQU8sSUFBTUMsc0JBQXNCO0FBQ2pDQyxlQUFhLGFBRG9CO0FBRWpDQyxlQUFhLGFBRm9CO0FBR2pDQyxhQUFXLFdBSHNCO0FBSWpDQyxjQUFZLGFBSnFCO0FBS2pDQyxhQUFXLGFBTHNCO0FBTWpDQyxZQUFVLFdBTnVCO0FBT2pDQyxhQUFXLGFBUHNCO0FBUWpDQyxhQUFXLGFBUnNCO0FBU2pDQyxXQUFTO0FBVHdCLENBQTVCOztBQVlQLE9BQU8sSUFBTUMsb0JBQW9CO0FBQy9CQyxjQUFZLENBQ1YsU0FEVSxFQUVWLE9BRlUsQ0FEbUI7QUFLL0JDLGdCQUFjLENBQ1osV0FEWSxFQUVaLFdBRlksRUFHWixTQUhZLEVBSVosWUFKWSxDQUxpQjtBQVcvQkMsZ0JBQWM7QUFDWjtBQUNBLFNBRlk7QUFHWjtBQUNBLGNBSlk7QUFLWjtBQUNBLGtCQU5ZO0FBWGlCLENBQTFCOztBQXFCUDs7Ozs7O0FBTUEsT0FBTyxJQUFNQyx1QkFBdUI7QUFDbENDLE9BQUssS0FENkI7QUFFbENoQixhQUFXLFdBRnVCO0FBR2xDaUIsU0FBTyxPQUgyQjtBQUlsQ0MsU0FBTyxPQUoyQjtBQUtsQ0MsV0FBUyxPQUx5QjtBQU1sQ0MsWUFBVSxPQU53QjtBQU9sQ0MsY0FBWSxPQVBzQjtBQVFsQ0MsYUFBVyxPQVJ1QjtBQVNsQ0MsWUFBVSxPQVR3QjtBQVVsQ0MsZUFBYSxPQVZxQjtBQVdsQzFCLFVBQVEsUUFYMEI7QUFZbEMyQixlQUFhLFFBWnFCO0FBYWxDQyxjQUFZLFFBYnNCO0FBY2xDQyxhQUFXLFFBZHVCO0FBZWxDQyxnQkFBYyxRQWZvQjtBQWdCbENDLE9BQUssS0FoQjZCO0FBaUJsQ0MsWUFBVSxLQWpCd0I7QUFrQmxDQyxXQUFTLEtBbEJ5QjtBQW1CbENDLFNBQU8sS0FuQjJCO0FBb0JsQ0MsV0FBUyxLQXBCeUI7QUFxQmxDQyxXQUFTLEtBckJ5QjtBQXNCbENDLFlBQVUsS0F0QndCO0FBdUJsQ0MsVUFBUSxLQXZCMEI7QUF3QmxDQyxhQUFXLEtBeEJ1QjtBQXlCbENDLFNBQU8sT0F6QjJCO0FBMEJsQ0MsYUFBVyxPQTFCdUI7QUEyQmxDQyxjQUFZLE9BM0JzQjtBQTRCbENDLFdBQVMsT0E1QnlCO0FBNkJsQ0MsYUFBVztBQTdCdUIsQ0FBN0I7O0FBZ0NQOzs7OztBQUtBLE9BQU8sSUFBTUMsd0JBQXdCO0FBQ25DQyxTQUFPLEtBRDRCO0FBRW5DQyxZQUFVLFdBRnlCO0FBR25DckMsYUFBVyxhQUh3QjtBQUluQ0MsYUFBVyxhQUp3QjtBQUtuQ0MsV0FBUyxXQUwwQjtBQU1uQ29DLGNBQVk7QUFOdUIsQ0FBOUIiLCJmaWxlIjoiY29uc3RhbnRzLmpzIiwic291cmNlc0NvbnRlbnQiOlsiLy8gQ29weXJpZ2h0IChjKSAyMDE3IFViZXIgVGVjaG5vbG9naWVzLCBJbmMuXG4vL1xuLy8gUGVybWlzc2lvbiBpcyBoZXJlYnkgZ3JhbnRlZCwgZnJlZSBvZiBjaGFyZ2UsIHRvIGFueSBwZXJzb24gb2J0YWluaW5nIGEgY29weVxuLy8gb2YgdGhpcyBzb2Z0d2FyZSBhbmQgYXNzb2NpYXRlZCBkb2N1bWVudGF0aW9uIGZpbGVzICh0aGUgXCJTb2Z0d2FyZVwiKSwgdG8gZGVhbFxuLy8gaW4gdGhlIFNvZnR3YXJlIHdpdGhvdXQgcmVzdHJpY3Rpb24sIGluY2x1ZGluZyB3aXRob3V0IGxpbWl0YXRpb24gdGhlIHJpZ2h0c1xuLy8gdG8gdXNlLCBjb3B5LCBtb2RpZnksIG1lcmdlLCBwdWJsaXNoLCBkaXN0cmlidXRlLCBzdWJsaWNlbnNlLCBhbmQvb3Igc2VsbFxuLy8gY29waWVzIG9mIHRoZSBTb2Z0d2FyZSwgYW5kIHRvIHBlcm1pdCBwZXJzb25zIHRvIHdob20gdGhlIFNvZnR3YXJlIGlzXG4vLyBmdXJuaXNoZWQgdG8gZG8gc28sIHN1YmplY3QgdG8gdGhlIGZvbGxvd2luZyBjb25kaXRpb25zOlxuLy9cbi8vIFRoZSBhYm92ZSBjb3B5cmlnaHQgbm90aWNlIGFuZCB0aGlzIHBlcm1pc3Npb24gbm90aWNlIHNoYWxsIGJlIGluY2x1ZGVkIGluXG4vLyBhbGwgY29waWVzIG9yIHN1YnN0YW50aWFsIHBvcnRpb25zIG9mIHRoZSBTb2Z0d2FyZS5cbi8vXG4vLyBUSEUgU09GVFdBUkUgSVMgUFJPVklERUQgXCJBUyBJU1wiLCBXSVRIT1VUIFdBUlJBTlRZIE9GIEFOWSBLSU5ELCBFWFBSRVNTIE9SXG4vLyBJTVBMSUVELCBJTkNMVURJTkcgQlVUIE5PVCBMSU1JVEVEIFRPIFRIRSBXQVJSQU5USUVTIE9GIE1FUkNIQU5UQUJJTElUWSxcbi8vIEZJVE5FU1MgRk9SIEEgUEFSVElDVUxBUiBQVVJQT1NFIEFORCBOT05JTkZSSU5HRU1FTlQuIElOIE5PIEVWRU5UIFNIQUxMIFRIRVxuLy8gQVVUSE9SUyBPUiBDT1BZUklHSFQgSE9MREVSUyBCRSBMSUFCTEUgRk9SIEFOWSBDTEFJTSwgREFNQUdFUyBPUiBPVEhFUlxuLy8gTElBQklMSVRZLCBXSEVUSEVSIElOIEFOIEFDVElPTiBPRiBDT05UUkFDVCwgVE9SVCBPUiBPVEhFUldJU0UsIEFSSVNJTkcgRlJPTSxcbi8vIE9VVCBPRiBPUiBJTiBDT05ORUNUSU9OIFdJVEggVEhFIFNPRlRXQVJFIE9SIFRIRSBVU0UgT1IgT1RIRVIgREVBTElOR1MgSU5cbi8vIFRIRSBTT0ZUV0FSRS5cblxuaW1wb3J0IEhhbW1lciBmcm9tICcuL3V0aWxzL2hhbW1lcic7XG5cbi8vIFRoaXMgbW9kdWxlIGNvbnRhaW5zIGNvbnN0YW50cyB0aGF0IG11c3QgYmUgY29uZGl0aW9uYWxseSByZXF1aXJlZFxuLy8gZHVlIHRvIGB3aW5kb3dgL2Bkb2N1bWVudGAgcmVmZXJlbmNlcyBkb3duc3RyZWFtLlxuZXhwb3J0IGNvbnN0IFJFQ09HTklaRVJTID0gSGFtbWVyID8gW1xuICBbSGFtbWVyLlJvdGF0ZSwge2VuYWJsZTogZmFsc2V9XSxcbiAgW0hhbW1lci5QaW5jaCwge2VuYWJsZTogZmFsc2V9XSxcbiAgW0hhbW1lci5Td2lwZSwge2VuYWJsZTogZmFsc2V9XSxcbiAgW0hhbW1lci5QYW4sIHt0aHJlc2hvbGQ6IDAsIGVuYWJsZTogZmFsc2V9XSxcbiAgW0hhbW1lci5QcmVzcywge2VuYWJsZTogZmFsc2V9XSxcbiAgW0hhbW1lci5UYXAsIHtldmVudDogJ2RvdWJsZXRhcCcsIHRhcHM6IDIsIGVuYWJsZTogZmFsc2V9XSxcbiAgW0hhbW1lci5UYXAsIHtlbmFibGU6IGZhbHNlfV1cbl0gOiBudWxsO1xuXG4vLyBSZWNvZ25pemUgdGhlIGZvbGxvd2luZyBnZXN0dXJlcyBldmVuIGlmIGEgZ2l2ZW4gcmVjb2duaXplciBzdWNjZWVkc1xuZXhwb3J0IGNvbnN0IFJFQ09HTklaRVJfQ09NUEFUSUJMRV9NQVAgPSB7XG4gIHJvdGF0ZTogWydwaW5jaCddXG59O1xuXG4vLyBSZWNvZ25pemUgdGhlIGZvbGxpbmcgZ2VzdHVyZXMgb25seSBpZiBhIGdpdmVuIHJlY29nbml6ZXIgZmFpbHNcbmV4cG9ydCBjb25zdCBSRUNPR05JWkVSX0ZBTExCQUNLX01BUCA9IHtcbiAgZG91YmxldGFwOiBbJ3RhcCddXG59O1xuXG4vKipcbiAqIE9ubHkgb25lIHNldCBvZiBiYXNpYyBpbnB1dCBldmVudHMgd2lsbCBiZSBmaXJlZCBieSBIYW1tZXIuanM6XG4gKiBlaXRoZXIgcG9pbnRlciwgdG91Y2gsIG9yIG1vdXNlLCBkZXBlbmRpbmcgb24gc3lzdGVtIHN1cHBvcnQuXG4gKiBJbiBvcmRlciB0byBlbmFibGUgYW4gYXBwbGljYXRpb24gdG8gYmUgYWdub3N0aWMgb2Ygc3lzdGVtIHN1cHBvcnQsXG4gKiBhbGlhcyBiYXNpYyBpbnB1dCBldmVudHMgaW50byBcImNsYXNzZXNcIiBvZiBldmVudHM6IGRvd24sIG1vdmUsIGFuZCB1cC5cbiAqIFNlZSBgX29uQmFzaWNJbnB1dCgpYCBmb3IgdXNhZ2Ugb2YgdGhlc2UgYWxpYXNlcy5cbiAqL1xuZXhwb3J0IGNvbnN0IEJBU0lDX0VWRU5UX0FMSUFTRVMgPSB7XG4gIHBvaW50ZXJkb3duOiAncG9pbnRlcmRvd24nLFxuICBwb2ludGVybW92ZTogJ3BvaW50ZXJtb3ZlJyxcbiAgcG9pbnRlcnVwOiAncG9pbnRlcnVwJyxcbiAgdG91Y2hzdGFydDogJ3BvaW50ZXJkb3duJyxcbiAgdG91Y2htb3ZlOiAncG9pbnRlcm1vdmUnLFxuICB0b3VjaGVuZDogJ3BvaW50ZXJ1cCcsXG4gIG1vdXNlZG93bjogJ3BvaW50ZXJkb3duJyxcbiAgbW91c2Vtb3ZlOiAncG9pbnRlcm1vdmUnLFxuICBtb3VzZXVwOiAncG9pbnRlcnVwJ1xufTtcblxuZXhwb3J0IGNvbnN0IElOUFVUX0VWRU5UX1RZUEVTID0ge1xuICBLRVlfRVZFTlRTOiBbXG4gICAgJ2tleWRvd24nLFxuICAgICdrZXl1cCdcbiAgXSxcbiAgTU9VU0VfRVZFTlRTOiBbXG4gICAgJ21vdXNlZG93bicsXG4gICAgJ21vdXNlbW92ZScsXG4gICAgJ21vdXNldXAnLFxuICAgICdtb3VzZWxlYXZlJ1xuICBdLFxuICBXSEVFTF9FVkVOVFM6IFtcbiAgICAvLyBDaHJvbWUsIFNhZmFyaVxuICAgICd3aGVlbCcsXG4gICAgLy8gSUVcbiAgICAnbW91c2V3aGVlbCcsXG4gICAgLy8gbGVnYWN5IEZpcmVmb3hcbiAgICAnRE9NTW91c2VTY3JvbGwnXG4gIF1cbn07XG5cbi8qKlxuICogXCJHZXN0dXJhbFwiIGV2ZW50cyBhcmUgdGhvc2UgdGhhdCBoYXZlIHNlbWFudGljIG1lYW5pbmcgYmV5b25kIHRoZSBiYXNpYyBpbnB1dCBldmVudCxcbiAqIGUuZy4gYSBjbGljayBvciB0YXAgaXMgYSBzZXF1ZW5jZSBvZiBgZG93bmAgYW5kIGB1cGAgZXZlbnRzIHdpdGggbm8gYG1vdmVgIGV2ZW50IGluIGJldHdlZW4uXG4gKiBIYW1tZXIuanMgaGFuZGxlcyB0aGVzZSB3aXRoIGl0cyBSZWNvZ25pemVyIHN5c3RlbTtcbiAqIHRoaXMgYmxvY2sgbWFwcyBldmVudCBuYW1lcyB0byB0aGUgUmVjb2duaXplcnMgcmVxdWlyZWQgdG8gZGV0ZWN0IHRoZSBldmVudHMuXG4gKi9cbmV4cG9ydCBjb25zdCBFVkVOVF9SRUNPR05JWkVSX01BUCA9IHtcbiAgdGFwOiAndGFwJyxcbiAgZG91YmxldGFwOiAnZG91YmxldGFwJyxcbiAgcHJlc3M6ICdwcmVzcycsXG4gIHBpbmNoOiAncGluY2gnLFxuICBwaW5jaGluOiAncGluY2gnLFxuICBwaW5jaG91dDogJ3BpbmNoJyxcbiAgcGluY2hzdGFydDogJ3BpbmNoJyxcbiAgcGluY2htb3ZlOiAncGluY2gnLFxuICBwaW5jaGVuZDogJ3BpbmNoJyxcbiAgcGluY2hjYW5jZWw6ICdwaW5jaCcsXG4gIHJvdGF0ZTogJ3JvdGF0ZScsXG4gIHJvdGF0ZXN0YXJ0OiAncm90YXRlJyxcbiAgcm90YXRlbW92ZTogJ3JvdGF0ZScsXG4gIHJvdGF0ZWVuZDogJ3JvdGF0ZScsXG4gIHJvdGF0ZWNhbmNlbDogJ3JvdGF0ZScsXG4gIHBhbjogJ3BhbicsXG4gIHBhbnN0YXJ0OiAncGFuJyxcbiAgcGFubW92ZTogJ3BhbicsXG4gIHBhbnVwOiAncGFuJyxcbiAgcGFuZG93bjogJ3BhbicsXG4gIHBhbmxlZnQ6ICdwYW4nLFxuICBwYW5yaWdodDogJ3BhbicsXG4gIHBhbmVuZDogJ3BhbicsXG4gIHBhbmNhbmNlbDogJ3BhbicsXG4gIHN3aXBlOiAnc3dpcGUnLFxuICBzd2lwZWxlZnQ6ICdzd2lwZScsXG4gIHN3aXBlcmlnaHQ6ICdzd2lwZScsXG4gIHN3aXBldXA6ICdzd2lwZScsXG4gIHN3aXBlZG93bjogJ3N3aXBlJ1xufTtcblxuLyoqXG4gKiBNYXAgZ2VzdHVyYWwgZXZlbnRzIHR5cGljYWxseSBwcm92aWRlZCBieSBicm93c2Vyc1xuICogdGhhdCBhcmUgbm90IHJlcG9ydGVkIGluICdoYW1tZXIuaW5wdXQnIGV2ZW50c1xuICogdG8gY29ycmVzcG9uZGluZyBIYW1tZXIuanMgZ2VzdHVyZXMuXG4gKi9cbmV4cG9ydCBjb25zdCBHRVNUVVJFX0VWRU5UX0FMSUFTRVMgPSB7XG4gIGNsaWNrOiAndGFwJyxcbiAgZGJsY2xpY2s6ICdkb3VibGV0YXAnLFxuICBtb3VzZWRvd246ICdwb2ludGVyZG93bicsXG4gIG1vdXNlbW92ZTogJ3BvaW50ZXJtb3ZlJyxcbiAgbW91c2V1cDogJ3BvaW50ZXJ1cCcsXG4gIG1vdXNlbGVhdmU6ICdwb2ludGVybGVhdmUnXG59O1xuIl19
 
/***/ }),
/* 115 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__event_manager__ = __webpack_require__(672);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "EventManager", function() { return __WEBPACK_IMPORTED_MODULE_0__event_manager__["a"]; });
// Copyright (c) 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
 
 
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9pbmRleC5qcyJdLCJuYW1lcyI6WyJkZWZhdWx0IiwiRXZlbnRNYW5hZ2VyIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQSxTQUFRQSxXQUFXQyxZQUFuQixRQUFzQyxpQkFBdEMiLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VzQ29udGVudCI6WyIvLyBDb3B5cmlnaHQgKGMpIDIwMTcgVWJlciBUZWNobm9sb2dpZXMsIEluYy5cbi8vXG4vLyBQZXJtaXNzaW9uIGlzIGhlcmVieSBncmFudGVkLCBmcmVlIG9mIGNoYXJnZSwgdG8gYW55IHBlcnNvbiBvYnRhaW5pbmcgYSBjb3B5XG4vLyBvZiB0aGlzIHNvZnR3YXJlIGFuZCBhc3NvY2lhdGVkIGRvY3VtZW50YXRpb24gZmlsZXMgKHRoZSBcIlNvZnR3YXJlXCIpLCB0byBkZWFsXG4vLyBpbiB0aGUgU29mdHdhcmUgd2l0aG91dCByZXN0cmljdGlvbiwgaW5jbHVkaW5nIHdpdGhvdXQgbGltaXRhdGlvbiB0aGUgcmlnaHRzXG4vLyB0byB1c2UsIGNvcHksIG1vZGlmeSwgbWVyZ2UsIHB1Ymxpc2gsIGRpc3RyaWJ1dGUsIHN1YmxpY2Vuc2UsIGFuZC9vciBzZWxsXG4vLyBjb3BpZXMgb2YgdGhlIFNvZnR3YXJlLCBhbmQgdG8gcGVybWl0IHBlcnNvbnMgdG8gd2hvbSB0aGUgU29mdHdhcmUgaXNcbi8vIGZ1cm5pc2hlZCB0byBkbyBzbywgc3ViamVjdCB0byB0aGUgZm9sbG93aW5nIGNvbmRpdGlvbnM6XG4vL1xuLy8gVGhlIGFib3ZlIGNvcHlyaWdodCBub3RpY2UgYW5kIHRoaXMgcGVybWlzc2lvbiBub3RpY2Ugc2hhbGwgYmUgaW5jbHVkZWQgaW5cbi8vIGFsbCBjb3BpZXMgb3Igc3Vic3RhbnRpYWwgcG9ydGlvbnMgb2YgdGhlIFNvZnR3YXJlLlxuLy9cbi8vIFRIRSBTT0ZUV0FSRSBJUyBQUk9WSURFRCBcIkFTIElTXCIsIFdJVEhPVVQgV0FSUkFOVFkgT0YgQU5ZIEtJTkQsIEVYUFJFU1MgT1Jcbi8vIElNUExJRUQsIElOQ0xVRElORyBCVVQgTk9UIExJTUlURUQgVE8gVEhFIFdBUlJBTlRJRVMgT0YgTUVSQ0hBTlRBQklMSVRZLFxuLy8gRklUTkVTUyBGT1IgQSBQQVJUSUNVTEFSIFBVUlBPU0UgQU5EIE5PTklORlJJTkdFTUVOVC4gSU4gTk8gRVZFTlQgU0hBTEwgVEhFXG4vLyBBVVRIT1JTIE9SIENPUFlSSUdIVCBIT0xERVJTIEJFIExJQUJMRSBGT1IgQU5ZIENMQUlNLCBEQU1BR0VTIE9SIE9USEVSXG4vLyBMSUFCSUxJVFksIFdIRVRIRVIgSU4gQU4gQUNUSU9OIE9GIENPTlRSQUNULCBUT1JUIE9SIE9USEVSV0lTRSwgQVJJU0lORyBGUk9NLFxuLy8gT1VUIE9GIE9SIElOIENPTk5FQ1RJT04gV0lUSCBUSEUgU09GVFdBUkUgT1IgVEhFIFVTRSBPUiBPVEhFUiBERUFMSU5HUyBJTlxuLy8gVEhFIFNPRlRXQVJFLlxuXG5leHBvcnQge2RlZmF1bHQgYXMgRXZlbnRNYW5hZ2VyfSBmcm9tICcuL2V2ZW50LW1hbmFnZXInO1xuIl19
 
/***/ }),
/* 116 */
/***/ (function(module, exports, __webpack_require__) {
 
/* WEBPACK VAR INJECTION */(function(process) {/**
 * Copyright (c) 2013-present, Facebook, Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */
 
if (process.env.NODE_ENV !== 'production') {
  var REACT_ELEMENT_TYPE = (typeof Symbol === 'function' &&
    Symbol.for &&
    Symbol.for('react.element')) ||
    0xeac7;
 
  var isValidElement = function(object) {
    return typeof object === 'object' &&
      object !== null &&
      object.$$typeof === REACT_ELEMENT_TYPE;
  };
 
  // By explicitly using `prop-types` you are opting into new development behavior.
  // http://fb.me/prop-types-in-prod
  var throwOnDirectAccess = true;
  module.exports = __webpack_require__(679)(isValidElement, throwOnDirectAccess);
} else {
  // By explicitly using `prop-types` you are opting into new production behavior.
  // http://fb.me/prop-types-in-prod
  module.exports = __webpack_require__(678)();
}
 
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(26)))
 
/***/ }),
/* 117 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
/* WEBPACK VAR INJECTION */(function(process) {
 
if (process.env.NODE_ENV === 'production') {
  module.exports = __webpack_require__(681);
} else {
  module.exports = __webpack_require__(680);
}
 
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(26)))
 
/***/ }),
/* 118 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = createMat4;
/* harmony export (immutable) */ __webpack_exports__["b"] = transformVector;
/* harmony export (immutable) */ __webpack_exports__["d"] = mod;
/* harmony export (immutable) */ __webpack_exports__["c"] = lerp;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_gl_vec4_scale__ = __webpack_require__(161);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_gl_vec4_scale___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_gl_vec4_scale__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_gl_vec4_transformMat4__ = __webpack_require__(103);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_gl_vec4_transformMat4___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_gl_vec4_transformMat4__);
 
 
 
// Helper, avoids low-precision 32 bit matrices from gl-matrix mat4.create()
function createMat4() {
  return [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];
}
 
// Transforms a vec4 with a projection matrix
function transformVector(matrix, vector) {
  var result = __WEBPACK_IMPORTED_MODULE_1_gl_vec4_transformMat4___default()([], vector, matrix);
  __WEBPACK_IMPORTED_MODULE_0_gl_vec4_scale___default()(result, result, 1 / result[3]);
  return result;
}
 
function mod(value, divisor) {
  var modulus = value % divisor;
  return modulus < 0 ? divisor + modulus : modulus;
}
 
function lerp(start, end, step) {
  return step * end + (1 - step) * start;
}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9tYXRoLXV0aWxzLmpzIl0sIm5hbWVzIjpbInZlYzRfc2NhbGUiLCJ2ZWM0X3RyYW5zZm9ybU1hdDQiLCJjcmVhdGVNYXQ0IiwidHJhbnNmb3JtVmVjdG9yIiwibWF0cml4IiwidmVjdG9yIiwicmVzdWx0IiwibW9kIiwidmFsdWUiLCJkaXZpc29yIiwibW9kdWx1cyIsImxlcnAiLCJzdGFydCIsImVuZCIsInN0ZXAiXSwibWFwcGluZ3MiOiJBQUFBLE9BQU9BLFVBQVAsTUFBdUIsZUFBdkI7QUFDQSxPQUFPQyxrQkFBUCxNQUErQix1QkFBL0I7O0FBRUE7QUFDQSxPQUFPLFNBQVNDLFVBQVQsR0FBc0I7QUFDM0IsU0FBTyxDQUFDLENBQUQsRUFBSSxDQUFKLEVBQU8sQ0FBUCxFQUFVLENBQVYsRUFBYSxDQUFiLEVBQWdCLENBQWhCLEVBQW1CLENBQW5CLEVBQXNCLENBQXRCLEVBQXlCLENBQXpCLEVBQTRCLENBQTVCLEVBQStCLENBQS9CLEVBQWtDLENBQWxDLEVBQXFDLENBQXJDLEVBQXdDLENBQXhDLEVBQTJDLENBQTNDLEVBQThDLENBQTlDLENBQVA7QUFDRDs7QUFFRDtBQUNBLE9BQU8sU0FBU0MsZUFBVCxDQUF5QkMsTUFBekIsRUFBaUNDLE1BQWpDLEVBQXlDO0FBQzlDLE1BQU1DLFNBQVNMLG1CQUFtQixFQUFuQixFQUF1QkksTUFBdkIsRUFBK0JELE1BQS9CLENBQWY7QUFDQUosYUFBV00sTUFBWCxFQUFtQkEsTUFBbkIsRUFBMkIsSUFBSUEsT0FBTyxDQUFQLENBQS9CO0FBQ0EsU0FBT0EsTUFBUDtBQUNEOztBQUVELE9BQU8sU0FBU0MsR0FBVCxDQUFhQyxLQUFiLEVBQW9CQyxPQUFwQixFQUE2QjtBQUNsQyxNQUFNQyxVQUFVRixRQUFRQyxPQUF4QjtBQUNBLFNBQU9DLFVBQVUsQ0FBVixHQUFjRCxVQUFVQyxPQUF4QixHQUFrQ0EsT0FBekM7QUFDRDs7QUFFRCxPQUFPLFNBQVNDLElBQVQsQ0FBY0MsS0FBZCxFQUFxQkMsR0FBckIsRUFBMEJDLElBQTFCLEVBQWdDO0FBQ3JDLFNBQU9BLE9BQU9ELEdBQVAsR0FBYSxDQUFDLElBQUlDLElBQUwsSUFBYUYsS0FBakM7QUFDRCIsImZpbGUiOiJtYXRoLXV0aWxzLmpzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHZlYzRfc2NhbGUgZnJvbSAnZ2wtdmVjNC9zY2FsZSc7XG5pbXBvcnQgdmVjNF90cmFuc2Zvcm1NYXQ0IGZyb20gJ2dsLXZlYzQvdHJhbnNmb3JtTWF0NCc7XG5cbi8vIEhlbHBlciwgYXZvaWRzIGxvdy1wcmVjaXNpb24gMzIgYml0IG1hdHJpY2VzIGZyb20gZ2wtbWF0cml4IG1hdDQuY3JlYXRlKClcbmV4cG9ydCBmdW5jdGlvbiBjcmVhdGVNYXQ0KCkge1xuICByZXR1cm4gWzEsIDAsIDAsIDAsIDAsIDEsIDAsIDAsIDAsIDAsIDEsIDAsIDAsIDAsIDAsIDFdO1xufVxuXG4vLyBUcmFuc2Zvcm1zIGEgdmVjNCB3aXRoIGEgcHJvamVjdGlvbiBtYXRyaXhcbmV4cG9ydCBmdW5jdGlvbiB0cmFuc2Zvcm1WZWN0b3IobWF0cml4LCB2ZWN0b3IpIHtcbiAgY29uc3QgcmVzdWx0ID0gdmVjNF90cmFuc2Zvcm1NYXQ0KFtdLCB2ZWN0b3IsIG1hdHJpeCk7XG4gIHZlYzRfc2NhbGUocmVzdWx0LCByZXN1bHQsIDEgLyByZXN1bHRbM10pO1xuICByZXR1cm4gcmVzdWx0O1xufVxuXG5leHBvcnQgZnVuY3Rpb24gbW9kKHZhbHVlLCBkaXZpc29yKSB7XG4gIGNvbnN0IG1vZHVsdXMgPSB2YWx1ZSAlIGRpdmlzb3I7XG4gIHJldHVybiBtb2R1bHVzIDwgMCA/IGRpdmlzb3IgKyBtb2R1bHVzIDogbW9kdWx1cztcbn1cblxuZXhwb3J0IGZ1bmN0aW9uIGxlcnAoc3RhcnQsIGVuZCwgc3RlcCkge1xuICByZXR1cm4gc3RlcCAqIGVuZCArICgxIC0gc3RlcCkgKiBzdGFydDtcbn1cbiJdfQ==
 
/***/ }),
/* 119 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
 
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
 
var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
 
var _core = __webpack_require__(13);
 
var _luma = __webpack_require__(12);
 
var _pathLayerVertex = __webpack_require__(316);
 
var _pathLayerVertex2 = _interopRequireDefault(_pathLayerVertex);
 
var _pathLayerVertex3 = __webpack_require__(315);
 
var _pathLayerVertex4 = _interopRequireDefault(_pathLayerVertex3);
 
var _pathLayerFragment = __webpack_require__(314);
 
var _pathLayerFragment2 = _interopRequireDefault(_pathLayerFragment);
 
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
 
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
 
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
 
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // Copyright (c) 2015 - 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
 
var fp64LowPart = _core.experimental.fp64LowPart,
    enable64bitSupport = _core.experimental.enable64bitSupport;
 
 
var DEFAULT_COLOR = [0, 0, 0, 255];
 
var defaultProps = {
  widthScale: 1, // stroke width in meters
  widthMinPixels: 0, //  min stroke width in pixels
  widthMaxPixels: Number.MAX_SAFE_INTEGER, // max stroke width in pixels
  rounded: false,
  miterLimit: 4,
  fp64: false,
  dashJustified: false,
 
  getPath: function getPath(object) {
    return object.path;
  },
  getColor: function getColor(object) {
    return object.color || DEFAULT_COLOR;
  },
  getWidth: function getWidth(object) {
    return object.width || 1;
  },
  getDashArray: null
};
 
var isClosed = function isClosed(path) {
  var firstPoint = path[0];
  var lastPoint = path[path.length - 1];
  return firstPoint[0] === lastPoint[0] && firstPoint[1] === lastPoint[1] && firstPoint[2] === lastPoint[2];
};
 
var PathLayer = function (_Layer) {
  _inherits(PathLayer, _Layer);
 
  function PathLayer() {
    _classCallCheck(this, PathLayer);
 
    return _possibleConstructorReturn(this, (PathLayer.__proto__ || Object.getPrototypeOf(PathLayer)).apply(this, arguments));
  }
 
  _createClass(PathLayer, [{
    key: 'getShaders',
    value: function getShaders() {
      return enable64bitSupport(this.props) ? { vs: _pathLayerVertex4.default, fs: _pathLayerFragment2.default, modules: ['project64', 'picking'] } : { vs: _pathLayerVertex2.default, fs: _pathLayerFragment2.default, modules: ['picking'] }; // 'project' module added by default.
    }
  }, {
    key: 'initializeState',
    value: function initializeState() {
      var attributeManager = this.getAttributeManager();
      /* eslint-disable max-len */
      attributeManager.addInstanced({
        instanceStartPositions: { size: 3, update: this.calculateStartPositions },
        instanceEndPositions: { size: 3, update: this.calculateEndPositions },
        instanceLeftDeltas: { size: 3, update: this.calculateLeftDeltas },
        instanceRightDeltas: { size: 3, update: this.calculateRightDeltas },
        instanceStrokeWidths: { size: 1, accessor: 'getWidth', update: this.calculateStrokeWidths },
        instanceDashArrays: { size: 2, accessor: 'getDashArray', update: this.calculateDashArrays },
        instanceColors: {
          size: 4,
          type: _luma.GL.UNSIGNED_BYTE,
          accessor: 'getColor',
          update: this.calculateColors
        },
        instancePickingColors: { size: 3, type: _luma.GL.UNSIGNED_BYTE, update: this.calculatePickingColors }
      });
      /* eslint-enable max-len */
    }
  }, {
    key: 'updateAttribute',
    value: function updateAttribute(_ref) {
      var props = _ref.props,
          oldProps = _ref.oldProps,
          changeFlags = _ref.changeFlags;
 
      if (props.fp64 !== oldProps.fp64) {
        var attributeManager = this.getAttributeManager();
        attributeManager.invalidateAll();
 
        if (props.fp64 && props.coordinateSystem === _core.COORDINATE_SYSTEM.LNGLAT) {
          attributeManager.addInstanced({
            instanceStartEndPositions64xyLow: {
              size: 4,
              update: this.calculateInstanceStartEndPositions64xyLow
            }
          });
        } else {
          attributeManager.remove(['instanceStartEndPositions64xyLow']);
        }
      }
    }
  }, {
    key: 'updateState',
    value: function updateState(_ref2) {
      var oldProps = _ref2.oldProps,
          props = _ref2.props,
          changeFlags = _ref2.changeFlags;
 
      _get(PathLayer.prototype.__proto__ || Object.getPrototypeOf(PathLayer.prototype), 'updateState', this).call(this, { props: props, oldProps: oldProps, changeFlags: changeFlags });
 
      var getPath = this.props.getPath;
 
      var attributeManager = this.getAttributeManager();
      if (props.fp64 !== oldProps.fp64) {
        var gl = this.context.gl;
 
        this.setState({ model: this._getModel(gl) });
      }
      this.updateAttribute({ props: props, oldProps: oldProps, changeFlags: changeFlags });
 
      var geometryChanged = changeFlags.dataChanged || changeFlags.updateTriggersChanged && (changeFlags.updateTriggersChanged.all || changeFlags.updateTriggersChanged.getPath);
 
      if (geometryChanged) {
        // this.state.paths only stores point positions in each path
        var paths = props.data.map(getPath);
        var numInstances = paths.reduce(function (count, path) {
          return count + path.length - 1;
        }, 0);
 
        this.setState({ paths: paths, numInstances: numInstances });
        attributeManager.invalidateAll();
      }
    }
  }, {
    key: 'draw',
    value: function draw(_ref3) {
      var uniforms = _ref3.uniforms;
      var _props = this.props,
          rounded = _props.rounded,
          miterLimit = _props.miterLimit,
          widthScale = _props.widthScale,
          widthMinPixels = _props.widthMinPixels,
          widthMaxPixels = _props.widthMaxPixels,
          dashJustified = _props.dashJustified;
 
 
      this.state.model.render(Object.assign({}, uniforms, {
        jointType: Number(rounded),
        alignMode: Number(dashJustified),
        widthScale: widthScale,
        miterLimit: miterLimit,
        widthMinPixels: widthMinPixels,
        widthMaxPixels: widthMaxPixels
      }));
    }
  }, {
    key: '_getModel',
    value: function _getModel(gl) {
      /*
       *       _
       *        "-_ 1                   3                       5
       *     _     "o---------------------o-------------------_-o
       *       -   / ""--..__              '.             _.-' /
       *   _     "@- - - - - ""--..__- - - - x - - - -_.@'    /
       *    "-_  /                   ""--..__ '.  _,-` :     /
       *       "o----------------------------""-o'    :     /
       *      0,2                            4 / '.  :     /
       *                                      /   '.:     /
       *                                     /     :'.   /
       *                                    /     :  ', /
       *                                   /     :     o
       */
 
      var SEGMENT_INDICES = [
      // start corner
      0, 2, 1,
      // body
      1, 2, 4, 1, 4, 3,
      // end corner
      3, 4, 5];
 
      // [0] position on segment - 0: start, 1: end
      // [1] side of path - -1: left, 0: center, 1: right
      // [2] role - 0: offset point 1: joint point
      var SEGMENT_POSITIONS = [
      // bevel start corner
      0, 0, 1,
      // start inner corner
      0, -1, 0,
      // start outer corner
      0, 1, 0,
      // end inner corner
      1, -1, 0,
      // end outer corner
      1, 1, 0,
      // bevel end corner
      1, 0, 1];
 
      return new _luma.Model(gl, Object.assign({}, this.getShaders(), {
        id: this.props.id,
        geometry: new _luma.Geometry({
          drawMode: _luma.GL.TRIANGLES,
          attributes: {
            indices: new Uint16Array(SEGMENT_INDICES),
            positions: new Float32Array(SEGMENT_POSITIONS)
          }
        }),
        isInstanced: true,
        shaderCache: this.context.shaderCache
      }));
    }
  }, {
    key: 'calculateStartPositions',
    value: function calculateStartPositions(attribute) {
      var paths = this.state.paths;
      var value = attribute.value;
 
 
      var i = 0;
      paths.forEach(function (path) {
        var numSegments = path.length - 1;
        for (var ptIndex = 0; ptIndex < numSegments; ptIndex++) {
          var point = path[ptIndex];
          value[i++] = point[0];
          value[i++] = point[1];
          value[i++] = point[2] || 0;
        }
      });
    }
  }, {
    key: 'calculateEndPositions',
    value: function calculateEndPositions(attribute) {
      var paths = this.state.paths;
      var value = attribute.value;
 
 
      var i = 0;
      paths.forEach(function (path) {
        for (var ptIndex = 1; ptIndex < path.length; ptIndex++) {
          var point = path[ptIndex];
          value[i++] = point[0];
          value[i++] = point[1];
          value[i++] = point[2] || 0;
        }
      });
    }
  }, {
    key: 'calculateInstanceStartEndPositions64xyLow',
    value: function calculateInstanceStartEndPositions64xyLow(attribute) {
      var paths = this.state.paths;
      var value = attribute.value;
 
 
      var i = 0;
      paths.forEach(function (path) {
        var numSegments = path.length - 1;
        for (var ptIndex = 0; ptIndex < numSegments; ptIndex++) {
          var startPoint = path[ptIndex];
          var endPoint = path[ptIndex + 1];
          value[i++] = fp64LowPart(startPoint[0]);
          value[i++] = fp64LowPart(startPoint[1]);
          value[i++] = fp64LowPart(endPoint[0]);
          value[i++] = fp64LowPart(endPoint[1]);
        }
      });
    }
  }, {
    key: 'calculateLeftDeltas',
    value: function calculateLeftDeltas(attribute) {
      var paths = this.state.paths;
      var value = attribute.value;
 
 
      var i = 0;
      paths.forEach(function (path) {
        var numSegments = path.length - 1;
        var prevPoint = isClosed(path) ? path[path.length - 2] : path[0];
 
        for (var ptIndex = 0; ptIndex < numSegments; ptIndex++) {
          var point = path[ptIndex];
          value[i++] = point[0] - prevPoint[0];
          value[i++] = point[1] - prevPoint[1];
          value[i++] = point[2] - prevPoint[2] || 0;
          prevPoint = point;
        }
      });
    }
  }, {
    key: 'calculateRightDeltas',
    value: function calculateRightDeltas(attribute) {
      var paths = this.state.paths;
      var value = attribute.value;
 
 
      var i = 0;
      paths.forEach(function (path) {
        for (var ptIndex = 1; ptIndex < path.length; ptIndex++) {
          var point = path[ptIndex];
          var nextPoint = path[ptIndex + 1];
          if (!nextPoint) {
            nextPoint = isClosed(path) ? path[1] : point;
          }
 
          value[i++] = nextPoint[0] - point[0];
          value[i++] = nextPoint[1] - point[1];
          value[i++] = nextPoint[2] - point[2] || 0;
        }
      });
    }
  }, {
    key: 'calculateStrokeWidths',
    value: function calculateStrokeWidths(attribute) {
      var _props2 = this.props,
          data = _props2.data,
          getWidth = _props2.getWidth;
      var paths = this.state.paths;
      var value = attribute.value;
 
 
      var i = 0;
      paths.forEach(function (path, index) {
        var width = getWidth(data[index], index);
        for (var ptIndex = 1; ptIndex < path.length; ptIndex++) {
          value[i++] = width;
        }
      });
    }
  }, {
    key: 'calculateDashArrays',
    value: function calculateDashArrays(attribute) {
      var _props3 = this.props,
          data = _props3.data,
          getDashArray = _props3.getDashArray;
 
      if (!getDashArray) {
        return;
      }
 
      var paths = this.state.paths;
      var value = attribute.value;
 
      var i = 0;
      paths.forEach(function (path, index) {
        var dashArray = getDashArray(data[index], index);
        for (var ptIndex = 1; ptIndex < path.length; ptIndex++) {
          value[i++] = dashArray[0];
          value[i++] = dashArray[1];
        }
      });
    }
  }, {
    key: 'calculateColors',
    value: function calculateColors(attribute) {
      var _props4 = this.props,
          data = _props4.data,
          getColor = _props4.getColor;
      var paths = this.state.paths;
      var value = attribute.value;
 
 
      var i = 0;
      paths.forEach(function (path, index) {
        var pointColor = getColor(data[index], index);
        if (isNaN(pointColor[3])) {
          pointColor[3] = 255;
        }
        for (var ptIndex = 1; ptIndex < path.length; ptIndex++) {
          value[i++] = pointColor[0];
          value[i++] = pointColor[1];
          value[i++] = pointColor[2];
          value[i++] = pointColor[3];
        }
      });
    }
 
    // Override the default picking colors calculation
 
  }, {
    key: 'calculatePickingColors',
    value: function calculatePickingColors(attribute) {
      var _this2 = this;
 
      var paths = this.state.paths;
      var value = attribute.value;
 
 
      var i = 0;
      paths.forEach(function (path, index) {
        var pickingColor = _this2.encodePickingColor(index);
        for (var ptIndex = 1; ptIndex < path.length; ptIndex++) {
          value[i++] = pickingColor[0];
          value[i++] = pickingColor[1];
          value[i++] = pickingColor[2];
        }
      });
    }
  }]);
 
  return PathLayer;
}(_core.Layer);
 
exports.default = PathLayer;
 
 
PathLayer.layerName = 'PathLayer';
PathLayer.defaultProps = defaultProps;
 
/***/ }),
/* 120 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.isSimple = isSimple;
exports.normalize = normalize;
exports.getVertexCount = getVertexCount;
exports.getTriangleCount = getTriangleCount;
exports.forEachVertex = forEachVertex;
// Copyright (c) 2015 - 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
 
// Basic polygon support
//
// Handles simple and complex polygons
// Simple polygons are arrays of vertices, implicitly "closed"
// Complex polygons are arrays of simple polygons, with the first polygon
// representing the outer hull and other polygons representing holes
 
/**
 * Check if this is a non-nested polygon (i.e. the first element of the first element is a number)
 * @param {Array} polygon - either a complex or simple polygon
 * @return {Boolean} - true if the polygon is a simple polygon (i.e. not an array of polygons)
 */
function isSimple(polygon) {
  return polygon.length >= 1 && polygon[0].length >= 2 && Number.isFinite(polygon[0][0]);
}
 
/**
 * Normalize to ensure that all polygons in a list are complex - simplifies processing
 * @param {Array} polygon - either a complex or a simple polygon
 * @param {Object} opts
 * @param {Object} opts.dimensions - if 3, the coords will be padded with 0's if needed
 * @return {Array} - returns a complex polygons
 */
function normalize(polygon) {
  var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
      _ref$dimensions = _ref.dimensions,
      dimensions = _ref$dimensions === undefined ? 3 : _ref$dimensions;
 
  return isSimple(polygon) ? [polygon] : polygon;
}
 
/**
 * Check if this is a non-nested polygon (i.e. the first element of the first element is a number)
 * @param {Array} polygon - either a complex or simple polygon
 * @return {Boolean} - true if the polygon is a simple polygon (i.e. not an array of polygons)
 */
function getVertexCount(polygon) {
  return isSimple(polygon) ? polygon.length : polygon.reduce(function (length, simplePolygon) {
    return length + simplePolygon.length;
  }, 0);
}
 
// Return number of triangles needed to tesselate the polygon
function getTriangleCount(polygon) {
  var triangleCount = 0;
  var first = true;
  var _iteratorNormalCompletion = true;
  var _didIteratorError = false;
  var _iteratorError = undefined;
 
  try {
    for (var _iterator = normalize(polygon)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
      var simplePolygon = _step.value;
 
      var size = simplePolygon.length;
      if (first) {
        triangleCount += size >= 3 ? size - 2 : 0;
      } else {
        triangleCount += size + 1;
      }
      first = false;
    }
  } catch (err) {
    _didIteratorError = true;
    _iteratorError = err;
  } finally {
    try {
      if (!_iteratorNormalCompletion && _iterator.return) {
        _iterator.return();
      }
    } finally {
      if (_didIteratorError) {
        throw _iteratorError;
      }
    }
  }
 
  return triangleCount;
}
 
function forEachVertex(polygon, visitor) {
  if (isSimple(polygon)) {
    polygon.forEach(visitor);
    return;
  }
 
  var vertexIndex = 0;
  polygon.forEach(function (simplePolygon) {
    simplePolygon.forEach(function (v, i, p) {
      return visitor(v, vertexIndex, polygon);
    });
    vertexIndex++;
  });
}
 
/***/ }),
/* 121 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
 
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
 
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); // Copyright (c) 2015 Uber Technologies, Inc.
 
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
 
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
 
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
 
var _mapState = __webpack_require__(82);
 
var _mapState2 = _interopRequireDefault(_mapState);
 
var _linearInterpolator = __webpack_require__(125);
 
var _linearInterpolator2 = _interopRequireDefault(_linearInterpolator);
 
var _transitionManager = __webpack_require__(186);
 
var _assert = __webpack_require__(1);
 
var _assert2 = _interopRequireDefault(_assert);
 
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
 
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
 
var NO_TRANSITION_PROPS = {
  transitionDuration: 0
};
var LINEAR_TRANSITION_PROPS = {
  transitionDuration: 300,
  transitionEasing: function transitionEasing(t) {
    return t;
  },
  transitionInterpolator: new _linearInterpolator2.default(),
  transitionInterruption: _transitionManager.TRANSITION_EVENTS.BREAK
};
 
// EVENT HANDLING PARAMETERS
var PITCH_MOUSE_THRESHOLD = 5;
var PITCH_ACCEL = 1.2;
var ZOOM_ACCEL = 0.01;
 
var EVENT_TYPES = {
  WHEEL: ['wheel'],
  PAN: ['panstart', 'panmove', 'panend'],
  PINCH: ['pinchstart', 'pinchmove', 'pinchend'],
  DOUBLE_TAP: ['doubletap'],
  KEYBOARD: ['keydown']
};
 
var ViewportControls = function () {
  /**
   * @classdesc
   * A class that handles events and updates mercator style viewport parameters
   */
  function ViewportControls(ViewportState) {
    var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
 
    _classCallCheck(this, ViewportControls);
 
    (0, _assert2.default)(ViewportState);
    this.ViewportState = ViewportState;
    this.viewportState = null;
    this.viewportStateProps = null;
    this.eventManager = null;
    this._events = null;
    this._state = {
      isDragging: false
    };
    this.events = [];
 
    this.handleEvent = this.handleEvent.bind(this);
 
    this.setOptions(options);
 
    if (this.constructor === ViewportControls) {
      Object.seal(this);
    }
  }
 
  /**
   * Callback for events
   * @param {hammer.Event} event
   */
 
 
  _createClass(ViewportControls, [{
    key: 'handleEvent',
    value: function handleEvent(event) {
      var ViewportState = this.ViewportState;
 
      this.viewportState = new ViewportState(Object.assign({}, this.viewportStateProps, this._state));
 
      switch (event.type) {
        case 'panstart':
          return this._onPanStart(event);
        case 'panmove':
          return this._onPan(event);
        case 'panend':
          return this._onPanEnd(event);
        case 'pinchstart':
          return this._onPinchStart(event);
        case 'pinchmove':
          return this._onPinch(event);
        case 'pinchend':
          return this._onPinchEnd(event);
        case 'doubletap':
          return this._onDoubleTap(event);
        case 'wheel':
          return this._onWheel(event);
        case 'keydown':
          return this._onKeyDown(event);
        default:
          return false;
      }
    }
 
    /* Event utils */
    // Event object: http://hammerjs.github.io/api/#event-object
 
  }, {
    key: 'getCenter',
    value: function getCenter(event) {
      var _event$offsetCenter = event.offsetCenter,
          x = _event$offsetCenter.x,
          y = _event$offsetCenter.y;
 
      return [x, y];
    }
  }, {
    key: 'isFunctionKeyPressed',
    value: function isFunctionKeyPressed(event) {
      var srcEvent = event.srcEvent;
 
      return Boolean(srcEvent.metaKey || srcEvent.altKey || srcEvent.ctrlKey || srcEvent.shiftKey);
    }
  }, {
    key: 'isDragging',
    value: function isDragging() {
      return this._state.isDragging;
    }
 
    /**
     * Extract interactivity options
     */
 
  }, {
    key: 'setOptions',
    value: function setOptions(options) {
      var onViewportChange = options.onViewportChange,
          _options$onStateChang = options.onStateChange,
          onStateChange = _options$onStateChang === undefined ? this.onStateChange : _options$onStateChang,
          _options$eventManager = options.eventManager,
          eventManager = _options$eventManager === undefined ? this.eventManager : _options$eventManager,
          _options$scrollZoom = options.scrollZoom,
          scrollZoom = _options$scrollZoom === undefined ? true : _options$scrollZoom,
          _options$dragPan = options.dragPan,
          dragPan = _options$dragPan === undefined ? true : _options$dragPan,
          _options$dragRotate = options.dragRotate,
          dragRotate = _options$dragRotate === undefined ? true : _options$dragRotate,
          _options$doubleClickZ = options.doubleClickZoom,
          doubleClickZoom = _options$doubleClickZ === undefined ? true : _options$doubleClickZ,
          _options$touchZoom = options.touchZoom,
          touchZoom = _options$touchZoom === undefined ? true : _options$touchZoom,
          _options$touchRotate = options.touchRotate,
          touchRotate = _options$touchRotate === undefined ? false : _options$touchRotate,
          _options$keyboard = options.keyboard,
          keyboard = _options$keyboard === undefined ? true : _options$keyboard;
 
 
      this.onViewportChange = onViewportChange;
      this.onStateChange = onStateChange;
      this.viewportStateProps = options;
 
      if (this.eventManager !== eventManager) {
        // EventManager has changed
        this.eventManager = eventManager;
        this._events = {};
        this.toggleEvents(this.events, true);
      }
 
      // Register/unregister events
      var isInteractive = Boolean(this.onViewportChange);
      this.toggleEvents(EVENT_TYPES.WHEEL, isInteractive && scrollZoom);
      this.toggleEvents(EVENT_TYPES.PAN, isInteractive && (dragPan || dragRotate));
      this.toggleEvents(EVENT_TYPES.PINCH, isInteractive && (touchZoom || touchRotate));
      this.toggleEvents(EVENT_TYPES.DOUBLE_TAP, isInteractive && doubleClickZoom);
      this.toggleEvents(EVENT_TYPES.KEYBOARD, isInteractive && keyboard);
 
      // Interaction toggles
      this.scrollZoom = scrollZoom;
      this.dragPan = dragPan;
      this.dragRotate = dragRotate;
      this.doubleClickZoom = doubleClickZoom;
      this.touchZoom = touchZoom;
      this.touchRotate = touchRotate;
      this.keyboard = keyboard;
    }
  }, {
    key: 'toggleEvents',
    value: function toggleEvents(eventNames, enabled) {
      var _this = this;
 
      if (this.eventManager) {
        eventNames.forEach(function (eventName) {
          if (_this._events[eventName] !== enabled) {
            _this._events[eventName] = enabled;
            if (enabled) {
              _this.eventManager.on(eventName, _this.handleEvent);
            } else {
              _this.eventManager.off(eventName, _this.handleEvent);
            }
          }
        });
      }
    }
 
    // Private Methods
 
  }, {
    key: 'setState',
    value: function setState(newState) {
      Object.assign(this._state, newState);
      if (this.onStateChange) {
        this.onStateChange(this._state);
      }
    }
 
    /* Callback util */
    // formats map state and invokes callback function
 
  }, {
    key: 'updateViewport',
    value: function updateViewport(newViewportState) {
      var extraProps = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
      var extraState = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
 
      var oldViewport = this.viewportState.getViewportProps();
      var newViewport = Object.assign({}, newViewportState.getViewportProps(), extraProps);
 
      if (this.onViewportChange && Object.keys(newViewport).some(function (key) {
        return oldViewport[key] !== newViewport[key];
      })) {
        // Viewport has changed
        var viewport = this.viewportState.getViewport ? this.viewportState.getViewport() : null;
        this.onViewportChange(newViewport, viewport);
      }
 
      this.setState(Object.assign({}, newViewportState.getInteractiveState(), extraState));
    }
 
    /* Event handlers */
    // Default handler for the `panstart` event.
 
  }, {
    key: '_onPanStart',
    value: function _onPanStart(event) {
      var pos = this.getCenter(event);
      var newViewportState = this.viewportState.panStart({ pos: pos }).rotateStart({ pos: pos });
      return this.updateViewport(newViewportState, NO_TRANSITION_PROPS, { isDragging: true });
    }
 
    // Default handler for the `panmove` event.
 
  }, {
    key: '_onPan',
    value: function _onPan(event) {
      return this.isFunctionKeyPressed(event) || event.rightButton ? this._onPanRotate(event) : this._onPanMove(event);
    }
 
    // Default handler for the `panend` event.
 
  }, {
    key: '_onPanEnd',
    value: function _onPanEnd(event) {
      var newViewportState = this.viewportState.panEnd().rotateEnd();
      return this.updateViewport(newViewportState, null, { isDragging: false });
    }
 
    // Default handler for panning to move.
    // Called by `_onPan` when panning without function key pressed.
 
  }, {
    key: '_onPanMove',
    value: function _onPanMove(event) {
      if (!this.dragPan) {
        return false;
      }
      var pos = this.getCenter(event);
      var newViewportState = this.viewportState.pan({ pos: pos });
      return this.updateViewport(newViewportState, NO_TRANSITION_PROPS, { isDragging: true });
    }
 
    // Default handler for panning to rotate.
    // Called by `_onPan` when panning with function key pressed.
 
  }, {
    key: '_onPanRotate',
    value: function _onPanRotate(event) {
      if (!this.dragRotate) {
        return false;
      }
 
      return this.viewportState instanceof _mapState2.default ? this._onPanRotateMap(event) : this._onPanRotateStandard(event);
    }
 
    // Normal pan to rotate
 
  }, {
    key: '_onPanRotateStandard',
    value: function _onPanRotateStandard(event) {
      var deltaX = event.deltaX,
          deltaY = event.deltaY;
 
      var _viewportState$getVie = this.viewportState.getViewportProps(),
          width = _viewportState$getVie.width,
          height = _viewportState$getVie.height;
 
      var deltaScaleX = deltaX / width;
      var deltaScaleY = deltaY / height;
 
      var newViewportState = this.viewportState.rotate({ deltaScaleX: deltaScaleX, deltaScaleY: deltaScaleY });
      return this.updateViewport(newViewportState, NO_TRANSITION_PROPS, { isDragging: true });
    }
  }, {
    key: '_onPanRotateMap',
    value: function _onPanRotateMap(event) {
      var deltaX = event.deltaX,
          deltaY = event.deltaY;
 
      var _getCenter = this.getCenter(event),
          _getCenter2 = _slicedToArray(_getCenter, 2),
          centerY = _getCenter2[1];
 
      var startY = centerY - deltaY;
 
      var _viewportState$getVie2 = this.viewportState.getViewportProps(),
          width = _viewportState$getVie2.width,
          height = _viewportState$getVie2.height;
 
      var deltaScaleX = deltaX / width;
      var deltaScaleY = 0;
 
      if (deltaY > 0) {
        if (Math.abs(height - startY) > PITCH_MOUSE_THRESHOLD) {
          // Move from 0 to -1 as we drag upwards
          deltaScaleY = deltaY / (startY - height) * PITCH_ACCEL;
        }
      } else if (deltaY < 0) {
        if (startY > PITCH_MOUSE_THRESHOLD) {
          // Move from 0 to 1 as we drag upwards
          deltaScaleY = 1 - centerY / startY;
        }
      }
      deltaScaleY = Math.min(1, Math.max(-1, deltaScaleY));
 
      var newViewportState = this.viewportState.rotate({ deltaScaleX: deltaScaleX, deltaScaleY: deltaScaleY });
      return this.updateViewport(newViewportState, NO_TRANSITION_PROPS, { isDragging: true });
    }
 
    // Default handler for the `wheel` event.
 
  }, {
    key: '_onWheel',
    value: function _onWheel(event) {
      if (!this.scrollZoom) {
        return false;
      }
 
      var pos = this.getCenter(event);
      var delta = event.delta;
 
      // Map wheel delta to relative scale
 
      var scale = 2 / (1 + Math.exp(-Math.abs(delta * ZOOM_ACCEL)));
      if (delta < 0 && scale !== 0) {
        scale = 1 / scale;
      }
 
      var newViewportState = this.viewportState.zoom({ pos: pos, scale: scale });
      return this.updateViewport(newViewportState, NO_TRANSITION_PROPS);
    }
 
    // Default handler for the `pinchstart` event.
 
  }, {
    key: '_onPinchStart',
    value: function _onPinchStart(event) {
      var pos = this.getCenter(event);
      var newViewportState = this.viewportState.zoomStart({ pos: pos }).rotateStart({ pos: pos });
      // hack - hammer's `rotation` field doesn't seem to produce the correct angle
      this._state.startPinchRotation = event.rotation;
      return this.updateViewport(newViewportState, NO_TRANSITION_PROPS, { isDragging: true });
    }
 
    // Default handler for the `pinch` event.
 
  }, {
    key: '_onPinch',
    value: function _onPinch(event) {
      if (!this.touchZoom && !this.touchRotate) {
        return false;
      }
 
      var newViewportState = this.viewportState;
      if (this.touchZoom) {
        var scale = event.scale;
 
        var pos = this.getCenter(event);
        newViewportState = newViewportState.zoom({ pos: pos, scale: scale });
      }
      if (this.touchRotate) {
        var rotation = event.rotation;
        var startPinchRotation = this._state.startPinchRotation;
 
        newViewportState = newViewportState.rotate({
          deltaScaleX: -(rotation - startPinchRotation) / 180
        });
      }
 
      return this.updateViewport(newViewportState, NO_TRANSITION_PROPS, { isDragging: true });
    }
 
    // Default handler for the `pinchend` event.
 
  }, {
    key: '_onPinchEnd',
    value: function _onPinchEnd(event) {
      var newViewportState = this.viewportState.zoomEnd().rotateEnd();
      this._state.startPinchRotation = 0;
      return this.updateViewport(newViewportState, null, { isDragging: false });
    }
 
    // Default handler for the `doubletap` event.
 
  }, {
    key: '_onDoubleTap',
    value: function _onDoubleTap(event) {
      if (!this.doubleClickZoom) {
        return false;
      }
      var pos = this.getCenter(event);
      var isZoomOut = this.isFunctionKeyPressed(event);
 
      var newViewportState = this.viewportState.zoom({ pos: pos, scale: isZoomOut ? 0.5 : 2 });
      return this.updateViewport(newViewportState, LINEAR_TRANSITION_PROPS);
    }
 
    /* eslint-disable complexity */
    // Default handler for the `keydown` event
 
  }, {
    key: '_onKeyDown',
    value: function _onKeyDown(event) {
      if (!this.keyboard) {
        return false;
      }
      var funcKey = this.isFunctionKeyPressed(event);
      var viewportState = this.viewportState;
 
      var newViewportState = void 0;
 
      switch (event.srcEvent.keyCode) {
        case 189:
          // -
          newViewportState = funcKey ? viewportState.zoomOut().zoomOut() : viewportState.zoomOut();
          break;
        case 187:
          // +
          newViewportState = funcKey ? viewportState.zoomIn().zoomIn() : viewportState.zoomIn();
          break;
        case 37:
          // left
          newViewportState = funcKey ? viewportState.rotateLeft() : viewportState.moveLeft();
          break;
        case 39:
          // right
          newViewportState = funcKey ? viewportState.rotateRight() : viewportState.moveRight();
          break;
        case 38:
          // up
          newViewportState = funcKey ? viewportState.rotateUp() : viewportState.moveUp();
          break;
        case 40:
          // down
          newViewportState = funcKey ? viewportState.rotateDown() : viewportState.moveDown();
          break;
        default:
          return false;
      }
      return this.updateViewport(newViewportState, LINEAR_TRANSITION_PROPS);
    }
    /* eslint-enable complexity */
 
  }]);
 
  return ViewportControls;
}();
 
exports.default = ViewportControls;
 
/***/ }),
/* 122 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
 
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
 
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
 
// Copyright (c) 2015 - 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
 
var counter = 0;
 
var Effect = function () {
  function Effect() {
    _classCallCheck(this, Effect);
 
    this.id = 'effect';
    this.count = counter++;
    this.visible = true;
    this.priority = 0;
    this.needsRedraw = false;
  }
 
  /**
   * subclasses should override to set up any resources needed
   */
 
 
  _createClass(Effect, [{
    key: 'initialize',
    value: function initialize(_ref) {
      var gl = _ref.gl,
          layerManager = _ref.layerManager;
    }
    /**
     * and subclasses should free those resources here
     */
 
  }, {
    key: 'finalize',
    value: function finalize(_ref2) {
      var gl = _ref2.gl,
          layerManager = _ref2.layerManager;
    }
    /**
     * override for a callback immediately before drawing each frame
     */
 
  }, {
    key: 'preDraw',
    value: function preDraw(_ref3) {
      var gl = _ref3.gl,
          layerManager = _ref3.layerManager;
    }
    /**
     * override for a callback immediately after drawing a frame's layers
     */
 
  }, {
    key: 'draw',
    value: function draw(_ref4) {
      var gl = _ref4.gl,
          layerManager = _ref4.layerManager;
    }
  }, {
    key: 'setNeedsRedraw',
    value: function setNeedsRedraw() {
      var redraw = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
 
      this.needsRedraw = redraw;
    }
  }]);
 
  return Effect;
}();
 
exports.default = Effect;
 
/***/ }),
/* 123 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
 
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
 
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); // Copyright (c) 2015 - 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
 
/* global window */
 
 
var _constants = __webpack_require__(70);
 
var _attributeManager = __webpack_require__(182);
 
var _attributeManager2 = _interopRequireDefault(_attributeManager);
 
var _stats = __webpack_require__(185);
 
var _stats2 = _interopRequireDefault(_stats);
 
var _count = __webpack_require__(194);
 
var _log = __webpack_require__(17);
 
var _log2 = _interopRequireDefault(_log);
 
var _createProps = __webpack_require__(340);
 
var _props2 = __webpack_require__(187);
 
var _seerIntegration = __webpack_require__(124);
 
var _luma = __webpack_require__(12);
 
var _assert = __webpack_require__(1);
 
var _assert2 = _interopRequireDefault(_assert);
 
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
 
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
 
var LOG_PRIORITY_UPDATE = 1;
var EMPTY_PROPS = Object.freeze({});
var noop = function noop() {};
 
var defaultProps = {
  // data: Special handling for null, see below
  dataComparator: null,
  updateTriggers: {}, // Update triggers: a core change detection mechanism in deck.gl
  numInstances: undefined,
 
  visible: true,
  pickable: false,
  opacity: 0.8,
 
  onHover: noop,
  onClick: noop,
 
  coordinateSystem: _constants.COORDINATE_SYSTEM.LNGLAT,
  coordinateOrigin: [0, 0, 0],
 
  parameters: {},
  uniforms: {},
  framebuffer: null,
 
  animation: null, // Passed prop animation functions to evaluate props
 
  // Offset depth based on layer index to avoid z-fighting.
  // Negative values pull layer towards the camera
  // https://www.opengl.org/archives/resources/faq/technical/polygonoffset.htm
  getPolygonOffset: function getPolygonOffset(_ref) {
    var layerIndex = _ref.layerIndex;
    return [0, -layerIndex * 100];
  },
 
  // Selection/Highlighting
  highlightedObjectIndex: null,
  autoHighlight: false,
  highlightColor: [0, 0, 128, 128]
};
 
var counter = 0;
 
var Layer = function () {
  // constructor(...propObjects)
  function Layer() {
    _classCallCheck(this, Layer);
 
    // Merges incoming props with defaults and freezes them.
    // TODO switch to spread operator once we no longer transpile this code
    // this.props = createProps.apply(propObjects);
    /* eslint-disable prefer-spread */
    this.props = _createProps.createProps.apply(this, arguments);
    /* eslint-enable prefer-spread */
 
    // Define all members before layer is sealed
    this.id = this.props.id; // The layer's id, used for matching with layers from last render cycle
    this.oldProps = EMPTY_PROPS; // Props from last render used for change detection
    this.count = counter++; // Keep track of how many layer instances you are generating
    this.lifecycle = _constants.LIFECYCLE.NO_STATE; // Helps track and debug the life cycle of the layers
    this.state = null; // Will be set to the shared layer state object during layer matching
    this.context = null; // Will reference layer manager's context, contains state shared by layers
    this.parentLayer = null; // reference to the composite layer parent that rendered this layer
 
    // CompositeLayer members, need to be defined here because of the `Object.seal`
    this.internalState = null;
 
    // Seal the layer
    Object.seal(this);
  }
 
  // clone this layer with modified props
 
 
  _createClass(Layer, [{
    key: 'clone',
    value: function clone(newProps) {
      return new this.constructor(Object.assign({}, this.props, newProps));
    }
  }, {
    key: 'toString',
    value: function toString() {
      var className = this.constructor.layerName || this.constructor.name;
      return className + '({id: \'' + this.props.id + '\'})';
    }
  }, {
    key: 'setState',
 
 
    // Public API
 
    // Updates selected state members and marks the object for redraw
    value: function setState(updateObject) {
      Object.assign(this.state, updateObject);
      this.state.needsRedraw = true;
    }
 
    // Sets the redraw flag for this layer, will trigger a redraw next animation frame
 
  }, {
    key: 'setNeedsRedraw',
    value: function setNeedsRedraw() {
      var redraw = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
 
      if (this.state) {
        this.state.needsRedraw = redraw;
      }
    }
 
    // Checks state of attributes and model
 
  }, {
    key: 'getNeedsRedraw',
    value: function getNeedsRedraw() {
      var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
          _ref2$clearRedrawFlag = _ref2.clearRedrawFlags,
          clearRedrawFlags = _ref2$clearRedrawFlag === undefined ? false : _ref2$clearRedrawFlag;
 
      return this._getNeedsRedraw(clearRedrawFlags);
    }
 
    // Return an array of models used by this layer, can be overriden by layer subclass
 
  }, {
    key: 'getModels',
    value: function getModels() {
      return this.state.models || (this.state.model ? [this.state.model] : []);
    }
  }, {
    key: 'needsUpdate',
    value: function needsUpdate() {
      // Call subclass lifecycle method
      return this.shouldUpdateState(this._getUpdateParams());
      // End lifecycle method
    }
 
    // Returns true if the layer is pickable and visible.
 
  }, {
    key: 'isPickable',
    value: function isPickable() {
      return this.props.pickable && this.props.visible;
    }
  }, {
    key: 'getAttributeManager',
    value: function getAttributeManager() {
      return this.state && this.state.attributeManager;
    }
 
    // Use iteration (the only required capability on data) to get first element
    // deprecated
 
  }, {
    key: 'getFirstObject',
    value: function getFirstObject() {
      var data = this.props.data;
      var _iteratorNormalCompletion = true;
      var _didIteratorError = false;
      var _iteratorError = undefined;
 
      try {
        for (var _iterator = data[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
          var object = _step.value;
 
          return object;
        }
      } catch (err) {
        _didIteratorError = true;
        _iteratorError = err;
      } finally {
        try {
          if (!_iteratorNormalCompletion && _iterator.return) {
            _iterator.return();
          }
        } finally {
          if (_didIteratorError) {
            throw _iteratorError;
          }
        }
      }
 
      return null;
    }
 
    // PROJECTION METHODS
 
    /**
     * Projects a point with current map state (lat, lon, zoom, pitch, bearing)
     *
     * Note: Position conversion is done in shader, so in many cases there is no need
     * for this function
     * @param {Array|TypedArray} lngLat - long and lat values
     * @return {Array|TypedArray} - x, y coordinates
     */
 
  }, {
    key: 'project',
    value: function project(lngLat) {
    debugger
      var viewport = this.context.viewport;
 
      (0, _assert2.default)(Array.isArray(lngLat), 'Layer.project needs [lng,lat]');
      return viewport.project(lngLat);
    }
  }, {
    key: 'unproject',
    value: function unproject(xy) {
      debugger
      var viewport = this.context.viewport;
 
      (0, _assert2.default)(Array.isArray(xy), 'Layer.unproject needs [x,y]');
      return viewport.unproject(xy);
    }
  }, {
    key: 'projectFlat',
    value: function projectFlat(lngLat) {
      var viewport = this.context.viewport;
      debugger
      (0, _assert2.default)(Array.isArray(lngLat), 'Layer.project needs [lng,lat]');
      return viewport.projectFlat(lngLat);
    }
  }, {
    key: 'unprojectFlat',
    value: function unprojectFlat(xy) {
      var viewport = this.context.viewport;
      debugger
      (0, _assert2.default)(Array.isArray(xy), 'Layer.unproject needs [x,y]');
      return viewport.unprojectFlat(xy);
    }
 
    // TODO - needs to refer to context
 
  }, {
    key: 'screenToDevicePixels',
    value: function screenToDevicePixels(screenPixels) {
      _log2.default.deprecated('screenToDevicePixels', 'DeckGL prop useDevicePixels for conversion');
      var devicePixelRatio = typeof window !== 'undefined' ? window.devicePixelRatio : 1;
      return screenPixels * devicePixelRatio;
    }
 
    /**
     * Returns the picking color that doesn't match any subfeature
     * Use if some graphics do not belong to any pickable subfeature
     * @return {Array} - a black color
     */
 
  }, {
    key: 'nullPickingColor',
    value: function nullPickingColor() {
      return [0, 0, 0];
    }
 
    /**
     * Returns the picking color that doesn't match any subfeature
     * Use if some graphics do not belong to any pickable subfeature
     * @param {int} i - index to be decoded
     * @return {Array} - the decoded color
     */
 
  }, {
    key: 'encodePickingColor',
    value: function encodePickingColor(i) {
      (0, _assert2.default)((i + 1 >> 24 & 255) === 0, 'index out of picking color range');
      return [i + 1 & 255, i + 1 >> 8 & 255, i + 1 >> 8 >> 8 & 255];
    }
 
    /**
     * Returns the picking color that doesn't match any subfeature
     * Use if some graphics do not belong to any pickable subfeature
     * @param {Uint8Array} color - color array to be decoded
     * @return {Array} - the decoded picking color
     */
 
  }, {
    key: 'decodePickingColor',
    value: function decodePickingColor(color) {
      (0, _assert2.default)(color instanceof Uint8Array);
 
      var _color = _slicedToArray(color, 3),
          i1 = _color[0],
          i2 = _color[1],
          i3 = _color[2];
      // 1 was added to seperate from no selection
 
 
      var index = i1 + i2 * 256 + i3 * 65536 - 1;
      return index;
    }
 
    // //////////////////////////////////////////////////
    // LIFECYCLE METHODS, overridden by the layer subclasses
 
    // Called once to set up the initial state
    // App can create WebGL resources
 
  }, {
    key: 'initializeState',
    value: function initializeState() {
      throw new Error('Layer ' + this + ' has not defined initializeState');
    }
 
    // Let's layer control if updateState should be called
 
  }, {
    key: 'shouldUpdateState',
    value: function shouldUpdateState(_ref3) {
      var oldProps = _ref3.oldProps,
          props = _ref3.props,
          oldContext = _ref3.oldContext,
          context = _ref3.context,
          changeFlags = _ref3.changeFlags;
 
      return changeFlags.propsOrDataChanged;
    }
 
    // Default implementation, all attributes will be invalidated and updated
    // when data changes
 
  }, {
    key: 'updateState',
    value: function updateState(_ref4) {
      var oldProps = _ref4.oldProps,
          props = _ref4.props,
          oldContext = _ref4.oldContext,
          context = _ref4.context,
          changeFlags = _ref4.changeFlags;
 
      var attributeManager = this.getAttributeManager();
      if (changeFlags.dataChanged && attributeManager) {
        attributeManager.invalidateAll();
      }
    }
 
    // Called once when layer is no longer matched and state will be discarded
    // App can destroy WebGL resources here
 
  }, {
    key: 'finalizeState',
    value: function finalizeState() {}
 
    // Update attribute transition
 
  }, {
    key: 'updateTransition',
    value: function updateTransition() {
      var _state = this.state,
          model = _state.model,
          attributeManager = _state.attributeManager;
 
      var isInTransition = attributeManager && attributeManager.updateTransition();
 
      if (model && isInTransition) {
        model.setAttributes(attributeManager.getChangedAttributes({ transition: true }));
      }
    }
 
    // If state has a model, draw it with supplied uniforms
 
  }, {
    key: 'draw',
    value: function draw(opts) {
      var _iteratorNormalCompletion2 = true;
      var _didIteratorError2 = false;
      var _iteratorError2 = undefined;
 
      try {
        for (var _iterator2 = this.getModels()[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
          var model = _step2.value;
 
          model.draw(opts);
        }
      } catch (err) {
        _didIteratorError2 = true;
        _iteratorError2 = err;
      } finally {
        try {
          if (!_iteratorNormalCompletion2 && _iterator2.return) {
            _iterator2.return();
          }
        } finally {
          if (_didIteratorError2) {
            throw _iteratorError2;
          }
        }
      }
    }
 
    // called to populate the info object that is passed to the event handler
    // @return null to cancel event
 
  }, {
    key: 'getPickingInfo',
    value: function getPickingInfo(_ref5) {
      var info = _ref5.info,
          mode = _ref5.mode;
      var index = info.index;
 
 
      if (index >= 0) {
        // If props.data is an indexable array, get the object
        if (Array.isArray(this.props.data)) {
          info.object = this.props.data[index];
        }
      }
 
      return info;
    }
 
    // END LIFECYCLE METHODS
    // //////////////////////////////////////////////////
 
    // Default implementation of attribute invalidation, can be redefined
 
  }, {
    key: 'invalidateAttribute',
    value: function invalidateAttribute() {
      var name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'all';
      var diffReason = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
 
      var attributeManager = this.getAttributeManager();
      if (!attributeManager) {
        return;
      }
 
      if (name === 'all') {
        _log2.default.log(LOG_PRIORITY_UPDATE, 'updateTriggers invalidating all attributes: ' + diffReason);
        attributeManager.invalidateAll();
      } else {
        _log2.default.log(LOG_PRIORITY_UPDATE, 'updateTriggers invalidating attribute ' + name + ': ' + diffReason);
        attributeManager.invalidate(name);
      }
    }
 
    // Calls attribute manager to update any WebGL attributes, can be redefined
 
  }, {
    key: 'updateAttributes',
    value: function updateAttributes(props) {
      var attributeManager = this.getAttributeManager();
      if (!attributeManager) {
        return;
      }
 
      // Figure out data length
      var numInstances = this.getNumInstances(props);
 
      attributeManager.update({
        data: props.data,
        numInstances: numInstances,
        props: props,
        transitions: props.transitions,
        buffers: props,
        context: this,
        // Don't worry about non-attribute props
        ignoreUnknownAttributes: true
      });
 
      // TODO - Use getModels?
      var model = this.state.model;
 
      if (model) {
        var changedAttributes = attributeManager.getChangedAttributes({ clearChangedFlags: true });
        model.setAttributes(changedAttributes);
      }
    }
  }, {
    key: 'calculateInstancePickingColors',
    value: function calculateInstancePickingColors(attribute, _ref6) {
      var numInstances = _ref6.numInstances;
      var value = attribute.value,
          size = attribute.size;
      // add 1 to index to seperate from no selection
 
      for (var i = 0; i < numInstances; i++) {
        var pickingColor = this.encodePickingColor(i);
        value[i * size + 0] = pickingColor[0];
        value[i * size + 1] = pickingColor[1];
        value[i * size + 2] = pickingColor[2];
      }
    }
 
    // INTERNAL METHODS
 
    // Deduces numer of instances. Intention is to support:
    // - Explicit setting of numInstances
    // - Auto-deduction for ES6 containers that define a size member
    // - Auto-deduction for Classic Arrays via the built-in length attribute
    // - Auto-deduction via arrays
 
  }, {
    key: 'getNumInstances',
    value: function getNumInstances(props) {
      props = props || this.props;
 
      // First check if the layer has set its own value
      if (this.state && this.state.numInstances !== undefined) {
        return this.state.numInstances;
      }
 
      // Check if app has provided an explicit value
      if (props.numInstances !== undefined) {
        return props.numInstances;
      }
 
      // Use container library to get a count for any ES6 container or object
      var _props = props,
          data = _props.data;
 
      return (0, _count.count)(data);
    }
 
    // LAYER MANAGER API
    // Should only be called by the deck.gl LayerManager class
 
    // Called by layer manager when a new layer is found
    /* eslint-disable max-statements */
 
  }, {
    key: '_initialize',
    value: function _initialize() {
      (0, _assert2.default)(arguments.length === 0);
      (0, _assert2.default)(this.context.gl);
      (0, _assert2.default)(!this.state);
 
      var attributeManager = new _attributeManager2.default(this.context.gl, {
        id: this.props.id
      });
 
      // All instanced layers get instancePickingColors attribute by default
      // Their shaders can use it to render a picking scene
      // TODO - this slightly slows down non instanced layers
      attributeManager.addInstanced({
        instancePickingColors: {
          type: _luma.GL.UNSIGNED_BYTE,
          size: 3,
          update: this.calculateInstancePickingColors
        }
      });
 
      this.internalState = {
        subLayers: null, // reference to sublayers rendered in a previous cycle
        stats: new _stats2.default({ id: 'draw' })
        // animatedProps: null, // Computing animated props requires layer manager state
        // TODO - move these fields here (risks breaking layers)
        // attributeManager,
        // needsRedraw: true,
      };
 
      this.state = {
        attributeManager: attributeManager,
        model: null,
        needsRedraw: true
      };
 
      // Call subclass lifecycle methods
      this.initializeState(this.context);
      // End subclass lifecycle methods
 
      // initializeState callback tends to clear state
      this.setChangeFlags({ dataChanged: true, propsChanged: true, viewportChanged: true });
 
      this._updateState(this._getUpdateParams());
 
      if (this.isComposite) {
        this._renderLayers(true);
      }
 
      var model = this.state.model;
 
      if (model) {
        model.id = this.props.id;
        model.program.id = this.props.id + '-program';
        model.geometry.id = this.props.id + '-geometry';
        model.setAttributes(attributeManager.getAttributes());
      }
 
      // Last but not least, update any sublayers
      if (this.isComposite) {
        this._renderLayers();
      }
 
      this.clearChangeFlags();
    }
 
    // Called by layer manager
    // if this layer is new (not matched with an existing layer) oldProps will be empty object
 
  }, {
    key: '_update',
    value: function _update() {
      (0, _assert2.default)(arguments.length === 0);
 
      // Call subclass lifecycle method
      var stateNeedsUpdate = this.needsUpdate();
      // End lifecycle method
 
      var updateParams = this._getUpdateParams();
 
      if (stateNeedsUpdate) {
        this._updateState(updateParams);
      }
 
      // Render or update previously rendered sublayers
      if (this.isComposite) {
        this._renderLayers(stateNeedsUpdate);
      }
 
      this.clearChangeFlags();
      // Release old props for GC once update is complete
      this.oldProps = EMPTY_PROPS;
    }
    /* eslint-enable max-statements */
 
  }, {
    key: '_updateState',
    value: function _updateState(updateParams) {
      // Call subclass lifecycle methods
      this.updateState(updateParams);
      // End subclass lifecycle methods
 
      // Add any subclass attributes
      this.updateAttributes(this.props);
      this._updateBaseUniforms();
      this._updateModuleSettings();
 
      // Note: Automatic instance count update only works for single layers
      if (this.state.model) {
        this.state.model.setInstanceCount(this.getNumInstances());
      }
    }
 
    // Called by manager when layer is about to be disposed
    // Note: not guaranteed to be called on application shutdown
 
  }, {
    key: '_finalize',
    value: function _finalize() {
      (0, _assert2.default)(arguments.length === 0);
      // Call subclass lifecycle method
      this.finalizeState(this.context);
      // End lifecycle method
      (0, _seerIntegration.removeLayerInSeer)(this.id);
    }
 
    // Calculates uniforms
 
  }, {
    key: 'drawLayer',
    value: function drawLayer(_ref7) {
      var _this = this;
 
      var _ref7$moduleParameter = _ref7.moduleParameters,
          moduleParameters = _ref7$moduleParameter === undefined ? null : _ref7$moduleParameter,
          _ref7$uniforms = _ref7.uniforms,
          uniforms = _ref7$uniforms === undefined ? {} : _ref7$uniforms,
          _ref7$parameters = _ref7.parameters,
          parameters = _ref7$parameters === undefined ? {} : _ref7$parameters;
 
      if (!uniforms.picking_uActive) {
        this.updateTransition();
      }
 
      // TODO/ib - hack move to luma Model.draw
      if (moduleParameters) {
        var _iteratorNormalCompletion3 = true;
        var _didIteratorError3 = false;
        var _iteratorError3 = undefined;
 
        try {
          for (var _iterator3 = this.getModels()[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {
            var model = _step3.value;
 
            model.updateModuleSettings(moduleParameters);
          }
        } catch (err) {
          _didIteratorError3 = true;
          _iteratorError3 = err;
        } finally {
          try {
            if (!_iteratorNormalCompletion3 && _iterator3.return) {
              _iterator3.return();
            }
          } finally {
            if (_didIteratorError3) {
              throw _iteratorError3;
            }
          }
        }
      }
 
      // Apply polygon offset to avoid z-fighting
      // TODO - move to draw-layers
      var getPolygonOffset = this.props.getPolygonOffset;
 
      var offsets = getPolygonOffset && getPolygonOffset(uniforms) || [0, 0];
      parameters.polygonOffset = offsets;
 
      // Call subclass lifecycle method
      (0, _luma.withParameters)(this.context.gl, parameters, function () {
        _this.draw({ moduleParameters: moduleParameters, uniforms: uniforms, parameters: parameters, context: _this.context });
      });
      // End lifecycle method
    }
 
    // {uniforms = {}, ...opts}
 
  }, {
    key: 'pickLayer',
    value: function pickLayer(opts) {
      // Call subclass lifecycle method
      return this.getPickingInfo(opts);
      // End lifecycle method
    }
 
    // Helper methods
 
  }, {
    key: 'getChangeFlags',
    value: function getChangeFlags() {
      return this.internalState.changeFlags;
    }
 
    // Dirty some change flags, will be handled by updateLayer
    /* eslint-disable complexity */
 
  }, {
    key: 'setChangeFlags',
    value: function setChangeFlags(flags) {
      var _this2 = this;
 
      this.internalState.changeFlags = this.internalState.changeFlags || {};
      var changeFlags = this.internalState.changeFlags;
 
      // Update primary flags
      if (flags.dataChanged && !changeFlags.dataChanged) {
        changeFlags.dataChanged = flags.dataChanged;
        _log2.default.log(LOG_PRIORITY_UPDATE + 1, function () {
          return 'dataChanged: ' + flags.dataChanged + ' in ' + _this2.id;
        });
      }
      if (flags.updateTriggersChanged && !changeFlags.updateTriggersChanged) {
        changeFlags.updateTriggersChanged = changeFlags.updateTriggersChanged && flags.updateTriggersChanged ? Object.assign({}, flags.updateTriggersChanged, changeFlags.updateTriggersChanged) : flags.updateTriggersChanged || changeFlags.updateTriggersChanged;
        _log2.default.log(LOG_PRIORITY_UPDATE + 1, function () {
          return 'updateTriggersChanged: ' + (Object.keys(flags.updateTriggersChanged).join(', ') + ' in ' + _this2.id);
        });
      }
      if (flags.propsChanged && !changeFlags.propsChanged) {
        changeFlags.propsChanged = flags.propsChanged;
        _log2.default.log(LOG_PRIORITY_UPDATE + 1, function () {
          return 'propsChanged: ' + flags.propsChanged + ' in ' + _this2.id;
        });
      }
      if (flags.viewportChanged && !changeFlags.viewportChanged) {
        changeFlags.viewportChanged = flags.viewportChanged;
        _log2.default.log(LOG_PRIORITY_UPDATE + 2, function () {
          return 'viewportChanged: ' + flags.viewportChanged + ' in ' + _this2.id;
        });
      }
 
      // Update composite flags
      var propsOrDataChanged = flags.dataChanged || flags.updateTriggersChanged || flags.propsChanged;
      changeFlags.propsOrDataChanged = changeFlags.propsOrDataChanged || propsOrDataChanged;
      changeFlags.somethingChanged = changeFlags.somethingChanged || propsOrDataChanged || flags.viewportChanged;
    }
    /* eslint-enable complexity */
 
    // Clear all changeFlags, typically after an update
 
  }, {
    key: 'clearChangeFlags',
    value: function clearChangeFlags() {
      this.internalState.changeFlags = {
        // Primary changeFlags, can be strings stating reason for change
        dataChanged: false,
        propsChanged: false,
        updateTriggersChanged: false,
        viewportChanged: false,
 
        // Derived changeFlags
        propsOrDataChanged: false,
        somethingChanged: false
      };
    }
  }, {
    key: 'printChangeFlags',
    value: function printChangeFlags() {
      var flags = this.internalState.changeFlags;
      return '' + (flags.dataChanged ? 'data ' : '') + (flags.propsChanged ? 'props ' : '') + (flags.updateTriggersChanged ? 'triggers ' : '') + (flags.viewportChanged ? 'viewport' : '');
    }
 
    // Compares the layers props with old props from a matched older layer
    // and extracts change flags that describe what has change so that state
    // can be update correctly with minimal effort
    // TODO - arguments for testing only
 
  }, {
    key: 'diffProps',
    value: function diffProps() {
      var newProps = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.props;
      var oldProps = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.oldProps;
 
      var changeFlags = (0, _props2.diffProps)(newProps, oldProps);
 
      // iterate over changedTriggers
      if (changeFlags.updateTriggersChanged) {
        for (var key in changeFlags.updateTriggersChanged) {
          if (changeFlags.updateTriggersChanged[key]) {
            this._activeUpdateTrigger(key);
          }
        }
      }
 
      return this.setChangeFlags(changeFlags);
    }
 
    // PRIVATE METHODS
 
  }, {
    key: '_getUpdateParams',
    value: function _getUpdateParams() {
      return {
        props: this.props,
        oldProps: this.oldProps,
        context: this.context,
        oldContext: this.oldContext || {},
        changeFlags: this.internalState.changeFlags
      };
    }
 
    // Checks state of attributes and model
 
  }, {
    key: '_getNeedsRedraw',
    value: function _getNeedsRedraw(clearRedrawFlags) {
      // this method may be called by the render loop as soon a the layer
      // has been created, so guard against uninitialized state
      if (!this.state) {
        return false;
      }
 
      var redraw = false;
      redraw = redraw || this.state.needsRedraw && this.id;
      this.state.needsRedraw = this.state.needsRedraw && !clearRedrawFlags;
 
      // TODO - is attribute manager needed? - Model should be enough.
      var attributeManager = this.getAttributeManager();
      var attributeManagerNeedsRedraw = attributeManager && attributeManager.getNeedsRedraw({ clearRedrawFlags: clearRedrawFlags });
      redraw = redraw || attributeManagerNeedsRedraw;
 
      var _iteratorNormalCompletion4 = true;
      var _didIteratorError4 = false;
      var _iteratorError4 = undefined;
 
      try {
        for (var _iterator4 = this.getModels()[Symbol.iterator](), _step4; !(_iteratorNormalCompletion4 = (_step4 = _iterator4.next()).done); _iteratorNormalCompletion4 = true) {
          var model = _step4.value;
 
          var modelNeedsRedraw = model.getNeedsRedraw({ clearRedrawFlags: clearRedrawFlags });
          if (modelNeedsRedraw && typeof modelNeedsRedraw !== 'string') {
            modelNeedsRedraw = 'model ' + model.id;
          }
          redraw = redraw || modelNeedsRedraw;
        }
      } catch (err) {
        _didIteratorError4 = true;
        _iteratorError4 = err;
      } finally {
        try {
          if (!_iteratorNormalCompletion4 && _iterator4.return) {
            _iterator4.return();
          }
        } finally {
          if (_didIteratorError4) {
            throw _iteratorError4;
          }
        }
      }
 
      return redraw;
    }
 
    // Called by layer manager to transfer state from an old layer
 
  }, {
    key: '_transferState',
    value: function _transferState(oldLayer) {
      var state = oldLayer.state,
          internalState = oldLayer.internalState,
          props = oldLayer.props;
 
      (0, _assert2.default)(state && internalState);
 
      // Move state
      state.layer = this;
      this.state = state;
      this.internalState = internalState;
      // Note: We keep the state ref on old layers to support async actions
      // oldLayer.state = null;
 
      // Keep a temporary ref to the old props, for prop comparison
      this.oldProps = props;
 
      // Update model layer reference
      var _iteratorNormalCompletion5 = true;
      var _didIteratorError5 = false;
      var _iteratorError5 = undefined;
 
      try {
        for (var _iterator5 = this.getModels()[Symbol.iterator](), _step5; !(_iteratorNormalCompletion5 = (_step5 = _iterator5.next()).done); _iteratorNormalCompletion5 = true) {
          var model = _step5.value;
 
          model.userData.layer = this;
        }
      } catch (err) {
        _didIteratorError5 = true;
        _iteratorError5 = err;
      } finally {
        try {
          if (!_iteratorNormalCompletion5 && _iterator5.return) {
            _iterator5.return();
          }
        } finally {
          if (_didIteratorError5) {
            throw _iteratorError5;
          }
        }
      }
 
      this.diffProps();
    }
 
    // Operate on each changed triggers, will be called when an updateTrigger changes
 
  }, {
    key: '_activeUpdateTrigger',
    value: function _activeUpdateTrigger(propName) {
      this.invalidateAttribute(propName);
    }
 
    //  Helper to check that required props are supplied
 
  }, {
    key: '_checkRequiredProp',
    value: function _checkRequiredProp(propertyName, condition) {
      var value = this.props[propertyName];
      if (value === undefined) {
        throw new Error('Property ' + propertyName + ' undefined in layer ' + this);
      }
      if (condition && !condition(value)) {
        throw new Error('Bad property ' + propertyName + ' in layer ' + this);
      }
    }
  }, {
    key: '_updateBaseUniforms',
    value: function _updateBaseUniforms() {
      var uniforms = {
        // apply gamma to opacity to make it visually "linear"
        opacity: Math.pow(this.props.opacity, 1 / 2.2),
        ONE: 1.0
      };
      var _iteratorNormalCompletion6 = true;
      var _didIteratorError6 = false;
      var _iteratorError6 = undefined;
 
      try {
        for (var _iterator6 = this.getModels()[Symbol.iterator](), _step6; !(_iteratorNormalCompletion6 = (_step6 = _iterator6.next()).done); _iteratorNormalCompletion6 = true) {
          var model = _step6.value;
 
          model.setUniforms(uniforms);
        }
 
        // TODO - set needsRedraw on the model(s)?
      } catch (err) {
        _didIteratorError6 = true;
        _iteratorError6 = err;
      } finally {
        try {
          if (!_iteratorNormalCompletion6 && _iterator6.return) {
            _iterator6.return();
          }
        } finally {
          if (_didIteratorError6) {
            throw _iteratorError6;
          }
        }
      }
 
      this.state.needsRedraw = true;
    }
  }, {
    key: '_updateModuleSettings',
    value: function _updateModuleSettings() {
      var settings = {
        pickingHighlightColor: this.props.highlightColor
      };
      var _iteratorNormalCompletion7 = true;
      var _didIteratorError7 = false;
      var _iteratorError7 = undefined;
 
      try {
        for (var _iterator7 = this.getModels()[Symbol.iterator](), _step7; !(_iteratorNormalCompletion7 = (_step7 = _iterator7.next()).done); _iteratorNormalCompletion7 = true) {
          var model = _step7.value;
 
          model.updateModuleSettings(settings);
        }
      } catch (err) {
        _didIteratorError7 = true;
        _iteratorError7 = err;
      } finally {
        try {
          if (!_iteratorNormalCompletion7 && _iterator7.return) {
            _iterator7.return();
          }
        } finally {
          if (_didIteratorError7) {
            throw _iteratorError7;
          }
        }
      }
    }
 
    // DEPRECATED METHODS
 
    // Updates selected state members and marks the object for redraw
 
  }, {
    key: 'setUniforms',
    value: function setUniforms(uniformMap) {
      var _iteratorNormalCompletion8 = true;
      var _didIteratorError8 = false;
      var _iteratorError8 = undefined;
 
      try {
        for (var _iterator8 = this.getModels()[Symbol.iterator](), _step8; !(_iteratorNormalCompletion8 = (_step8 = _iterator8.next()).done); _iteratorNormalCompletion8 = true) {
          var model = _step8.value;
 
          model.setUniforms(uniformMap);
        }
 
        // TODO - set needsRedraw on the model(s)?
      } catch (err) {
        _didIteratorError8 = true;
        _iteratorError8 = err;
      } finally {
        try {
          if (!_iteratorNormalCompletion8 && _iterator8.return) {
            _iterator8.return();
          }
        } finally {
          if (_didIteratorError8) {
            throw _iteratorError8;
          }
        }
      }
 
      this.state.needsRedraw = true;
      _log2.default.deprecated('layer.setUniforms', 'model.setUniforms');
    }
  }, {
    key: 'stats',
    get: function get() {
      return this.internalState.stats;
    }
  }]);
 
  return Layer;
}();
 
exports.default = Layer;
 
 
Layer.layerName = 'Layer';
Layer.defaultProps = defaultProps;
 
/***/ }),
/* 124 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.removeLayerInSeer = exports.updateLayerInSeer = exports.initLayerInSeer = exports.seerInitListener = exports.layerEditListener = exports.applyPropOverrides = exports.setPropOverrides = undefined;
 
var _seer = __webpack_require__(173);
 
var _seer2 = _interopRequireDefault(_seer);
 
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
 
function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
 
/**
 * Recursively set a nested property of an object given a properties array and a value
 */
var recursiveSet = function recursiveSet(obj, path, value) {
  if (!obj) {
    return;
  }
 
  if (path.length > 1) {
    recursiveSet(obj[path[0]], path.slice(1), value);
  } else {
    obj[path[0]] = value;
  }
};
 
var overrides = new Map();
 
/**
 * Create an override on the specify layer, indexed by a valuePath array.
 * Do nothing in case Seer as not been initialized to prevent any preformance drawback.
 */
var setPropOverrides = exports.setPropOverrides = function setPropOverrides(id, valuePath, value) {
  if (!_seer2.default.isReady()) {
    return;
  }
 
  if (!overrides.has(id)) {
    overrides.set(id, new Map());
  }
 
  var props = overrides.get(id);
  props.set(valuePath, value);
};
 
/**
 * Get the props overrides of a specific layer if Seer as been initialized
 * Invalidates the data to be sure new ones are always picked up.
 */
var applyPropOverrides = exports.applyPropOverrides = function applyPropOverrides(props) {
  if (!_seer2.default.isReady() || !props.id) {
    return;
  }
 
  var overs = overrides.get(props.id);
  if (!overs) {
    return;
  }
 
  overs.forEach(function (value, valuePath) {
    recursiveSet(props, valuePath, value);
    // Invalidate data array if we have a data override
    if (valuePath[0] === 'data') {
      props.data = [].concat(_toConsumableArray(props.data));
    }
  });
};
 
/**
 * Listen for deck.gl edit events
 */
var layerEditListener = exports.layerEditListener = function layerEditListener(cb) {
  if (!_seer2.default.isReady()) {
    return;
  }
 
  _seer2.default.listenFor('deck.gl', cb);
};
 
/**
 * Listen for seer init events to resend data
 */
var seerInitListener = exports.seerInitListener = function seerInitListener(cb) {
  if (!_seer2.default.isReady()) {
    return;
  }
 
  _seer2.default.listenFor('init', cb);
};
 
var initLayerInSeer = exports.initLayerInSeer = function initLayerInSeer(layer) {
  if (!_seer2.default.isReady() || !layer) {
    return;
  }
 
  var badges = [layer.constructor.layerName];
 
  _seer2.default.listItem('deck.gl', layer.id, {
    badges: badges,
    // TODO: Seer currently only handles single model layers
    links: layer.state && layer.state.model ? ['luma.gl:' + layer.state.model.id] : undefined,
    parent: layer.parentLayer ? layer.parentLayer.id : undefined
  });
};
 
/**
 * Log layer's properties to Seer
 */
var updateLayerInSeer = exports.updateLayerInSeer = function updateLayerInSeer(layer) {
  if (!_seer2.default.isReady() || _seer2.default.throttle('deck.gl:' + layer.id, 1e3)) {
    return;
  }
 
  var data = logPayload(layer);
  _seer2.default.multiUpdate('deck.gl', layer.id, data);
};
 
/**
 * On finalize of a specify layer, remove it from seer
 */
var removeLayerInSeer = exports.removeLayerInSeer = function removeLayerInSeer(id) {
  if (!_seer2.default.isReady() || !id) {
    return;
  }
 
  _seer2.default.deleteItem('deck.gl', id);
};
 
function logPayload(layer) {
  var data = [{ path: 'objects.props', data: layer.props }];
 
  var badges = [layer.constructor.layerName];
 
  if (layer.state) {
    if (layer.state.attributeManager) {
      var attrs = layer.state.attributeManager.getAttributes();
      data.push({ path: 'objects.attributes', data: attrs });
      badges.push(layer.state.attributeManager.stats.getTimeString());
    }
    // TODO: Seer currently only handles single model layers
    if (layer.state.model) {
      layer.state.model.timerQueryEnabled = true;
      var lastFrameTime = layer.state.model.stats.lastFrameTime;
 
      if (lastFrameTime) {
        badges.push((lastFrameTime * 1000).toFixed(0) + '\u03BCs');
      }
    }
  }
 
  data.push({ path: 'badges', data: badges });
 
  return data;
}
 
/***/ }),
/* 125 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
 
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
 
var _transitionInterpolator = __webpack_require__(193);
 
var _transitionInterpolator2 = _interopRequireDefault(_transitionInterpolator);
 
var _transitionUtils = __webpack_require__(84);
 
var _assert = __webpack_require__(1);
 
var _assert2 = _interopRequireDefault(_assert);
 
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
 
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
 
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
 
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
 
var VIEWPORT_TRANSITION_PROPS = ['longitude', 'latitude', 'zoom', 'bearing', 'pitch'];
 
/**
 * Performs linear interpolation of two viewports.
 */
 
var LinearInterpolator = function (_TransitionInterpolat) {
  _inherits(LinearInterpolator, _TransitionInterpolat);
 
  /**
   * @param {Array} transitionProps - list of props to apply linear transition to.
   */
  function LinearInterpolator() {
    var transitionProps = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : VIEWPORT_TRANSITION_PROPS;
 
    _classCallCheck(this, LinearInterpolator);
 
    var _this = _possibleConstructorReturn(this, (LinearInterpolator.__proto__ || Object.getPrototypeOf(LinearInterpolator)).call(this));
 
    _this.propNames = transitionProps;
    return _this;
  }
 
  _createClass(LinearInterpolator, [{
    key: 'initializeProps',
    value: function initializeProps(startProps, endProps) {
      var startViewportProps = {};
      var endViewportProps = {};
 
      var _iteratorNormalCompletion = true;
      var _didIteratorError = false;
      var _iteratorError = undefined;
 
      try {
        for (var _iterator = this.propNames[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
          var key = _step.value;
 
          var startValue = startProps[key];
          var endValue = endProps[key];
          (0, _assert2.default)((0, _transitionUtils.isValid)(startValue) && (0, _transitionUtils.isValid)(endValue), key + ' must be supplied for transition');
 
          startViewportProps[key] = startValue;
          endViewportProps[key] = (0, _transitionUtils.getEndValueByShortestPath)(key, startValue, endValue);
        }
      } catch (err) {
        _didIteratorError = true;
        _iteratorError = err;
      } finally {
        try {
          if (!_iteratorNormalCompletion && _iterator.return) {
            _iterator.return();
          }
        } finally {
          if (_didIteratorError) {
            throw _iteratorError;
          }
        }
      }
 
      return {
        start: startViewportProps,
        end: endViewportProps
      };
    }
  }, {
    key: 'interpolateProps',
    value: function interpolateProps(startProps, endProps, t) {
      var viewport = {};
      var _iteratorNormalCompletion2 = true;
      var _didIteratorError2 = false;
      var _iteratorError2 = undefined;
 
      try {
        for (var _iterator2 = this.propNames[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
          var key = _step2.value;
 
          viewport[key] = (0, _transitionUtils.lerp)(startProps[key], endProps[key], t);
        }
      } catch (err) {
        _didIteratorError2 = true;
        _iteratorError2 = err;
      } finally {
        try {
          if (!_iteratorNormalCompletion2 && _iterator2.return) {
            _iterator2.return();
          }
        } finally {
          if (_didIteratorError2) {
            throw _iteratorError2;
          }
        }
      }
 
      return viewport;
    }
  }]);
 
  return LinearInterpolator;
}(_transitionInterpolator2.default);
 
exports.default = LinearInterpolator;
 
/***/ }),
/* 126 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.flatten = flatten;
exports.countVertices = countVertices;
exports.flattenVertices = flattenVertices;
exports.fillArray = fillArray;
// Copyright (c) 2015 - 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
 
/**
 * Flattens a nested array into a single level array,
 * or a single value into an array with one value
 * @example flatten([[1, [2]], [3], 4]) => [1, 2, 3, 4]
 * @example flatten(1) => [1]
 * @param {Array} array The array to flatten.
 * @param {Function} filter= - Optional predicate called on each `value` to
 *   determine if it should be included (pushed onto) the resulting array.
 * @param {Function} map= - Optional transform applied to each array elements.
 * @param {Array} result=[] - Optional array to push value into
 * @return {Array} Returns the new flattened array (new array or `result` if provided)
 */
function flatten(array) {
  var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
      _ref$filter = _ref.filter,
      filter = _ref$filter === undefined ? function () {
    return true;
  } : _ref$filter,
      _ref$map = _ref.map,
      map = _ref$map === undefined ? function (x) {
    return x;
  } : _ref$map,
      _ref$result = _ref.result,
      result = _ref$result === undefined ? [] : _ref$result;
 
  // Wrap single object in array
  if (!Array.isArray(array)) {
    return filter(array) ? [map(array)] : [];
  }
  // Deep flatten and filter the array
  return flattenArray(array, filter, map, result);
}
 
// Deep flattens an array. Helper to `flatten`, see its parameters
function flattenArray(array, filter, map, result) {
  var index = -1;
  while (++index < array.length) {
    var value = array[index];
    if (Array.isArray(value)) {
      flattenArray(value, filter, map, result);
    } else if (filter(value)) {
      result.push(map(value));
    }
  }
  return result;
}
 
function countVertices(nestedArray) {
  var count = 0;
  var index = -1;
  while (++index < nestedArray.length) {
    var value = nestedArray[index];
    if (Array.isArray(value) || ArrayBuffer.isView(value)) {
      count += countVertices(value);
    } else {
      count++;
    }
  }
  return count;
}
 
// Flattens nested array of vertices, padding third coordinate as needed
function flattenVertices(nestedArray) {
  var _ref2 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
      _ref2$result = _ref2.result,
      result = _ref2$result === undefined ? [] : _ref2$result,
      _ref2$dimensions = _ref2.dimensions,
      dimensions = _ref2$dimensions === undefined ? 3 : _ref2$dimensions;
 
  var index = -1;
  var vertexLength = 0;
  while (++index < nestedArray.length) {
    var value = nestedArray[index];
    if (Array.isArray(value) || ArrayBuffer.isView(value)) {
      flattenVertices(value, { result: result, dimensions: dimensions });
    } else {
      // eslint-disable-next-line
      if (vertexLength < dimensions) {
        result.push(value);
        vertexLength++;
      }
    }
  }
  // Add a third coordinate if needed
  if (vertexLength > 0 && vertexLength < dimensions) {
    result.push(0);
  }
  return result;
}
 
// Uses copyWithin to significantly speed up typed array value filling
function fillArray(_ref3) {
  var target = _ref3.target,
      source = _ref3.source,
      _ref3$start = _ref3.start,
      start = _ref3$start === undefined ? 0 : _ref3$start,
      _ref3$count = _ref3.count,
      count = _ref3$count === undefined ? 1 : _ref3$count;
 
  var length = source.length;
  var total = count * length;
  var copied = 0;
  for (var i = start; copied < length; copied++) {
    target[i++] = source[copied];
  }
 
  while (copied < total) {
    // If we have copied less than half, copy everything we got
    // else copy remaining in one operation
    if (copied < total - copied) {
      target.copyWithin(start + copied, start, start + copied);
      copied *= 2;
    } else {
      target.copyWithin(start + copied, start, start + total - copied);
      copied = total;
    }
  }
 
  return target;
}
 
// Flattens nested array of vertices, padding third coordinate as needed
/*
export function flattenTypedVertices(nestedArray, {
  result = [],
  Type = Float32Array,
  start = 0,
  dimensions = 3
} = {}) {
  let index = -1;
  let vertexLength = 0;
  while (++index < nestedArray.length) {
    const value = nestedArray[index];
    if (Array.isArray(value) || ArrayBuffer.isView(value)) {
      start = flattenTypedVertices(value, {result, start, dimensions});
    } else {
      if (vertexLength < dimensions) { // eslint-disable-line
        result[start++] = value;
        vertexLength++;
      }
    }
  }
  // Add a third coordinate if needed
  if (vertexLength > 0 && vertexLength < dimensions) {
    result[start++] = 0;
  }
  return start;
}
*/
 
/***/ }),
/* 127 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.transformVector = transformVector;
exports.createMat4 = createMat4;
exports.extractCameraVectors = extractCameraVectors;
exports.mod = mod;
 
var _multiply = __webpack_require__(246);
 
var _multiply2 = _interopRequireDefault(_multiply);
 
var _transformMat = __webpack_require__(103);
 
var _transformMat2 = _interopRequireDefault(_transformMat);
 
var _assert = __webpack_require__(1);
 
var _assert2 = _interopRequireDefault(_assert);
 
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
 
function transformVector(matrix, vector) {
  // Handle non-invertible matrix
  if (!matrix) {
    return null;
  }
  var result = (0, _transformMat2.default)([0, 0, 0, 0], vector, matrix);
  var scale = 1 / result[3];
  (0, _multiply2.default)(result, result, [scale, scale, scale, scale]);
  return result;
}
 
// Helper, avoids low-precision 32 bit matrices from gl-matrix mat4.create()
// Extensions to math.gl library. Intended to be folded back.
 
function createMat4() {
  return [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];
}
 
// Extract camera vectors (move to math library?)
function extractCameraVectors(_ref) {
  var viewMatrix = _ref.viewMatrix,
      viewMatrixInverse = _ref.viewMatrixInverse;
 
  // Read the translation from the inverse view matrix
  return {
    eye: [viewMatrixInverse[12], viewMatrixInverse[13], viewMatrixInverse[14]],
    direction: [viewMatrix[2], viewMatrix[6], viewMatrix[10]],
    up: [viewMatrix[1], viewMatrix[5], viewMatrix[9]]
  };
}
 
function mod(value, divisor) {
  (0, _assert2.default)(Number.isFinite(value) && Number.isFinite(divisor));
  var modulus = value % divisor;
  return modulus < 0 ? divisor + modulus : modulus;
}
 
/***/ }),
/* 128 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
// 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length)
 
var toObject = __webpack_require__(14);
var toAbsoluteIndex = __webpack_require__(57);
var toLength = __webpack_require__(11);
module.exports = function fill(value /* , start = 0, end = @length */) {
  var O = toObject(this);
  var length = toLength(O.length);
  var aLen = arguments.length;
  var index = toAbsoluteIndex(aLen > 1 ? arguments[1] : undefined, length);
  var end = aLen > 2 ? arguments[2] : undefined;
  var endPos = end === undefined ? length : toAbsoluteIndex(end, length);
  while (endPos > index) O[index++] = value;
  return O;
};
 
 
/***/ }),
/* 129 */
/***/ (function(module, exports, __webpack_require__) {
 
// 9.4.2.3 ArraySpeciesCreate(originalArray, length)
var speciesConstructor = __webpack_require__(368);
 
module.exports = function (original, length) {
  return new (speciesConstructor(original))(length);
};
 
 
/***/ }),
/* 130 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var $defineProperty = __webpack_require__(10);
var createDesc = __webpack_require__(54);
 
module.exports = function (object, index, value) {
  if (index in object) $defineProperty.f(object, index, createDesc(0, value));
  else object[index] = value;
};
 
 
/***/ }),
/* 131 */
/***/ (function(module, exports, __webpack_require__) {
 
var isObject = __webpack_require__(5);
var document = __webpack_require__(3).document;
// typeof document.createElement is 'object' in old IE
var is = isObject(document) && isObject(document.createElement);
module.exports = function (it) {
  return is ? document.createElement(it) : {};
};
 
 
/***/ }),
/* 132 */
/***/ (function(module, exports) {
 
// IE 8- don't enum bug keys
module.exports = (
  'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'
).split(',');
 
 
/***/ }),
/* 133 */
/***/ (function(module, exports, __webpack_require__) {
 
var MATCH = __webpack_require__(6)('match');
module.exports = function (KEY) {
  var re = /./;
  try {
    '/./'[KEY](re);
  } catch (e) {
    try {
      re[MATCH] = false;
      return !'/./'[KEY](re);
    } catch (f) { /* empty */ }
  } return true;
};
 
 
/***/ }),
/* 134 */
/***/ (function(module, exports, __webpack_require__) {
 
var document = __webpack_require__(3).document;
module.exports = document && document.documentElement;
 
 
/***/ }),
/* 135 */
/***/ (function(module, exports, __webpack_require__) {
 
var isObject = __webpack_require__(5);
var setPrototypeOf = __webpack_require__(143).set;
module.exports = function (that, target, C) {
  var S = target.constructor;
  var P;
  if (S !== C && typeof S == 'function' && (P = S.prototype) !== C.prototype && isObject(P) && setPrototypeOf) {
    setPrototypeOf(that, P);
  } return that;
};
 
 
/***/ }),
/* 136 */
/***/ (function(module, exports, __webpack_require__) {
 
// check on default Array iterator
var Iterators = __webpack_require__(63);
var ITERATOR = __webpack_require__(6)('iterator');
var ArrayProto = Array.prototype;
 
module.exports = function (it) {
  return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it);
};
 
 
/***/ }),
/* 137 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var create = __webpack_require__(51);
var descriptor = __webpack_require__(54);
var setToStringTag = __webpack_require__(64);
var IteratorPrototype = {};
 
// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
__webpack_require__(19)(IteratorPrototype, __webpack_require__(6)('iterator'), function () { return this; });
 
module.exports = function (Constructor, NAME, next) {
  Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) });
  setToStringTag(Constructor, NAME + ' Iterator');
};
 
 
/***/ }),
/* 138 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var LIBRARY = __webpack_require__(50);
var $export = __webpack_require__(0);
var redefine = __webpack_require__(20);
var hide = __webpack_require__(19);
var has = __webpack_require__(18);
var Iterators = __webpack_require__(63);
var $iterCreate = __webpack_require__(137);
var setToStringTag = __webpack_require__(64);
var getPrototypeOf = __webpack_require__(23);
var ITERATOR = __webpack_require__(6)('iterator');
var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next`
var FF_ITERATOR = '@@iterator';
var KEYS = 'keys';
var VALUES = 'values';
 
var returnThis = function () { return this; };
 
module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) {
  $iterCreate(Constructor, NAME, next);
  var getMethod = function (kind) {
    if (!BUGGY && kind in proto) return proto[kind];
    switch (kind) {
      case KEYS: return function keys() { return new Constructor(this, kind); };
      case VALUES: return function values() { return new Constructor(this, kind); };
    } return function entries() { return new Constructor(this, kind); };
  };
  var TAG = NAME + ' Iterator';
  var DEF_VALUES = DEFAULT == VALUES;
  var VALUES_BUG = false;
  var proto = Base.prototype;
  var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT];
  var $default = (!BUGGY && $native) || getMethod(DEFAULT);
  var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined;
  var $anyNative = NAME == 'Array' ? proto.entries || $native : $native;
  var methods, key, IteratorPrototype;
  // Fix native
  if ($anyNative) {
    IteratorPrototype = getPrototypeOf($anyNative.call(new Base()));
    if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) {
      // Set @@toStringTag to native iterators
      setToStringTag(IteratorPrototype, TAG, true);
      // fix for some old engines
      if (!LIBRARY && !has(IteratorPrototype, ITERATOR)) hide(IteratorPrototype, ITERATOR, returnThis);
    }
  }
  // fix Array#{values, @@iterator}.name in V8 / FF
  if (DEF_VALUES && $native && $native.name !== VALUES) {
    VALUES_BUG = true;
    $default = function values() { return $native.call(this); };
  }
  // Define iterator
  if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) {
    hide(proto, ITERATOR, $default);
  }
  // Plug for library
  Iterators[NAME] = $default;
  Iterators[TAG] = returnThis;
  if (DEFAULT) {
    methods = {
      values: DEF_VALUES ? $default : getMethod(VALUES),
      keys: IS_SET ? $default : getMethod(KEYS),
      entries: $entries
    };
    if (FORCED) for (key in methods) {
      if (!(key in proto)) redefine(proto, key, methods[key]);
    } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);
  }
  return methods;
};
 
 
/***/ }),
/* 139 */
/***/ (function(module, exports) {
 
// 20.2.2.14 Math.expm1(x)
var $expm1 = Math.expm1;
module.exports = (!$expm1
  // Old FF bug
  || $expm1(10) > 22025.465794806719 || $expm1(10) < 22025.4657948067165168
  // Tor Browser bug
  || $expm1(-2e-17) != -2e-17
) ? function expm1(x) {
  return (x = +x) == 0 ? x : x > -1e-6 && x < 1e-6 ? x + x * x / 2 : Math.exp(x) - 1;
} : $expm1;
 
 
/***/ }),
/* 140 */
/***/ (function(module, exports) {
 
// 20.2.2.28 Math.sign(x)
module.exports = Math.sign || function sign(x) {
  // eslint-disable-next-line no-self-compare
  return (x = +x) == 0 || x != x ? x : x < 0 ? -1 : 1;
};
 
 
/***/ }),
/* 141 */
/***/ (function(module, exports, __webpack_require__) {
 
var global = __webpack_require__(3);
var macrotask = __webpack_require__(149).set;
var Observer = global.MutationObserver || global.WebKitMutationObserver;
var process = global.process;
var Promise = global.Promise;
var isNode = __webpack_require__(27)(process) == 'process';
 
module.exports = function () {
  var head, last, notify;
 
  var flush = function () {
    var parent, fn;
    if (isNode && (parent = process.domain)) parent.exit();
    while (head) {
      fn = head.fn;
      head = head.next;
      try {
        fn();
      } catch (e) {
        if (head) notify();
        else last = undefined;
        throw e;
      }
    } last = undefined;
    if (parent) parent.enter();
  };
 
  // Node.js
  if (isNode) {
    notify = function () {
      process.nextTick(flush);
    };
  // browsers with MutationObserver, except iOS Safari - https://github.com/zloirock/core-js/issues/339
  } else if (Observer && !(global.navigator && global.navigator.standalone)) {
    var toggle = true;
    var node = document.createTextNode('');
    new Observer(flush).observe(node, { characterData: true }); // eslint-disable-line no-new
    notify = function () {
      node.data = toggle = !toggle;
    };
  // environments with maybe non-completely correct, but existent Promise
  } else if (Promise && Promise.resolve) {
    var promise = Promise.resolve();
    notify = function () {
      promise.then(flush);
    };
  // for other environments - macrotask based on:
  // - setImmediate
  // - MessageChannel
  // - window.postMessag
  // - onreadystatechange
  // - setTimeout
  } else {
    notify = function () {
      // strange IE + webpack dev server bug - use .call(global)
      macrotask.call(global, flush);
    };
  }
 
  return function (fn) {
    var task = { fn: fn, next: undefined };
    if (last) last.next = task;
    if (!head) {
      head = task;
      notify();
    } last = task;
  };
};
 
 
/***/ }),
/* 142 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
// 25.4.1.5 NewPromiseCapability(C)
var aFunction = __webpack_require__(15);
 
function PromiseCapability(C) {
  var resolve, reject;
  this.promise = new C(function ($$resolve, $$reject) {
    if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor');
    resolve = $$resolve;
    reject = $$reject;
  });
  this.resolve = aFunction(resolve);
  this.reject = aFunction(reject);
}
 
module.exports.f = function (C) {
  return new PromiseCapability(C);
};
 
 
/***/ }),
/* 143 */
/***/ (function(module, exports, __webpack_require__) {
 
// Works with __proto__ only. Old v8 can't work with null proto objects.
/* eslint-disable no-proto */
var isObject = __webpack_require__(5);
var anObject = __webpack_require__(2);
var check = function (O, proto) {
  anObject(O);
  if (!isObject(proto) && proto !== null) throw TypeError(proto + ": can't set as prototype!");
};
module.exports = {
  set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line
    function (test, buggy, set) {
      try {
        set = __webpack_require__(28)(Function.call, __webpack_require__(22).f(Object.prototype, '__proto__').set, 2);
        set(test, []);
        buggy = !(test instanceof Array);
      } catch (e) { buggy = true; }
      return function setPrototypeOf(O, proto) {
        check(O, proto);
        if (buggy) O.__proto__ = proto;
        else set(O, proto);
        return O;
      };
    }({}, false) : undefined),
  check: check
};
 
 
/***/ }),
/* 144 */
/***/ (function(module, exports, __webpack_require__) {
 
var shared = __webpack_require__(98)('keys');
var uid = __webpack_require__(58);
module.exports = function (key) {
  return shared[key] || (shared[key] = uid(key));
};
 
 
/***/ }),
/* 145 */
/***/ (function(module, exports, __webpack_require__) {
 
var toInteger = __webpack_require__(36);
var defined = __webpack_require__(34);
// true  -> String#at
// false -> String#codePointAt
module.exports = function (TO_STRING) {
  return function (that, pos) {
    var s = String(defined(that));
    var i = toInteger(pos);
    var l = s.length;
    var a, b;
    if (i < 0 || i >= l) return TO_STRING ? '' : undefined;
    a = s.charCodeAt(i);
    return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff
      ? TO_STRING ? s.charAt(i) : a
      : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;
  };
};
 
 
/***/ }),
/* 146 */
/***/ (function(module, exports, __webpack_require__) {
 
// helper for String#{startsWith, endsWith, includes}
var isRegExp = __webpack_require__(92);
var defined = __webpack_require__(34);
 
module.exports = function (that, searchString, NAME) {
  if (isRegExp(searchString)) throw TypeError('String#' + NAME + " doesn't accept regex!");
  return String(defined(that));
};
 
 
/***/ }),
/* 147 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var toInteger = __webpack_require__(36);
var defined = __webpack_require__(34);
 
module.exports = function repeat(count) {
  var str = String(defined(this));
  var res = '';
  var n = toInteger(count);
  if (n < 0 || n == Infinity) throw RangeError("Count can't be negative");
  for (;n > 0; (n >>>= 1) && (str += str)) if (n & 1) res += str;
  return res;
};
 
 
/***/ }),
/* 148 */
/***/ (function(module, exports) {
 
module.exports = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003' +
  '\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
 
 
/***/ }),
/* 149 */
/***/ (function(module, exports, __webpack_require__) {
 
var ctx = __webpack_require__(28);
var invoke = __webpack_require__(208);
var html = __webpack_require__(134);
var cel = __webpack_require__(131);
var global = __webpack_require__(3);
var process = global.process;
var setTask = global.setImmediate;
var clearTask = global.clearImmediate;
var MessageChannel = global.MessageChannel;
var Dispatch = global.Dispatch;
var counter = 0;
var queue = {};
var ONREADYSTATECHANGE = 'onreadystatechange';
var defer, channel, port;
var run = function () {
  var id = +this;
  // eslint-disable-next-line no-prototype-builtins
  if (queue.hasOwnProperty(id)) {
    var fn = queue[id];
    delete queue[id];
    fn();
  }
};
var listener = function (event) {
  run.call(event.data);
};
// Node.js 0.9+ & IE10+ has setImmediate, otherwise:
if (!setTask || !clearTask) {
  setTask = function setImmediate(fn) {
    var args = [];
    var i = 1;
    while (arguments.length > i) args.push(arguments[i++]);
    queue[++counter] = function () {
      // eslint-disable-next-line no-new-func
      invoke(typeof fn == 'function' ? fn : Function(fn), args);
    };
    defer(counter);
    return counter;
  };
  clearTask = function clearImmediate(id) {
    delete queue[id];
  };
  // Node.js 0.8-
  if (__webpack_require__(27)(process) == 'process') {
    defer = function (id) {
      process.nextTick(ctx(run, id, 1));
    };
  // Sphere (JS game engine) Dispatch API
  } else if (Dispatch && Dispatch.now) {
    defer = function (id) {
      Dispatch.now(ctx(run, id, 1));
    };
  // Browsers with MessageChannel, includes WebWorkers
  } else if (MessageChannel) {
    channel = new MessageChannel();
    port = channel.port2;
    channel.port1.onmessage = listener;
    defer = ctx(port.postMessage, port, 1);
  // Browsers with postMessage, skip WebWorkers
  // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
  } else if (global.addEventListener && typeof postMessage == 'function' && !global.importScripts) {
    defer = function (id) {
      global.postMessage(id + '', '*');
    };
    global.addEventListener('message', listener, false);
  // IE8-
  } else if (ONREADYSTATECHANGE in cel('script')) {
    defer = function (id) {
      html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function () {
        html.removeChild(this);
        run.call(id);
      };
    };
  // Rest old browsers
  } else {
    defer = function (id) {
      setTimeout(ctx(run, id, 1), 0);
    };
  }
}
module.exports = {
  set: setTask,
  clear: clearTask
};
 
 
/***/ }),
/* 150 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var global = __webpack_require__(3);
var DESCRIPTORS = __webpack_require__(9);
var LIBRARY = __webpack_require__(50);
var $typed = __webpack_require__(100);
var hide = __webpack_require__(19);
var redefineAll = __webpack_require__(55);
var fails = __webpack_require__(4);
var anInstance = __webpack_require__(48);
var toInteger = __webpack_require__(36);
var toLength = __webpack_require__(11);
var toIndex = __webpack_require__(226);
var gOPN = __webpack_require__(52).f;
var dP = __webpack_require__(10).f;
var arrayFill = __webpack_require__(128);
var setToStringTag = __webpack_require__(64);
var ARRAY_BUFFER = 'ArrayBuffer';
var DATA_VIEW = 'DataView';
var PROTOTYPE = 'prototype';
var WRONG_LENGTH = 'Wrong length!';
var WRONG_INDEX = 'Wrong index!';
var $ArrayBuffer = global[ARRAY_BUFFER];
var $DataView = global[DATA_VIEW];
var Math = global.Math;
var RangeError = global.RangeError;
// eslint-disable-next-line no-shadow-restricted-names
var Infinity = global.Infinity;
var BaseBuffer = $ArrayBuffer;
var abs = Math.abs;
var pow = Math.pow;
var floor = Math.floor;
var log = Math.log;
var LN2 = Math.LN2;
var BUFFER = 'buffer';
var BYTE_LENGTH = 'byteLength';
var BYTE_OFFSET = 'byteOffset';
var $BUFFER = DESCRIPTORS ? '_b' : BUFFER;
var $LENGTH = DESCRIPTORS ? '_l' : BYTE_LENGTH;
var $OFFSET = DESCRIPTORS ? '_o' : BYTE_OFFSET;
 
// IEEE754 conversions based on https://github.com/feross/ieee754
function packIEEE754(value, mLen, nBytes) {
  var buffer = new Array(nBytes);
  var eLen = nBytes * 8 - mLen - 1;
  var eMax = (1 << eLen) - 1;
  var eBias = eMax >> 1;
  var rt = mLen === 23 ? pow(2, -24) - pow(2, -77) : 0;
  var i = 0;
  var s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0;
  var e, m, c;
  value = abs(value);
  // eslint-disable-next-line no-self-compare
  if (value != value || value === Infinity) {
    // eslint-disable-next-line no-self-compare
    m = value != value ? 1 : 0;
    e = eMax;
  } else {
    e = floor(log(value) / LN2);
    if (value * (c = pow(2, -e)) < 1) {
      e--;
      c *= 2;
    }
    if (e + eBias >= 1) {
      value += rt / c;
    } else {
      value += rt * pow(2, 1 - eBias);
    }
    if (value * c >= 2) {
      e++;
      c /= 2;
    }
    if (e + eBias >= eMax) {
      m = 0;
      e = eMax;
    } else if (e + eBias >= 1) {
      m = (value * c - 1) * pow(2, mLen);
      e = e + eBias;
    } else {
      m = value * pow(2, eBias - 1) * pow(2, mLen);
      e = 0;
    }
  }
  for (; mLen >= 8; buffer[i++] = m & 255, m /= 256, mLen -= 8);
  e = e << mLen | m;
  eLen += mLen;
  for (; eLen > 0; buffer[i++] = e & 255, e /= 256, eLen -= 8);
  buffer[--i] |= s * 128;
  return buffer;
}
function unpackIEEE754(buffer, mLen, nBytes) {
  var eLen = nBytes * 8 - mLen - 1;
  var eMax = (1 << eLen) - 1;
  var eBias = eMax >> 1;
  var nBits = eLen - 7;
  var i = nBytes - 1;
  var s = buffer[i--];
  var e = s & 127;
  var m;
  s >>= 7;
  for (; nBits > 0; e = e * 256 + buffer[i], i--, nBits -= 8);
  m = e & (1 << -nBits) - 1;
  e >>= -nBits;
  nBits += mLen;
  for (; nBits > 0; m = m * 256 + buffer[i], i--, nBits -= 8);
  if (e === 0) {
    e = 1 - eBias;
  } else if (e === eMax) {
    return m ? NaN : s ? -Infinity : Infinity;
  } else {
    m = m + pow(2, mLen);
    e = e - eBias;
  } return (s ? -1 : 1) * m * pow(2, e - mLen);
}
 
function unpackI32(bytes) {
  return bytes[3] << 24 | bytes[2] << 16 | bytes[1] << 8 | bytes[0];
}
function packI8(it) {
  return [it & 0xff];
}
function packI16(it) {
  return [it & 0xff, it >> 8 & 0xff];
}
function packI32(it) {
  return [it & 0xff, it >> 8 & 0xff, it >> 16 & 0xff, it >> 24 & 0xff];
}
function packF64(it) {
  return packIEEE754(it, 52, 8);
}
function packF32(it) {
  return packIEEE754(it, 23, 4);
}
 
function addGetter(C, key, internal) {
  dP(C[PROTOTYPE], key, { get: function () { return this[internal]; } });
}
 
function get(view, bytes, index, isLittleEndian) {
  var numIndex = +index;
  var intIndex = toIndex(numIndex);
  if (intIndex + bytes > view[$LENGTH]) throw RangeError(WRONG_INDEX);
  var store = view[$BUFFER]._b;
  var start = intIndex + view[$OFFSET];
  var pack = store.slice(start, start + bytes);
  return isLittleEndian ? pack : pack.reverse();
}
function set(view, bytes, index, conversion, value, isLittleEndian) {
  var numIndex = +index;
  var intIndex = toIndex(numIndex);
  if (intIndex + bytes > view[$LENGTH]) throw RangeError(WRONG_INDEX);
  var store = view[$BUFFER]._b;
  var start = intIndex + view[$OFFSET];
  var pack = conversion(+value);
  for (var i = 0; i < bytes; i++) store[start + i] = pack[isLittleEndian ? i : bytes - i - 1];
}
 
if (!$typed.ABV) {
  $ArrayBuffer = function ArrayBuffer(length) {
    anInstance(this, $ArrayBuffer, ARRAY_BUFFER);
    var byteLength = toIndex(length);
    this._b = arrayFill.call(new Array(byteLength), 0);
    this[$LENGTH] = byteLength;
  };
 
  $DataView = function DataView(buffer, byteOffset, byteLength) {
    anInstance(this, $DataView, DATA_VIEW);
    anInstance(buffer, $ArrayBuffer, DATA_VIEW);
    var bufferLength = buffer[$LENGTH];
    var offset = toInteger(byteOffset);
    if (offset < 0 || offset > bufferLength) throw RangeError('Wrong offset!');
    byteLength = byteLength === undefined ? bufferLength - offset : toLength(byteLength);
    if (offset + byteLength > bufferLength) throw RangeError(WRONG_LENGTH);
    this[$BUFFER] = buffer;
    this[$OFFSET] = offset;
    this[$LENGTH] = byteLength;
  };
 
  if (DESCRIPTORS) {
    addGetter($ArrayBuffer, BYTE_LENGTH, '_l');
    addGetter($DataView, BUFFER, '_b');
    addGetter($DataView, BYTE_LENGTH, '_l');
    addGetter($DataView, BYTE_OFFSET, '_o');
  }
 
  redefineAll($DataView[PROTOTYPE], {
    getInt8: function getInt8(byteOffset) {
      return get(this, 1, byteOffset)[0] << 24 >> 24;
    },
    getUint8: function getUint8(byteOffset) {
      return get(this, 1, byteOffset)[0];
    },
    getInt16: function getInt16(byteOffset /* , littleEndian */) {
      var bytes = get(this, 2, byteOffset, arguments[1]);
      return (bytes[1] << 8 | bytes[0]) << 16 >> 16;
    },
    getUint16: function getUint16(byteOffset /* , littleEndian */) {
      var bytes = get(this, 2, byteOffset, arguments[1]);
      return bytes[1] << 8 | bytes[0];
    },
    getInt32: function getInt32(byteOffset /* , littleEndian */) {
      return unpackI32(get(this, 4, byteOffset, arguments[1]));
    },
    getUint32: function getUint32(byteOffset /* , littleEndian */) {
      return unpackI32(get(this, 4, byteOffset, arguments[1])) >>> 0;
    },
    getFloat32: function getFloat32(byteOffset /* , littleEndian */) {
      return unpackIEEE754(get(this, 4, byteOffset, arguments[1]), 23, 4);
    },
    getFloat64: function getFloat64(byteOffset /* , littleEndian */) {
      return unpackIEEE754(get(this, 8, byteOffset, arguments[1]), 52, 8);
    },
    setInt8: function setInt8(byteOffset, value) {
      set(this, 1, byteOffset, packI8, value);
    },
    setUint8: function setUint8(byteOffset, value) {
      set(this, 1, byteOffset, packI8, value);
    },
    setInt16: function setInt16(byteOffset, value /* , littleEndian */) {
      set(this, 2, byteOffset, packI16, value, arguments[2]);
    },
    setUint16: function setUint16(byteOffset, value /* , littleEndian */) {
      set(this, 2, byteOffset, packI16, value, arguments[2]);
    },
    setInt32: function setInt32(byteOffset, value /* , littleEndian */) {
      set(this, 4, byteOffset, packI32, value, arguments[2]);
    },
    setUint32: function setUint32(byteOffset, value /* , littleEndian */) {
      set(this, 4, byteOffset, packI32, value, arguments[2]);
    },
    setFloat32: function setFloat32(byteOffset, value /* , littleEndian */) {
      set(this, 4, byteOffset, packF32, value, arguments[2]);
    },
    setFloat64: function setFloat64(byteOffset, value /* , littleEndian */) {
      set(this, 8, byteOffset, packF64, value, arguments[2]);
    }
  });
} else {
  if (!fails(function () {
    $ArrayBuffer(1);
  }) || !fails(function () {
    new $ArrayBuffer(-1); // eslint-disable-line no-new
  }) || fails(function () {
    new $ArrayBuffer(); // eslint-disable-line no-new
    new $ArrayBuffer(1.5); // eslint-disable-line no-new
    new $ArrayBuffer(NaN); // eslint-disable-line no-new
    return $ArrayBuffer.name != ARRAY_BUFFER;
  })) {
    $ArrayBuffer = function ArrayBuffer(length) {
      anInstance(this, $ArrayBuffer);
      return new BaseBuffer(toIndex(length));
    };
    var ArrayBufferProto = $ArrayBuffer[PROTOTYPE] = BaseBuffer[PROTOTYPE];
    for (var keys = gOPN(BaseBuffer), j = 0, key; keys.length > j;) {
      if (!((key = keys[j++]) in $ArrayBuffer)) hide($ArrayBuffer, key, BaseBuffer[key]);
    }
    if (!LIBRARY) ArrayBufferProto.constructor = $ArrayBuffer;
  }
  // iOS Safari 7.x bug
  var view = new $DataView(new $ArrayBuffer(2));
  var $setInt8 = $DataView[PROTOTYPE].setInt8;
  view.setInt8(0, 2147483648);
  view.setInt8(1, 2147483649);
  if (view.getInt8(0) || !view.getInt8(1)) redefineAll($DataView[PROTOTYPE], {
    setInt8: function setInt8(byteOffset, value) {
      $setInt8.call(this, byteOffset, value << 24 >> 24);
    },
    setUint8: function setUint8(byteOffset, value) {
      $setInt8.call(this, byteOffset, value << 24 >> 24);
    }
  }, true);
}
setToStringTag($ArrayBuffer, ARRAY_BUFFER);
setToStringTag($DataView, DATA_VIEW);
hide($DataView[PROTOTYPE], $typed.VIEW, true);
exports[ARRAY_BUFFER] = $ArrayBuffer;
exports[DATA_VIEW] = $DataView;
 
 
/***/ }),
/* 151 */
/***/ (function(module, exports, __webpack_require__) {
 
var global = __webpack_require__(3);
var navigator = global.navigator;
 
module.exports = navigator && navigator.userAgent || '';
 
 
/***/ }),
/* 152 */
/***/ (function(module, exports, __webpack_require__) {
 
var global = __webpack_require__(3);
var core = __webpack_require__(33);
var LIBRARY = __webpack_require__(50);
var wksExt = __webpack_require__(227);
var defineProperty = __webpack_require__(10).f;
module.exports = function (name) {
  var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {});
  if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: wksExt.f(name) });
};
 
 
/***/ }),
/* 153 */
/***/ (function(module, exports, __webpack_require__) {
 
var classof = __webpack_require__(71);
var ITERATOR = __webpack_require__(6)('iterator');
var Iterators = __webpack_require__(63);
module.exports = __webpack_require__(33).getIteratorMethod = function (it) {
  if (it != undefined) return it[ITERATOR]
    || it['@@iterator']
    || Iterators[classof(it)];
};
 
 
/***/ }),
/* 154 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var addToUnscopables = __webpack_require__(43);
var step = __webpack_require__(211);
var Iterators = __webpack_require__(63);
var toIObject = __webpack_require__(24);
 
// 22.1.3.4 Array.prototype.entries()
// 22.1.3.13 Array.prototype.keys()
// 22.1.3.29 Array.prototype.values()
// 22.1.3.30 Array.prototype[@@iterator]()
module.exports = __webpack_require__(138)(Array, 'Array', function (iterated, kind) {
  this._t = toIObject(iterated); // target
  this._i = 0;                   // next index
  this._k = kind;                // kind
// 22.1.5.2.1 %ArrayIteratorPrototype%.next()
}, function () {
  var O = this._t;
  var kind = this._k;
  var index = this._i++;
  if (!O || index >= O.length) {
    this._t = undefined;
    return step(1);
  }
  if (kind == 'keys') return step(0, index);
  if (kind == 'values') return step(0, O[index]);
  return step(0, [index, O[index]]);
}, 'values');
 
// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)
Iterators.Arguments = Iterators.Array;
 
addToUnscopables('keys');
addToUnscopables('values');
addToUnscopables('entries');
 
 
/***/ }),
/* 155 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
/* WEBPACK VAR INJECTION */(function(process) {/**
 * Copyright (c) 2014-present, Facebook, Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 *
 */
 
 
 
var emptyFunction = __webpack_require__(74);
 
/**
 * Similar to invariant but only logs a warning if the condition is not met.
 * This can be used to log issues in development environments in critical
 * paths. Removing the logging code for production environments will keep the
 * same logic and follow the same code paths.
 */
 
var warning = emptyFunction;
 
if (process.env.NODE_ENV !== 'production') {
  var printWarning = function printWarning(format) {
    for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
      args[_key - 1] = arguments[_key];
    }
 
    var argIndex = 0;
    var message = 'Warning: ' + format.replace(/%s/g, function () {
      return args[argIndex++];
    });
    if (typeof console !== 'undefined') {
      console.error(message);
    }
    try {
      // --- Welcome to debugging React ---
      // This error was thrown as a convenience so that you can use this stack
      // to find the callsite that caused this warning to fire.
      throw new Error(message);
    } catch (x) {}
  };
 
  warning = function warning(condition, format) {
    if (format === undefined) {
      throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');
    }
 
    if (format.indexOf('Failed Composite propType: ') === 0) {
      return; // Ignore CompositeComponent proptype check.
    }
 
    if (!condition) {
      for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
        args[_key2 - 2] = arguments[_key2];
      }
 
      printWarning.apply(undefined, [format].concat(args));
    }
  };
}
 
module.exports = warning;
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(26)))
 
/***/ }),
/* 156 */
/***/ (function(module, exports) {
 
module.exports = invert;
 
/**
 * Inverts a mat4
 *
 * @param {mat4} out the receiving matrix
 * @param {mat4} a the source matrix
 * @returns {mat4} out
 */
function invert(out, a) {
    var a00 = a[0], a01 = a[1], a02 = a[2], a03 = a[3],
        a10 = a[4], a11 = a[5], a12 = a[6], a13 = a[7],
        a20 = a[8], a21 = a[9], a22 = a[10], a23 = a[11],
        a30 = a[12], a31 = a[13], a32 = a[14], a33 = a[15],
 
        b00 = a00 * a11 - a01 * a10,
        b01 = a00 * a12 - a02 * a10,
        b02 = a00 * a13 - a03 * a10,
        b03 = a01 * a12 - a02 * a11,
        b04 = a01 * a13 - a03 * a11,
        b05 = a02 * a13 - a03 * a12,
        b06 = a20 * a31 - a21 * a30,
        b07 = a20 * a32 - a22 * a30,
        b08 = a20 * a33 - a23 * a30,
        b09 = a21 * a32 - a22 * a31,
        b10 = a21 * a33 - a23 * a31,
        b11 = a22 * a33 - a23 * a32,
 
        // Calculate the determinant
        det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;
 
    if (!det) { 
        return null; 
    }
    det = 1.0 / det;
 
    out[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det;
    out[1] = (a02 * b10 - a01 * b11 - a03 * b09) * det;
    out[2] = (a31 * b05 - a32 * b04 + a33 * b03) * det;
    out[3] = (a22 * b04 - a21 * b05 - a23 * b03) * det;
    out[4] = (a12 * b08 - a10 * b11 - a13 * b07) * det;
    out[5] = (a00 * b11 - a02 * b08 + a03 * b07) * det;
    out[6] = (a32 * b02 - a30 * b05 - a33 * b01) * det;
    out[7] = (a20 * b05 - a22 * b02 + a23 * b01) * det;
    out[8] = (a10 * b10 - a11 * b08 + a13 * b06) * det;
    out[9] = (a01 * b08 - a00 * b10 - a03 * b06) * det;
    out[10] = (a30 * b04 - a31 * b02 + a33 * b00) * det;
    out[11] = (a21 * b02 - a20 * b04 - a23 * b00) * det;
    out[12] = (a11 * b07 - a10 * b09 - a12 * b06) * det;
    out[13] = (a00 * b09 - a01 * b07 + a02 * b06) * det;
    out[14] = (a31 * b01 - a30 * b03 - a32 * b00) * det;
    out[15] = (a20 * b03 - a21 * b01 + a22 * b00) * det;
 
    return out;
};
 
/***/ }),
/* 157 */
/***/ (function(module, exports) {
 
module.exports = rotateX;
 
/**
 * Rotates a matrix by the given angle around the X axis
 *
 * @param {mat4} out the receiving matrix
 * @param {mat4} a the matrix to rotate
 * @param {Number} rad the angle to rotate the matrix by
 * @returns {mat4} out
 */
function rotateX(out, a, rad) {
    var s = Math.sin(rad),
        c = Math.cos(rad),
        a10 = a[4],
        a11 = a[5],
        a12 = a[6],
        a13 = a[7],
        a20 = a[8],
        a21 = a[9],
        a22 = a[10],
        a23 = a[11];
 
    if (a !== out) { // If the source and destination differ, copy the unchanged rows
        out[0]  = a[0];
        out[1]  = a[1];
        out[2]  = a[2];
        out[3]  = a[3];
        out[12] = a[12];
        out[13] = a[13];
        out[14] = a[14];
        out[15] = a[15];
    }
 
    // Perform axis-specific matrix multiplication
    out[4] = a10 * c + a20 * s;
    out[5] = a11 * c + a21 * s;
    out[6] = a12 * c + a22 * s;
    out[7] = a13 * c + a23 * s;
    out[8] = a20 * c - a10 * s;
    out[9] = a21 * c - a11 * s;
    out[10] = a22 * c - a12 * s;
    out[11] = a23 * c - a13 * s;
    return out;
};
 
/***/ }),
/* 158 */
/***/ (function(module, exports) {
 
module.exports = rotateZ;
 
/**
 * Rotates a matrix by the given angle around the Z axis
 *
 * @param {mat4} out the receiving matrix
 * @param {mat4} a the matrix to rotate
 * @param {Number} rad the angle to rotate the matrix by
 * @returns {mat4} out
 */
function rotateZ(out, a, rad) {
    var s = Math.sin(rad),
        c = Math.cos(rad),
        a00 = a[0],
        a01 = a[1],
        a02 = a[2],
        a03 = a[3],
        a10 = a[4],
        a11 = a[5],
        a12 = a[6],
        a13 = a[7];
 
    if (a !== out) { // If the source and destination differ, copy the unchanged last row
        out[8]  = a[8];
        out[9]  = a[9];
        out[10] = a[10];
        out[11] = a[11];
        out[12] = a[12];
        out[13] = a[13];
        out[14] = a[14];
        out[15] = a[15];
    }
 
    // Perform axis-specific matrix multiplication
    out[0] = a00 * c + a10 * s;
    out[1] = a01 * c + a11 * s;
    out[2] = a02 * c + a12 * s;
    out[3] = a03 * c + a13 * s;
    out[4] = a10 * c - a00 * s;
    out[5] = a11 * c - a01 * s;
    out[6] = a12 * c - a02 * s;
    out[7] = a13 * c - a03 * s;
    return out;
};
 
/***/ }),
/* 159 */
/***/ (function(module, exports) {
 
module.exports = add
 
/**
 * Adds two vec2's
 *
 * @param {vec2} out the receiving vector
 * @param {vec2} a the first operand
 * @param {vec2} b the second operand
 * @returns {vec2} out
 */
function add(out, a, b) {
    out[0] = a[0] + b[0]
    out[1] = a[1] + b[1]
    return out
}
 
/***/ }),
/* 160 */
/***/ (function(module, exports) {
 
module.exports = negate
 
/**
 * Negates the components of a vec2
 *
 * @param {vec2} out the receiving vector
 * @param {vec2} a vector to negate
 * @returns {vec2} out
 */
function negate(out, a) {
    out[0] = -a[0]
    out[1] = -a[1]
    return out
}
 
/***/ }),
/* 161 */
/***/ (function(module, exports) {
 
module.exports = scale
 
/**
 * Scales a vec4 by a scalar number
 *
 * @param {vec4} out the receiving vector
 * @param {vec4} a the vector to scale
 * @param {Number} b amount to scale the vector by
 * @returns {vec4} out
 */
function scale (out, a, b) {
  out[0] = a[0] * b
  out[1] = a[1] * b
  out[2] = a[2] * b
  out[3] = a[3] * b
  return out
}
 
 
/***/ }),
/* 162 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = registerShaderModules;
/* harmony export (immutable) */ __webpack_exports__["b"] = setDefaultShaderModules;
/* harmony export (immutable) */ __webpack_exports__["c"] = getShaderModule;
/* harmony export (immutable) */ __webpack_exports__["d"] = resolveModules;
/* unused harmony export getShaderDependencies */
/* unused harmony export getDependencyGraph */
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_assert__ = __webpack_require__(1);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_assert___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_assert__);
 
 
var shaderModules = {};
var defaultShaderModules = [];
 
/**
 * Registers an array of shader modules
 * @param {Object[]} shaderModuleList - Array of shader modules
 */
function registerShaderModules(shaderModuleList) {
  var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
      _ref$ignoreMultipleRe = _ref.ignoreMultipleRegistrations,
      ignoreMultipleRegistrations = _ref$ignoreMultipleRe === undefined ? false : _ref$ignoreMultipleRe;
 
  var _iteratorNormalCompletion = true;
  var _didIteratorError = false;
  var _iteratorError = undefined;
 
  try {
    for (var _iterator = shaderModuleList[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
      var shaderModule = _step.value;
 
      registerShaderModule(shaderModule, { ignoreMultipleRegistrations: ignoreMultipleRegistrations });
    }
  } catch (err) {
    _didIteratorError = true;
    _iteratorError = err;
  } finally {
    try {
      if (!_iteratorNormalCompletion && _iterator.return) {
        _iterator.return();
      }
    } finally {
      if (_didIteratorError) {
        throw _iteratorError;
      }
    }
  }
}
 
/**
 * Registers an array of default shader modules. These will be concatenated
 * automatically at the end of any shader module list passed to
 * `assembleShaders` (plus `resolveModules` and `getShaderDependencies`)
 * @param {Object[]} modules - Array of shader modules
 */
function setDefaultShaderModules(modules) {
  defaultShaderModules = modules;
}
 
// Looks up a moduleName among registered modules and returns definition.
// If "inline" module, returns it directly
function getShaderModule(moduleOrName) {
  // Check if "inline" module
  if (typeof moduleOrName !== 'string') {
    var _shaderModule = moduleOrName;
    __WEBPACK_IMPORTED_MODULE_0_assert___default()(typeof _shaderModule.name === 'string');
    registerShaderModule(_shaderModule, { ignoreMultipleRegistrations: true });
    return _shaderModule;
  }
 
  // Look up module
  var shaderModule = shaderModules[moduleOrName];
  if (!shaderModule) {
    // console.log(`${moduleOrName} not in registered modules:`, shaderModules);
    __WEBPACK_IMPORTED_MODULE_0_assert___default()(false, 'Unknown shader module ' + moduleOrName);
  }
  return shaderModule;
}
 
// registers any supplied modules and returns a list of module names
function resolveModules(modules) {
  var moduleNames = modules.map(function (module) {
    if (typeof module !== 'string') {
      registerShaderModules([module], { ignoreMultipleRegistrations: true });
      return module.name;
    }
    return module;
  });
 
  return getShaderDependencies(moduleNames);
}
 
/**
 * Takes a list of shader module names and returns a new list of
 * shader module names that includes all dependencies, sorted so
 * that modules that are dependencies of other modules come first.
 *
 * If the shader glsl code from the returned modules is concatenated
 * in the reverse order, it is guaranteed that all functions be resolved and
 * that all function and variable definitions come before use.
 *
 * @param {String[]} modules - Array of modules (inline modules or module names)
 * @return {String[]} - Array of modules
 */
function getShaderDependencies(modules) {
  modules = modules.concat(defaultShaderModules);
 
  var result = {};
  getDependencyGraph({
    modules: modules,
    level: 0,
    result: result
  });
 
  // Return a reverse sort so that dependencies come before the modules that use them
  return Object.keys(result).sort(function (a, b) {
    return result[b] - result[a];
  });
}
 
/**
 * Recursively checks module dpendencies to calculate dependency
 * level of each module.
 *
 * @param {String[]} modules - Array of modules
 * @param {Number} level - Current level
 * @return {result} - Map of module name to its level
 */
// Adds another level of dependencies to the result map
function getDependencyGraph(_ref2) {
  var modules = _ref2.modules,
      level = _ref2.level,
      result = _ref2.result;
 
  if (level >= 5) {
    throw new Error('Possible loop in shader dependency graph');
  }
 
  // Update level on all current modules
  var _iteratorNormalCompletion2 = true;
  var _didIteratorError2 = false;
  var _iteratorError2 = undefined;
 
  try {
    for (var _iterator2 = modules[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
      var moduleOrName = _step2.value;
 
      var shaderModule = getShaderModule(moduleOrName);
      if (result[shaderModule.name] === undefined || result[shaderModule.name] < level) {
        result[shaderModule.name] = level;
      }
    }
 
    // Recurse
  } catch (err) {
    _didIteratorError2 = true;
    _iteratorError2 = err;
  } finally {
    try {
      if (!_iteratorNormalCompletion2 && _iterator2.return) {
        _iterator2.return();
      }
    } finally {
      if (_didIteratorError2) {
        throw _iteratorError2;
      }
    }
  }
 
  var _iteratorNormalCompletion3 = true;
  var _didIteratorError3 = false;
  var _iteratorError3 = undefined;
 
  try {
    for (var _iterator3 = modules[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {
      var _moduleOrName = _step3.value;
 
      var _shaderModule2 = getShaderModule(_moduleOrName);
 
      if (_shaderModule2.dependencies) {
        getDependencyGraph({
          modules: _shaderModule2.dependencies,
          level: level + 1,
          result: result
        });
      }
    }
  } catch (err) {
    _didIteratorError3 = true;
    _iteratorError3 = err;
  } finally {
    try {
      if (!_iteratorNormalCompletion3 && _iterator3.return) {
        _iterator3.return();
      }
    } finally {
      if (_didIteratorError3) {
        throw _iteratorError3;
      }
    }
  }
 
  return result;
}
 
// PRIVATE API
 
function parseDeprecationDefinitions() {
  var deprecations = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
 
  deprecations.forEach(function (def) {
    switch (def.type) {
      case 'function':
        def.regex = new RegExp('\\b' + def.old + '\\(');
        break;
      default:
        def.regex = new RegExp(def.type + ' ' + def.old + ';');
    }
  });
 
  return deprecations;
}
 
function registerShaderModule(shaderModule, _ref3) {
  var _ref3$ignoreMultipleR = _ref3.ignoreMultipleRegistrations,
      ignoreMultipleRegistrations = _ref3$ignoreMultipleR === undefined ? false : _ref3$ignoreMultipleR;
 
  __WEBPACK_IMPORTED_MODULE_0_assert___default()(shaderModule.name, 'shader module has no name');
  if (!ignoreMultipleRegistrations && shaderModules[shaderModule.name]) {
    // TODO - instead verify that definition is not changing...
    throw new Error('shader module ' + shaderModule.name + ' already registered');
  }
  shaderModules[shaderModule.name] = shaderModule;
  shaderModule.dependencies = shaderModule.dependencies || [];
  shaderModule.deprecations = parseDeprecationDefinitions(shaderModule.deprecations);
}
//# sourceMappingURL=shader-modules.js.map
 
/***/ }),
/* 163 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["b"] = getGLTypeFromTypedArray;
/* harmony export (immutable) */ __webpack_exports__["a"] = getTypedArrayFromGLType;
/* harmony export (immutable) */ __webpack_exports__["c"] = flipRows;
/* harmony export (immutable) */ __webpack_exports__["d"] = scalePixels;
// GL Constants
var GL_BYTE = 0x1400;
var GL_UNSIGNED_BYTE = 0x1401;
var GL_SHORT = 0x1402;
var GL_UNSIGNED_SHORT = 0x1403;
var GL_INT = 0x1404;
var GL_UNSIGNED_INT = 0x1405;
var GL_FLOAT = 0x1406;
var GL_UNSIGNED_SHORT_4_4_4_4 = 0x8033;
var GL_UNSIGNED_SHORT_5_5_5_1 = 0x8034;
var GL_UNSIGNED_SHORT_5_6_5 = 0x8363;
 
var ERR_TYPE_DEDUCTION = 'Failed to deduce GL constant from typed array';
 
// Converts TYPED ARRAYS to corresponding GL constant
// Used to auto deduce gl parameter types
function getGLTypeFromTypedArray(arrayOrType) {
  // If typed array, look up constructor
  var type = ArrayBuffer.isView(arrayOrType) ? arrayOrType.constructor : arrayOrType;
  switch (type) {
    case Float32Array:
      return GL_FLOAT;
    case Uint16Array:
      return GL_UNSIGNED_SHORT;
    case Uint32Array:
      return GL_UNSIGNED_INT;
    case Uint8Array:
      return GL_UNSIGNED_BYTE;
    case Uint8ClampedArray:
      return GL_UNSIGNED_BYTE;
    case Int8Array:
      return GL_BYTE;
    case Int16Array:
      return GL_SHORT;
    case Int32Array:
      return GL_INT;
    default:
      throw new Error(ERR_TYPE_DEDUCTION);
  }
}
 
// Converts GL constant to corresponding TYPED ARRAY
// Used to auto deduce gl parameter types
 
/* eslint-disable complexity */
function getTypedArrayFromGLType(glType) {
  var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
      _ref$clamped = _ref.clamped,
      clamped = _ref$clamped === undefined ? true : _ref$clamped;
 
  // Sorted in some order of likelihood to reduce amount of comparisons
  switch (glType) {
    case GL_FLOAT:
      return Float32Array;
    case GL_UNSIGNED_SHORT:
    case GL_UNSIGNED_SHORT_5_6_5:
    case GL_UNSIGNED_SHORT_4_4_4_4:
    case GL_UNSIGNED_SHORT_5_5_5_1:
      return Uint16Array;
    case GL_UNSIGNED_INT:
      return Uint32Array;
    case GL_UNSIGNED_BYTE:
      return clamped ? Uint8ClampedArray : Uint8Array;
    case GL_BYTE:
      return Int8Array;
    case GL_SHORT:
      return Int16Array;
    case GL_INT:
      return Int32Array;
    default:
      throw new Error('Failed to deduce typed array type from GL constant');
  }
}
/* eslint-enable complexity */
 
// Flip rows (can be used on arrays returned from `Framebuffer.readPixels`)
// https://stackoverflow.com/questions/41969562/
// how-can-i-flip-the-result-of-webglrenderingcontext-readpixels
function flipRows(_ref2) {
  var data = _ref2.data,
      width = _ref2.width,
      height = _ref2.height,
      _ref2$bytesPerPixel = _ref2.bytesPerPixel,
      bytesPerPixel = _ref2$bytesPerPixel === undefined ? 4 : _ref2$bytesPerPixel,
      temp = _ref2.temp;
 
  var bytesPerRow = width * bytesPerPixel;
 
  // make a temp buffer to hold one row
  temp = temp || new Uint8Array(bytesPerRow);
  for (var y = 0; y < height / 2; ++y) {
    var topOffset = y * bytesPerRow;
    var bottomOffset = (height - y - 1) * bytesPerRow;
    // make copy of a row on the top half
    temp.set(data.subarray(topOffset, topOffset + bytesPerRow));
    // copy a row from the bottom half to the top
    data.copyWithin(topOffset, bottomOffset, bottomOffset + bytesPerRow);
    // copy the copy of the top half row to the bottom half
    data.set(temp, bottomOffset);
  }
}
 
function scalePixels(_ref3) {
  var data = _ref3.data,
      width = _ref3.width,
      height = _ref3.height;
 
  var newWidth = Math.round(width / 2);
  var newHeight = Math.round(height / 2);
  var newData = new Uint8Array(newWidth * newHeight * 4);
  for (var y = 0; y < newHeight; y++) {
    for (var x = 0; x < newWidth; x++) {
      for (var c = 0; c < 4; c++) {
        newData[(y * newWidth + x) * 4 + c] = data[(y * 2 * width + x * 2) * 4 + c];
      }
    }
  }
  return { data: newData, width: newWidth, height: newHeight };
}
//# sourceMappingURL=typed-array-utils.js.map
 
/***/ }),
/* 164 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* unused harmony export clone */
/* unused harmony export deepEqual */
/* unused harmony export GL_STATE_SETTERS */
/* harmony export (immutable) */ __webpack_exports__["a"] = trackContextState;
/* harmony export (immutable) */ __webpack_exports__["b"] = pushContextState;
/* harmony export (immutable) */ __webpack_exports__["c"] = popContextState;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__constants__ = __webpack_require__(46);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__set_parameters__ = __webpack_require__(266);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__polyfill_context__ = __webpack_require__(265);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_assert__ = __webpack_require__(1);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_assert___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_assert__);
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
 
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
 
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
 
// Support for listening to context state changes and intercepting state queries
//
// NOTE: this system does not handle buffer bindings
 
 
 
 
 
var clone = function clone(x) {
  return Array.isArray(x) || ArrayBuffer.isView(x) ? x.slice() : x;
};
 
var deepEqual = function deepEqual(x, y) {
  var isArrayX = Array.isArray(x) || ArrayBuffer.isView(x);
  var isArrayY = Array.isArray(y) || ArrayBuffer.isView(y);
  if (isArrayX && isArrayY && x.length === y.length) {
    for (var i = 0; i < x.length; ++i) {
      if (x[i] !== y[i]) {
        return false;
      }
    }
    return true;
  }
  return x === y;
};
 
// interceptors for WEBGL FUNCTIONS that set WebGLRenderingContext state
// These "setters" map functions to gl parameters
 
var GL_STATE_SETTERS = {
 
  // GENERIC SETTERS
 
  enable: function enable(update, cap) {
    return update(_defineProperty({}, cap, true));
  },
  disable: function disable(update, cap) {
    return update(_defineProperty({}, cap, false));
  },
  pixelStorei: function pixelStorei(update, pname, param) {
    return update(_defineProperty({}, pname, param));
  },
  hint: function hint(update, pname, _hint) {
    return update(_defineProperty({}, pname, _hint));
  },
 
  // SPECIFIC SETTERS
 
  bindFramebuffer: function bindFramebuffer(update, target, fb) {
    var _update5;
 
    switch (target) {
      case __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].FRAMEBUFFER:
        return update((_update5 = {}, _defineProperty(_update5, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].DRAW_FRAMEBUFFER_BINDING, fb), _defineProperty(_update5, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].READ_FRAMEBUFFER_BINDING, fb), _update5));
      case __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].DRAW_FRAMEBUFFER:
        return update(_defineProperty({}, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].DRAW_FRAMEBUFFER_BINDING, fb));
      case __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].READ_FRAMEBUFFER:
        return update(_defineProperty({}, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].READ_FRAMEBUFFER_BINDING, fb));
      default:
        return null;
    }
  },
  blendColor: function blendColor(update, r, g, b, a) {
    return update(_defineProperty({}, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].BLEND_COLOR, new Float32Array([r, g, b, a])));
  },
 
  blendEquation: function blendEquation(update, mode) {
    var _update9;
 
    return update((_update9 = {}, _defineProperty(_update9, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].BLEND_EQUATION_RGB, mode), _defineProperty(_update9, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].BLEND_EQUATION_ALPHA, mode), _update9));
  },
 
  blendEquationSeparate: function blendEquationSeparate(update, modeRGB, modeAlpha) {
    var _update10;
 
    return update((_update10 = {}, _defineProperty(_update10, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].BLEND_EQUATION_RGB, modeRGB), _defineProperty(_update10, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].BLEND_EQUATION_ALPHA, modeAlpha), _update10));
  },
 
  blendFunc: function blendFunc(update, src, dst) {
    var _update11;
 
    return update((_update11 = {}, _defineProperty(_update11, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].BLEND_SRC_RGB, src), _defineProperty(_update11, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].BLEND_DST_RGB, dst), _defineProperty(_update11, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].BLEND_SRC_ALPHA, src), _defineProperty(_update11, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].BLEND_DST_ALPHA, dst), _update11));
  },
 
  blendFuncSeparate: function blendFuncSeparate(update, srcRGB, dstRGB, srcAlpha, dstAlpha) {
    var _update12;
 
    return update((_update12 = {}, _defineProperty(_update12, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].BLEND_SRC_RGB, srcRGB), _defineProperty(_update12, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].BLEND_DST_RGB, dstRGB), _defineProperty(_update12, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].BLEND_SRC_ALPHA, srcAlpha), _defineProperty(_update12, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].BLEND_DST_ALPHA, dstAlpha), _update12));
  },
 
  clearColor: function clearColor(update, r, g, b, a) {
    return update(_defineProperty({}, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].COLOR_CLEAR_VALUE, new Float32Array([r, g, b, a])));
  },
 
  clearDepth: function clearDepth(update, depth) {
    return update(_defineProperty({}, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].DEPTH_CLEAR_VALUE, depth));
  },
 
  clearStencil: function clearStencil(update, s) {
    return update(_defineProperty({}, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].STENCIL_CLEAR_VALUE, s));
  },
 
  colorMask: function colorMask(update, r, g, b, a) {
    return update(_defineProperty({}, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].COLOR_WRITEMASK, [r, g, b, a]));
  },
 
  cullFace: function cullFace(update, mode) {
    return update(_defineProperty({}, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].CULL_FACE_MODE, mode));
  },
 
  depthFunc: function depthFunc(update, func) {
    return update(_defineProperty({}, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].DEPTH_FUNC, func));
  },
 
  depthRange: function depthRange(update, zNear, zFar) {
    return update(_defineProperty({}, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].DEPTH_RANGE, new Float32Array([zNear, zFar])));
  },
 
  depthMask: function depthMask(update, mask) {
    return update(_defineProperty({}, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].DEPTH_WRITEMASK, mask));
  },
 
  frontFace: function frontFace(update, face) {
    return update(_defineProperty({}, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].FRONT_FACE, face));
  },
 
  lineWidth: function lineWidth(update, width) {
    return update(_defineProperty({}, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].LINE_WIDTH, width));
  },
 
  polygonOffset: function polygonOffset(update, factor, units) {
    var _update23;
 
    return update((_update23 = {}, _defineProperty(_update23, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].POLYGON_OFFSET_FACTOR, factor), _defineProperty(_update23, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].POLYGON_OFFSET_UNITS, units), _update23));
  },
 
  sampleCoverage: function sampleCoverage(update, value, invert) {
    var _update24;
 
    return update((_update24 = {}, _defineProperty(_update24, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].SAMPLE_COVERAGE_VALUE, value), _defineProperty(_update24, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].SAMPLE_COVERAGE_INVERT, invert), _update24));
  },
 
  scissor: function scissor(update, x, y, width, height) {
    return update(_defineProperty({}, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].SCISSOR_BOX, new Int32Array([x, y, width, height])));
  },
 
  stencilMask: function stencilMask(update, mask) {
    var _update26;
 
    return update((_update26 = {}, _defineProperty(_update26, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].STENCIL_WRITEMASK, mask), _defineProperty(_update26, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].STENCIL_BACK_WRITEMASK, mask), _update26));
  },
 
  stencilMaskSeparate: function stencilMaskSeparate(update, face, mask) {
    return update(_defineProperty({}, face === __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].FRONT ? __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].STENCIL_WRITEMASK : __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].STENCIL_BACK_WRITEMASK, mask));
  },
 
  stencilFunc: function stencilFunc(update, func, ref, mask) {
    var _update28;
 
    return update((_update28 = {}, _defineProperty(_update28, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].STENCIL_FUNC, func), _defineProperty(_update28, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].STENCIL_REF, ref), _defineProperty(_update28, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].STENCIL_VALUE_MASK, mask), _defineProperty(_update28, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].STENCIL_BACK_FUNC, func), _defineProperty(_update28, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].STENCIL_BACK_REF, ref), _defineProperty(_update28, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].STENCIL_BACK_VALUE_MASK, mask), _update28));
  },
 
  stencilFuncSeparate: function stencilFuncSeparate(update, face, func, ref, mask) {
    var _update29;
 
    return update((_update29 = {}, _defineProperty(_update29, face === __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].FRONT ? __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].STENCIL_FUNC : __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].STENCIL_BACK_FUNC, func), _defineProperty(_update29, face === __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].FRONT ? __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].STENCIL_REF : __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].STENCIL_BACK_REF, ref), _defineProperty(_update29, face === __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].FRONT ? __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].STENCIL_VALUE_MASK : __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].STENCIL_BACK_VALUE_MASK, mask), _update29));
  },
 
  stencilOp: function stencilOp(update, fail, zfail, zpass) {
    var _update30;
 
    return update((_update30 = {}, _defineProperty(_update30, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].STENCIL_FAIL, fail), _defineProperty(_update30, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].STENCIL_PASS_DEPTH_FAIL, zfail), _defineProperty(_update30, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].STENCIL_PASS_DEPTH_PASS, zpass), _defineProperty(_update30, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].STENCIL_BACK_FAIL, fail), _defineProperty(_update30, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].STENCIL_BACK_PASS_DEPTH_FAIL, zfail), _defineProperty(_update30, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].STENCIL_BACK_PASS_DEPTH_PASS, zpass), _update30));
  },
 
  stencilOpSeparate: function stencilOpSeparate(update, face, fail, zfail, zpass) {
    var _update31;
 
    return update((_update31 = {}, _defineProperty(_update31, face === __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].FRONT ? __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].STENCIL_FAIL : __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].STENCIL_BACK_FAIL, fail), _defineProperty(_update31, face === __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].FRONT ? __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].STENCIL_PASS_DEPTH_FAIL : __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].STENCIL_BACK_PASS_DEPTH_FAIL, zfail), _defineProperty(_update31, face === __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].FRONT ? __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].STENCIL_PASS_DEPTH_PASS : __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].STENCIL_BACK_PASS_DEPTH_PASS, zpass), _update31));
  },
 
  viewport: function viewport(update, x, y, width, height) {
    return update(_defineProperty({}, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].VIEWPORT, new Int32Array([x, y, width, height])));
  }
};
 
// HELPER FUNCTIONS - INSTALL GET/SET INTERCEPTORS (SPYS) ON THE CONTEXT
 
// Overrides a WebGLRenderingContext state "getter" function
// to return values directly from cache
 
function installGetterOverride(gl, functionName) {
  // Get the original function from the WebGLRenderingContext
  var originalGetterFunc = gl[functionName].bind(gl);
 
  // Wrap it with a spy so that we can update our state cache when it gets called
  gl[functionName] = function () {
    var pname = arguments.length <= 0 ? undefined : arguments[0];
 
    // WebGL limits are not prepopulated in the cache, we must
    // query first time. They are all primitive (single value)
    if (!(pname in gl.state.cache)) {
      gl.state.cache[pname] = originalGetterFunc.apply(undefined, arguments);
    }
 
    // Optionally call the original function to do a "hard" query from the WebGLRenderingContext
    return gl.state.enable ?
    // Call the getter the params so that it can e.g. serve from a cache
    gl.state.cache[pname] :
    // Optionally call the original function to do a "hard" query from the WebGLRenderingContext
    originalGetterFunc.apply(undefined, arguments);
  };
 
  // Set the name of this anonymous function to help in debugging and profiling
  Object.defineProperty(gl[functionName], 'name', { value: functionName + '-from-cache', configurable: false });
}
 
// Overrides a WebGLRenderingContext state "setter" function
// to call a setter spy before the actual setter. Allows us to keep a cache
// updated with a copy of the WebGL context state.
function installSetterSpy(gl, functionName, setter) {
  // Get the original function from the WebGLRenderingContext
  var originalSetterFunc = gl[functionName].bind(gl);
 
  // Wrap it with a spy so that we can update our state cache when it gets called
  gl[functionName] = function () {
    for (var _len = arguments.length, params = Array(_len), _key = 0; _key < _len; _key++) {
      params[_key] = arguments[_key];
    }
 
    // Update the value
    // Call the setter with the state cache and the params so that it can store the parameters
    var _setter = setter.apply(undefined, [gl.state._updateCache].concat(params)),
        valueChanged = _setter.valueChanged,
        oldValue = _setter.oldValue;
 
    // Call the original WebGLRenderingContext func to make sure the context actually gets updated
 
 
    if (valueChanged) {
      var _gl$state;
 
      (_gl$state = gl.state).log.apply(_gl$state, ['gl.' + functionName].concat(params)); // eslint-disable-line
      originalSetterFunc.apply(undefined, params);
    }
 
    // Note: if the original function fails to set the value, our state cache will be bad
    // No solution for this at the moment, but assuming that this is unlikely to be a real problem
    // We could call the setter after the originalSetterFunc. Concern is that this would
    // cause different behavior in debug mode, where originalSetterFunc can throw exceptions
 
    return oldValue;
  };
 
  // Set the name of this anonymous function to help in debugging and profiling
  Object.defineProperty(gl[functionName], 'name', { value: functionName + '-to-cache', configurable: false });
}
 
// HELPER CLASS - GLState
 
/* eslint-disable no-shadow */
 
var GLState = /*#__PURE__*/function () {
  function GLState(gl) {
    var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
        _ref$copyState = _ref.copyState,
        copyState = _ref$copyState === undefined ? false : _ref$copyState,
        _ref$log = _ref.log,
        log = _ref$log === undefined ? function () {} : _ref$log;
 
    _classCallCheck(this, GLState);
 
    this.gl = gl;
    this.stateStack = [];
    this.enable = true;
    this.cache = copyState ? __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__set_parameters__["a" /* getParameters */])(gl) : Object.assign({}, __WEBPACK_IMPORTED_MODULE_1__set_parameters__["b" /* GL_PARAMETER_DEFAULTS */]);
    this.log = log;
 
    this._updateCache = this._updateCache.bind(this);
    Object.seal(this);
  }
 
  _createClass(GLState, [{
    key: 'push',
    value: function push() {
      var values = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
 
      this.stateStack.push({});
    }
  }, {
    key: 'pop',
    value: function pop() {
      __WEBPACK_IMPORTED_MODULE_3_assert___default()(this.stateStack.length > 0);
      // Use the saved values in the state stack to restore parameters
      var oldValues = this.stateStack[this.stateStack.length - 1];
      __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__set_parameters__["c" /* setParameters */])(this.gl, oldValues, this.cache);
      // Don't pop until we have reset parameters (to make sure other "stack frames" are not affected)
      this.stateStack.pop();
    }
 
    // interceptor for context set functions - update our cache and our stack
    // values (Object) - the key values for this setter
 
  }, {
    key: '_updateCache',
    value: function _updateCache(values) {
      var valueChanged = false;
      var oldValue = void 0; // = undefined
 
      var oldValues = this.stateStack.length > 0 && this.stateStack[this.stateStack.length - 1];
 
      for (var key in values) {
        __WEBPACK_IMPORTED_MODULE_3_assert___default()(key !== undefined);
        // Check that value hasn't already been shadowed
        if (!deepEqual(values[key], this.cache[key])) {
          valueChanged = true;
          oldValue = this.cache[key];
 
          // First, save current value being shadowed
          // If a state stack frame is active, save the current parameter values for pop
          // but first check that value hasn't already been shadowed and saved
          if (oldValues && !(key in oldValues)) {
            oldValues[key] = this.cache[key];
          }
 
          // Save current value being shadowed
          this.cache[key] = values[key];
        }
      }
 
      return { valueChanged: valueChanged, oldValue: oldValue };
    }
  }]);
 
  return GLState;
}();
 
// PUBLIC API
 
/**
 * Initialize WebGL state caching on a context
 * can be called multiple times to enable/disable
 * @param {WebGLRenderingContext} - context
 */
// After calling this function, context state will be cached
// gl.state.push() and gl.state.pop() will be available for saving,
// temporarily modifying, and then restoring state.
 
 
function trackContextState(gl) {
  var _ref2 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
      _ref2$enable = _ref2.enable,
      enable = _ref2$enable === undefined ? true : _ref2$enable,
      copyState = _ref2.copyState;
 
  __WEBPACK_IMPORTED_MODULE_3_assert___default()(copyState !== undefined);
  if (!gl.state) {
    __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__polyfill_context__["a" /* default */])(gl);
 
    // Create a state cache
    gl.state = new GLState(gl, { copyState: copyState, enable: enable });
 
    // intercept all setter functions in the table
    for (var key in GL_STATE_SETTERS) {
      var setter = GL_STATE_SETTERS[key];
      installSetterSpy(gl, key, setter);
    }
 
    // intercept all getter functions in the table
    installGetterOverride(gl, 'getParameter');
    installGetterOverride(gl, 'isEnabled');
  }
 
  gl.state.enable = enable;
 
  return gl;
}
 
function pushContextState(gl) {
  __WEBPACK_IMPORTED_MODULE_3_assert___default()(gl.state);
  gl.state.push();
}
 
function popContextState(gl) {
  __WEBPACK_IMPORTED_MODULE_3_assert___default()(gl.state);
  gl.state.pop();
}
//# sourceMappingURL=track-context-state.js.map
 
/***/ }),
/* 165 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["c"] = getContextLimits;
/* harmony export (immutable) */ __webpack_exports__["b"] = getGLContextInfo;
/* unused harmony export getGLContextInfo2 */
/* harmony export (immutable) */ __webpack_exports__["a"] = getContextInfo;
/* harmony export (immutable) */ __webpack_exports__["d"] = glGetDebugInfo;
/* unused harmony export TEST_EXPORTS */
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__gl_constants__ = __webpack_require__(25);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__context__ = __webpack_require__(7);
var _WEBGL_LIMITS;
 
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
 
/* eslint-disable no-inline-comments, max-len */
 
 
 
var WEBGL_LIMITS = (_WEBGL_LIMITS = {}, _defineProperty(_WEBGL_LIMITS, __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].ALIASED_LINE_WIDTH_RANGE, { gl1: new Float32Array([1, 1]) }), _defineProperty(_WEBGL_LIMITS, __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].ALIASED_POINT_SIZE_RANGE, { gl1: new Float32Array([1, 1]) }), _defineProperty(_WEBGL_LIMITS, __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].MAX_TEXTURE_SIZE, { gl1: 64, gl2: 2048 }), _defineProperty(_WEBGL_LIMITS, __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].MAX_CUBE_MAP_TEXTURE_SIZE, { gl1: 16 }), _defineProperty(_WEBGL_LIMITS, __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].MAX_TEXTURE_IMAGE_UNITS, { gl1: 8 }), _defineProperty(_WEBGL_LIMITS, __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].MAX_COMBINED_TEXTURE_IMAGE_UNITS, { gl1: 8 }), _defineProperty(_WEBGL_LIMITS, __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].MAX_VERTEX_TEXTURE_IMAGE_UNITS, { gl1: 0 }), _defineProperty(_WEBGL_LIMITS, __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].MAX_RENDERBUFFER_SIZE, { gl1: 1 }), _defineProperty(_WEBGL_LIMITS, __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].MAX_VARYING_VECTORS, { gl1: 8 }), _defineProperty(_WEBGL_LIMITS, __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].MAX_VERTEX_ATTRIBS, { gl1: 8 }), _defineProperty(_WEBGL_LIMITS, __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].MAX_VERTEX_UNIFORM_VECTORS, { gl1: 128 }), _defineProperty(_WEBGL_LIMITS, __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].MAX_FRAGMENT_UNIFORM_VECTORS, { gl1: 16 }), _defineProperty(_WEBGL_LIMITS, __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].MAX_VIEWPORT_DIMS, { gl1: new Int32Array([0, 0]) }), _defineProperty(_WEBGL_LIMITS, __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].MAX_3D_TEXTURE_SIZE, { gl1: 0, gl2: 256 }), _defineProperty(_WEBGL_LIMITS, __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].MAX_ARRAY_TEXTURE_LAYERS, { gl1: 0, gl2: 256 }), _defineProperty(_WEBGL_LIMITS, __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].MAX_CLIENT_WAIT_TIMEOUT_WEBGL, { gl1: 0, gl2: 0 }), _defineProperty(_WEBGL_LIMITS, __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].MAX_COLOR_ATTACHMENTS, { gl1: 0, gl2: 4 }), _defineProperty(_WEBGL_LIMITS, __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS, { gl1: 0, gl2: 0 }), _defineProperty(_WEBGL_LIMITS, __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].MAX_COMBINED_UNIFORM_BLOCKS, { gl1: 0, gl2: 0 }), _defineProperty(_WEBGL_LIMITS, __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS, { gl1: 0, gl2: 0 }), _defineProperty(_WEBGL_LIMITS, __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].MAX_DRAW_BUFFERS, { gl1: 0, gl2: 4 }), _defineProperty(_WEBGL_LIMITS, __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].MAX_ELEMENT_INDEX, { gl1: 0, gl2: 0 }), _defineProperty(_WEBGL_LIMITS, __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].MAX_ELEMENTS_INDICES, { gl1: 0, gl2: 0 }), _defineProperty(_WEBGL_LIMITS, __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].MAX_ELEMENTS_VERTICES, { gl1: 0, gl2: 0 }), _defineProperty(_WEBGL_LIMITS, __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].MAX_FRAGMENT_INPUT_COMPONENTS, { gl1: 0, gl2: 0 }), _defineProperty(_WEBGL_LIMITS, __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].MAX_FRAGMENT_UNIFORM_BLOCKS, { gl1: 0, gl2: 0 }), _defineProperty(_WEBGL_LIMITS, __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].MAX_FRAGMENT_UNIFORM_COMPONENTS, { gl1: 0, gl2: 0 }), _defineProperty(_WEBGL_LIMITS, __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].MAX_SAMPLES, { gl1: 0, gl2: 0 }), _defineProperty(_WEBGL_LIMITS, __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].MAX_SERVER_WAIT_TIMEOUT, { gl1: 0, gl2: 0 }), _defineProperty(_WEBGL_LIMITS, __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].MAX_TEXTURE_LOD_BIAS, { gl1: 0, gl2: 0 }), _defineProperty(_WEBGL_LIMITS, __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS, { gl1: 0, gl2: 0 }), _defineProperty(_WEBGL_LIMITS, __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS, { gl1: 0, gl2: 0 }), _defineProperty(_WEBGL_LIMITS, __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS, { gl1: 0, gl2: 0 }), _defineProperty(_WEBGL_LIMITS, __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].MAX_UNIFORM_BLOCK_SIZE, { gl1: 0, gl2: 0 }), _defineProperty(_WEBGL_LIMITS, __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].MAX_UNIFORM_BUFFER_BINDINGS, { gl1: 0, gl2: 0 }), _defineProperty(_WEBGL_LIMITS, __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].MAX_VARYING_COMPONENTS, { gl1: 0, gl2: 0 }), _defineProperty(_WEBGL_LIMITS, __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].MAX_VERTEX_OUTPUT_COMPONENTS, { gl1: 0, gl2: 0 }), _defineProperty(_WEBGL_LIMITS, __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].MAX_VERTEX_UNIFORM_BLOCKS, { gl1: 0, gl2: 0 }), _defineProperty(_WEBGL_LIMITS, __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].MAX_VERTEX_UNIFORM_COMPONENTS, { gl1: 0, gl2: 0 }), _defineProperty(_WEBGL_LIMITS, __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].MIN_PROGRAM_TEXEL_OFFSET, { gl1: 0, gl2: -8, negative: true }), _defineProperty(_WEBGL_LIMITS, __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].MAX_PROGRAM_TEXEL_OFFSET, { gl1: 0, gl2: 7 }), _defineProperty(_WEBGL_LIMITS, __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].UNIFORM_BUFFER_OFFSET_ALIGNMENT, { gl1: 0, gl2: 0 // GLint
}), _WEBGL_LIMITS);
 
function getContextLimits(gl) {
  gl.luma = gl.luma || {};
 
  if (!gl.luma.limits) {
    gl.luma.limits = {};
    gl.luma.webgl1MinLimits = {};
    gl.luma.webgl2MinLimits = {};
 
    var isWebgl2 = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__context__["b" /* isWebGL2 */])(gl);
 
    // WEBGL limits
    for (var parameter in WEBGL_LIMITS) {
      var limit = WEBGL_LIMITS[parameter];
 
      var webgl1MinLimit = limit.gl1;
      var webgl2MinLimit = 'gl2' in limit ? limit.gl2 : limit.gl1;
      var minLimit = isWebgl2 ? webgl2MinLimit : webgl1MinLimit;
 
      // Check if we can query for this limit
      var limitNotAvailable = 'gl2' in limit && !isWebgl2 || 'extension' in limit && !gl.getExtension(limit.extension);
 
      var value = limitNotAvailable ? minLimit : gl.getParameter(parameter);
      gl.luma.limits[parameter] = value;
      gl.luma.webgl1MinLimits[parameter] = webgl1MinLimit;
      gl.luma.webgl2MinLimits[parameter] = webgl2MinLimit;
    }
  }
 
  return gl.luma.limits;
}
 
function getGLContextInfo(gl) {
  gl.luma = gl.luma || {};
 
  if (!gl.luma.info) {
    var _gl$luma$info;
 
    var info = gl.getExtension('WEBGL_debug_renderer_info');
    gl.luma.info = (_gl$luma$info = {}, _defineProperty(_gl$luma$info, __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].VENDOR, gl.getParameter(__WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].VENDOR)), _defineProperty(_gl$luma$info, __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].RENDERER, gl.getParameter(__WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].RENDERER)), _defineProperty(_gl$luma$info, __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].UNMASKED_VENDOR_WEBGL, gl.getParameter(info && info.UNMASKED_VENDOR_WEBGL || __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].VENDOR)), _defineProperty(_gl$luma$info, __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].UNMASKED_RENDERER_WEBGL, gl.getParameter(info && info.UNMASKED_RENDERER_WEBGL || __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].RENDERER)), _defineProperty(_gl$luma$info, __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].VERSION, gl.getParameter(__WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].VERSION)), _defineProperty(_gl$luma$info, __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].SHADING_LANGUAGE_VERSION, gl.getParameter(__WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].SHADING_LANGUAGE_VERSION)), _gl$luma$info);
  }
 
  return gl.luma.info;
}
 
var GL_UNMASKED_VENDOR_WEBGL = 0x9245; // vendor string of the graphics driver.
var GL_UNMASKED_RENDERER_WEBGL = 0x9246; // renderer string of the graphics driver.
 
function getGLContextInfo2(gl) {
  var vendorMasked = gl.getParameter(__WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].VENDOR);
  var rendererMasked = gl.getParameter(__WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].RENDERER);
  var ext = gl.getExtension('WEBGL_debug_renderer_info');
  var vendorUnmasked = ext && gl.getParameter(ext.UNMASKED_VENDOR_WEBGL || __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].VENDOR);
  var rendererUnmasked = ext && gl.getParameter(ext.UNMASKED_RENDERER_WEBGL || __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].RENDERER);
  return {
    vendor: vendorUnmasked || vendorMasked,
    renderer: rendererUnmasked || rendererMasked,
    vendorMasked: vendorMasked,
    rendererMasked: rendererMasked,
    version: gl.getParameter(__WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].VERSION),
    shadingLanguageVersion: gl.getParameter(__WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].SHADING_LANGUAGE_VERSION)
  };
}
 
function getContextInfo(gl) {
  var limits = getContextLimits(gl);
  var info = getGLContextInfo(gl);
  return {
    // basic information
    vendor: info[GL_UNMASKED_VENDOR_WEBGL] || info[__WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].VENDOR],
    renderer: info[GL_UNMASKED_RENDERER_WEBGL] || info[__WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].RENDERER],
    version: info[__WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].VERSION],
    shadingLanguageVersion: info[__WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].SHADING_LANGUAGE_VERSION],
    // info, caps and limits
    info: info,
    limits: limits,
    webgl1MinLimits: gl.luma.webgl1MinLimits,
    webgl2MinLimits: gl.luma.webgl2MinLimits
  };
}
 
// DEBUG INFO
 
/**
 * Provides strings identifying the GPU vendor and driver.
 * https://www.khronos.org/registry/webgl/extensions/WEBGL_debug_renderer_info/
 * @param {WebGLRenderingContext} gl - context
 * @return {Object} - 'vendor' and 'renderer' string fields.
 */
function glGetDebugInfo(gl) {
  return getGLContextInfo2(gl);
  // const info = gl.getExtension('WEBGL_debug_renderer_info');
  // // We can't determine if 'WEBGL_debug_renderer_info' is supported by
  // // checking whether info is null here. Firefox doesn't follow the
  // // specs by returning null for unsupported extension. Instead,
  // // it returns an object without GL_UNMASKED_VENDOR_WEBGL and GL_UNMASKED_RENDERER_WEBGL.
  // return {
  //   vendor: (info && info.UNMASKED_VENDOR_WEBGL) ?
  //     gl.getParameter(info.UNMASKED_VENDOR_WEBGL) : 'unknown',
  //   renderer: (info && info.UNMASKED_RENDERER_WEBGL) ?
  //     gl.getParameter(info.UNMASKED_RENDERER_WEBGL) : 'unknown'
  // };
}
 
var TEST_EXPORTS = {
  WEBGL_LIMITS: WEBGL_LIMITS
};
//# sourceMappingURL=context-limits.js.map
 
/***/ }),
/* 166 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
 
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
 
var ERR_DELETED = 'Query was deleted before result was available';
var ERR_CANCEL = 'Query was canceled before result was available';
 
var noop = function noop(x) {
  return x;
};
 
var QueryManager = /*#__PURE__*/function () {
 
  /**
   * Internal class that helps "asynchronous WebGL query objects" manage
   * pending requests (e.g. for EXT_disjoint_timer_query and WebGL2 queries)
   *
   * Creates and manages promises for the queries.
   * Tracks pending queries enabling polling.
   * Tracks pending queries enabling invalidation.
   * Encapsulates some standard error messages.
   *
   * Remarks:
   * - Maintains a minimal list of pending queries only to minimize GC impact
   * - Exported as a singleton class instance.
   */
  function QueryManager() {
    _classCallCheck(this, QueryManager);
 
    this.pendingQueries = new Set();
    this.invalidQueryType = null;
    this.invalidErrorMessage = '';
    this.checkInvalid = function () {
      return false;
    };
  }
 
  // API THAT SHOULD BE EXPOSED TO APPLICATION
 
  // Checks invalidation callback and then all pending queries for completion
  // Should only be called once per tick
 
 
  _createClass(QueryManager, [{
    key: 'poll',
    value: function poll(gl) {
      this.cancelInvalidQueries(gl);
 
      // Now check availability of results and resolve promises as appropriate
      var _iteratorNormalCompletion = true;
      var _didIteratorError = false;
      var _iteratorError = undefined;
 
      try {
        for (var _iterator = this.pendingQueries.values()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
          var query = _step.value;
 
          var resultAvailable = query.isResultAvailable();
          if (resultAvailable) {
            var result = query.getResult();
            this.resolveQuery(query, result);
          }
        }
      } catch (err) {
        _didIteratorError = true;
        _iteratorError = err;
      } finally {
        try {
          if (!_iteratorNormalCompletion && _iterator.return) {
            _iterator.return();
          }
        } finally {
          if (_didIteratorError) {
            throw _iteratorError;
          }
        }
      }
    }
 
    // API FOR MANAGED QUERY CLASSES
 
    // Registers query invalidation method - used to detect disjoint timer queries
 
  }, {
    key: 'setInvalidator',
    value: function setInvalidator(_ref) {
      var queryType = _ref.queryType,
          errorMessage = _ref.errorMessage,
          checkInvalid = _ref.checkInvalid;
 
      this.invalidQueryType = queryType;
      this.invalidErrorMessage = errorMessage;
      this.checkInvalid = checkInvalid;
    }
 
    // Starts a query, sets up a new promise
 
  }, {
    key: 'beginQuery',
    value: function beginQuery(query) {
      var onComplete = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : noop;
      var onError = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : noop;
 
      // Make sure disjoint state is cleared, so that this query starts fresh
      // Cancel other queries if needed
      this.cancelInvalidQueries(query.gl);
 
      // Cancel current promise - noop if already resolved or rejected
      this.cancelQuery(query);
 
      // Create a new promise with attached resolve and reject methods
      var resolvers = {};
      query.promise = new Promise(function (resolve, reject) {
        resolvers.resolve = resolve;
        resolvers.reject = reject;
      });
      Object.assign(query.promise, resolvers);
 
      // Add this query to the pending queries
      this.pendingQueries.add(query);
      // Register the callbacks
      return query.promise.then(onComplete).catch(onError);
    }
 
    // Resolves a query with a result
 
  }, {
    key: 'resolveQuery',
    value: function resolveQuery(query, result) {
      this.pendingQueries.delete(query);
      query.promise.resolve(result);
    }
 
    // Rejects the promise
 
  }, {
    key: 'rejectQuery',
    value: function rejectQuery(query, errorMessage) {
      this.pendingQueries.delete(query);
      if (query.promise) {
        query.promise.reject(new Error(errorMessage));
      }
    }
 
    // Rejects promise with standard message for Query.delete()
 
  }, {
    key: 'deleteQuery',
    value: function deleteQuery(query) {
      return this.rejectQuery(query, ERR_DELETED);
    }
 
    // Rejects promise with standard message for Query.cancel()
 
  }, {
    key: 'cancelQuery',
    value: function cancelQuery(query) {
      return this.rejectQuery(query, ERR_CANCEL);
    }
 
    // Rejects promise with registered message for invalidation
 
  }, {
    key: 'invalidateQuery',
    value: function invalidateQuery(query) {
      if (query instanceof this.invalidQueryType) {
        this.rejectQuery(query, this.invalidErrorMessage);
      }
    }
 
    // Checks all queries to see if need to be invalidated
 
  }, {
    key: 'cancelInvalidQueries',
    value: function cancelInvalidQueries(gl) {
      // We assume that we can cancel queries for all context.
      // Should be OK since this is used to check for "disjoint" GPU state
      if (this.checkInvalid(gl)) {
        var _iteratorNormalCompletion2 = true;
        var _didIteratorError2 = false;
        var _iteratorError2 = undefined;
 
        try {
          for (var _iterator2 = this.pendingQueries.values()[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
            var query = _step2.value;
 
            this.invalidateQuery(query);
          }
        } catch (err) {
          _didIteratorError2 = true;
          _iteratorError2 = err;
        } finally {
          try {
            if (!_iteratorNormalCompletion2 && _iterator2.return) {
              _iterator2.return();
            }
          } finally {
            if (_didIteratorError2) {
              throw _iteratorError2;
            }
          }
        }
      }
    }
  }]);
 
  return QueryManager;
}();
 
/* harmony default export */ __webpack_exports__["a"] = (new QueryManager());
//# sourceMappingURL=query-manager.js.map
 
/***/ }),
/* 167 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__api__ = __webpack_require__(38);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__context__ = __webpack_require__(7);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__texture__ = __webpack_require__(62);
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
 
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
 
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
 
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
 
 
 
 
 
var Texture2D = /*#__PURE__*/function (_Texture) {
  _inherits(Texture2D, _Texture);
 
  _createClass(Texture2D, null, [{
    key: 'isSupported',
    value: function isSupported(gl, opts) {
      return __WEBPACK_IMPORTED_MODULE_2__texture__["a" /* default */].isSupported(gl, opts);
    }
 
    /**
     * @classdesc
     * 2D WebGL Texture
     * Note: Constructor will initialize your texture.
     *
     * @class
     * @param {WebGLRenderingContext} gl - gl context
     * @param {Image|ArrayBuffer|null} opts= - named options
     * @param {Image|ArrayBuffer|null} opts.data= - buffer
     * @param {GLint} width - width of texture
     * @param {GLint} height - height of texture
     */
 
  }]);
 
  function Texture2D(gl) {
    var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
 
    _classCallCheck(this, Texture2D);
 
    __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__context__["j" /* assertWebGLContext */])(gl);
 
    var _this = _possibleConstructorReturn(this, (Texture2D.__proto__ || Object.getPrototypeOf(Texture2D)).call(this, gl, Object.assign({}, opts, { target: gl.TEXTURE_2D })));
 
    _this.initialize(opts);
 
    Object.seal(_this);
    return _this;
  }
 
  // target cannot be modified by bind:
  // textures are special because when you first bind them to a target,
  // they get special information. When you first bind a texture as a
  // GL_TEXTURE_2D, you are actually setting special state in the texture.
  // You are saying that this texture is a 2D texture.
  // And it will always be a 2D texture; this state cannot be changed ever.
  // If you have a texture that was first bound as a GL_TEXTURE_2D,
  // you must always bind it as a GL_TEXTURE_2D;
  // attempting to bind it as GL_TEXTURE_1D will give rise to an error
  // (while run-time).
 
  _createClass(Texture2D, [{
    key: 'bind',
    value: function bind() {
      var textureUnit = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.textureUnit;
      var gl = this.gl;
 
      if (textureUnit === undefined) {
        throw new Error('Texture.bind: must specify texture unit');
      }
      this.textureUnit = textureUnit;
      gl.activeTexture(gl.TEXTURE0 + textureUnit);
      gl.bindTexture(this.target, this.handle);
      return textureUnit;
    }
  }, {
    key: 'unbind',
    value: function unbind() {
      var gl = this.gl;
 
      if (this.textureUnit === undefined) {
        throw new Error('Texture.unbind: texture unit not specified');
      }
      gl.activeTexture(gl.TEXTURE0 + this.textureUnit);
      gl.bindTexture(this.target, null);
      return this.textureUnit;
    }
  }, {
    key: 'getActiveUnit',
    value: function getActiveUnit() {
      return this.gl.getParameter(__WEBPACK_IMPORTED_MODULE_0__api__["f" /* GL */].ACTIVE_TEXTURE) - __WEBPACK_IMPORTED_MODULE_0__api__["f" /* GL */].TEXTURE0;
    }
  }]);
 
  return Texture2D;
}(__WEBPACK_IMPORTED_MODULE_2__texture__["a" /* default */]);
 
/* harmony default export */ __webpack_exports__["a"] = (Texture2D);
//# sourceMappingURL=texture-2d.js.map
 
/***/ }),
/* 168 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = parseUniformName;
/* harmony export (immutable) */ __webpack_exports__["b"] = getUniformSetter;
/* harmony export (immutable) */ __webpack_exports__["c"] = checkUniformValues;
/* harmony export (immutable) */ __webpack_exports__["e"] = getUniformsTable;
/* harmony export (immutable) */ __webpack_exports__["d"] = areUniformsEqual;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__framebuffer__ = __webpack_require__(69);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__texture__ = __webpack_require__(62);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils__ = __webpack_require__(8);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_assert__ = __webpack_require__(1);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_assert___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_assert__);
var _UNIFORM_SETTERS;
 
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
 
 
 
 
 
 
// Local constants, will be "collapsed" during minification
 
// WebGL1
 
var GL_FLOAT = 0x1406;
var GL_FLOAT_VEC2 = 0x8B50;
var GL_FLOAT_VEC3 = 0x8B51;
var GL_FLOAT_VEC4 = 0x8B52;
 
var GL_INT = 0x1404;
var GL_INT_VEC2 = 0x8B53;
var GL_INT_VEC3 = 0x8B54;
var GL_INT_VEC4 = 0x8B55;
 
var GL_BOOL = 0x8B56;
var GL_BOOL_VEC2 = 0x8B57;
var GL_BOOL_VEC3 = 0x8B58;
var GL_BOOL_VEC4 = 0x8B59;
 
var GL_FLOAT_MAT2 = 0x8B5A;
var GL_FLOAT_MAT3 = 0x8B5B;
var GL_FLOAT_MAT4 = 0x8B5C;
 
var GL_SAMPLER_2D = 0x8B5E;
var GL_SAMPLER_CUBE = 0x8B60;
 
// WebGL2
 
var GL_UNSIGNED_INT = 0x1405;
var GL_UNSIGNED_INT_VEC2 = 0x8DC6;
var GL_UNSIGNED_INT_VEC3 = 0x8DC7;
var GL_UNSIGNED_INT_VEC4 = 0x8DC8;
 
/* eslint-disable camelcase */
var GL_FLOAT_MAT2x3 = 0x8B65;
var GL_FLOAT_MAT2x4 = 0x8B66;
var GL_FLOAT_MAT3x2 = 0x8B67;
var GL_FLOAT_MAT3x4 = 0x8B68;
var GL_FLOAT_MAT4x2 = 0x8B69;
var GL_FLOAT_MAT4x3 = 0x8B6A;
 
var GL_SAMPLER_3D = 0x8B5F;
var GL_SAMPLER_2D_SHADOW = 0x8B62;
var GL_SAMPLER_2D_ARRAY = 0x8DC1;
var GL_SAMPLER_2D_ARRAY_SHADOW = 0x8DC4;
var GL_SAMPLER_CUBE_SHADOW = 0x8DC5;
var GL_INT_SAMPLER_2D = 0x8DCA;
var GL_INT_SAMPLER_3D = 0x8DCB;
var GL_INT_SAMPLER_CUBE = 0x8DCC;
var GL_INT_SAMPLER_2D_ARRAY = 0x8DCF;
var GL_UNSIGNED_INT_SAMPLER_2D = 0x8DD2;
var GL_UNSIGNED_INT_SAMPLER_3D = 0x8DD3;
var GL_UNSIGNED_INT_SAMPLER_CUBE = 0x8DD4;
var GL_UNSIGNED_INT_SAMPLER_2D_ARRAY = 0x8DD7;
 
var UNIFORM_SETTERS = (_UNIFORM_SETTERS = {}, _defineProperty(_UNIFORM_SETTERS, GL_FLOAT, function (gl, location, value) {
  return gl.uniform1f(location, value);
}), _defineProperty(_UNIFORM_SETTERS, GL_FLOAT_VEC2, function (gl, location, value) {
  return gl.uniform2fv(location, toFloatArray(value, 2));
}), _defineProperty(_UNIFORM_SETTERS, GL_FLOAT_VEC3, function (gl, location, value) {
  return gl.uniform3fv(location, toFloatArray(value, 3));
}), _defineProperty(_UNIFORM_SETTERS, GL_FLOAT_VEC4, function (gl, location, value) {
  return gl.uniform4fv(location, toFloatArray(value, 4));
}), _defineProperty(_UNIFORM_SETTERS, GL_INT, function (gl, location, value) {
  return gl.uniform1i(location, value);
}), _defineProperty(_UNIFORM_SETTERS, GL_INT_VEC2, function (gl, location, value) {
  return gl.uniform2iv(location, toIntArray(value, 2));
}), _defineProperty(_UNIFORM_SETTERS, GL_INT_VEC3, function (gl, location, value) {
  return gl.uniform3iv(location, toIntArray(value, 3));
}), _defineProperty(_UNIFORM_SETTERS, GL_INT_VEC4, function (gl, location, value) {
  return gl.uniform4iv(location, toIntArray(value, 4));
}), _defineProperty(_UNIFORM_SETTERS, GL_BOOL, function (gl, location, value) {
  return gl.uniform1i(location, value);
}), _defineProperty(_UNIFORM_SETTERS, GL_BOOL_VEC2, function (gl, location, value) {
  return gl.uniform2iv(location, toIntArray(value, 2));
}), _defineProperty(_UNIFORM_SETTERS, GL_BOOL_VEC3, function (gl, location, value) {
  return gl.uniform3iv(location, toIntArray(value, 3));
}), _defineProperty(_UNIFORM_SETTERS, GL_BOOL_VEC4, function (gl, location, value) {
  return gl.uniform4iv(location, toIntArray(value, 4));
}), _defineProperty(_UNIFORM_SETTERS, GL_FLOAT_MAT2, function (gl, location, value) {
  return gl.uniformMatrix2fv(location, false, toFloatArray(value, 4));
}), _defineProperty(_UNIFORM_SETTERS, GL_FLOAT_MAT3, function (gl, location, value) {
  return gl.uniformMatrix3fv(location, false, toFloatArray(value, 9));
}), _defineProperty(_UNIFORM_SETTERS, GL_FLOAT_MAT4, function (gl, location, value) {
  return gl.uniformMatrix4fv(location, false, toFloatArray(value, 16));
}), _defineProperty(_UNIFORM_SETTERS, GL_SAMPLER_2D, function (gl, location, value) {
  return gl.uniform1i(location, value);
}), _defineProperty(_UNIFORM_SETTERS, GL_SAMPLER_CUBE, function (gl, location, value) {
  return gl.uniform1i(location, value);
}), _defineProperty(_UNIFORM_SETTERS, GL_UNSIGNED_INT, function (gl, location, value) {
  return gl.uniform1ui(location, value);
}), _defineProperty(_UNIFORM_SETTERS, GL_UNSIGNED_INT_VEC2, function (gl, location, value) {
  return gl.uniform2uiv(location, toUIntArray(value, 2));
}), _defineProperty(_UNIFORM_SETTERS, GL_UNSIGNED_INT_VEC3, function (gl, location, value) {
  return gl.uniform3uiv(location, toUIntArray(value, 3));
}), _defineProperty(_UNIFORM_SETTERS, GL_UNSIGNED_INT_VEC4, function (gl, location, value) {
  return gl.uniform4uiv(location, toUIntArray(value, 4));
}), _defineProperty(_UNIFORM_SETTERS, GL_FLOAT_MAT2x3, function (gl, location, value) {
  return gl.uniformMatrix2x3fv(location, false, toFloatArray(value, 6));
}), _defineProperty(_UNIFORM_SETTERS, GL_FLOAT_MAT2x4, function (gl, location, value) {
  return gl.uniformMatrix2x4fv(location, false, toFloatArray(value, 8));
}), _defineProperty(_UNIFORM_SETTERS, GL_FLOAT_MAT3x2, function (gl, location, value) {
  return gl.uniformMatrix3x2fv(location, false, toFloatArray(value, 6));
}), _defineProperty(_UNIFORM_SETTERS, GL_FLOAT_MAT3x4, function (gl, location, value) {
  return gl.uniformMatrix3x4fv(location, false, toFloatArray(value, 12));
}), _defineProperty(_UNIFORM_SETTERS, GL_FLOAT_MAT4x2, function (gl, location, value) {
  return gl.uniformMatrix4x2fv(location, false, toFloatArray(value, 8));
}), _defineProperty(_UNIFORM_SETTERS, GL_FLOAT_MAT4x3, function (gl, location, value) {
  return gl.uniformMatrix4x3fv(location, false, toFloatArray(value, 12));
}), _defineProperty(_UNIFORM_SETTERS, GL_SAMPLER_3D, function (gl, location, value) {
  return gl.uniform1i(location, value);
}), _defineProperty(_UNIFORM_SETTERS, GL_SAMPLER_2D_SHADOW, function (gl, location, value) {
  return gl.uniform1i(location, value);
}), _defineProperty(_UNIFORM_SETTERS, GL_SAMPLER_2D_ARRAY, function (gl, location, value) {
  return gl.uniform1i(location, value);
}), _defineProperty(_UNIFORM_SETTERS, GL_SAMPLER_2D_ARRAY_SHADOW, function (gl, location, value) {
  return gl.uniform1i(location, value);
}), _defineProperty(_UNIFORM_SETTERS, GL_SAMPLER_CUBE_SHADOW, function (gl, location, value) {
  return gl.uniform1i(location, value);
}), _defineProperty(_UNIFORM_SETTERS, GL_INT_SAMPLER_2D, function (gl, location, value) {
  return gl.uniform1i(location, value);
}), _defineProperty(_UNIFORM_SETTERS, GL_INT_SAMPLER_3D, function (gl, location, value) {
  return gl.uniform1i(location, value);
}), _defineProperty(_UNIFORM_SETTERS, GL_INT_SAMPLER_CUBE, function (gl, location, value) {
  return gl.uniform1i(location, value);
}), _defineProperty(_UNIFORM_SETTERS, GL_INT_SAMPLER_2D_ARRAY, function (gl, location, value) {
  return gl.uniform1i(location, value);
}), _defineProperty(_UNIFORM_SETTERS, GL_UNSIGNED_INT_SAMPLER_2D, function (gl, location, value) {
  return gl.uniform1i(location, value);
}), _defineProperty(_UNIFORM_SETTERS, GL_UNSIGNED_INT_SAMPLER_3D, function (gl, location, value) {
  return gl.uniform1i(location, value);
}), _defineProperty(_UNIFORM_SETTERS, GL_UNSIGNED_INT_SAMPLER_CUBE, function (gl, location, value) {
  return gl.uniform1i(location, value);
}), _defineProperty(_UNIFORM_SETTERS, GL_UNSIGNED_INT_SAMPLER_2D_ARRAY, function (gl, location, value) {
  return gl.uniform1i(location, value);
}), _UNIFORM_SETTERS);
 
// Pre-allocated typed arrays for temporary conversion
var FLOAT_ARRAY = {};
var INT_ARRAY = {};
var UINT_ARRAY = {};
 
/* Functions to ensure the type of uniform values */
function toTypedArray(value, uniformLength, Type, cache) {
  var length = value.length;
  if (length % uniformLength) {
    __WEBPACK_IMPORTED_MODULE_2__utils__["b" /* log */].warn('Uniform size should be multiples of ' + uniformLength, value);
  }
 
  if (value instanceof Type) {
    return value;
  }
  var result = cache[length];
  if (!result) {
    result = new Type(length);
    cache[length] = result;
  }
  for (var i = 0; i < length; i++) {
    result[i] = value[i];
  }
  return result;
}
 
function toFloatArray(value, uniformLength) {
  return toTypedArray(value, uniformLength, Float32Array, FLOAT_ARRAY);
}
 
function toIntArray(value, uniformLength) {
  return toTypedArray(value, uniformLength, Int32Array, INT_ARRAY);
}
 
function toUIntArray(value, uniformLength) {
  return toTypedArray(value, uniformLength, Uint32Array, UINT_ARRAY);
}
 
function parseUniformName(name) {
  // name = name[name.length - 1] === ']' ?
  // name.substr(0, name.length - 3) : name;
 
  // if array name then clean the array brackets
  var UNIFORM_NAME_REGEXP = /([^\[]*)(\[[0-9]+\])?/;
  var matches = name.match(UNIFORM_NAME_REGEXP);
  if (!matches || matches.length < 2) {
    throw new Error('Failed to parse GLSL uniform name ' + name);
  }
 
  return {
    name: matches[1],
    length: matches[2] || 1,
    isArray: Boolean(matches[2])
  };
}
 
// Returns a Magic Uniform Setter
/* eslint-disable complexity */
function getUniformSetter(gl, location, info) {
  var setter = UNIFORM_SETTERS[info.type];
  if (!setter) {
    throw new Error('Unknown GLSL uniform type ' + info.type);
  }
  return setter.bind(null, gl, location);
}
 
// Basic checks of uniform values without knowledge of program
// To facilitate early detection of e.g. undefined values in JavaScript
function checkUniformValues(uniforms, source) {
  for (var uniformName in uniforms) {
    var value = uniforms[uniformName];
    if (!checkUniformValue(value)) {
      // Add space to source
      source = source ? source + ' ' : '';
      // Value could be unprintable so write the object on console
      console.error(source + ' Bad uniform ' + uniformName, value); // eslint-disable-line
      /* eslint-enable no-console */
      throw new Error(source + ' Bad uniform ' + uniformName);
    }
  }
  return true;
}
 
// TODO use type information during validation
function checkUniformValue(value) {
  // Check that every element in array is a number, and at least 1 element
  if (Array.isArray(value)) {
    return value.length > 0 && value.every(function (element) {
      return isFinite(element);
    });
    // Typed arrays can only contain numbers, but check length
  } else if (ArrayBuffer.isView(value)) {
    // TODO - Can contain NaN
    return value.length > 0;
    // Check that single value is a number
  } else if (isFinite(value)) {
    return true;
    // Test for texture (for sampler uniforms)
    // WebGL2: if (value instanceof Texture || value instanceof Sampler) {
  } else if (value instanceof __WEBPACK_IMPORTED_MODULE_1__texture__["a" /* default */]) {
    return true;
  } else if (value instanceof __WEBPACK_IMPORTED_MODULE_0__framebuffer__["a" /* default */]) {
    return Boolean(value.texture);
  }
  return false;
}
 
function isUniformDefined(value) {
  return value !== undefined && value !== null;
}
// Helper
function addUniformToTable(_ref) {
  var table = _ref.table,
      header = _ref.header,
      uniforms = _ref.uniforms,
      uniformName = _ref.uniformName,
      undefinedOnly = _ref.undefinedOnly;
 
  var value = uniforms[uniformName];
  var isDefined = isUniformDefined(value);
  if (!undefinedOnly || !isDefined) {
    table[uniformName] = _defineProperty({
      // Add program's unprovided uniforms
      Type: isDefined ? value : 'NOT PROVIDED'
    }, header, isDefined ? __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__utils__["c" /* formatValue */])(value) : 'N/A');
    return true;
  }
  return false;
}
 
// Prepares a table suitable for console.table
/* eslint-disable max-statements */
function getUniformsTable() {
  var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
      _ref2$header = _ref2.header,
      header = _ref2$header === undefined ? 'Uniforms' : _ref2$header,
      program = _ref2.program,
      uniforms = _ref2.uniforms,
      _ref2$undefinedOnly = _ref2.undefinedOnly,
      undefinedOnly = _ref2$undefinedOnly === undefined ? false : _ref2$undefinedOnly;
 
  __WEBPACK_IMPORTED_MODULE_3_assert___default()(program);
 
  var SHADER_MODULE_UNIFORM_REGEXP = '.*_.*';
  var PROJECT_MODULE_UNIFORM_REGEXP = '.*Matrix'; // TODO - Use explicit list
 
  var uniformLocations = program._uniformSetters;
  var table = {}; // {[header]: {}};
 
  // Add program's provided uniforms (in alphabetical order)
  var uniformNames = Object.keys(uniformLocations).sort();
 
  var count = 0;
 
  // First add non-underscored uniforms (assumed not coming from shader modules)
  var _iteratorNormalCompletion = true;
  var _didIteratorError = false;
  var _iteratorError = undefined;
 
  try {
    for (var _iterator = uniformNames[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
      var _uniformName = _step.value;
 
      if (!_uniformName.match(SHADER_MODULE_UNIFORM_REGEXP) && !_uniformName.match(PROJECT_MODULE_UNIFORM_REGEXP)) {
        if (addUniformToTable({ table: table, header: header, uniforms: uniforms, uniformName: _uniformName, undefinedOnly: undefinedOnly })) {
          count++;
        }
      }
    }
 
    // add underscored uniforms (assumed from shader modules)
  } catch (err) {
    _didIteratorError = true;
    _iteratorError = err;
  } finally {
    try {
      if (!_iteratorNormalCompletion && _iterator.return) {
        _iterator.return();
      }
    } finally {
      if (_didIteratorError) {
        throw _iteratorError;
      }
    }
  }
 
  var _iteratorNormalCompletion2 = true;
  var _didIteratorError2 = false;
  var _iteratorError2 = undefined;
 
  try {
    for (var _iterator2 = uniformNames[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
      var _uniformName2 = _step2.value;
 
      if (_uniformName2.match(PROJECT_MODULE_UNIFORM_REGEXP)) {
        if (addUniformToTable({ table: table, header: header, uniforms: uniforms, uniformName: _uniformName2, undefinedOnly: undefinedOnly })) {
          count++;
        }
      }
    }
  } catch (err) {
    _didIteratorError2 = true;
    _iteratorError2 = err;
  } finally {
    try {
      if (!_iteratorNormalCompletion2 && _iterator2.return) {
        _iterator2.return();
      }
    } finally {
      if (_didIteratorError2) {
        throw _iteratorError2;
      }
    }
  }
 
  var _iteratorNormalCompletion3 = true;
  var _didIteratorError3 = false;
  var _iteratorError3 = undefined;
 
  try {
    for (var _iterator3 = uniformNames[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {
      var _uniformName3 = _step3.value;
 
      if (!table[_uniformName3]) {
        if (addUniformToTable({ table: table, header: header, uniforms: uniforms, uniformName: _uniformName3, undefinedOnly: undefinedOnly })) {
          count++;
        }
      }
    }
 
    // Create a table of unused uniforms
  } catch (err) {
    _didIteratorError3 = true;
    _iteratorError3 = err;
  } finally {
    try {
      if (!_iteratorNormalCompletion3 && _iterator3.return) {
        _iterator3.return();
      }
    } finally {
      if (_didIteratorError3) {
        throw _iteratorError3;
      }
    }
  }
 
  var unusedCount = 0;
  var unusedTable = {};
  if (!undefinedOnly) {
    for (var uniformName in uniforms) {
      var uniform = uniforms[uniformName];
      if (!table[uniformName]) {
        unusedCount++;
        unusedTable[uniformName] = _defineProperty({
          Type: 'NOT USED: ' + uniform
        }, header, __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__utils__["c" /* formatValue */])(uniform));
      }
    }
  }
 
  return { table: table, count: count, unusedTable: unusedTable, unusedCount: unusedCount };
}
 
/**
 * Given two values of a uniform, returns `true` if they are equal
 */
function areUniformsEqual(uniform1, uniform2) {
  if (Array.isArray(uniform1) || ArrayBuffer.isView(uniform1)) {
    if (!uniform2) {
      return false;
    }
    var len = uniform1.length;
    if (uniform2.length !== len) {
      return false;
    }
    for (var i = 0; i < len; i++) {
      if (uniform1[i] !== uniform2[i]) {
        return false;
      }
    }
    return true;
  }
  return uniform1 === uniform2;
}
//# sourceMappingURL=uniforms.js.map
 
/***/ }),
/* 169 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__gl_constants__ = __webpack_require__(25);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__context__ = __webpack_require__(7);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__resource__ = __webpack_require__(30);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_assert__ = __webpack_require__(1);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_assert___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_assert__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__utils__ = __webpack_require__(8);
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
 
function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
 
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
 
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
 
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
 
// WebGL2 VertexArray Objects Helper
 
 
 
 
 
 
/* eslint-disable camelcase */
var OES_vertex_array_object = 'OES_vertex_array_object';
 
var GL_ELEMENT_ARRAY_BUFFER = 0x8893;
 
// const GL_CURRENT_VERTEX_ATTRIB = 0x8626;
 
var GL_VERTEX_ATTRIB_ARRAY_ENABLED = 0x8622;
var GL_VERTEX_ATTRIB_ARRAY_SIZE = 0x8623;
var GL_VERTEX_ATTRIB_ARRAY_STRIDE = 0x8624;
var GL_VERTEX_ATTRIB_ARRAY_TYPE = 0x8625;
var GL_VERTEX_ATTRIB_ARRAY_NORMALIZED = 0x886A;
var GL_VERTEX_ATTRIB_ARRAY_POINTER = 0x8645;
var GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING = 0x889F;
 
var GL_VERTEX_ATTRIB_ARRAY_INTEGER = 0x88FD;
var GL_VERTEX_ATTRIB_ARRAY_DIVISOR = 0x88FE;
 
var PARAMETERS = [GL_VERTEX_ATTRIB_ARRAY_ENABLED, GL_VERTEX_ATTRIB_ARRAY_SIZE, GL_VERTEX_ATTRIB_ARRAY_STRIDE, GL_VERTEX_ATTRIB_ARRAY_TYPE, GL_VERTEX_ATTRIB_ARRAY_NORMALIZED, GL_VERTEX_ATTRIB_ARRAY_POINTER, GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING, GL_VERTEX_ATTRIB_ARRAY_INTEGER, GL_VERTEX_ATTRIB_ARRAY_DIVISOR];
 
var ERR_ELEMENTS = 'elements must be GL.ELEMENT_ARRAY_BUFFER';
 
var VertexArray = /*#__PURE__*/function (_Resource) {
  _inherits(VertexArray, _Resource);
 
  _createClass(VertexArray, [{
    key: 'MAX_ATTRIBUTES',
    get: function get() {
      return this.gl.getParameter(this.gl.MAX_VERTEX_ATTRIBS);
    }
 
    // Create a VertexArray
 
  }], [{
    key: 'isSupported',
    value: function isSupported(gl) {
      return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__context__["b" /* isWebGL2 */])(gl) || gl.getExtension(OES_vertex_array_object);
    }
  }, {
    key: 'getDefaultArray',
    value: function getDefaultArray(gl) {
      gl.luma = gl.luma || {};
      if (!gl.luma.defaultVertexArray) {
        gl.luma.defaultVertexArray = new VertexArray(gl, { handle: null });
      }
      return gl.luma.defaultVertexArray;
    }
  }, {
    key: 'getMaxAttributes',
    value: function getMaxAttributes(gl) {
      return gl.getParameter(gl.MAX_VERTEX_ATTRIBS);
    }
  }]);
 
  function VertexArray(gl) {
    var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
 
    _classCallCheck(this, VertexArray);
 
    var _this = _possibleConstructorReturn(this, (VertexArray.__proto__ || Object.getPrototypeOf(VertexArray)).call(this, gl, opts));
 
    _this.elements = null;
    _this.buffers = {}; // new Array(this.MAX_VERTEX_ATTRIBS).fill(null);
    _this.locations = {};
    _this.names = {};
    _this.drawParameters = {};
 
    _this._bound = false;
    _this._filledLocations = {};
    Object.seal(_this);
 
    _this.initialize(opts);
    return _this;
  }
 
  _createClass(VertexArray, [{
    key: 'initialize',
    value: function initialize() {
      var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
          _ref$buffers = _ref.buffers,
          buffers = _ref$buffers === undefined ? {} : _ref$buffers,
          _ref$elements = _ref.elements,
          elements = _ref$elements === undefined ? null : _ref$elements,
          _ref$locations = _ref.locations,
          locations = _ref$locations === undefined ? {} : _ref$locations;
 
      this.setLocations(locations);
      this.setBuffers(buffers, { clear: true });
      this.setElements(elements);
    }
  }, {
    key: 'setLocations',
 
 
    // Register an optional buffer name to location mapping
    value: function setLocations(locations) {
      this.locations = locations;
      this.names = {};
    }
 
    // Set (bind) an elements buffer, for indexed rendering. Must be GL.ELEMENT_ARRAY_BUFFER
 
  }, {
    key: 'setElements',
    value: function setElements(elements) {
      __WEBPACK_IMPORTED_MODULE_3_assert___default()(!elements || elements.target === GL_ELEMENT_ARRAY_BUFFER, ERR_ELEMENTS);
 
      this.ext.bindVertexArray(this.handle);
      this.gl.bindBuffer(GL_ELEMENT_ARRAY_BUFFER, elements && elements.handle);
      this.ext.bindVertexArray(null);
 
      this.elements = elements;
      return this;
    }
 
    // Set (bind) an array or map of vertex array buffers, either in numbered or
    // named locations. (named locations requires `locations` to have been provided).
    // For names that are not present in `location`, the supplied buffers will be ignored.
    // if a single buffer of type GL.ELEMENT_ARRAY_BUFFER is present, it will be set as elements
    // @param {Object} buffers - An object map with attribute names being keys
    //   and values are expected to be instances of Buffer.
 
  }, {
    key: '_getBufferAndLayout',
    value: function _getBufferAndLayout(bufferData) {
      // Check if buffer was supplied
      var buffer = void 0;
      var layout = void 0;
      if (bufferData.handle) {
        buffer = bufferData;
        layout = bufferData.layout;
      } else {
        buffer = bufferData.buffer;
        layout = Object.assign({}, buffer.layout, bufferData.layout || {}, bufferData);
      }
      return { buffer: buffer, layout: layout };
    }
  }, {
    key: 'setBuffers',
    value: function setBuffers(buffers) {
      var _ref2 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
          _ref2$clear = _ref2.clear,
          clear = _ref2$clear === undefined ? true : _ref2$clear;
 
      if (clear) {
        this.clearBindings();
      }
 
      var _getLocations2 = this._getLocations(buffers),
          locations = _getLocations2.locations,
          elements = _getLocations2.elements;
 
      this.ext.bindVertexArray(this.handle);
 
      // Process locations in order
      for (var location in locations) {
        var bufferData = locations[location];
        if (bufferData) {
          var _getBufferAndLayout2 = this._getBufferAndLayout(bufferData),
              buffer = _getBufferAndLayout2.buffer,
              layout = _getBufferAndLayout2.layout;
 
          this.setBuffer({ location: location, buffer: buffer, layout: layout });
          this.setDivisor(location, layout.instanced ? 1 : 0);
          this.enable(location);
        } else {
          // DISABLE MISSING ATTRIBUTE
          this.disable(location);
        }
      }
      this.buffers = buffers;
 
      this.ext.bindVertexArray(null);
 
      if (elements) {
        this.setElements(elements);
      }
    }
 
    // Enable an attribute
 
  }, {
    key: 'enable',
    value: function enable(location) {
      var _this2 = this;
 
      this.bind(function () {
        _this2.gl.enableVertexAttribArray(location);
      });
    }
  }, {
    key: 'clearBindings',
    value: function clearBindings() {
      var _this3 = this;
 
      var _ref3 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
          _ref3$disableZero = _ref3.disableZero,
          disableZero = _ref3$disableZero === undefined ? false : _ref3$disableZero;
 
      this.bind(function () {
        for (var location in _this3._filledLocations) {
          if (_this3._filledLocations[location] && (location > 0 || disableZero)) {
            _this3.gl.disableVertexAttribArray(location);
          }
        }
        _this3._filledLocations = {};
      });
    }
 
    // Disable an attribute
    // Perf penalty when disabling attribute 0:
    // https://stackoverflow.com/questions/20305231/webgl-warning-attribute-0-is-disabled-
    // this-has-significant-performance-penalt
 
  }, {
    key: 'disable',
    value: function disable(location) {
      var _this4 = this;
 
      var disableZero = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
 
      if (location > 0 || disableZero) {
        this.bind(function () {
          _this4.gl.disableVertexAttribArray(location);
        });
      }
    }
 
    // Set the frequency divisor used for instanced rendering.
 
  }, {
    key: 'setDivisor',
    value: function setDivisor(location, divisor) {
      var _this5 = this;
 
      this.bind(function () {
        _this5.ext.vertexAttribDivisor(location, divisor);
      });
    }
 
    // Set a location in vertex attributes array to a buffer
 
  }, {
    key: 'setBuffer',
    value: function setBuffer() {
      var _ref4 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
          location = _ref4.location,
          buffer = _ref4.buffer,
          target = _ref4.target,
          layout = _ref4.layout;
 
      var gl = this.gl;
 
      // Copy main data characteristics from buffer
 
      target = target !== undefined ? target : buffer.target;
      layout = layout !== undefined ? layout : buffer.layout;
      __WEBPACK_IMPORTED_MODULE_3_assert___default()(target, 'setBuffer needs target');
      __WEBPACK_IMPORTED_MODULE_3_assert___default()(layout, 'setBuffer called on uninitialized buffer');
      this._filledLocations[location] = true;
 
      this.bind(function () {
        // a non-zero named buffer object must be bound to the GL_ARRAY_BUFFER target
        buffer.bind({ target: gl.ARRAY_BUFFER });
 
        var _layout = layout,
            size = _layout.size,
            type = _layout.type,
            normalized = _layout.normalized,
            stride = _layout.stride,
            offset = _layout.offset;
        // Attach _bound ARRAY_BUFFER with specified buffer format to location
 
        if (!layout.integer) {
          gl.vertexAttribPointer(location, size, type, normalized, stride, offset);
        } else {
          // specifies *integer* data formats and locations of vertex attributes
          __WEBPACK_IMPORTED_MODULE_3_assert___default()(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__context__["b" /* isWebGL2 */])(gl));
          gl.vertexAttribIPointer(location, size, type, stride, offset);
        }
      });
    }
 
    // Specify values for generic vertex attributes
 
  }, {
    key: 'setGeneric',
    value: function setGeneric(_ref5) {
      var location = _ref5.location,
          array = _ref5.array;
 
      this._filledLocations[location] = true;
      switch (array.constructor) {
        case Float32Array:
          this._setGenericFloatArray(location, array);
          break;
        case Int32Array:
          this._setGenericIntArray(location, array);
          break;
        case Uint32Array:
          this._setGenericUintArray(location, array);
          break;
        default:
          this.setGenericValues.apply(this, [location].concat(_toConsumableArray(array)));
      }
    }
  }, {
    key: '_setGenericFloatArray',
    value: function _setGenericFloatArray(location, array) {
      var gl = this.gl;
 
      switch (array.length) {
        case 1:
          gl.vertexAttrib1fv(location, array);break;
        case 2:
          gl.vertexAttrib2fv(location, array);break;
        case 3:
          gl.vertexAttrib3fv(location, array);break;
        case 4:
          gl.vertexAttrib4fv(location, array);break;
        default:
          __WEBPACK_IMPORTED_MODULE_3_assert___default()(false);
      }
    }
  }, {
    key: '_setGenericIntArray',
    value: function _setGenericIntArray(location, array) {
      var gl = this.gl;
 
      __WEBPACK_IMPORTED_MODULE_3_assert___default()(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__context__["b" /* isWebGL2 */])(gl));
      switch (array.length) {
        case 1:
          gl.vertexAttribI1iv(location, array);break;
        case 2:
          gl.vertexAttribI2iv(location, array);break;
        case 3:
          gl.vertexAttribI3iv(location, array);break;
        case 4:
          gl.vertexAttribI4iv(location, array);break;
        default:
          __WEBPACK_IMPORTED_MODULE_3_assert___default()(false);
      }
    }
  }, {
    key: '_setGenericUintArray',
    value: function _setGenericUintArray(location, array) {
      var gl = this.gl;
 
      __WEBPACK_IMPORTED_MODULE_3_assert___default()(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__context__["b" /* isWebGL2 */])(gl));
      switch (array.length) {
        case 1:
          gl.vertexAttribI1uiv(location, array);break;
        case 2:
          gl.vertexAttribI2uiv(location, array);break;
        case 3:
          gl.vertexAttribI3uiv(location, array);break;
        case 4:
          gl.vertexAttribI4uiv(location, array);break;
        default:
          __WEBPACK_IMPORTED_MODULE_3_assert___default()(false);
      }
    }
 
    // Specify values for generic vertex attributes
 
  }, {
    key: 'setGenericValues',
    value: function setGenericValues(location, v0, v1, v2, v3) {
      var gl = this.gl;
 
      switch (arguments.length - 1) {
        case 1:
          gl.vertexAttrib1f(location, v0);break;
        case 2:
          gl.vertexAttrib2f(location, v0, v1);break;
        case 3:
          gl.vertexAttrib3f(location, v0, v1, v2);break;
        case 4:
          gl.vertexAttrib4f(location, v0, v1, v2, v3);break;
        default:
          __WEBPACK_IMPORTED_MODULE_3_assert___default()(false);
      }
 
      // assert(gl instanceof WebGL2RenderingContext, 'WebGL2 required');
      // Looks like these will check how many arguments were supplied?
      // gl.vertexAttribI4i(location, v0, v1, v2, v3);
      // gl.vertexAttribI4ui(location, v0, v1, v2, v3);
    }
  }, {
    key: 'bind',
    value: function bind() {
      var funcOrHandle = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.handle;
 
      if (typeof funcOrHandle !== 'function') {
        this.bindVertexArray(funcOrHandle);
        return this;
      }
 
      var value = void 0;
 
      if (!this._bound) {
        this.ext.bindVertexArray(this.handle);
        this._bound = true;
 
        value = funcOrHandle();
 
        this.ext.bindVertexArray(null);
        this._bound = false;
      } else {
        value = funcOrHandle();
      }
 
      return value;
    }
 
    // PRIVATE
 
    // Auto detect draw parameters from the complement of buffers provided
 
  }, {
    key: '_deduceDrawParameters',
    value: function _deduceDrawParameters() {
      // indexing is autodetected - buffer with target gl.ELEMENT_ARRAY_BUFFER
      // index type is saved for drawElement calls
      var isInstanced = false;
      var isIndexed = false;
      var indexType = null;
 
      // Check if we have an elements array buffer
      if (this.elements) {
        isIndexed = true;
        indexType = this.elements.layout.type;
      }
 
      // Check if any instanced buffers
      this.buffers.forEach(function (buffer) {
        if (buffer.layout.instanced > 0) {
          isInstanced = true;
        }
      });
 
      return { isInstanced: isInstanced, isIndexed: isIndexed, indexType: indexType };
    }
    //         this._filledLocations[bufferName] = true;
 
  }, {
    key: '_getLocations',
    value: function _getLocations(buffers) {
      // Try to extract elements and locations
      var elements = null;
      var locations = {};
 
      for (var bufferName in buffers) {
        var buffer = buffers[bufferName];
 
        // Check if this is an elements array
        if (buffer && buffer.target === GL_ELEMENT_ARRAY_BUFFER) {
          __WEBPACK_IMPORTED_MODULE_3_assert___default()(!elements, 'Duplicate GL.ELEMENT_ARRAY_BUFFER');
          // assert(location === undefined, 'GL.ELEMENT_ARRAY_BUFFER assigned to location');
          elements = buffer;
        }
        // else if (!this._warn[bufferName]) {
        //   log.warn(2, `${this._print(bufferName)} not used`);
        //   this._warn[bufferName] = true;
        // }
 
        var location = Number(bufferName);
        // if key is a number, interpret as the location
        // if key is not a location number, assume it is a named buffer, look it up in supplied map
        if (!Number.isFinite(location)) {
          location = this.locations[bufferName];
        }
        __WEBPACK_IMPORTED_MODULE_3_assert___default()(Number.isFinite(location));
 
        __WEBPACK_IMPORTED_MODULE_3_assert___default()(!locations[location], 'Duplicate attribute for binding point ' + location);
        locations[location] = buffer;
      }
 
      return { locations: locations, elements: elements };
    }
  }, {
    key: '_sortBuffersByLocation',
    value: function _sortBuffersByLocation(buffers) {
      // Try to extract elements and locations
      var elements = null;
      var locations = new Array(this._attributeCount).fill(null);
 
      for (var bufferName in buffers) {
        var buffer = buffers[bufferName];
 
        // Check if this is an elements arrau
        if (buffer.target === GL_ELEMENT_ARRAY_BUFFER) {
          __WEBPACK_IMPORTED_MODULE_3_assert___default()(!elements, 'Duplicate GL.ELEMENT_ARRAY_BUFFER');
          // assert(location === undefined, 'GL.ELEMENT_ARRAY_BUFFER assigned to location');
          elements = buffer;
        } else if (!this._warn[bufferName]) {
          __WEBPACK_IMPORTED_MODULE_4__utils__["b" /* log */].warn(2, this._print(bufferName) + ' not used');
          this._warn[bufferName] = true;
        }
 
        var location = Number(bufferName);
        // if key is a number, interpret as the location
        // if key is not a location number, assume it is a named buffer, look it up in supplied map
        if (!Number.isFinite(location)) {
          location = this.locations[bufferName];
        }
        locations[location] = bufferName;
        __WEBPACK_IMPORTED_MODULE_3_assert___default()(locations[location] === null, 'Duplicate attribute for binding point ' + location);
        locations[location] = location;
      }
 
      return { locations: locations, elements: elements };
    }
 
    // RESOURCE IMPLEMENTATION
 
  }, {
    key: '_createHandle',
    value: function _createHandle() {
      return this.ext.createVertexArray();
    }
  }, {
    key: '_deleteHandle',
    value: function _deleteHandle(handle) {
      this.ext.deleteVertexArray(handle);
      return [this.elements];
      // return [this.elements, ...this.buffers];
    }
 
    // Generic getter for information about a vertex attribute at a given position
    // @param {GLuint} location - index of the vertex attribute.
    // @param {GLenum} pname - specifies the information to query.
    // @returns {*} - requested vertex attribute information (specified by pname)
 
  }, {
    key: '_getParameter',
    value: function _getParameter(pname, _ref6) {
      var location = _ref6.location;
 
      __WEBPACK_IMPORTED_MODULE_3_assert___default()(Number.isFinite(location));
 
      this.ext.bindVertexArray(this.handle);
 
      // Let the polyfill intercept the query
      var result = void 0;
      switch (pname) {
        case GL_VERTEX_ATTRIB_ARRAY_POINTER:
          result = this.gl.getVertexAttribOffset(location, pname);
          break;
        default:
          result = this.ext.getVertexAttrib(location, pname);
      }
 
      this.ext.bindVertexArray(null);
      return result;
    }
  }, {
    key: '_getData',
    value: function _getData() {
      var _this6 = this;
 
      return new Array(this.MAX_ATTRIBUTES).fill(0).map(function (_, location) {
        var result = {};
        PARAMETERS.forEach(function (parameter) {
          result[__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__gl_constants__["c" /* glKey */])(parameter)] = _this6.getParameter(parameter, { location: location });
        });
        return result;
      });
    }
  }, {
    key: '_bind',
    value: function _bind(handle) {
      this.ext.bindVertexArray(handle);
    }
  }, {
    key: 'filledLocations',
    get: function get() {
      return this._filledLocations;
    }
  }]);
 
  return VertexArray;
}(__WEBPACK_IMPORTED_MODULE_2__resource__["a" /* default */]);
 
/* harmony default export */ __webpack_exports__["a"] = (VertexArray);
//# sourceMappingURL=vertex-array.js.map
 
/***/ }),
/* 170 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__math_array__ = __webpack_require__(112);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__common__ = __webpack_require__(31);
var _createClass=function(){function defineProperties(target,props){for(var descriptor,i=0;i<props.length;i++)descriptor=props[i],descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,'value'in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}();function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError('Cannot call a class as a function')}function _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError('this hasn\'t been initialised - super() hasn\'t been called');return call&&('object'==typeof call||'function'==typeof call)?call:self}function _inherits(subClass,superClass){if('function'!=typeof superClass&&null!==superClass)throw new TypeError('Super expression must either be null or a function, not '+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass)}var Vector=function(_MathArray){function Vector(){return _classCallCheck(this,Vector),_possibleConstructorReturn(this,(Vector.__proto__||Object.getPrototypeOf(Vector)).apply(this,arguments))}var _Mathsqrt=Math.sqrt;return _inherits(Vector,_MathArray),_createClass(Vector,[{key:'len',value:function len(){return _Mathsqrt(this.lengthSquared())}},{key:'magnitude',value:function magnitude(){return _Mathsqrt(this.lengthSquared())}},{key:'lengthSquared',value:function lengthSquared(){for(var length=0,i=0;i<this.ELEMENTS;++i)length+=this[i]*this[i];return length}},{key:'distance',value:function distance(mathArray){return _Mathsqrt(this.distanceSquared(mathArray))}},{key:'distanceSquared',value:function distanceSquared(mathArray){for(var dist,length=0,i=0;i<this.ELEMENTS;++i)dist=this[i]-mathArray[i],length+=dist*dist;return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__common__["g" /* checkNumber */])(length)}},{key:'dot',value:function dot(mathArray){for(var product=0,i=0;i<this.ELEMENTS;++i)product+=this[i]*mathArray[i];return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__common__["g" /* checkNumber */])(product)}},{key:'normalize',value:function normalize(){var length=this.magnitude();if(0!==length)for(var i=0;i<this.ELEMENTS;++i)this[i]/=length;return this.check()}}]),Vector}(__WEBPACK_IMPORTED_MODULE_0__math_array__["a" /* default */]);/* harmony default export */ __webpack_exports__["a"] = (Vector);
//# sourceMappingURL=vector.js.map
 
/***/ }),
/* 171 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
/*
object-assign
(c) Sindre Sorhus
@license MIT
*/
 
 
/* eslint-disable no-unused-vars */
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
var hasOwnProperty = Object.prototype.hasOwnProperty;
var propIsEnumerable = Object.prototype.propertyIsEnumerable;
 
function toObject(val) {
    if (val === null || val === undefined) {
        throw new TypeError('Object.assign cannot be called with null or undefined');
    }
 
    return Object(val);
}
 
function shouldUseNative() {
    try {
        if (!Object.assign) {
            return false;
        }
 
        // Detect buggy property enumeration order in older V8 versions.
 
        // https://bugs.chromium.org/p/v8/issues/detail?id=4118
        var test1 = new String('abc');  // eslint-disable-line no-new-wrappers
        test1[5] = 'de';
        if (Object.getOwnPropertyNames(test1)[0] === '5') {
            return false;
        }
 
        // https://bugs.chromium.org/p/v8/issues/detail?id=3056
        var test2 = {};
        for (var i = 0; i < 10; i++) {
            test2['_' + String.fromCharCode(i)] = i;
        }
        var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
            return test2[n];
        });
        if (order2.join('') !== '0123456789') {
            return false;
        }
 
        // https://bugs.chromium.org/p/v8/issues/detail?id=3056
        var test3 = {};
        'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
            test3[letter] = letter;
        });
        if (Object.keys(Object.assign({}, test3)).join('') !==
                'abcdefghijklmnopqrst') {
            return false;
        }
 
        return true;
    } catch (err) {
        // We don't expect any of the above to throw, but better to be safe.
        return false;
    }
}
 
module.exports = shouldUseNative() ? Object.assign : function (target, source) {
    var from;
    var to = toObject(target);
    var symbols;
 
    for (var s = 1; s < arguments.length; s++) {
        from = Object(arguments[s]);
 
        for (var key in from) {
            if (hasOwnProperty.call(from, key)) {
                to[key] = from[key];
            }
        }
 
        if (getOwnPropertySymbols) {
            symbols = getOwnPropertySymbols(from);
            for (var i = 0; i < symbols.length; i++) {
                if (propIsEnumerable.call(from, symbols[i])) {
                    to[symbols[i]] = from[symbols[i]];
                }
            }
        }
    }
 
    return to;
};
 
 
/***/ }),
/* 172 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
/**
 * Copyright (c) 2013-present, Facebook, Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */
 
 
 
var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
 
module.exports = ReactPropTypesSecret;
 
 
/***/ }),
/* 173 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
 
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
 
// Copyright (c) 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
 
var isBrowser = typeof window !== 'undefined' && window.addEventListener;
 
var timers = new Map();
 
/**
 * Ready check for Seer initialization
 *
 * @returns {Boolean}
 */
var isReady = function isReady() {
  return isBrowser && window.__SEER_INITIALIZED__;
};
 
/**
 * Utility method allowing to throttle a user action based on a key and a minimun delay.
 *
 * @param key {String} A unique key
 * @param delay {Number} The minimal delay to throttle
 * @returns {Boolean}
 */
var throttle = function throttle(key, delay) {
  var time = timers.get(key);
  var now = Date.now();
  if (time && now - time < delay) {
    return true;
  }
  timers.set(key, now);
  return false;
};
 
var replacer = function replacer(seen) {
  return function (key, value) {
    if (value && (typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object' && seen.has(value)) {
      return;
    }
    seen.add(value);
    var isArray = Object.prototype.toString.call(value).slice(8, -1).includes('Array');
    if (isArray) {
      return Array.prototype.slice.call(value, 0, 20);
    }
    return value;
  };
};
 
/**
 * Low-level api leveraging window.postMessage
 *
 * @param type {String} The action type
 * @param payload {Any} The action payload
 */
var send = function send(type) {
  var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
 
  if (!isBrowser || !isReady()) {
    return;
  }
 
  var seen = new Set();
  var payload = JSON.stringify(data, replacer(seen));
 
  try {
    window.postMessage({ type: type, payload: payload, source: 'seer-agent' }, '*');
  } catch (e) {
    if (throttle('seer-log', 2E3)) {
      return;
    }
    console.log(e); // eslint-disable-line
  }
};
 
var listeners = new Map();
 
var listener = function listener(message) {
  if (!message || !message.data || message.data.source !== 'seer-core') {
    return;
  }
  var _message$data = message.data,
      type = _message$data.type,
      payload = _message$data.payload;
 
 
  var typeListeners = listeners.get(type);
  if (typeListeners) {
    typeListeners.forEach(function (cb) {
      return cb(payload);
    });
  }
};
 
/**
 * Initilize window listener. There will be only one for the whole process
 * to prevent too many registrations.
 *
 * This method will be called automatically if you use the `listenFor` method.
 */
var init = function init() {
  if (!isBrowser || window.__SEER_LISTENER__) {
    return;
  }
  window.addEventListener('message', listener);
  window.__SEER_LISTENER__ = true;
};
 
/**
 * Clean listener. Can be useful in case you want to unregister upcoming events
 * or liberate memory.
 */
var clean = function clean() {
  if (!isBrowser || !window.__SEER_LISTENER__) {
    return;
  }
  window.removeEventListener('message', listener);
  delete window.__SEER_LISTENER__;
};
 
/**
 * Create a listener that will be called upon events of the given key.
 *
 * @param key {String} The unique tab key
 * @param cb {Function} A callback that will receive the message payload
 */
var listenFor = function listenFor(type, cb) {
  if (!isBrowser) {
    return;
  }
  if (!type || !cb) {
    throw new Error('Please provide a type and callback');
  }
  if (!listeners.has(type)) {
    listeners.set(type, []);
  }
  if (!window.__SEER_LISTENER__) {
    init();
  }
  listeners.get(type).push(cb);
};
 
/**
 * Remove an identity listener
 *
 * @param cb {Function} The callback to remove
 */
var removeListener = function removeListener(cb) {
  listeners.forEach(function (typeListeners, key) {
    listeners.set(key, typeListeners.filter(function (l) {
      return l !== cb;
    }));
  });
};
 
/**
 * Creates a new indexed list.
 * It works by index to get O(1) accessing and performance.
 *
 * @param key {String} The key of the tab
 * @param data {Object} The indexed object
 */
var list = function list(key, data) {
  return send('LIST', { key: key, data: data });
};
 
/**
 * Creates an element in the indexed list, based on the itemKey.
 *
 * @param key {String} The key of the tab
 * @param itemKey {String} The key of the item
 * @param data {Any} The value of the item
 */
var listItem = function listItem(key, itemKey) {
  var data = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  return send('LIST_ITEM', { key: key, itemKey: itemKey, data: data });
};
 
/**
 * Update an item property, can be deeply nested.
 *
 * @param key {String} The key of the tab
 * @param itemKey {String} The key of the item
 * @param path {String} The path of the variable you want to update
 * @param data {Object} The new value
 */
var updateItem = function updateItem(key, itemKey, path, data) {
  return send('UPDATE_ITEM', { key: key, itemKey: itemKey, path: path, data: data });
};
 
/**
 * Similar to updateItem, but allows to pass an array with {path,data} pairs for
 * multiple update of the same item without having to send multiple messages.
 *
 * @param key {String} The key of the tab
 * @param itemKey {String} The key of the item
 * @param array {Array} The array of updates
 * @param array.path {String} The path for this update
 * @param array.data {Object} The value of this update
 */
var multiUpdate = function multiUpdate(key, itemKey, array) {
  return send('MULTI_UPDATE_ITEM', { key: key, itemKey: itemKey, array: array });
};
 
/**
 * Remove a specific item in a specific tab.
 *
 * @param key {String} They key of the tab
 * @param itemKey {String} The key of the item
 */
var deleteItem = function deleteItem(key, itemKey) {
  return send('DELETE_ITEM', { key: key, itemKey: itemKey });
};
 
/**
 * Will create a log message to an item, that will be displayde with the current time.
 *
 * @param key {String} The key of the tab
 * @param itemKey {String} The key of the item
 * @param msg {String} The message to display
 */
var addLog = function addLog(key, itemKey, msg) {
  return send('ADD_LOG', { key: key, itemKey: itemKey, msg: msg });
};
 
exports.default = {
 
  send: send,
  throttle: throttle,
  isReady: isReady,
 
  list: list,
  listItem: listItem,
  updateItem: updateItem,
  multiUpdate: multiUpdate,
  deleteItem: deleteItem,
  addLog: addLog,
 
  listeners: listeners,
  listenFor: listenFor,
  removeListener: removeListener,
  init: init,
  clean: clean
 
};
 
 
/***/ }),
/* 174 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
 
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
 
var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
 
var _core = __webpack_require__(13);
 
var _luma = __webpack_require__(12);
 
var _gridCellLayerVertex = __webpack_require__(297);
 
var _gridCellLayerVertex2 = _interopRequireDefault(_gridCellLayerVertex);
 
var _gridCellLayerVertex3 = __webpack_require__(296);
 
var _gridCellLayerVertex4 = _interopRequireDefault(_gridCellLayerVertex3);
 
var _gridCellLayerFragment = __webpack_require__(295);
 
var _gridCellLayerFragment2 = _interopRequireDefault(_gridCellLayerFragment);
 
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
 
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
 
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
 
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // Copyright (c) 2015 - 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
 
var fp64LowPart = _core.experimental.fp64LowPart,
    enable64bitSupport = _core.experimental.enable64bitSupport;
 
 
var DEFAULT_COLOR = [255, 0, 255, 255];
 
var defaultProps = {
  cellSize: 1000,
  coverage: 1,
  elevationScale: 1,
  extruded: true,
  fp64: false,
 
  getPosition: function getPosition(x) {
    return x.position;
  },
  getElevation: function getElevation(x) {
    return x.elevation;
  },
  getColor: function getColor(x) {
    return x.color;
  },
 
  lightSettings: {
    lightsPosition: [-122.45, 37.65, 8000, -122.45, 37.2, 1000],
    ambientRatio: 0.4,
    diffuseRatio: 0.6,
    specularRatio: 0.8,
    lightsStrength: [1.0, 0.0, 0.8, 0.0],
    numberOfLights: 2
  }
};
 
var GridCellLayer = function (_Layer) {
  _inherits(GridCellLayer, _Layer);
 
  function GridCellLayer() {
    _classCallCheck(this, GridCellLayer);
 
    return _possibleConstructorReturn(this, (GridCellLayer.__proto__ || Object.getPrototypeOf(GridCellLayer)).apply(this, arguments));
  }
 
  _createClass(GridCellLayer, [{
    key: 'getShaders',
 
    /**
     * A generic GridLayer that takes latitude longitude delta of cells as a uniform
     * and the min lat lng of cells. grid can be 3d when pass in a height
     * and set enable3d to true
     *
     * @param {array} props.data -
     * @param {boolean} props.extruded - enable grid elevation
     * @param {number} props.cellSize - grid cell size in meters
     * @param {function} props.getPosition - position accessor, returned as [minLng, minLat]
     * @param {function} props.getElevation - elevation accessor
     * @param {function} props.getColor - color accessor, returned as [r, g, b, a]
     */
 
    value: function getShaders() {
      var shaderCache = this.context.shaderCache;
 
      return enable64bitSupport(this.props) ? { vs: _gridCellLayerVertex4.default, fs: _gridCellLayerFragment2.default, modules: ['project64', 'lighting', 'picking'], shaderCache: shaderCache } : { vs: _gridCellLayerVertex2.default, fs: _gridCellLayerFragment2.default, modules: ['lighting', 'picking'], shaderCache: shaderCache }; // 'project' module added by default.
    }
  }, {
    key: 'initializeState',
    value: function initializeState() {
      var attributeManager = this.getAttributeManager();
      /* eslint-disable max-len */
      attributeManager.addInstanced({
        instancePositions: {
          size: 4,
          transition: true,
          accessor: ['getPosition', 'getElevation'],
          update: this.calculateInstancePositions
        },
        instanceColors: {
          size: 4,
          type: _luma.GL.UNSIGNED_BYTE,
          transition: true,
          accessor: 'getColor',
          update: this.calculateInstanceColors
        }
      });
      /* eslint-enable max-len */
    }
  }, {
    key: 'updateAttribute',
    value: function updateAttribute(_ref) {
      var props = _ref.props,
          oldProps = _ref.oldProps,
          changeFlags = _ref.changeFlags;
 
      if (props.fp64 !== oldProps.fp64) {
        var attributeManager = this.getAttributeManager();
        attributeManager.invalidateAll();
 
        if (props.fp64 && props.coordinateSystem === _core.COORDINATE_SYSTEM.LNGLAT) {
          attributeManager.addInstanced({
            instancePositions64xyLow: {
              size: 2,
              accessor: 'getPosition',
              update: this.calculateInstancePositions64xyLow
            }
          });
        } else {
          attributeManager.remove(['instancePositions64xyLow']);
        }
      }
    }
  }, {
    key: 'updateState',
    value: function updateState(_ref2) {
      var props = _ref2.props,
          oldProps = _ref2.oldProps,
          changeFlags = _ref2.changeFlags;
 
      _get(GridCellLayer.prototype.__proto__ || Object.getPrototypeOf(GridCellLayer.prototype), 'updateState', this).call(this, { props: props, oldProps: oldProps, changeFlags: changeFlags });
      // Re-generate model if geometry changed
      if (props.fp64 !== oldProps.fp64) {
        var gl = this.context.gl;
 
        this.setState({ model: this._getModel(gl) });
      }
      this.updateAttribute({ props: props, oldProps: oldProps, changeFlags: changeFlags });
      this.updateUniforms();
    }
  }, {
    key: '_getModel',
    value: function _getModel(gl) {
      return new _luma.Model(gl, Object.assign({}, this.getShaders(), {
        id: this.props.id,
        geometry: new _luma.CubeGeometry(),
        isInstanced: true,
        shaderCache: this.context.shaderCache
      }));
    }
  }, {
    key: 'updateUniforms',
    value: function updateUniforms() {
      var _props = this.props,
          opacity = _props.opacity,
          extruded = _props.extruded,
          elevationScale = _props.elevationScale,
          coverage = _props.coverage,
          lightSettings = _props.lightSettings;
      var model = this.state.model;
 
 
      model.setUniforms(Object.assign({}, {
        extruded: extruded,
        elevationScale: elevationScale,
        opacity: opacity,
        coverage: coverage
      }, lightSettings));
    }
  }, {
    key: 'draw',
    value: function draw(_ref3) {
      var uniforms = _ref3.uniforms;
      var viewport = this.context.viewport;
      // TODO - this should be a standard uniform in project package
 
      var _viewport$getDistance = viewport.getDistanceScales(),
          pixelsPerMeter = _viewport$getDistance.pixelsPerMeter;
 
      // cellSize needs to be updated on every draw call
      // because it is based on viewport
 
 
      _get(GridCellLayer.prototype.__proto__ || Object.getPrototypeOf(GridCellLayer.prototype), 'draw', this).call(this, {
        uniforms: Object.assign({
          cellSize: this.props.cellSize * pixelsPerMeter[0]
        }, uniforms)
      });
    }
  }, {
    key: 'calculateInstancePositions',
    value: function calculateInstancePositions(attribute) {
      var _props2 = this.props,
          data = _props2.data,
          getPosition = _props2.getPosition,
          getElevation = _props2.getElevation;
      var value = attribute.value,
          size = attribute.size;
 
      var i = 0;
      var _iteratorNormalCompletion = true;
      var _didIteratorError = false;
      var _iteratorError = undefined;
 
      try {
        for (var _iterator = data[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
          var object = _step.value;
 
          var position = getPosition(object);
          var elevation = getElevation(object) || 0;
          value[i + 0] = position[0];
          value[i + 1] = position[1];
          value[i + 2] = 0;
          value[i + 3] = elevation;
          i += size;
        }
      } catch (err) {
        _didIteratorError = true;
        _iteratorError = err;
      } finally {
        try {
          if (!_iteratorNormalCompletion && _iterator.return) {
            _iterator.return();
          }
        } finally {
          if (_didIteratorError) {
            throw _iteratorError;
          }
        }
      }
    }
  }, {
    key: 'calculateInstancePositions64xyLow',
    value: function calculateInstancePositions64xyLow(attribute) {
      var _props3 = this.props,
          data = _props3.data,
          getPosition = _props3.getPosition;
      var value = attribute.value;
 
      var i = 0;
      var _iteratorNormalCompletion2 = true;
      var _didIteratorError2 = false;
      var _iteratorError2 = undefined;
 
      try {
        for (var _iterator2 = data[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
          var point = _step2.value;
 
          var position = getPosition(point);
          value[i++] = fp64LowPart(position[0]);
          value[i++] = fp64LowPart(position[1]);
        }
      } catch (err) {
        _didIteratorError2 = true;
        _iteratorError2 = err;
      } finally {
        try {
          if (!_iteratorNormalCompletion2 && _iterator2.return) {
            _iterator2.return();
          }
        } finally {
          if (_didIteratorError2) {
            throw _iteratorError2;
          }
        }
      }
    }
  }, {
    key: 'calculateInstanceColors',
    value: function calculateInstanceColors(attribute) {
      var _props4 = this.props,
          data = _props4.data,
          getColor = _props4.getColor;
      var value = attribute.value,
          size = attribute.size;
 
      var i = 0;
      var _iteratorNormalCompletion3 = true;
      var _didIteratorError3 = false;
      var _iteratorError3 = undefined;
 
      try {
        for (var _iterator3 = data[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {
          var object = _step3.value;
 
          var color = getColor(object) || DEFAULT_COLOR;
          value[i + 0] = color[0];
          value[i + 1] = color[1];
          value[i + 2] = color[2];
          value[i + 3] = Number.isFinite(color[3]) ? color[3] : DEFAULT_COLOR[3];
          i += size;
        }
      } catch (err) {
        _didIteratorError3 = true;
        _iteratorError3 = err;
      } finally {
        try {
          if (!_iteratorNormalCompletion3 && _iterator3.return) {
            _iterator3.return();
          }
        } finally {
          if (_didIteratorError3) {
            throw _iteratorError3;
          }
        }
      }
    }
  }]);
 
  return GridCellLayer;
}(_core.Layer);
 
exports.default = GridCellLayer;
 
 
GridCellLayer.layerName = 'GridCellLayer';
GridCellLayer.defaultProps = defaultProps;
 
/***/ }),
/* 175 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
 
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
 
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
 
var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
 
var _core = __webpack_require__(13);
 
var _luma = __webpack_require__(12);
 
var _hexagonCellLayerVertex = __webpack_require__(302);
 
var _hexagonCellLayerVertex2 = _interopRequireDefault(_hexagonCellLayerVertex);
 
var _hexagonCellLayerVertex3 = __webpack_require__(301);
 
var _hexagonCellLayerVertex4 = _interopRequireDefault(_hexagonCellLayerVertex3);
 
var _hexagonCellLayerFragment = __webpack_require__(300);
 
var _hexagonCellLayerFragment2 = _interopRequireDefault(_hexagonCellLayerFragment);
 
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
 
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
 
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
 
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // Copyright (c) 2015 - 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
 
var log = _core.experimental.log,
    fp64LowPart = _core.experimental.fp64LowPart,
    enable64bitSupport = _core.experimental.enable64bitSupport;
 
 
var DEFAULT_COLOR = [255, 0, 255, 255];
 
var defaultProps = {
  hexagonVertices: null,
  radius: null,
  angle: null,
  coverage: 1,
  elevationScale: 1,
  extruded: true,
  fp64: false,
 
  getCentroid: function getCentroid(x) {
    return x.centroid;
  },
  getColor: function getColor(x) {
    return x.color;
  },
  getElevation: function getElevation(x) {
    return x.elevation;
  },
 
  lightSettings: {
    lightsPosition: [-122.45, 37.75, 8000, -122.0, 38.0, 5000],
    ambientRatio: 0.4,
    diffuseRatio: 0.6,
    specularRatio: 0.8,
    lightsStrength: [1.2, 0.0, 0.8, 0.0],
    numberOfLights: 2
  }
};
 
var HexagonCellLayer = function (_Layer) {
  _inherits(HexagonCellLayer, _Layer);
 
  function HexagonCellLayer(props) {
    _classCallCheck(this, HexagonCellLayer);
 
    var missingProps = false;
    if (!props.hexagonVertices && (!props.radius || !Number.isFinite(props.angle))) {
      log.once(0, 'HexagonCellLayer: Either hexagonVertices or radius and angle are ' + 'needed to calculate primitive hexagon.');
      missingProps = true;
    } else if (props.hexagonVertices && (!Array.isArray(props.hexagonVertices) || props.hexagonVertices.length < 6)) {
      log.once(0, 'HexagonCellLayer: hexagonVertices needs to be an array of 6 points');
 
      missingProps = true;
    }
 
    if (missingProps) {
      log.once(0, 'Now using 1000 meter as default radius, 0 as default angle');
      props.radius = 1000;
      props.angle = 0;
    }
 
    return _possibleConstructorReturn(this, (HexagonCellLayer.__proto__ || Object.getPrototypeOf(HexagonCellLayer)).call(this, props));
  }
 
  _createClass(HexagonCellLayer, [{
    key: 'getShaders',
    value: function getShaders() {
      return enable64bitSupport(this.props) ? { vs: _hexagonCellLayerVertex4.default, fs: _hexagonCellLayerFragment2.default, modules: ['project64', 'lighting', 'picking'] } : { vs: _hexagonCellLayerVertex2.default, fs: _hexagonCellLayerFragment2.default, modules: ['lighting', 'picking'] }; // 'project' module added by default.
    }
 
    /**
     * DeckGL calls initializeState when GL context is available
     * Essentially a deferred constructor
     */
 
  }, {
    key: 'initializeState',
    value: function initializeState() {
      var attributeManager = this.getAttributeManager();
      /* eslint-disable max-len */
      attributeManager.addInstanced({
        instancePositions: {
          size: 3,
          transition: true,
          accessor: ['getCentroid', 'getElevation'],
          update: this.calculateInstancePositions
        },
        instanceColors: {
          size: 4,
          type: _luma.GL.UNSIGNED_BYTE,
          transition: true,
          accessor: 'getColor',
          update: this.calculateInstanceColors
        }
      });
      /* eslint-enable max-len */
    }
  }, {
    key: 'updateAttribute',
    value: function updateAttribute(_ref) {
      var props = _ref.props,
          oldProps = _ref.oldProps,
          changeFlags = _ref.changeFlags;
 
      if (props.fp64 !== oldProps.fp64) {
        var attributeManager = this.getAttributeManager();
        attributeManager.invalidateAll();
 
        if (props.fp64 && props.coordinateSystem === _core.COORDINATE_SYSTEM.LNGLAT) {
          attributeManager.addInstanced({
            instancePositions64xyLow: {
              size: 2,
              accessor: 'getCentroid',
              update: this.calculateInstancePositions64xyLow
            }
          });
        } else {
          attributeManager.remove(['instancePositions64xyLow']);
        }
      }
    }
  }, {
    key: 'updateState',
    value: function updateState(_ref2) {
      var props = _ref2.props,
          oldProps = _ref2.oldProps,
          changeFlags = _ref2.changeFlags;
 
      _get(HexagonCellLayer.prototype.__proto__ || Object.getPrototypeOf(HexagonCellLayer.prototype), 'updateState', this).call(this, { props: props, oldProps: oldProps, changeFlags: changeFlags });
      if (props.fp64 !== oldProps.fp64) {
        var gl = this.context.gl;
 
        this.setState({ model: this._getModel(gl) });
      }
      this.updateAttribute({ props: props, oldProps: oldProps, changeFlags: changeFlags });
 
      this.updateUniforms();
    }
  }, {
    key: 'updateRadiusAngle',
    value: function updateRadiusAngle() {
      var angle = void 0;
      var radius = void 0;
      var hexagonVertices = this.props.hexagonVertices;
 
 
      if (Array.isArray(hexagonVertices) && hexagonVertices.length >= 6) {
        // calculate angle and vertices from hexagonVertices if provided
        var vertices = this.props.hexagonVertices;
 
        var vertex0 = vertices[0];
        var vertex3 = vertices[3];
 
        // transform to space coordinates
        var spaceCoord0 = this.projectFlat(vertex0);
        var spaceCoord3 = this.projectFlat(vertex3);
 
        // distance between two close centroids
        var dx = spaceCoord0[0] - spaceCoord3[0];
        var dy = spaceCoord0[1] - spaceCoord3[1];
        var dxy = Math.sqrt(dx * dx + dy * dy);
 
        // Calculate angle that the perpendicular hexagon vertex axis is tilted
        angle = Math.acos(dx / dxy) * -Math.sign(dy) + Math.PI / 2;
        radius = dxy / 2;
      } else if (this.props.radius && Number.isFinite(this.props.angle)) {
        // if no hexagonVertices provided, try use radius & angle
        var viewport = this.context.viewport;
        // TODO - this should be a standard uniform in project package
 
        var _viewport$getDistance = viewport.getDistanceScales(),
            pixelsPerMeter = _viewport$getDistance.pixelsPerMeter;
 
        angle = this.props.angle;
        radius = this.props.radius * pixelsPerMeter[0];
      }
 
      return { angle: angle, radius: radius };
    }
  }, {
    key: 'getCylinderGeometry',
    value: function getCylinderGeometry(radius) {
      return new _luma.CylinderGeometry({
        radius: radius,
        topRadius: radius,
        bottomRadius: radius,
        topCap: true,
        bottomCap: true,
        height: 1,
        nradial: 6,
        nvertical: 1
      });
    }
  }, {
    key: 'updateUniforms',
    value: function updateUniforms() {
      var _props = this.props,
          opacity = _props.opacity,
          elevationScale = _props.elevationScale,
          extruded = _props.extruded,
          coverage = _props.coverage,
          lightSettings = _props.lightSettings;
      var model = this.state.model;
 
 
      model.setUniforms(Object.assign({}, {
        extruded: extruded,
        opacity: opacity,
        coverage: coverage,
        elevationScale: elevationScale
      }, lightSettings));
    }
  }, {
    key: '_getModel',
    value: function _getModel(gl) {
      return new _luma.Model(gl, Object.assign({}, this.getShaders(), {
        id: this.props.id,
        geometry: this.getCylinderGeometry(1),
        isInstanced: true,
        shaderCache: this.context.shaderCache
      }));
    }
  }, {
    key: 'draw',
    value: function draw(_ref3) {
      var uniforms = _ref3.uniforms;
 
      _get(HexagonCellLayer.prototype.__proto__ || Object.getPrototypeOf(HexagonCellLayer.prototype), 'draw', this).call(this, { uniforms: Object.assign(this.updateRadiusAngle(), uniforms) });
    }
  }, {
    key: 'calculateInstancePositions',
    value: function calculateInstancePositions(attribute) {
      var _props2 = this.props,
          data = _props2.data,
          getCentroid = _props2.getCentroid,
          getElevation = _props2.getElevation;
      var value = attribute.value,
          size = attribute.size;
 
      var i = 0;
      var _iteratorNormalCompletion = true;
      var _didIteratorError = false;
      var _iteratorError = undefined;
 
      try {
        for (var _iterator = data[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
          var object = _step.value;
 
          var _getCentroid = getCentroid(object),
              _getCentroid2 = _slicedToArray(_getCentroid, 2),
              lon = _getCentroid2[0],
              lat = _getCentroid2[1];
 
          var elevation = getElevation(object);
          value[i + 0] = lon;
          value[i + 1] = lat;
          value[i + 2] = elevation || 0;
          i += size;
        }
      } catch (err) {
        _didIteratorError = true;
        _iteratorError = err;
      } finally {
        try {
          if (!_iteratorNormalCompletion && _iterator.return) {
            _iterator.return();
          }
        } finally {
          if (_didIteratorError) {
            throw _iteratorError;
          }
        }
      }
    }
  }, {
    key: 'calculateInstancePositions64xyLow',
    value: function calculateInstancePositions64xyLow(attribute) {
      var _props3 = this.props,
          data = _props3.data,
          getCentroid = _props3.getCentroid;
      var value = attribute.value;
 
      var i = 0;
      var _iteratorNormalCompletion2 = true;
      var _didIteratorError2 = false;
      var _iteratorError2 = undefined;
 
      try {
        for (var _iterator2 = data[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
          var object = _step2.value;
 
          var position = getCentroid(object);
          value[i++] = fp64LowPart(position[0]);
          value[i++] = fp64LowPart(position[1]);
        }
      } catch (err) {
        _didIteratorError2 = true;
        _iteratorError2 = err;
      } finally {
        try {
          if (!_iteratorNormalCompletion2 && _iterator2.return) {
            _iterator2.return();
          }
        } finally {
          if (_didIteratorError2) {
            throw _iteratorError2;
          }
        }
      }
    }
  }, {
    key: 'calculateInstanceColors',
    value: function calculateInstanceColors(attribute) {
      var _props4 = this.props,
          data = _props4.data,
          getColor = _props4.getColor;
      var value = attribute.value,
          size = attribute.size;
 
      var i = 0;
      var _iteratorNormalCompletion3 = true;
      var _didIteratorError3 = false;
      var _iteratorError3 = undefined;
 
      try {
        for (var _iterator3 = data[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {
          var object = _step3.value;
 
          var color = getColor(object) || DEFAULT_COLOR;
 
          value[i + 0] = color[0];
          value[i + 1] = color[1];
          value[i + 2] = color[2];
          value[i + 3] = Number.isFinite(color[3]) ? color[3] : DEFAULT_COLOR[3];
          i += size;
        }
      } catch (err) {
        _didIteratorError3 = true;
        _iteratorError3 = err;
      } finally {
        try {
          if (!_iteratorNormalCompletion3 && _iterator3.return) {
            _iterator3.return();
          }
        } finally {
          if (_didIteratorError3) {
            throw _iteratorError3;
          }
        }
      }
    }
  }]);
 
  return HexagonCellLayer;
}(_core.Layer);
 
exports.default = HexagonCellLayer;
 
 
HexagonCellLayer.layerName = 'HexagonCellLayer';
HexagonCellLayer.defaultProps = defaultProps;
 
/***/ }),
/* 176 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
 
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
 
var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
 
var _core = __webpack_require__(13);
 
var _luma = __webpack_require__(12);
 
var _scatterplotLayerVertex = __webpack_require__(324);
 
var _scatterplotLayerVertex2 = _interopRequireDefault(_scatterplotLayerVertex);
 
var _scatterplotLayerVertex3 = __webpack_require__(323);
 
var _scatterplotLayerVertex4 = _interopRequireDefault(_scatterplotLayerVertex3);
 
var _scatterplotLayerFragment = __webpack_require__(322);
 
var _scatterplotLayerFragment2 = _interopRequireDefault(_scatterplotLayerFragment);
 
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
 
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
 
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
 
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // Copyright (c) 2015 - 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
 
var fp64LowPart = _core.experimental.fp64LowPart,
    enable64bitSupport = _core.experimental.enable64bitSupport;
 
 
var DEFAULT_COLOR = [0, 0, 0, 255];
 
var defaultProps = {
  radiusScale: 1,
  radiusMinPixels: 0, //  min point radius in pixels
  radiusMaxPixels: Number.MAX_SAFE_INTEGER, // max point radius in pixels
  strokeWidth: 1,
  outline: false,
  fp64: false,
 
  getPosition: function getPosition(x) {
    return x.position;
  },
  getRadius: function getRadius(x) {
    return x.radius || 1;
  },
  getColor: function getColor(x) {
    return x.color || DEFAULT_COLOR;
  }
};
 
var ScatterplotLayer = function (_Layer) {
  _inherits(ScatterplotLayer, _Layer);
 
  function ScatterplotLayer() {
    _classCallCheck(this, ScatterplotLayer);
 
    return _possibleConstructorReturn(this, (ScatterplotLayer.__proto__ || Object.getPrototypeOf(ScatterplotLayer)).apply(this, arguments));
  }
 
  _createClass(ScatterplotLayer, [{
    key: 'getShaders',
    value: function getShaders(id) {
      var shaderCache = this.context.shaderCache;
 
      return enable64bitSupport(this.props) ? { vs: _scatterplotLayerVertex4.default, fs: _scatterplotLayerFragment2.default, modules: ['project64', 'picking'], shaderCache: shaderCache } : { vs: _scatterplotLayerVertex2.default, fs: _scatterplotLayerFragment2.default, modules: ['picking'], shaderCache: shaderCache }; // 'project' module added by default.
    }
  }, {
    key: 'initializeState',
    value: function initializeState() {
      /* eslint-disable max-len */
      this.state.attributeManager.addInstanced({
        instancePositions: {
          size: 3,
          transition: true,
          accessor: 'getPosition',
          update: this.calculateInstancePositions
        },
        instanceRadius: {
          size: 1,
          transition: true,
          accessor: 'getRadius',
          defaultValue: 1,
          update: this.calculateInstanceRadius
        },
        instanceColors: {
          size: 4,
          transition: true,
          type: _luma.GL.UNSIGNED_BYTE,
          accessor: 'getColor',
          update: this.calculateInstanceColors
        }
      });
      /* eslint-enable max-len */
    }
  }, {
    key: 'updateAttribute',
    value: function updateAttribute(_ref) {
      var props = _ref.props,
          oldProps = _ref.oldProps,
          changeFlags = _ref.changeFlags;
 
      if (props.fp64 !== oldProps.fp64) {
        var attributeManager = this.getAttributeManager();
        attributeManager.invalidateAll();
 
        if (props.fp64 && props.coordinateSystem === _core.COORDINATE_SYSTEM.LNGLAT) {
          attributeManager.addInstanced({
            instancePositions64xyLow: {
              size: 2,
              accessor: 'getPosition',
              update: this.calculateInstancePositions64xyLow
            }
          });
        } else {
          attributeManager.remove(['instancePositions64xyLow']);
        }
      }
    }
  }, {
    key: 'updateState',
    value: function updateState(_ref2) {
      var props = _ref2.props,
          oldProps = _ref2.oldProps,
          changeFlags = _ref2.changeFlags;
 
      _get(ScatterplotLayer.prototype.__proto__ || Object.getPrototypeOf(ScatterplotLayer.prototype), 'updateState', this).call(this, { props: props, oldProps: oldProps, changeFlags: changeFlags });
      if (props.fp64 !== oldProps.fp64) {
        var gl = this.context.gl;
 
        this.setState({ model: this._getModel(gl) });
      }
      this.updateAttribute({ props: props, oldProps: oldProps, changeFlags: changeFlags });
    }
  }, {
    key: 'draw',
    value: function draw(_ref3) {
      var uniforms = _ref3.uniforms;
      var _props = this.props,
          radiusScale = _props.radiusScale,
          radiusMinPixels = _props.radiusMinPixels,
          radiusMaxPixels = _props.radiusMaxPixels,
          outline = _props.outline,
          strokeWidth = _props.strokeWidth;
 
      this.state.model.render(Object.assign({}, uniforms, {
        outline: outline ? 1 : 0,
        strokeWidth: strokeWidth,
        radiusScale: radiusScale,
        radiusMinPixels: radiusMinPixels,
        radiusMaxPixels: radiusMaxPixels
      }));
    }
  }, {
    key: '_getModel',
    value: function _getModel(gl) {
      // a square that minimally cover the unit circle
      var positions = [-1, -1, 0, -1, 1, 0, 1, 1, 0, 1, -1, 0];
 
      return new _luma.Model(gl, Object.assign(this.getShaders(), {
        id: this.props.id,
        geometry: new _luma.Geometry({
          drawMode: _luma.GL.TRIANGLE_FAN,
          attributes: {
            positions: new Float32Array(positions)
          }
        }),
        isInstanced: true,
        shaderCache: this.context.shaderCache
      }));
    }
  }, {
    key: 'calculateInstancePositions',
    value: function calculateInstancePositions(attribute) {
      var _props2 = this.props,
          data = _props2.data,
          getPosition = _props2.getPosition;
      var value = attribute.value;
 
      var i = 0;
      var _iteratorNormalCompletion = true;
      var _didIteratorError = false;
      var _iteratorError = undefined;
 
      try {
        for (var _iterator = data[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
          var point = _step.value;
 
          var position = getPosition(point);
          value[i++] = position[0];
          value[i++] = position[1];
          value[i++] = position[2] || 0;
        }
      } catch (err) {
        _didIteratorError = true;
        _iteratorError = err;
      } finally {
        try {
          if (!_iteratorNormalCompletion && _iterator.return) {
            _iterator.return();
          }
        } finally {
          if (_didIteratorError) {
            throw _iteratorError;
          }
        }
      }
    }
  }, {
    key: 'calculateInstancePositions64xyLow',
    value: function calculateInstancePositions64xyLow(attribute) {
      var _props3 = this.props,
          data = _props3.data,
          getPosition = _props3.getPosition;
      var value = attribute.value;
 
      var i = 0;
      var _iteratorNormalCompletion2 = true;
      var _didIteratorError2 = false;
      var _iteratorError2 = undefined;
 
      try {
        for (var _iterator2 = data[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
          var point = _step2.value;
 
          var position = getPosition(point);
          value[i++] = fp64LowPart(position[0]);
          value[i++] = fp64LowPart(position[1]);
        }
      } catch (err) {
        _didIteratorError2 = true;
        _iteratorError2 = err;
      } finally {
        try {
          if (!_iteratorNormalCompletion2 && _iterator2.return) {
            _iterator2.return();
          }
        } finally {
          if (_didIteratorError2) {
            throw _iteratorError2;
          }
        }
      }
    }
  }, {
    key: 'calculateInstanceRadius',
    value: function calculateInstanceRadius(attribute) {
      var _props4 = this.props,
          data = _props4.data,
          getRadius = _props4.getRadius;
      var value = attribute.value;
 
      var i = 0;
      var _iteratorNormalCompletion3 = true;
      var _didIteratorError3 = false;
      var _iteratorError3 = undefined;
 
      try {
        for (var _iterator3 = data[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {
          var point = _step3.value;
 
          var radius = getRadius(point);
          value[i++] = isNaN(radius) ? 1 : radius;
        }
      } catch (err) {
        _didIteratorError3 = true;
        _iteratorError3 = err;
      } finally {
        try {
          if (!_iteratorNormalCompletion3 && _iterator3.return) {
            _iterator3.return();
          }
        } finally {
          if (_didIteratorError3) {
            throw _iteratorError3;
          }
        }
      }
    }
  }, {
    key: 'calculateInstanceColors',
    value: function calculateInstanceColors(attribute) {
      var _props5 = this.props,
          data = _props5.data,
          getColor = _props5.getColor;
      var value = attribute.value;
 
      var i = 0;
      var _iteratorNormalCompletion4 = true;
      var _didIteratorError4 = false;
      var _iteratorError4 = undefined;
 
      try {
        for (var _iterator4 = data[Symbol.iterator](), _step4; !(_iteratorNormalCompletion4 = (_step4 = _iterator4.next()).done); _iteratorNormalCompletion4 = true) {
          var point = _step4.value;
 
          var color = getColor(point) || DEFAULT_COLOR;
          value[i++] = color[0];
          value[i++] = color[1];
          value[i++] = color[2];
          value[i++] = isNaN(color[3]) ? 255 : color[3];
        }
      } catch (err) {
        _didIteratorError4 = true;
        _iteratorError4 = err;
      } finally {
        try {
          if (!_iteratorNormalCompletion4 && _iterator4.return) {
            _iterator4.return();
          }
        } finally {
          if (_didIteratorError4) {
            throw _iteratorError4;
          }
        }
      }
    }
  }]);
 
  return ScatterplotLayer;
}(_core.Layer);
 
exports.default = ScatterplotLayer;
 
 
ScatterplotLayer.layerName = 'ScatterplotLayer';
ScatterplotLayer.defaultProps = defaultProps;
 
/***/ }),
/* 177 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
 
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
 
var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
 
var _core = __webpack_require__(13);
 
var _luma = __webpack_require__(12);
 
var _props2 = __webpack_require__(187);
 
var _polygonTesselator = __webpack_require__(329);
 
var _polygonTesselatorExtruded = __webpack_require__(328);
 
var _solidPolygonLayerVertex = __webpack_require__(332);
 
var _solidPolygonLayerVertex2 = _interopRequireDefault(_solidPolygonLayerVertex);
 
var _solidPolygonLayerVertex3 = __webpack_require__(331);
 
var _solidPolygonLayerVertex4 = _interopRequireDefault(_solidPolygonLayerVertex3);
 
var _solidPolygonLayerFragment = __webpack_require__(330);
 
var _solidPolygonLayerFragment2 = _interopRequireDefault(_solidPolygonLayerFragment);
 
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
 
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
 
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
 
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // Copyright (c) 2015 - 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
 
var enable64bitSupport = _core.experimental.enable64bitSupport,
    get = _core.experimental.get;
 
// Polygon geometry generation is managed by the polygon tesselator
 
var defaultProps = {
  // Whether to extrude
  extruded: false,
  // Whether to draw a GL.LINES wireframe of the polygon
  wireframe: false,
  fp64: false,
 
  // elevation multiplier
  elevationScale: 1,
 
  // Accessor for polygon geometry
  getPolygon: function getPolygon(f) {
    return get(f, 'polygon') || get(f, 'geometry.coordinates');
  },
  // Accessor for extrusion height
  getElevation: function getElevation(f) {
    return get(f, 'elevation') || get(f, 'properties.height') || 0;
  },
  // Accessor for color
  getColor: function getColor(f) {
    return get(f, 'color') || get(f, 'properties.color');
  },
 
  // Optional settings for 'lighting' shader module
  lightSettings: {
    lightsPosition: [-122.45, 37.75, 8000, -122.0, 38.0, 5000],
    ambientRatio: 0.05,
    diffuseRatio: 0.6,
    specularRatio: 0.8,
    lightsStrength: [2.0, 0.0, 0.0, 0.0],
    numberOfLights: 2
  }
};
 
var SolidPolygonLayer = function (_Layer) {
  _inherits(SolidPolygonLayer, _Layer);
 
  function SolidPolygonLayer() {
    _classCallCheck(this, SolidPolygonLayer);
 
    return _possibleConstructorReturn(this, (SolidPolygonLayer.__proto__ || Object.getPrototypeOf(SolidPolygonLayer)).apply(this, arguments));
  }
 
  _createClass(SolidPolygonLayer, [{
    key: 'getShaders',
    value: function getShaders() {
      return enable64bitSupport(this.props) ? { vs: _solidPolygonLayerVertex4.default, fs: _solidPolygonLayerFragment2.default, modules: ['project64', 'lighting', 'picking'] } : { vs: _solidPolygonLayerVertex2.default, fs: _solidPolygonLayerFragment2.default, modules: ['lighting', 'picking'] }; // 'project' module added by default.
    }
  }, {
    key: 'initializeState',
    value: function initializeState() {
      var gl = this.context.gl;
 
      this.setState({
        numInstances: 0,
        IndexType: gl.getExtension('OES_element_index_uint') ? Uint32Array : Uint16Array
      });
 
      var attributeManager = this.getAttributeManager();
      var noAlloc = true;
      /* eslint-disable max-len */
      attributeManager.add({
        indices: { size: 1, isIndexed: true, update: this.calculateIndices, noAlloc: noAlloc },
        positions: { size: 3, accessor: 'getElevation', update: this.calculatePositions, noAlloc: noAlloc },
        normals: { size: 3, update: this.calculateNormals, noAlloc: noAlloc },
        colors: {
          size: 4,
          type: _luma.GL.UNSIGNED_BYTE,
          accessor: 'getColor',
          update: this.calculateColors,
          noAlloc: noAlloc
        },
        pickingColors: { size: 3, type: _luma.GL.UNSIGNED_BYTE, update: this.calculatePickingColors, noAlloc: noAlloc }
      });
      /* eslint-enable max-len */
    }
  }, {
    key: 'updateAttribute',
    value: function updateAttribute(_ref) {
      var props = _ref.props,
          oldProps = _ref.oldProps,
          changeFlags = _ref.changeFlags;
 
      if (props.fp64 !== oldProps.fp64) {
        var attributeManager = this.getAttributeManager();
        attributeManager.invalidateAll();
 
        if (props.fp64 && props.coordinateSystem === _core.COORDINATE_SYSTEM.LNGLAT) {
          attributeManager.add({
            positions64xyLow: { size: 2, update: this.calculatePositionsLow }
          });
        } else {
          attributeManager.remove(['positions64xyLow']);
        }
      }
    }
  }, {
    key: 'draw',
    value: function draw(_ref2) {
      var uniforms = _ref2.uniforms;
      var _props = this.props,
          extruded = _props.extruded,
          lightSettings = _props.lightSettings,
          elevationScale = _props.elevationScale;
 
 
      this.state.model.render(Object.assign({}, uniforms, {
        extruded: extruded ? 1.0 : 0.0,
        elevationScale: elevationScale
      }, lightSettings));
    }
  }, {
    key: 'updateState',
    value: function updateState(_ref3) {
      var props = _ref3.props,
          oldProps = _ref3.oldProps,
          changeFlags = _ref3.changeFlags;
 
      _get(SolidPolygonLayer.prototype.__proto__ || Object.getPrototypeOf(SolidPolygonLayer.prototype), 'updateState', this).call(this, { props: props, oldProps: oldProps, changeFlags: changeFlags });
 
      var regenerateModel = this.updateGeometry({ props: props, oldProps: oldProps, changeFlags: changeFlags });
 
      if (regenerateModel) {
        var gl = this.context.gl;
 
        this.setState({ model: this._getModel(gl) });
      }
      this.updateAttribute({ props: props, oldProps: oldProps, changeFlags: changeFlags });
    }
 
    /* eslint-disable complexity */
 
  }, {
    key: 'updateGeometry',
    value: function updateGeometry(_ref4) {
      var _this2 = this;
 
      var props = _ref4.props,
          oldProps = _ref4.oldProps,
          changeFlags = _ref4.changeFlags;
 
      var geometryConfigChanged = props.extruded !== oldProps.extruded || props.wireframe !== oldProps.wireframe || props.fp64 !== oldProps.fp64 || changeFlags.updateTriggersChanged && (changeFlags.updateTriggersChanged.all || changeFlags.updateTriggersChanged.getPolygon);
 
      // check if updateTriggers.getElevation has been triggered
      var getElevationTriggered = changeFlags.updateTriggersChanged && (0, _props2.compareProps)({
        oldProps: oldProps.updateTriggers.getElevation || {},
        newProps: props.updateTriggers.getElevation || {},
        triggerName: 'getElevation'
      });
 
      // When the geometry config  or the data is changed,
      // tessellator needs to be invoked
      if (changeFlags.dataChanged || geometryConfigChanged || getElevationTriggered) {
        var getPolygon = props.getPolygon,
            extruded = props.extruded,
            wireframe = props.wireframe,
            getElevation = props.getElevation;
 
        // TODO - avoid creating a temporary array here: let the tesselator iterate
 
        var polygons = props.data.map(getPolygon);
 
        this.setState({
          polygonTesselator: !extruded ? new _polygonTesselator.PolygonTesselator({ polygons: polygons, fp64: this.props.fp64 }) : new _polygonTesselatorExtruded.PolygonTesselatorExtruded({
            polygons: polygons,
            wireframe: wireframe,
            getHeight: function getHeight(polygonIndex) {
              return getElevation(_this2.props.data[polygonIndex]);
            },
            fp64: this.props.fp64
          })
        });
 
        this.state.attributeManager.invalidateAll();
      }
 
      return geometryConfigChanged;
    }
    /* eslint-disable complexity */
 
  }, {
    key: '_getModel',
    value: function _getModel(gl) {
      return new _luma.Model(gl, Object.assign({}, this.getShaders(), {
        id: this.props.id,
        geometry: new _luma.Geometry({
          drawMode: this.props.wireframe ? _luma.GL.LINES : _luma.GL.TRIANGLES,
          attributes: {}
        }),
        vertexCount: 0,
        isIndexed: true,
        shaderCache: this.context.shaderCache
      }));
    }
  }, {
    key: 'calculateIndices',
    value: function calculateIndices(attribute) {
      attribute.value = this.state.polygonTesselator.indices();
      attribute.target = _luma.GL.ELEMENT_ARRAY_BUFFER;
      this.state.model.setVertexCount(attribute.value.length / attribute.size);
    }
  }, {
    key: 'calculatePositions',
    value: function calculatePositions(attribute) {
      attribute.value = this.state.polygonTesselator.positions().positions;
    }
  }, {
    key: 'calculatePositionsLow',
    value: function calculatePositionsLow(attribute) {
      attribute.value = this.state.polygonTesselator.positions().positions64xyLow;
    }
  }, {
    key: 'calculateNormals',
    value: function calculateNormals(attribute) {
      attribute.value = this.state.polygonTesselator.normals();
    }
  }, {
    key: 'calculateColors',
    value: function calculateColors(attribute) {
      var _this3 = this;
 
      attribute.value = this.state.polygonTesselator.colors({
        getColor: function getColor(polygonIndex) {
          return _this3.props.getColor(_this3.props.data[polygonIndex]);
        }
      });
    }
 
    // Override the default picking colors calculation
 
  }, {
    key: 'calculatePickingColors',
    value: function calculatePickingColors(attribute) {
      attribute.value = this.state.polygonTesselator.pickingColors();
    }
  }]);
 
  return SolidPolygonLayer;
}(_core.Layer);
 
exports.default = SolidPolygonLayer;
 
 
SolidPolygonLayer.layerName = 'SolidPolygonLayer';
SolidPolygonLayer.defaultProps = defaultProps;
 
/***/ }),
/* 178 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
 
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
 
var _viewportControls = __webpack_require__(121);
 
var _viewportControls2 = _interopRequireDefault(_viewportControls);
 
var _mapState = __webpack_require__(82);
 
var _mapState2 = _interopRequireDefault(_mapState);
 
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
 
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
 
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
 
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // Copyright (c) 2015 Uber Technologies, Inc.
 
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
 
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
 
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
 
var MapControls = function (_ViewportControls) {
  _inherits(MapControls, _ViewportControls);
 
  /**
   * @classdesc
   * A class that handles events and updates mercator style viewport parameters
   */
  function MapControls(options) {
    _classCallCheck(this, MapControls);
 
    return _possibleConstructorReturn(this, (MapControls.__proto__ || Object.getPrototypeOf(MapControls)).call(this, _mapState2.default, options));
  }
 
  // Default handler for the `panmove` event.
 
 
  _createClass(MapControls, [{
    key: '_onPan',
    value: function _onPan(event) {
      return this.isFunctionKeyPressed(event) ? this._onPanRotate(event) : this._onPanMove(event);
    }
  }]);
 
  return MapControls;
}(_viewportControls2.default);
 
exports.default = MapControls;
 
/***/ }),
/* 179 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
 
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
 
var _orbitViewport = __webpack_require__(85);
 
var _orbitViewport2 = _interopRequireDefault(_orbitViewport);
 
var _assert = __webpack_require__(1);
 
var _assert2 = _interopRequireDefault(_assert);
 
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
 
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
 
var defaultState = {
  lookAt: [0, 0, 0],
  rotationX: 0,
  rotationOrbit: 0,
  fov: 50,
  near: 1,
  far: 100,
  translationX: 0,
  translationY: 0,
  zoom: 1
};
 
var defaultConstraints = {
  minZoom: 0,
  maxZoom: Infinity
};
 
/* Helpers */
 
// Constrain number between bounds
function clamp(x, min, max) {
  return x < min ? min : x > max ? max : x;
}
 
function ensureFinite(value, fallbackValue) {
  return Number.isFinite(value) ? value : fallbackValue;
}
 
var OrbitState = function () {
  function OrbitState(_ref) {
    var width = _ref.width,
        height = _ref.height,
        distance = _ref.distance,
        rotationX = _ref.rotationX,
        rotationOrbit = _ref.rotationOrbit,
        orbitAxis = _ref.orbitAxis,
        bounds = _ref.bounds,
        lookAt = _ref.lookAt,
        fov = _ref.fov,
        near = _ref.near,
        far = _ref.far,
        translationX = _ref.translationX,
        translationY = _ref.translationY,
        zoom = _ref.zoom,
        minZoom = _ref.minZoom,
        maxZoom = _ref.maxZoom,
        startPanViewport = _ref.startPanViewport,
        startPanPos = _ref.startPanPos,
        isPanning = _ref.isPanning,
        startRotateViewport = _ref.startRotateViewport,
        isRotating = _ref.isRotating,
        startZoomViewport = _ref.startZoomViewport,
        startZoomPos = _ref.startZoomPos;
 
    _classCallCheck(this, OrbitState);
 
    (0, _assert2.default)(Number.isFinite(width), '`width` must be supplied');
    (0, _assert2.default)(Number.isFinite(height), '`height` must be supplied');
    (0, _assert2.default)(Number.isFinite(distance), '`distance` must be supplied');
 
    this._viewportProps = this._applyConstraints({
      width: width,
      height: height,
      distance: distance,
      rotationX: ensureFinite(rotationX, defaultState.rotationX),
      rotationOrbit: ensureFinite(rotationOrbit, defaultState.rotationOrbit),
      orbitAxis: orbitAxis,
 
      bounds: bounds,
      lookAt: lookAt || defaultState.lookAt,
 
      fov: ensureFinite(fov, defaultState.fov),
      near: ensureFinite(near, defaultState.near),
      far: ensureFinite(far, defaultState.far),
      translationX: ensureFinite(translationX, defaultState.translationX),
      translationY: ensureFinite(translationY, defaultState.translationY),
      zoom: ensureFinite(zoom, defaultState.zoom),
 
      minZoom: ensureFinite(minZoom, defaultConstraints.minZoom),
      maxZoom: ensureFinite(maxZoom, defaultConstraints.maxZoom)
    });
 
    this._interactiveState = {
      startPanViewport: startPanViewport,
      startPanPos: startPanPos,
      isPanning: isPanning,
      startRotateViewport: startRotateViewport,
      isRotating: isRotating,
      startZoomViewport: startZoomViewport,
      startZoomPos: startZoomPos
    };
  }
 
  /* Public API */
 
  _createClass(OrbitState, [{
    key: 'getViewportProps',
    value: function getViewportProps() {
      return this._viewportProps;
    }
  }, {
    key: 'getInteractiveState',
    value: function getInteractiveState() {
      return this._interactiveState;
    }
 
    /**
     * Start panning
     * @param {[Number, Number]} pos - position on screen where the pointer grabs
     */
 
  }, {
    key: 'panStart',
    value: function panStart(_ref2) {
      var pos = _ref2.pos;
 
      var viewport = new _orbitViewport2.default(this._viewportProps);
 
      return this._getUpdatedOrbitState({
        startPanPos: pos,
        startPanViewport: viewport
      });
    }
 
    /**
     * Pan
     * @param {[Number, Number]} pos - position on screen where the pointer is
     */
 
  }, {
    key: 'pan',
    value: function pan(_ref3) {
      var pos = _ref3.pos,
          startPos = _ref3.startPos;
 
      if (this._interactiveState.isRotating) {
        return this._getUpdatedOrbitState();
      }
 
      var startPanPos = this._interactiveState.startPanPos || startPos;
      (0, _assert2.default)(startPanPos, '`startPanPos` props is required');
 
      var viewport = this._interactiveState.startPanViewport || new _orbitViewport2.default(this._viewportProps);
 
      var deltaX = pos[0] - startPanPos[0];
      var deltaY = pos[1] - startPanPos[1];
 
      var center = viewport.project(viewport.lookAt);
      var newLookAt = viewport.unproject([center[0] - deltaX, center[1] - deltaY, center[2]]);
 
      return this._getUpdatedOrbitState({
        lookAt: newLookAt,
        isPanning: true
      });
    }
 
    /**
     * End panning
     * Must call if `panStart()` was called
     */
 
  }, {
    key: 'panEnd',
    value: function panEnd() {
      return this._getUpdatedOrbitState({
        startPanViewport: null,
        startPanPos: null,
        isPanning: null
      });
    }
 
    /**
     * Start rotating
     * @param {[Number, Number]} pos - position on screen where the pointer grabs
     */
 
  }, {
    key: 'rotateStart',
    value: function rotateStart(_ref4) {
      var pos = _ref4.pos;
 
      // Rotation center should be the worldspace position at the center of the
      // the screen. If not found, use the last one.
      var viewport = new _orbitViewport2.default(this._viewportProps);
 
      return this._getUpdatedOrbitState({
        startRotateViewport: viewport
      });
    }
 
    /**
     * Rotate
     * @param {[Number, Number]} pos - position on screen where the pointer is
     */
 
  }, {
    key: 'rotate',
    value: function rotate(_ref5) {
      var deltaScaleX = _ref5.deltaScaleX,
          deltaScaleY = _ref5.deltaScaleY;
 
      if (this._interactiveState.isPanning) {
        return this._getUpdatedOrbitState();
      }
 
      var startRotateViewport = this._interactiveState.startRotateViewport;
 
      var _ref6 = startRotateViewport || {},
          rotationX = _ref6.rotationX,
          rotationOrbit = _ref6.rotationOrbit;
 
      rotationX = ensureFinite(rotationX, this._viewportProps.rotationX);
      rotationOrbit = ensureFinite(rotationOrbit, this._viewportProps.rotationOrbit);
 
      var newRotationX = clamp(rotationX - deltaScaleY * 180, -89.999, 89.999);
      var newRotationOrbit = (rotationOrbit - deltaScaleX * 180) % 360;
 
      return this._getUpdatedOrbitState({
        rotationX: newRotationX,
        rotationOrbit: newRotationOrbit,
        isRotating: true
      });
    }
 
    /**
     * End rotating
     * Must call if `rotateStart()` was called
     */
 
  }, {
    key: 'rotateEnd',
    value: function rotateEnd() {
      return this._getUpdatedOrbitState({
        startRotateViewport: null,
        isRotating: null
      });
    }
 
    /**
     * Start zooming
     * @param {[Number, Number]} pos - position on screen where the pointer grabs
     */
 
  }, {
    key: 'zoomStart',
    value: function zoomStart(_ref7) {
      var pos = _ref7.pos;
 
      var viewport = new _orbitViewport2.default(this._viewportProps);
      return this._getUpdatedOrbitState({
        startZoomViewport: viewport,
        startZoomPos: pos
      });
    }
 
    /**
     * Zoom
     * @param {[Number, Number]} pos - position on screen where the current center is
     * @param {[Number, Number]} startPos - the center position at
     *   the start of the operation. Must be supplied of `zoomStart()` was not called
     * @param {Number} scale - a number between [0, 1] specifying the accumulated
     *   relative scale.
     */
 
  }, {
    key: 'zoom',
    value: function zoom(_ref8) {
      var pos = _ref8.pos,
          startPos = _ref8.startPos,
          scale = _ref8.scale;
      var _viewportProps = this._viewportProps,
          zoom = _viewportProps.zoom,
          minZoom = _viewportProps.minZoom,
          maxZoom = _viewportProps.maxZoom,
          width = _viewportProps.width,
          height = _viewportProps.height;
 
      var startZoomPos = this._interactiveState.startZoomPos || startPos || pos;
      var viewport = this._interactiveState.startZoomViewport || new _orbitViewport2.default(this._viewportProps);
 
      var newZoom = clamp(zoom * scale, minZoom, maxZoom);
      var deltaX = pos[0] - startZoomPos[0];
      var deltaY = pos[1] - startZoomPos[1];
 
      // Zoom around the center position
      var cx = startZoomPos[0] - width / 2;
      var cy = height / 2 - startZoomPos[1];
      var center = viewport.project(viewport.lookAt);
      var newCenterX = center[0] - cx + cx * newZoom / zoom + deltaX;
      var newCenterY = center[1] + cy - cy * newZoom / zoom - deltaY;
 
      var newLookAt = viewport.unproject([newCenterX, newCenterY, center[2]]);
 
      return this._getUpdatedOrbitState({
        lookAt: newLookAt,
        zoom: newZoom
      });
    }
 
    /**
     * End zooming
     * Must call if `zoomStart()` was called
     */
 
  }, {
    key: 'zoomEnd',
    value: function zoomEnd() {
      return this._getUpdatedOrbitState({
        startZoomPos: null
      });
    }
 
    /* Private methods */
 
  }, {
    key: '_getUpdatedOrbitState',
    value: function _getUpdatedOrbitState(newProps) {
      // Update _viewportProps
      return new OrbitState(Object.assign({}, this._viewportProps, this._interactiveState, newProps));
    }
 
    // Apply any constraints (mathematical or defined by _viewportProps) to map state
 
  }, {
    key: '_applyConstraints',
    value: function _applyConstraints(props) {
      // Ensure zoom is within specified range
      var maxZoom = props.maxZoom,
          minZoom = props.minZoom,
          zoom = props.zoom;
 
      props.zoom = zoom > maxZoom ? maxZoom : zoom;
      props.zoom = zoom < minZoom ? minZoom : zoom;
 
      return props;
    }
  }]);
 
  return OrbitState;
}();
 
exports.default = OrbitState;
 
/***/ }),
/* 180 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
 
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
 
var _math = __webpack_require__(16);
 
var _assert = __webpack_require__(1);
 
var _assert2 = _interopRequireDefault(_assert);
 
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
 
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
 
var SphericalCoordinates = _math.experimental.SphericalCoordinates;
 
 
var defaultState = {
  position: [0, 0, 0],
  lookAt: [0, 0, 0],
  up: [0, 0, 1],
 
  rotationX: 0,
  rotationY: 0,
 
  fov: 50,
  near: 1,
  far: 100
};
 
/* Helpers */
 
var ViewState = function () {
  function ViewState(opts) {
    _classCallCheck(this, ViewState);
 
    var width = opts.width,
        height = opts.height,
        _opts$position = opts.position,
        position = _opts$position === undefined ? defaultState.position : _opts$position;
 
 
    (0, _assert2.default)(Number.isFinite(width), '`width` must be supplied');
    (0, _assert2.default)(Number.isFinite(height), '`height` must be supplied');
 
    this._viewportProps = this._applyConstraints(Object.assign({}, opts, {
      position: new _math.Vector3(position)
    }));
  }
 
  _createClass(ViewState, [{
    key: 'getViewportProps',
    value: function getViewportProps() {
      return this._viewportProps;
    }
  }, {
    key: 'getDirection',
    value: function getDirection() {
      var spherical = new SphericalCoordinates({
        bearing: this._viewportProps.bearing,
        pitch: this._viewportProps.pitch
      });
      var direction = spherical.toVector3().normalize();
      return direction;
    }
  }, {
    key: 'getDirectionFromBearing',
    value: function getDirectionFromBearing(bearing) {
      var spherical = new SphericalCoordinates({
        bearing: bearing,
        pitch: 90
      });
      var direction = spherical.toVector3().normalize();
      return direction;
    }
 
    // Redefined by subclass
    // Apply any constraints (mathematical or defined by _viewportProps) to map state
 
  }, {
    key: '_applyConstraints',
    value: function _applyConstraints(props) {
      return props;
    }
  }]);
 
  return ViewState;
}();
 
exports.default = ViewState;
 
/***/ }),
/* 181 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
 
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
 
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
 
// Copyright (c) 2015 - 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
 
/* eslint-disable no-try-catch */
 
var EffectManager = function () {
  function EffectManager(_ref) {
    var gl = _ref.gl,
        layerManager = _ref.layerManager;
 
    _classCallCheck(this, EffectManager);
 
    this.gl = gl;
    this.layerManager = layerManager;
    this._effects = [];
  }
 
  /**
   * Adds an effect to be managed.  That effect's initialize function will
   * be called, and the effect's preDraw and draw callbacks will be
   * called at the appropriate times in the render loop
   * @param {Effect} effect - the effect to be added
   */
 
 
  _createClass(EffectManager, [{
    key: "addEffect",
    value: function addEffect(effect) {
      this._effects.push(effect);
      this._sortEffects();
      effect.initialize({ gl: this.gl, layerManager: this.layerManager });
    }
 
    /**
     * Removes an effect that is already being managed.  That effect's
     * finalize function will be called, and its callbacks will no longer
     * be envoked in the render loop
     * @param {Effect} effect - the effect to be removed
     * @return {bool} - True if the effect was already being managed, and
     * thus successfully removed; false otherwise
     */
 
  }, {
    key: "removeEffect",
    value: function removeEffect(effect) {
      var i = this._effects.indexOf(effect);
      if (i >= 0) {
        effect.finalize({ gl: this.gl, layerManager: this.layerManager });
        this._effects.splice(i, 1);
        return true;
      }
      return false;
    }
 
    /**
     * Envoke the preDraw callback of all managed events, in order of
     * decreasing priority
     */
 
  }, {
    key: "preDraw",
    value: function preDraw() {
      var _iteratorNormalCompletion = true;
      var _didIteratorError = false;
      var _iteratorError = undefined;
 
      try {
        for (var _iterator = this._effects[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
          var effect = _step.value;
 
          if (effect.needsRedraw) {
            effect.preDraw({ gl: this.gl, layerManager: this.layerManager });
          }
        }
      } catch (err) {
        _didIteratorError = true;
        _iteratorError = err;
      } finally {
        try {
          if (!_iteratorNormalCompletion && _iterator.return) {
            _iterator.return();
          }
        } finally {
          if (_didIteratorError) {
            throw _iteratorError;
          }
        }
      }
    }
 
    /**
     * Envoke the draw callback of all managed events, in order of
     * decreasing priority
     */
 
  }, {
    key: "draw",
    value: function draw() {
      var _iteratorNormalCompletion2 = true;
      var _didIteratorError2 = false;
      var _iteratorError2 = undefined;
 
      try {
        for (var _iterator2 = this._effects[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
          var effect = _step2.value;
 
          if (effect.needsRedraw) {
            effect.draw({ gl: this.gl, layerManager: this.layerManager });
          }
        }
      } catch (err) {
        _didIteratorError2 = true;
        _iteratorError2 = err;
      } finally {
        try {
          if (!_iteratorNormalCompletion2 && _iterator2.return) {
            _iterator2.return();
          }
        } finally {
          if (_didIteratorError2) {
            throw _iteratorError2;
          }
        }
      }
    }
  }, {
    key: "_sortEffects",
    value: function _sortEffects() {
      this._effects.sort(function (a, b) {
        if (a.priority > b.priority) {
          return -1;
        } else if (a.priority < b.priority) {
          return 1;
        }
        return a.count - b.count;
      });
    }
  }]);
 
  return EffectManager;
}();
 
exports.default = EffectManager;
 
/***/ }),
/* 182 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
 
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); // Copyright (c) 2015 - 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
 
/* eslint-disable guard-for-in */
 
 
exports.glArrayFromType = glArrayFromType;
 
var _stats = __webpack_require__(185);
 
var _stats2 = _interopRequireDefault(_stats);
 
var _log = __webpack_require__(17);
 
var _log2 = _interopRequireDefault(_log);
 
var _luma = __webpack_require__(12);
 
var _assert = __webpack_require__(1);
 
var _assert2 = _interopRequireDefault(_assert);
 
var _attributeTransitionManager = __webpack_require__(335);
 
var _attributeTransitionManager2 = _interopRequireDefault(_attributeTransitionManager);
 
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
 
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
 
var LOG_START_END_PRIORITY = 1;
var LOG_DETAIL_PRIORITY = 2;
 
function noop() {}
 
/* eslint-disable complexity */
function glArrayFromType(glType) {
  var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
      _ref$clamped = _ref.clamped,
      clamped = _ref$clamped === undefined ? true : _ref$clamped;
 
  // Sorted in some order of likelihood to reduce amount of comparisons
  switch (glType) {
    case _luma.GL.FLOAT:
      return Float32Array;
    case _luma.GL.UNSIGNED_SHORT:
    case _luma.GL.UNSIGNED_SHORT_5_6_5:
    case _luma.GL.UNSIGNED_SHORT_4_4_4_4:
    case _luma.GL.UNSIGNED_SHORT_5_5_5_1:
      return Uint16Array;
    case _luma.GL.UNSIGNED_INT:
      return Uint32Array;
    case _luma.GL.UNSIGNED_BYTE:
      return clamped ? Uint8ClampedArray : Uint8Array;
    case _luma.GL.BYTE:
      return Int8Array;
    case _luma.GL.SHORT:
      return Int16Array;
    case _luma.GL.INT:
      return Int32Array;
    default:
      throw new Error('Failed to deduce type from array');
  }
}
/* eslint-enable complexity */
 
// Default loggers
var logFunctions = {
  savedMessages: null,
  timeStart: null,
 
  onLog: function onLog(_ref2) {
    var level = _ref2.level,
        message = _ref2.message;
 
    _log2.default.log(level, message);
  },
  onUpdateStart: function onUpdateStart(_ref3) {
    var level = _ref3.level,
        id = _ref3.id,
        numInstances = _ref3.numInstances;
 
    logFunctions.savedMessages = [];
    logFunctions.timeStart = new Date();
  },
  onUpdate: function onUpdate(_ref4) {
    var level = _ref4.level,
        message = _ref4.message;
 
    if (logFunctions.savedMessages) {
      logFunctions.savedMessages.push(message);
    }
  },
  onUpdateEnd: function onUpdateEnd(_ref5) {
    var level = _ref5.level,
        id = _ref5.id,
        numInstances = _ref5.numInstances;
 
    var timeMs = Math.round(new Date() - logFunctions.timeStart);
    var time = timeMs + 'ms';
    _log2.default.group(level, 'Updated attributes for ' + numInstances + ' instances in ' + id + ' in ' + time, {
      collapsed: true
    });
    var _iteratorNormalCompletion = true;
    var _didIteratorError = false;
    var _iteratorError = undefined;
 
    try {
      for (var _iterator = logFunctions.savedMessages[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
        var message = _step.value;
 
        _log2.default.log(level, message);
      }
    } catch (err) {
      _didIteratorError = true;
      _iteratorError = err;
    } finally {
      try {
        if (!_iteratorNormalCompletion && _iterator.return) {
          _iterator.return();
        }
      } finally {
        if (_didIteratorError) {
          throw _iteratorError;
        }
      }
    }
 
    _log2.default.groupEnd(level, 'Updated attributes for ' + numInstances + ' instances in ' + id + ' in ' + time);
    logFunctions.savedMessages = null;
  }
};
 
var AttributeManager = function () {
  _createClass(AttributeManager, null, [{
    key: 'setDefaultLogFunctions',
 
    /**
     * Sets log functions to help trace or time attribute updates.
     * Default logging uses deck logger.
     *
     * `onLog` is called for each attribute.
     *
     * To enable detailed control of timming and e.g. hierarchical logging,
     * hooks are also provided for update start and end.
     *
     * @param {Object} [opts]
     * @param {String} [opts.onLog=] - called to print
     * @param {String} [opts.onUpdateStart=] - called before update() starts
     * @param {String} [opts.onUpdateEnd=] - called after update() ends
     */
    value: function setDefaultLogFunctions() {
      var _ref6 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
          onLog = _ref6.onLog,
          onUpdateStart = _ref6.onUpdateStart,
          onUpdate = _ref6.onUpdate,
          onUpdateEnd = _ref6.onUpdateEnd;
 
      if (onLog !== undefined) {
        logFunctions.onLog = onLog || noop;
      }
      if (onUpdateStart !== undefined) {
        logFunctions.onUpdateStart = onUpdateStart || noop;
      }
      if (onUpdate !== undefined) {
        logFunctions.onUpdate = onUpdate || noop;
      }
      if (onUpdateEnd !== undefined) {
        logFunctions.onUpdateEnd = onUpdateEnd || noop;
      }
    }
 
    /**
     * @classdesc
     * Automated attribute generation and management. Suitable when a set of
     * vertex shader attributes are generated by iteration over a data array,
     * and updates to these attributes are needed either when the data itself
     * changes, or when other data relevant to the calculations change.
     *
     * - First the application registers descriptions of its dynamic vertex
     *   attributes using AttributeManager.add().
     * - Then, when any change that affects attributes is detected by the
     *   application, the app will call AttributeManager.invalidate().
     * - Finally before it renders, it calls AttributeManager.update() to
     *   ensure that attributes are automatically rebuilt if anything has been
     *   invalidated.
     *
     * The application provided update functions describe how attributes
     * should be updated from a data array and are expected to traverse
     * that data array (or iterable) and fill in the attribute's typed array.
     *
     * Note that the attribute manager intentionally does not do advanced
     * change detection, but instead makes it easy to build such detection
     * by offering the ability to "invalidate" each attribute separately.
     *
     * Summary:
     * - keeps track of valid state for each attribute
     * - auto reallocates attributes when needed
     * - auto updates attributes with registered updater functions
     * - allows overriding with application supplied buffers
     *
     * Limitations:
     * - There are currently no provisions for only invalidating a range of
     *   indices in an attribute.
     *
     * @class
     * @param {Object} [props]
     * @param {String} [props.id] - identifier (for debugging)
     */
 
  }]);
 
  function AttributeManager(gl) {
    var _ref7 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
        _ref7$id = _ref7.id,
        id = _ref7$id === undefined ? 'attribute-manager' : _ref7$id;
 
    _classCallCheck(this, AttributeManager);
 
    this.id = id;
    this.gl = gl;
 
    this.attributes = {};
    this.updateTriggers = {};
    this.accessors = {};
    this.allocedInstances = -1;
    this.needsRedraw = true;
 
    this.userData = {};
    this.stats = new _stats2.default({ id: 'attr' });
 
    this.attributeTransitionManger = new _attributeTransitionManager2.default(gl, {
      id: id + '-transitions'
    });
 
    // For debugging sanity, prevent uninitialized members
    Object.seal(this);
  }
 
  /**
   * Adds attributes
   * Takes a map of attribute descriptor objects
   * - keys are attribute names
   * - values are objects with attribute fields
   *
   * attribute.size - number of elements per object
   * attribute.updater - number of elements
   * attribute.instanced=0 - is this is an instanced attribute (a.k.a. divisor)
   * attribute.noAlloc=false - if this attribute should not be allocated
   *
   * @example
   * attributeManager.add({
   *   positions: {size: 2, update: calculatePositions}
   *   colors: {size: 3, update: calculateColors}
   * });
   *
   * @param {Object} attributes - attribute map (see above)
   * @param {Object} updaters - separate map of update functions (deprecated)
   */
 
 
  _createClass(AttributeManager, [{
    key: 'add',
    value: function add(attributes) {
      var updaters = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
 
      this._add(attributes, updaters);
    }
 
    /**
     * Removes attributes
     * Takes an array of attribute names and delete them from
     * the attribute map if they exists
     *
     * @example
     * attributeManager.remove(['position']);
     *
     * @param {Object} attributeNameArray - attribute name array (see above)
     */
 
  }, {
    key: 'remove',
    value: function remove(attributeNameArray) {
      for (var i = 0; i < attributeNameArray.length; i++) {
        var name = attributeNameArray[i];
        if (this.attributes[name] !== undefined) {
          delete this.attributes[name];
        }
      }
    }
 
    /* Marks an attribute for update
     * @param {string} triggerName: attribute or accessor name
     */
 
  }, {
    key: 'invalidate',
    value: function invalidate(triggerName) {
      var invalidatedAttributes = this._invalidateTrigger(triggerName);
 
      // For performance tuning
      logFunctions.onLog({
        level: LOG_DETAIL_PRIORITY,
        message: 'invalidated attributes ' + invalidatedAttributes + ' (' + triggerName + ') for ' + this.id,
        id: this.identifier
      });
    }
  }, {
    key: 'invalidateAll',
    value: function invalidateAll() {
      for (var attributeName in this.attributes) {
        this.attributes[attributeName].needsUpdate = true;
      }
 
      // For performance tuning
      logFunctions.onLog({
        level: LOG_DETAIL_PRIORITY,
        message: 'invalidated all attributes for ' + this.id,
        id: this.identifier
      });
    }
  }, {
    key: '_invalidateTrigger',
    value: function _invalidateTrigger(triggerName) {
      var attributes = this.attributes,
          updateTriggers = this.updateTriggers;
 
      var invalidatedAttributes = updateTriggers[triggerName];
 
      if (!invalidatedAttributes) {
        var message = 'invalidating non-existent trigger ' + triggerName + ' for ' + this.id + '\n';
        message += 'Valid triggers: ' + Object.keys(attributes).join(', ');
        _log2.default.warn(message, invalidatedAttributes);
      } else {
        invalidatedAttributes.forEach(function (name) {
          var attribute = attributes[name];
          if (attribute) {
            attribute.needsUpdate = true;
          }
        });
      }
      return invalidatedAttributes;
    }
 
    /**
     * Ensure all attribute buffers are updated from props or data.
     *
     * Note: Any preallocated buffers in "buffers" matching registered attribute
     * names will be used. No update will happen in this case.
     * Note: Calls onUpdateStart and onUpdateEnd log callbacks before and after.
     *
     * @param {Object} opts - options
     * @param {Object} opts.data - data (iterable object)
     * @param {Object} opts.numInstances - count of data
     * @param {Object} opts.buffers = {} - pre-allocated buffers
     * @param {Object} opts.props - passed to updaters
     * @param {Object} opts.context - Used as "this" context for updaters
     */
 
  }, {
    key: 'update',
    value: function update() {
      var _ref8 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
          data = _ref8.data,
          numInstances = _ref8.numInstances,
          transitions = _ref8.transitions,
          _ref8$props = _ref8.props,
          props = _ref8$props === undefined ? {} : _ref8$props,
          _ref8$buffers = _ref8.buffers,
          buffers = _ref8$buffers === undefined ? {} : _ref8$buffers,
          _ref8$context = _ref8.context,
          context = _ref8$context === undefined ? {} : _ref8$context,
          _ref8$ignoreUnknownAt = _ref8.ignoreUnknownAttributes,
          ignoreUnknownAttributes = _ref8$ignoreUnknownAt === undefined ? false : _ref8$ignoreUnknownAt;
 
      // First apply any application provided buffers
      this._checkExternalBuffers({ buffers: buffers, ignoreUnknownAttributes: ignoreUnknownAttributes });
      this._setExternalBuffers(buffers);
 
      // Only initiate alloc/update (and logging) if actually needed
      if (this._analyzeBuffers({ numInstances: numInstances })) {
        logFunctions.onUpdateStart({ level: LOG_START_END_PRIORITY, id: this.id, numInstances: numInstances });
        this.stats.timeStart();
        this._updateBuffers({ numInstances: numInstances, data: data, props: props, context: context });
        this.stats.timeEnd();
        logFunctions.onUpdateEnd({ level: LOG_START_END_PRIORITY, id: this.id, numInstances: numInstances });
      }
 
      this.attributeTransitionManger.update(this.attributes, transitions);
    }
 
    /**
     * Returns all attribute descriptors
     * Note: Format matches luma.gl Model/Program.setAttributes()
     * @return {Object} attributes - descriptors
     */
 
  }, {
    key: 'getAttributes',
    value: function getAttributes() {
      return this.attributes;
    }
 
    /**
     * Returns changed attribute descriptors
     * This indicates which WebGLBuggers need to be updated
     * @return {Object} attributes - descriptors
     */
 
  }, {
    key: 'getChangedAttributes',
    value: function getChangedAttributes(_ref9) {
      var _ref9$transition = _ref9.transition,
          transition = _ref9$transition === undefined ? false : _ref9$transition,
          _ref9$clearChangedFla = _ref9.clearChangedFlags,
          clearChangedFlags = _ref9$clearChangedFla === undefined ? false : _ref9$clearChangedFla;
      var attributes = this.attributes,
          attributeTransitionManger = this.attributeTransitionManger;
 
 
      if (transition) {
        return attributeTransitionManger.getAttributes();
      }
 
      var changedAttributes = {};
      for (var attributeName in attributes) {
        var attribute = attributes[attributeName];
        if (attribute.changed) {
          attribute.changed = attribute.changed && !clearChangedFlags;
 
          // Only return non-transition attributes
          if (!attributeTransitionManger.hasAttribute(attributeName)) {
            changedAttributes[attributeName] = attribute;
          }
        }
      }
      return changedAttributes;
    }
 
    /**
     * Returns the redraw flag, optionally clearing it.
     * Redraw flag will be set if any attributes attributes changed since
     * flag was last cleared.
     *
     * @param {Object} [opts]
     * @param {String} [opts.clearRedrawFlags=false] - whether to clear the flag
     * @return {false|String} - reason a redraw is needed.
     */
 
  }, {
    key: 'getNeedsRedraw',
    value: function getNeedsRedraw() {
      var _ref10 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
          _ref10$clearRedrawFla = _ref10.clearRedrawFlags,
          clearRedrawFlags = _ref10$clearRedrawFla === undefined ? false : _ref10$clearRedrawFla;
 
      var redraw = this.needsRedraw;
      this.needsRedraw = this.needsRedraw && !clearRedrawFlags;
      return redraw && this.id;
    }
 
    /**
     * Sets the redraw flag.
     * @param {Boolean} redraw=true
     * @return {AttributeManager} - for chaining
     */
 
  }, {
    key: 'setNeedsRedraw',
    value: function setNeedsRedraw() {
      var redraw = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
 
      this.needsRedraw = true;
      return this;
    }
 
    // DEPRECATED METHODS
 
    /**
     * Adds attributes
     * @param {Object} attributes - attribute map (see above)
     * @param {Object} updaters - separate map of update functions (deprecated)
     */
 
  }, {
    key: 'addInstanced',
    value: function addInstanced(attributes) {
      var updaters = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
 
      this._add(attributes, updaters, { instanced: 1 });
    }
 
    // PROTECTED METHODS - Only to be used by collaborating classes, not by apps
 
    /**
     * Returns object containing all accessors as keys, with non-null values
     * @return {Object} - accessors object
     */
 
  }, {
    key: 'getAccessors',
    value: function getAccessors() {
      return this.updateTriggers;
    }
 
    // PRIVATE METHODS
 
    // Used to register an attribute
 
  }, {
    key: '_add',
    value: function _add(attributes) {
      var updaters = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
 
      var _extraProps = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
 
      var newAttributes = {};
 
      for (var attributeName in attributes) {
        // support for separate update function map
        // For now, just copy any attributes from that map into the main map
        // TODO - Attribute maps are a deprecated feature, remove
        if (attributeName in updaters) {
          attributes[attributeName] = Object.assign({}, attributes[attributeName], updaters[attributeName]);
        }
 
        var attribute = attributes[attributeName];
 
        var isGeneric = attribute.isGeneric || false;
        var isIndexed = attribute.isIndexed || attribute.elements;
        var size = attribute.elements && 1 || attribute.size;
        var value = attribute.value || null;
 
        // Initialize the attribute descriptor, with WebGL and metadata fields
        var attributeData = Object.assign({
          // Ensure that fields are present before Object.seal()
          target: undefined,
          userData: {} // Reserved for application
        },
        // Metadata
        attribute, {
          // State
          isExternalBuffer: false,
          needsAlloc: false,
          needsUpdate: false,
          changed: false,
 
          // Luma fields
          isGeneric: isGeneric,
          isIndexed: isIndexed,
          size: size,
          value: value
        }, _extraProps);
        // Sanity - no app fields on our attributes. Use userData instead.
        Object.seal(attributeData);
 
        // Check all fields and generate helpful error messages
        this._validateAttributeDefinition(attributeName, attributeData);
 
        // Add to both attributes list (for registration with model)
        newAttributes[attributeName] = attributeData;
      }
 
      Object.assign(this.attributes, newAttributes);
 
      this._mapUpdateTriggersToAttributes();
    }
 
    // build updateTrigger name to attribute name mapping
 
  }, {
    key: '_mapUpdateTriggersToAttributes',
    value: function _mapUpdateTriggersToAttributes() {
      var _this = this;
 
      var triggers = {};
 
      var _loop = function _loop(attributeName) {
        var attribute = _this.attributes[attributeName];
        var accessor = attribute.accessor;
 
        // Backards compatibility: allow attribute name to be used as update trigger key
 
        triggers[attributeName] = [attributeName];
 
        // use accessor name as update trigger key
        if (typeof accessor === 'string') {
          accessor = [accessor];
        }
        if (Array.isArray(accessor)) {
          accessor.forEach(function (accessorName) {
            if (!triggers[accessorName]) {
              triggers[accessorName] = [];
            }
            triggers[accessorName].push(attributeName);
          });
        }
      };
 
      for (var attributeName in this.attributes) {
        _loop(attributeName);
      }
 
      this.updateTriggers = triggers;
    }
  }, {
    key: '_validateAttributeDefinition',
    value: function _validateAttributeDefinition(attributeName, attribute) {
      (0, _assert2.default)(attribute.size >= 1 && attribute.size <= 4, 'Attribute definition for ' + attributeName + ' invalid size');
 
      // Check that either 'accessor' or 'update' is a valid function
      var hasUpdater = attribute.noAlloc || typeof attribute.update === 'function' || typeof attribute.accessor === 'string';
      if (!hasUpdater) {
        throw new Error('Attribute ' + attributeName + ' missing update or accessor');
      }
    }
 
    // Checks that any attribute buffers in props are valid
    // Note: This is just to help app catch mistakes
 
  }, {
    key: '_checkExternalBuffers',
    value: function _checkExternalBuffers() {
      var _ref11 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
          _ref11$buffers = _ref11.buffers,
          buffers = _ref11$buffers === undefined ? {} : _ref11$buffers,
          _ref11$ignoreUnknownA = _ref11.ignoreUnknownAttributes,
          ignoreUnknownAttributes = _ref11$ignoreUnknownA === undefined ? false : _ref11$ignoreUnknownA;
 
      var attributes = this.attributes;
 
      for (var attributeName in buffers) {
        var attribute = attributes[attributeName];
        if (!attribute && !ignoreUnknownAttributes) {
          throw new Error('Unknown attribute prop ' + attributeName);
        }
        // const buffer = buffers[attributeName];
        // TODO - check buffer type
      }
    }
 
    // Set the buffers for the supplied attributes
    // Update attribute buffers from any attributes in props
    // Detach any previously set buffers, marking all
    // Attributes for auto allocation
    /* eslint-disable max-statements */
 
  }, {
    key: '_setExternalBuffers',
    value: function _setExternalBuffers(bufferMap) {
      var attributes = this.attributes,
          numInstances = this.numInstances;
 
      // Copy the refs of any supplied buffers in the props
 
      for (var attributeName in attributes) {
        var attribute = attributes[attributeName];
        var buffer = bufferMap[attributeName];
        attribute.isExternalBuffer = false;
        if (buffer) {
          var ArrayType = glArrayFromType(attribute.type || _luma.GL.FLOAT);
          if (!(buffer instanceof ArrayType)) {
            throw new Error('Attribute ' + attributeName + ' must be of type ' + ArrayType.name);
          }
          if (attribute.auto && buffer.length <= numInstances * attribute.size) {
            throw new Error('Attribute prop array must match length and size');
          }
 
          attribute.isExternalBuffer = true;
          attribute.needsUpdate = false;
          if (attribute.value !== buffer) {
            attribute.value = buffer;
            attribute.changed = true;
            this.needsRedraw = true;
          }
        }
      }
    }
    /* eslint-enable max-statements */
 
    /* Checks that typed arrays for attributes are big enough
     * sets alloc flag if not
     * @return {Boolean} whether any updates are needed
     */
 
  }, {
    key: '_analyzeBuffers',
    value: function _analyzeBuffers(_ref12) {
      var numInstances = _ref12.numInstances;
      var attributes = this.attributes;
 
      (0, _assert2.default)(numInstances !== undefined, 'numInstances not defined');
 
      // Track whether any allocations or updates are needed
      var needsUpdate = false;
 
      for (var attributeName in attributes) {
        var attribute = attributes[attributeName];
        if (!attribute.isExternalBuffer) {
          // Do we need to reallocate the attribute's typed array?
          var needsAlloc = attribute.value === null || attribute.value.length / attribute.size < numInstances;
          if (needsAlloc && (attribute.update || attribute.accessor)) {
            attribute.needsAlloc = true;
            needsUpdate = true;
          }
          if (attribute.needsUpdate) {
            needsUpdate = true;
          }
        }
      }
 
      return needsUpdate;
    }
 
    /**
     * @private
     * Calls update on any buffers that need update
     * TODO? - If app supplied all attributes, no need to iterate over data
     *
     * @param {Object} opts - options
     * @param {Object} opts.data - data (iterable object)
     * @param {Object} opts.numInstances - count of data
     * @param {Object} opts.buffers = {} - pre-allocated buffers
     * @param {Object} opts.props - passed to updaters
     * @param {Object} opts.context - Used as "this" context for updaters
     */
    /* eslint-disable max-statements, complexity */
 
  }, {
    key: '_updateBuffers',
    value: function _updateBuffers(_ref13) {
      var numInstances = _ref13.numInstances,
          data = _ref13.data,
          props = _ref13.props,
          context = _ref13.context;
      var attributes = this.attributes;
 
      // Allocate at least one element to ensure a valid buffer
 
      var allocCount = Math.max(numInstances, 1);
 
      for (var attributeName in attributes) {
        var attribute = attributes[attributeName];
 
        // Allocate a new typed array if needed
        if (attribute.needsAlloc) {
          var ArrayType = glArrayFromType(attribute.type || _luma.GL.FLOAT);
          attribute.value = new ArrayType(attribute.size * allocCount);
          logFunctions.onUpdate({
            level: LOG_DETAIL_PRIORITY,
            message: attributeName + ' allocated ' + allocCount,
            id: this.id
          });
          attribute.needsAlloc = false;
          attribute.needsUpdate = true;
        }
      }
 
      for (var _attributeName in attributes) {
        var _attribute = attributes[_attributeName];
        // Call updater function if needed
        if (_attribute.needsUpdate) {
          this._updateBuffer({ attribute: _attribute, attributeName: _attributeName, numInstances: numInstances, data: data, props: props, context: context });
        }
      }
 
      this.allocedInstances = allocCount;
    }
  }, {
    key: '_updateBuffer',
    value: function _updateBuffer(_ref14) {
      var attribute = _ref14.attribute,
          attributeName = _ref14.attributeName,
          numInstances = _ref14.numInstances,
          data = _ref14.data,
          props = _ref14.props,
          context = _ref14.context;
      var update = attribute.update,
          accessor = attribute.accessor;
 
 
      var timeStart = new Date();
      if (update) {
        // Custom updater - typically for non-instanced layers
        update.call(context, attribute, { data: data, props: props, numInstances: numInstances });
        this._checkAttributeArray(attribute, attributeName);
      } else if (accessor) {
        // Standard updater
        this._updateBufferViaStandardAccessor({ attribute: attribute, data: data, props: props });
        this._checkAttributeArray(attribute, attributeName);
      } else {
        logFunctions.onUpdate({
          level: LOG_DETAIL_PRIORITY,
          message: attributeName + ' missing update function',
          id: this.id
        });
      }
      var timeMs = Math.round(new Date() - timeStart);
      var time = timeMs + 'ms';
      logFunctions.onUpdate({
        level: LOG_DETAIL_PRIORITY,
        message: attributeName + ' updated ' + numInstances + ' ' + time,
        id: this.id
      });
 
      attribute.needsUpdate = false;
      attribute.changed = true;
      this.needsRedraw = true;
    }
    /* eslint-enable max-statements */
 
  }, {
    key: '_updateBufferViaStandardAccessor',
    value: function _updateBufferViaStandardAccessor(_ref15) {
      var attribute = _ref15.attribute,
          data = _ref15.data,
          props = _ref15.props;
      var accessor = attribute.accessor,
          value = attribute.value,
          size = attribute.size;
 
      var accessorFunc = props[accessor];
 
      (0, _assert2.default)(typeof accessorFunc === 'function', 'accessor "' + accessor + '" is not a function');
 
      var _attribute$defaultVal = attribute.defaultValue,
          defaultValue = _attribute$defaultVal === undefined ? [0, 0, 0, 0] : _attribute$defaultVal;
 
      defaultValue = Array.isArray(defaultValue) ? defaultValue : [defaultValue];
      var i = 0;
      var _iteratorNormalCompletion2 = true;
      var _didIteratorError2 = false;
      var _iteratorError2 = undefined;
 
      try {
        for (var _iterator2 = data[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
          var object = _step2.value;
 
          var objectValue = accessorFunc(object);
          objectValue = Array.isArray(objectValue) ? objectValue : [objectValue];
          /* eslint-disable no-fallthrough, default-case */
          switch (size) {
            case 4:
              value[i + 3] = Number.isFinite(objectValue[3]) ? objectValue[3] : defaultValue[3];
            case 3:
              value[i + 2] = Number.isFinite(objectValue[2]) ? objectValue[2] : defaultValue[2];
            case 2:
              value[i + 1] = Number.isFinite(objectValue[1]) ? objectValue[1] : defaultValue[1];
            case 1:
              value[i + 0] = Number.isFinite(objectValue[0]) ? objectValue[0] : defaultValue[0];
          }
          i += size;
        }
      } catch (err) {
        _didIteratorError2 = true;
        _iteratorError2 = err;
      } finally {
        try {
          if (!_iteratorNormalCompletion2 && _iterator2.return) {
            _iterator2.return();
          }
        } finally {
          if (_didIteratorError2) {
            throw _iteratorError2;
          }
        }
      }
    }
  }, {
    key: '_checkAttributeArray',
    value: function _checkAttributeArray(attribute, attributeName) {
      var value = attribute.value;
 
      if (value && value.length >= 4) {
        var valid = Number.isFinite(value[0]) && Number.isFinite(value[1]) && Number.isFinite(value[2]) && Number.isFinite(value[3]);
        if (!valid) {
          throw new Error('Illegal attribute generated for ' + attributeName);
        }
      }
    }
 
    /**
     * Update attribute transition to the current timestamp
     * Returns `true` if any transition is in progress
     */
 
  }, {
    key: 'updateTransition',
    value: function updateTransition() {
      var attributeTransitionManger = this.attributeTransitionManger;
 
      var transitionUpdated = attributeTransitionManger.setCurrentTime(Date.now());
      this.needsRedraw = this.needsRedraw || transitionUpdated;
      return transitionUpdated;
    }
  }]);
 
  return AttributeManager;
}();
 
exports.default = AttributeManager;
 
/***/ }),
/* 183 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.getPixelRatio = undefined;
exports.drawLayers = drawLayers;
exports.drawPickingBuffer = drawPickingBuffer;
 
var _luma = __webpack_require__(12);
 
var _log = __webpack_require__(17);
 
var _log2 = _interopRequireDefault(_log);
 
var _assert = __webpack_require__(1);
 
var _assert2 = _interopRequireDefault(_assert);
 
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
 
var LOG_PRIORITY_DRAW = 2; // Copyright (c) 2015 - 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
 
/* global window */
 
 
var renderCount = 0;
 
// TODO - Exported for pick-layers.js - Move to util?
var getPixelRatio = exports.getPixelRatio = function getPixelRatio(_ref) {
  var useDevicePixels = _ref.useDevicePixels;
 
  (0, _assert2.default)(typeof useDevicePixels === 'boolean', 'Invalid useDevicePixels');
  return useDevicePixels && typeof window !== 'undefined' ? window.devicePixelRatio : 1;
};
 
// Convert viewport top-left CSS coordinates to bottom up WebGL coordinates
var getGLViewport = function getGLViewport(gl, _ref2) {
  var viewport = _ref2.viewport,
      pixelRatio = _ref2.pixelRatio;
 
  // TODO - dummy default for node
  var height = gl.canvas ? gl.canvas.clientHeight : 100;
  // Convert viewport top-left CSS coordinates to bottom up WebGL coordinates
  var dimensions = viewport;
  return [dimensions.x * pixelRatio, (height - dimensions.y - dimensions.height) * pixelRatio, dimensions.width * pixelRatio, dimensions.height * pixelRatio];
};
 
// Helper functions
 
function clearCanvas(gl, _ref3) {
  var useDevicePixels = _ref3.useDevicePixels;
 
  // const pixelRatio = getPixelRatio({useDevicePixels});
  var width = gl.drawingBufferWidth;
  var height = gl.drawingBufferHeight;
  // clear depth and color buffers, restoring transparency
  (0, _luma.withParameters)(gl, { viewport: [0, 0, width, height] }, function () {
    gl.clear(_luma.GL.COLOR_BUFFER_BIT | _luma.GL.DEPTH_BUFFER_BIT);
  });
}
 
// Draw a list of layers in a list of viewports
function drawLayers(gl, _ref4) {
  var layers = _ref4.layers,
      viewports = _ref4.viewports,
      onViewportActive = _ref4.onViewportActive,
      useDevicePixels = _ref4.useDevicePixels,
      _ref4$drawPickingColo = _ref4.drawPickingColors,
      drawPickingColors = _ref4$drawPickingColo === undefined ? false : _ref4$drawPickingColo,
      _ref4$deviceRect = _ref4.deviceRect,
      deviceRect = _ref4$deviceRect === undefined ? null : _ref4$deviceRect,
      _ref4$parameters = _ref4.parameters,
      parameters = _ref4$parameters === undefined ? {} : _ref4$parameters,
      _ref4$layerFilter = _ref4.layerFilter,
      layerFilter = _ref4$layerFilter === undefined ? null : _ref4$layerFilter,
      _ref4$pass = _ref4.pass,
      pass = _ref4$pass === undefined ? 'draw' : _ref4$pass,
      _ref4$redrawReason = _ref4.redrawReason,
      redrawReason = _ref4$redrawReason === undefined ? '' : _ref4$redrawReason;
 
  clearCanvas(gl, { useDevicePixels: useDevicePixels });
 
  // effectManager.preDraw();
 
  viewports.forEach(function (viewportOrDescriptor, i) {
    var viewport = getViewportFromDescriptor(viewportOrDescriptor);
 
    // Update context to point to this viewport
    onViewportActive(viewport);
 
    // render this viewport
    drawLayersInViewport(gl, {
      layers: layers,
      viewport: viewport,
      useDevicePixels: useDevicePixels,
      drawPickingColors: drawPickingColors,
      deviceRect: deviceRect,
      parameters: parameters,
      layerFilter: layerFilter,
      pass: pass,
      redrawReason: redrawReason
    });
  });
 
  // effectManager.draw();
}
 
// Draws list of layers and viewports into the picking buffer
// Note: does not sample the buffer, that has to be done by the caller
function drawPickingBuffer(gl, _ref5) {
  var layers = _ref5.layers,
      viewports = _ref5.viewports,
      onViewportActive = _ref5.onViewportActive,
      useDevicePixels = _ref5.useDevicePixels,
      pickingFBO = _ref5.pickingFBO,
      _ref5$deviceRect = _ref5.deviceRect,
      x = _ref5$deviceRect.x,
      y = _ref5$deviceRect.y,
      width = _ref5$deviceRect.width,
      height = _ref5$deviceRect.height,
      _ref5$layerFilter = _ref5.layerFilter,
      layerFilter = _ref5$layerFilter === undefined ? null : _ref5$layerFilter,
      _ref5$redrawReason = _ref5.redrawReason,
      redrawReason = _ref5$redrawReason === undefined ? '' : _ref5$redrawReason;
 
  // Make sure we clear scissor test and fbo bindings in case of exceptions
  // We are only interested in one pixel, no need to render anything else
  // Note that the callback here is called synchronously.
  // Set blend mode for picking
  // always overwrite existing pixel with [r,g,b,layerIndex]
  return (0, _luma.withParameters)(gl, {
    framebuffer: pickingFBO,
    scissorTest: true,
    scissor: [x, y, width, height],
    clearColor: [0, 0, 0, 0]
  }, function () {
    drawLayers(gl, {
      layers: layers,
      viewports: viewports,
      onViewportActive: onViewportActive,
      useDevicePixels: useDevicePixels,
      drawPickingColors: true,
      layerFilter: layerFilter,
      pass: 'picking',
      redrawReason: redrawReason,
      parameters: {
        blend: true,
        blendFunc: [gl.ONE, gl.ZERO, gl.CONSTANT_ALPHA, gl.ZERO],
        blendEquation: gl.FUNC_ADD,
        blendColor: [0, 0, 0, 0]
      }
    });
  });
}
 
// Draws a list of layers in one viewport
// TODO - when picking we could completely skip rendering viewports that dont
// intersect with the picking rect
function drawLayersInViewport(gl, _ref6) {
  var layers = _ref6.layers,
      viewport = _ref6.viewport,
      useDevicePixels = _ref6.useDevicePixels,
      _ref6$drawPickingColo = _ref6.drawPickingColors,
      drawPickingColors = _ref6$drawPickingColo === undefined ? false : _ref6$drawPickingColo,
      _ref6$deviceRect = _ref6.deviceRect,
      deviceRect = _ref6$deviceRect === undefined ? null : _ref6$deviceRect,
      _ref6$parameters = _ref6.parameters,
      parameters = _ref6$parameters === undefined ? {} : _ref6$parameters,
      layerFilter = _ref6.layerFilter,
      _ref6$pass = _ref6.pass,
      pass = _ref6$pass === undefined ? 'draw' : _ref6$pass,
      _ref6$redrawReason = _ref6.redrawReason,
      redrawReason = _ref6$redrawReason === undefined ? '' : _ref6$redrawReason;
 
  var pixelRatio = getPixelRatio({ useDevicePixels: useDevicePixels });
  var glViewport = getGLViewport(gl, { viewport: viewport, pixelRatio: pixelRatio });
 
  // render layers in normal colors
  var renderStats = {
    totalCount: layers.length,
    visibleCount: 0,
    compositeCount: 0,
    pickableCount: 0
  };
 
  // const {x, y, width, height} = deviceRect || [];
 
  (0, _luma.setParameters)(gl, parameters || {});
 
  // render layers in normal colors
  layers.forEach(function (layer, layerIndex) {
    // Check if we should draw layer
    var shouldDrawLayer = layer.props.visible;
    if (drawPickingColors) {
      shouldDrawLayer = shouldDrawLayer && layer.props.pickable;
    }
    if (shouldDrawLayer && layerFilter) {
      shouldDrawLayer = layerFilter({ layer: layer, viewport: viewport, isPicking: drawPickingColors });
    }
 
    // Calculate stats
    if (shouldDrawLayer && layer.props.pickable) {
      renderStats.pickableCount++;
    }
    if (layer.isComposite) {
      renderStats.compositeCount++;
    }
 
    // Draw the layer
    if (shouldDrawLayer) {
      if (!layer.isComposite) {
        renderStats.visibleCount++;
      }
 
      drawLayerInViewport({ gl: gl, layer: layer, layerIndex: layerIndex, drawPickingColors: drawPickingColors, glViewport: glViewport, parameters: parameters });
    }
  });
 
  renderCount++;
 
  logRenderStats({ renderStats: renderStats, pass: pass, redrawReason: redrawReason });
}
 
function drawLayerInViewport(_ref7) {
  var gl = _ref7.gl,
      layer = _ref7.layer,
      layerIndex = _ref7.layerIndex,
      drawPickingColors = _ref7.drawPickingColors,
      glViewport = _ref7.glViewport,
      parameters = _ref7.parameters;
 
  var moduleParameters = Object.assign({}, layer.props, {
    viewport: layer.context.viewport,
    pickingActive: drawPickingColors ? 1 : 0
  });
 
  var uniforms = Object.assign({}, layer.context.uniforms, { layerIndex: layerIndex });
 
  // All parameter resolving is done here instead of the layer
  // Blend parameters must not be overriden
  var layerParameters = Object.assign({}, layer.props.parameters || {}, parameters);
 
  Object.assign(layerParameters, {
    viewport: glViewport
  });
 
  if (drawPickingColors) {
    Object.assign(layerParameters, {
      blendColor: [0, 0, 0, (layerIndex + 1) / 255]
    });
  } else {
    Object.assign(moduleParameters, getObjectHighlightParameters(layer));
  }
 
  layer.drawLayer({
    moduleParameters: moduleParameters,
    uniforms: uniforms,
    parameters: layerParameters
  });
}
 
function logRenderStats(_ref8) {
  var renderStats = _ref8.renderStats,
      pass = _ref8.pass,
      redrawReason = _ref8.redrawReason;
 
  if (_log2.default.priority >= LOG_PRIORITY_DRAW) {
    var totalCount = renderStats.totalCount,
        visibleCount = renderStats.visibleCount,
        compositeCount = renderStats.compositeCount,
        pickableCount = renderStats.pickableCount;
 
    var primitiveCount = totalCount - compositeCount;
    var hiddenCount = primitiveCount - visibleCount;
 
    var message = '';
    message += 'RENDER #' + renderCount + ' ' + visibleCount + ' (of ' + totalCount + ' layers) to ' + pass + ' because ' + redrawReason + ' ';
    if (_log2.default.priority > LOG_PRIORITY_DRAW) {
      message += '(' + hiddenCount + ' hidden, ' + compositeCount + ' composite ' + pickableCount + ' unpickable)';
    }
 
    _log2.default.log(LOG_PRIORITY_DRAW, message);
  }
}
 
// Get a viewport from a viewport descriptor (which can be a plain viewport)
function getViewportFromDescriptor(viewportOrDescriptor) {
  return viewportOrDescriptor.viewport ? viewportOrDescriptor.viewport : viewportOrDescriptor;
}
 
/**
 * Returns the picking color of currenlty selected object of the given 'layer'.
 * @return {Array} - the picking color or null if layers selected object is invalid.
 */
function getObjectHighlightParameters(layer) {
  // TODO - inefficient to update settings every render?
  // TODO: Add warning if 'highlightedObjectIndex' is > numberOfInstances of the model.
 
  // Update picking module settings if highlightedObjectIndex is set.
  // This will overwrite any settings from auto highlighting.
  if (Number.isInteger(layer.props.highlightedObjectIndex)) {
    var pickingSelectedColor = layer.props.highlightedObjectIndex >= 0 ? layer.encodePickingColor(layer.props.highlightedObjectIndex) : null;
 
    return {
      pickingSelectedColor: pickingSelectedColor
    };
  }
  return null;
}
 
/***/ }),
/* 184 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
 
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); // Copyright (c) 2015 - 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
 
// TODO - remove, just for dummy initialization
 
 
var _assert = __webpack_require__(1);
 
var _assert2 = _interopRequireDefault(_assert);
 
var _luma = __webpack_require__(12);
 
var _seer = __webpack_require__(173);
 
var _seer2 = _interopRequireDefault(_seer);
 
var _layer = __webpack_require__(123);
 
var _layer2 = _interopRequireDefault(_layer);
 
var _drawLayers2 = __webpack_require__(183);
 
var _pickLayers = __webpack_require__(339);
 
var _constants = __webpack_require__(70);
 
var _viewport = __webpack_require__(42);
 
var _viewport2 = _interopRequireDefault(_viewport);
 
var _webMercatorViewport = __webpack_require__(86);
 
var _webMercatorViewport2 = _interopRequireDefault(_webMercatorViewport);
 
var _log = __webpack_require__(17);
 
var _log2 = _interopRequireDefault(_log);
 
var _flatten = __webpack_require__(126);
 
var _seerIntegration = __webpack_require__(124);
 
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
 
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
 
var LOG_PRIORITY_LIFECYCLE = 2;
var LOG_PRIORITY_LIFECYCLE_MINOR = 4;
 
var initialContext = {
  uniforms: {},
  viewports: [],
  viewport: null,
  layerFilter: null,
  viewportChanged: true,
  pickingFBO: null,
  useDevicePixels: true,
  lastPickedInfo: {
    index: -1,
    layerId: null
  }
};
 
var layerName = function layerName(layer) {
  return layer instanceof _layer2.default ? '' + layer : !layer ? 'null' : 'invalid';
};
 
var LayerManager = function () {
  // eslint-disable-next-line
  function LayerManager(gl) {
    var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
        eventManager = _ref.eventManager,
        //iclient
        isGeographicCoordinateSystem=_ref.isGeographicCoordinateSystem;
 
    _classCallCheck(this, LayerManager);
 
    // Currently deck.gl expects the DeckGL.layers array to be different
    // whenever React rerenders. If the same layers array is used, the
    // LayerManager's diffing algorithm will generate a fatal error and
    // break the rendering.
 
    // `this.lastRenderedLayers` stores the UNFILTERED layers sent
    // down to LayerManager, so that `layers` reference can be compared.
    // If it's the same across two React render calls, the diffing logic
    // will be skipped.
    this.lastRenderedLayers = [];
    this.prevLayers = [];
    this.layers = [];
 
    this.oldContext = {};
    this.context = Object.assign({}, initialContext, {
      gl: gl,
      // Enabling luma.gl Program caching using private API (_cachePrograms)
      shaderCache: new _luma.ShaderCache({ gl: gl, _cachePrograms: true })
    });
 
    // List of view descriptors, gets re-evaluated when width/height changes
    this.width = 100;
    this.height = 100;
    this.viewDescriptors = [];
    this.viewDescriptorsChanged = true;
    this.viewports = []; // Generated viewports
    this._needsRedraw = 'Initial render';
 
    // Event handling
    this._pickingRadius = 0;
 
    this._eventManager = null;
    this._onLayerClick = null;
    this._onLayerHover = null;
    this._onClick = this._onClick.bind(this);
    this._onPointerMove = this._onPointerMove.bind(this);
    this._onPointerLeave = this._onPointerLeave.bind(this);
    this._pickAndCallback = this._pickAndCallback.bind(this);
 
    // Seer integration
    this._initSeer = this._initSeer.bind(this);
    this._editSeer = this._editSeer.bind(this);
    (0, _seerIntegration.seerInitListener)(this._initSeer);
    (0, _seerIntegration.layerEditListener)(this._editSeer);
 
    Object.seal(this);
 
    if (eventManager) {
      this._initEventHandling(eventManager);
    }
 
    // Init with dummy viewport
    this.setViewports([new _webMercatorViewport2.default({ width: 1, height: 1, latitude: 0, longitude: 0, zoom: 1,isGeographicCoordinateSystem:isGeographicCoordinateSystem })]);
  }
 
  /**
   * Method to call when the layer manager is not needed anymore.
   *
   * Currently used in the <DeckGL> componentWillUnmount lifecycle to unbind Seer listeners.
   */
 
 
  _createClass(LayerManager, [{
    key: 'finalize',
    value: function finalize() {
      _seer2.default.removeListener(this._initSeer);
      _seer2.default.removeListener(this._editSeer);
    }
  }, {
    key: 'needsRedraw',
    value: function needsRedraw() {
      var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
          _ref2$clearRedrawFlag = _ref2.clearRedrawFlags,
          clearRedrawFlags = _ref2$clearRedrawFlag === undefined ? true : _ref2$clearRedrawFlag;
 
      return this._checkIfNeedsRedraw(clearRedrawFlags);
    }
 
    // Normally not called by app
 
  }, {
    key: 'setNeedsRedraw',
    value: function setNeedsRedraw(reason) {
      this._needsRedraw = this._needsRedraw || reason;
    }
 
    // Gets an (optionally) filtered list of layers
 
  }, {
    key: 'getLayers',
    value: function getLayers() {
      var _ref3 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
          _ref3$layerIds = _ref3.layerIds,
          layerIds = _ref3$layerIds === undefined ? null : _ref3$layerIds;
 
      // Filtering by layerId compares beginning of strings, so that sublayers will be included
      // Dependes on the convention of adding suffixes to the parent's layer name
      return layerIds ? this.layers.filter(function (layer) {
        return layerIds.find(function (layerId) {
          return layer.id.indexOf(layerId) === 0;
        });
      }) : this.layers;
    }
 
    // Get a set of viewports for a given width and height
    // TODO - Intention is for deck.gl to autodeduce width and height and drop the need for props
 
  }, {
    key: 'getViewports',
    value: function getViewports() {
      var _ref4 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
          width = _ref4.width,
          height = _ref4.height;
 
      if (width !== this.width || height !== this.height || this.viewDescriptorsChanged) {
        this._rebuildViewportsFromViews({ viewDescriptors: this.viewDescriptors, width: width, height: height });
        this.width = width;
        this.height = height;
      }
      return this.viewports;
    }
 
    /**
     * Set parameters needed for layer rendering and picking.
     * Parameters are to be passed as a single object, with the following values:
     * @param {Boolean} useDevicePixels
     */
 
  }, {
    key: 'setParameters',
    value: function setParameters(parameters) {
      if ('eventManager' in parameters) {
        this._initEventHandling(parameters.eventManager);
      }
 
      if ('pickingRadius' in parameters || 'onLayerClick' in parameters || 'onLayerHover' in parameters) {
        this._setEventHandlingParameters(parameters);
      }
 
      // TODO - For now we set layers before viewports to preservenchangeFlags
      if ('layers' in parameters) {
        this.setLayers(parameters.layers);
      }
 
      if ('viewports' in parameters) {
        this.setViewports(parameters.viewports);
      }
 
      if ('layerFilter' in parameters) {
        this.context.layerFilter = parameters.layerFilter;
        if (this.context.layerFilter !== parameters.layerFilter) {
          this.setNeedsRedraw('layerFilter changed');
        }
      }
 
      if ('drawPickingColors' in parameters) {
        if (this.context.drawPickingColors !== parameters.drawPickingColors) {
          this.setNeedsRedraw('drawPickingColors changed');
        }
      }
 
      Object.assign(this.context, parameters);
    }
 
    // Update the view descriptor list and set change flag if needed
 
  }, {
    key: 'setViewports',
    value: function setViewports(viewports) {
      // Ensure viewports are wrapped in descriptors
      var viewDescriptors = (0, _flatten.flatten)(viewports, { filter: Boolean }).map(function (viewport) {
        return viewport instanceof _viewport2.default ? { viewport: viewport } : viewport;
      });
 
      this.viewDescriptorsChanged = this.viewDescriptorsChanged || this._diffViews(viewDescriptors, this.viewDescriptors);
 
      // Try to not actually rebuild the viewports until `getViewports` is called
      if (this.viewDescriptorsChanged) {
        this.viewDescriptors = viewDescriptors;
        this._rebuildViewportsFromViews({ viewDescriptors: this.viewDescriptors });
        this.viewDescriptorsChanged = false;
      }
    }
 
    // Supply a new layer list, initiating sublayer generation and layer matching
 
  }, {
    key: 'setLayers',
    value: function setLayers(newLayers) {
      (0, _assert2.default)(this.context.viewport, 'LayerManager.updateLayers: viewport not set');
 
      // TODO - something is generating state updates that cause rerender of the same
      if (newLayers === this.lastRenderedLayers) {
        _log2.default.log(3, 'Ignoring layer update due to layer array not changed');
        return this;
      }
      this.lastRenderedLayers = newLayers;
 
      newLayers = (0, _flatten.flatten)(newLayers, { filter: Boolean });
 
      var _iteratorNormalCompletion = true;
      var _didIteratorError = false;
      var _iteratorError = undefined;
 
      try {
        for (var _iterator = newLayers[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
          var layer = _step.value;
 
          layer.context = this.context;
        }
      } catch (err) {
        _didIteratorError = true;
        _iteratorError = err;
      } finally {
        try {
          if (!_iteratorNormalCompletion && _iterator.return) {
            _iterator.return();
          }
        } finally {
          if (_didIteratorError) {
            throw _iteratorError;
          }
        }
      }
 
      this.prevLayers = this.layers;
 
      var _updateLayers2 = this._updateLayers({
        oldLayers: this.prevLayers,
        newLayers: newLayers
      }),
          error = _updateLayers2.error,
          generatedLayers = _updateLayers2.generatedLayers;
 
      this.layers = generatedLayers;
      // Throw first error found, if any
      if (error) {
        throw error;
      }
      return this;
    }
  }, {
    key: 'drawLayers',
    value: function drawLayers() {
      var _ref5 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
          _ref5$pass = _ref5.pass,
          pass = _ref5$pass === undefined ? 'render to screen' : _ref5$pass,
          _ref5$redrawReason = _ref5.redrawReason,
          redrawReason = _ref5$redrawReason === undefined ? 'unknown reason' : _ref5$redrawReason;
 
      var _context = this.context,
          gl = _context.gl,
          useDevicePixels = _context.useDevicePixels,
          drawPickingColors = _context.drawPickingColors;
 
      // render this viewport
 
      (0, _drawLayers2.drawLayers)(gl, {
        layers: this.layers,
        viewports: this.getViewports(),
        onViewportActive: this._activateViewport.bind(this),
        useDevicePixels: useDevicePixels,
        drawPickingColors: drawPickingColors,
        pass: pass,
        layerFilter: this.context.layerFilter,
        redrawReason: redrawReason
      });
    }
 
    // Pick the closest info at given coordinate
 
  }, {
    key: 'pickObject',
    value: function pickObject(_ref6) {
      var x = _ref6.x,
          y = _ref6.y,
          mode = _ref6.mode,
          _ref6$radius = _ref6.radius,
          radius = _ref6$radius === undefined ? 0 : _ref6$radius,
          layerIds = _ref6.layerIds,
          layerFilter = _ref6.layerFilter;
      var _context2 = this.context,
          gl = _context2.gl,
          useDevicePixels = _context2.useDevicePixels;
 
 
      var layers = this.getLayers({ layerIds: layerIds });
 
      return (0, _pickLayers.pickObject)(gl, {
        // User params
        x: x,
        y: y,
        radius: radius,
        layers: layers,
        mode: mode,
        layerFilter: layerFilter,
        // Injected params
        viewports: this.getViewports(),
        onViewportActive: this._activateViewport.bind(this),
        pickingFBO: this._getPickingBuffer(),
        lastPickedInfo: this.context.lastPickedInfo,
        useDevicePixels: useDevicePixels
      });
    }
 
    // Get all unique infos within a bounding box
 
  }, {
    key: 'pickObjects',
    value: function pickObjects(_ref7) {
      var x = _ref7.x,
          y = _ref7.y,
          width = _ref7.width,
          height = _ref7.height,
          layerIds = _ref7.layerIds,
          layerFilter = _ref7.layerFilter;
      var _context3 = this.context,
          gl = _context3.gl,
          useDevicePixels = _context3.useDevicePixels;
 
 
      var layers = this.getLayers({ layerIds: layerIds });
 
      return (0, _pickLayers.pickVisibleObjects)(gl, {
        x: x,
        y: y,
        width: width,
        height: height,
        layers: layers,
        layerFilter: layerFilter,
        mode: 'pickObjects',
        // TODO - how does this interact with multiple viewports?
        viewport: this.context.viewport,
        viewports: this.getViewports(),
        onViewportActive: this._activateViewport.bind(this),
        pickingFBO: this._getPickingBuffer(),
        useDevicePixels: useDevicePixels
      });
    }
 
    //
    // DEPRECATED METHODS in V5
    //
 
  }, {
    key: 'updateLayers',
    value: function updateLayers(_ref8) {
      var newLayers = _ref8.newLayers;
 
      _log2.default.deprecated('updateLayers', 'setLayers');
      this.setLayers(newLayers);
    }
  }, {
    key: 'setViewport',
    value: function setViewport(viewport) {
      _log2.default.deprecated('setViewport', 'setViewports');
      this.setViewports([viewport]);
      return this;
    }
 
    //
    // PRIVATE METHODS
    //
 
  }, {
    key: '_checkIfNeedsRedraw',
    value: function _checkIfNeedsRedraw(clearRedrawFlags) {
      var redraw = this._needsRedraw;
      if (clearRedrawFlags) {
        this._needsRedraw = false;
      }
 
      // This layers list doesn't include sublayers, relying on composite layers
      var _iteratorNormalCompletion2 = true;
      var _didIteratorError2 = false;
      var _iteratorError2 = undefined;
 
      try {
        for (var _iterator2 = this.layers[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
          var layer = _step2.value;
 
          // Call every layer to clear their flags
          var layerNeedsRedraw = layer.getNeedsRedraw({ clearRedrawFlags: clearRedrawFlags });
          redraw = redraw || layerNeedsRedraw;
        }
      } catch (err) {
        _didIteratorError2 = true;
        _iteratorError2 = err;
      } finally {
        try {
          if (!_iteratorNormalCompletion2 && _iterator2.return) {
            _iterator2.return();
          }
        } finally {
          if (_didIteratorError2) {
            throw _iteratorError2;
          }
        }
      }
 
      return redraw;
    }
 
    // Rebuilds viewports from descriptors towards a certain window size
 
  }, {
    key: '_rebuildViewportsFromViews',
    value: function _rebuildViewportsFromViews(_ref9) {
      var _this = this;
 
      var viewDescriptors = _ref9.viewDescriptors,
          width = _ref9.width,
          height = _ref9.height;
 
      var newViewports = viewDescriptors.map(function (viewDescriptor) {
        return (
          // If a `Viewport` instance was supplied, use it, otherwise build it
          viewDescriptor.viewport instanceof _viewport2.default ? viewDescriptor.viewport : _this._makeViewportFromViewDescriptor({ viewDescriptor: viewDescriptor, width: width, height: height })
        );
      });
 
      this.setNeedsRedraw('Viewport(s) changed');
 
      // Ensure one viewport is activated, layers may expect it
      // TODO - handle empty viewport list (using dummy viewport), or assert
      // const oldViewports = this.context.viewports;
      // if (viewportsChanged) {
 
      var viewport = newViewports[0];
      (0, _assert2.default)(viewport instanceof _viewport2.default, 'Invalid viewport');
 
      this.context.viewports = newViewports;
      this._activateViewport(viewport);
      // }
 
      // We've just rebuilt the viewports to match the descriptors, so clear the flag
      this.viewports = newViewports;
      this.viewDescriptorsChanged = false;
    }
 
    // Build a `Viewport` from a view descriptor
    // TODO - add support for autosizing viewports using width and height
 
  }, {
    key: '_makeViewportFromViewDescriptor',
    value: function _makeViewportFromViewDescriptor(_ref10) {
      var viewDescriptor = _ref10.viewDescriptor,
          width = _ref10.width,
          height = _ref10.height;
 
      // Get the type of the viewport
      // TODO - default to WebMercator?
      var ViewportType = viewDescriptor.type,
          viewState = viewDescriptor.viewState;
 
      // Resolve relative viewport dimensions
      // TODO - we need to have width and height available
 
      var viewportDimensions = this._getViewDimensions({ viewDescriptor: viewDescriptor });
 
      // Create the viewport, giving preference to view state in `viewState`
      return new ViewportType(Object.assign({}, viewDescriptor, viewportDimensions, viewState // Object.assign handles undefined
      ));
    }
 
    // Check if viewport array has changed, returns true if any change
    // Note that descriptors can be the same
 
  }, {
    key: '_diffViews',
    value: function _diffViews(newViews, oldViews) {
      var _this2 = this;
 
      if (newViews.length !== oldViews.length) {
        return true;
      }
 
      return newViews.some(function (_, i) {
        return _this2._diffView(newViews[i], oldViews[i]);
      });
    }
  }, {
    key: '_diffView',
    value: function _diffView(newView, oldView) {
      // `View` hiearchy supports an `equals` method
      if (newView.viewport) {
        return !oldView.viewport || !newView.viewport.equals(oldView.viewport);
      }
      // TODO - implement deep equal on view descriptors
      return newView !== oldView;
    }
 
    // Support for relative viewport dimensions (e.g {y: '50%', height: '50%'})
 
  }, {
    key: '_getViewDimensions',
    value: function _getViewDimensions(_ref11) {
      var viewDescriptor = _ref11.viewDescriptor,
          width = _ref11.width,
          height = _ref11.height;
 
      var parsePercent = function parsePercent(value, max) {
        return value;
      };
      // TODO - enable to support percent size specifiers
      // const parsePercent = (value, max) => value ?
      //   Math.round(parseFloat(value) / 100 * max) :
      //   (value === null ? max : value);
 
      return {
        x: parsePercent(viewDescriptor.x, width),
        y: parsePercent(viewDescriptor.y, height),
        width: parsePercent(viewDescriptor.width, width),
        height: parsePercent(viewDescriptor.height, height)
      };
    }
 
    /**
     * @param {Object} eventManager   A source of DOM input events
     */
 
  }, {
    key: '_initEventHandling',
    value: function _initEventHandling(eventManager) {
      this._eventManager = eventManager;
 
      // TODO: add/remove handlers on demand at runtime, not all at once on init.
      // Consider both top-level handlers like onLayerClick/Hover
      // and per-layer handlers attached to individual layers.
      // https://github.com/uber/deck.gl/issues/634
      this._eventManager.on({
        click: this._onClick,
        pointermove: this._onPointerMove,
        pointerleave: this._onPointerLeave
      });
    }
 
    // Set parameters for input event handling.
 
  }, {
    key: '_setEventHandlingParameters',
    value: function _setEventHandlingParameters(_ref12) {
      var pickingRadius = _ref12.pickingRadius,
          onLayerClick = _ref12.onLayerClick,
          onLayerHover = _ref12.onLayerHover;
 
      if (!isNaN(pickingRadius)) {
        this._pickingRadius = pickingRadius;
      }
      if (typeof onLayerClick !== 'undefined') {
        this._onLayerClick = onLayerClick;
      }
      if (typeof onLayerHover !== 'undefined') {
        this._onLayerHover = onLayerHover;
      }
      this._validateEventHandling();
    }
 
    // Make a viewport "current" in layer context, primed for draw
 
  }, {
    key: '_activateViewport',
    value: function _activateViewport(viewport) {
      // TODO - viewport change detection breaks METER_OFFSETS mode
      // const oldViewport = this.context.viewport;
      // const viewportChanged = !oldViewport || !viewport.equals(oldViewport);
      var viewportChanged = true;
 
      if (viewportChanged) {
        Object.assign(this.oldContext, this.context);
        this.context.viewport = viewport;
        this.context.viewportChanged = true;
        this.context.uniforms = {};
        (0, _log2.default)(4, viewport);
 
        // Update layers states
        // Let screen space layers update their state based on viewport
        // TODO - reimplement viewport change detection (single viewport optimization)
        // TODO - don't set viewportChanged during setViewports?
        if (this.context.viewportChanged) {
          var _iteratorNormalCompletion3 = true;
          var _didIteratorError3 = false;
          var _iteratorError3 = undefined;
 
          try {
            for (var _iterator3 = this.layers[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {
              var layer = _step3.value;
 
              layer.setChangeFlags({ viewportChanged: 'Viewport changed' });
              this._updateLayer(layer);
            }
          } catch (err) {
            _didIteratorError3 = true;
            _iteratorError3 = err;
          } finally {
            try {
              if (!_iteratorNormalCompletion3 && _iterator3.return) {
                _iterator3.return();
              }
            } finally {
              if (_didIteratorError3) {
                throw _iteratorError3;
              }
            }
          }
        }
      }
 
      (0, _assert2.default)(this.context.viewport, 'LayerManager: viewport not set');
 
      return this;
    }
  }, {
    key: '_getPickingBuffer',
    value: function _getPickingBuffer() {
      var gl = this.context.gl;
      // Create a frame buffer if not already available
 
      this.context.pickingFBO = this.context.pickingFBO || new _luma.Framebuffer(gl);
      // Resize it to current canvas size (this is a noop if size hasn't changed)
      this.context.pickingFBO.resize({ width: gl.canvas.width, height: gl.canvas.height });
      return this.context.pickingFBO;
    }
 
    // Match all layers, checking for caught errors
    // To avoid having an exception in one layer disrupt other layers
    // TODO - mark layers with exceptions as bad and remove from rendering cycle?
 
  }, {
    key: '_updateLayers',
    value: function _updateLayers(_ref13) {
      var oldLayers = _ref13.oldLayers,
          newLayers = _ref13.newLayers;
 
      // Create old layer map
      var oldLayerMap = {};
      var _iteratorNormalCompletion4 = true;
      var _didIteratorError4 = false;
      var _iteratorError4 = undefined;
 
      try {
        for (var _iterator4 = oldLayers[Symbol.iterator](), _step4; !(_iteratorNormalCompletion4 = (_step4 = _iterator4.next()).done); _iteratorNormalCompletion4 = true) {
          var oldLayer = _step4.value;
 
          if (oldLayerMap[oldLayer.id]) {
            _log2.default.warn('Multiple old layers with same id ' + layerName(oldLayer));
          } else {
            oldLayerMap[oldLayer.id] = oldLayer;
          }
        }
 
        // Allocate array for generated layers
      } catch (err) {
        _didIteratorError4 = true;
        _iteratorError4 = err;
      } finally {
        try {
          if (!_iteratorNormalCompletion4 && _iterator4.return) {
            _iterator4.return();
          }
        } finally {
          if (_didIteratorError4) {
            throw _iteratorError4;
          }
        }
      }
 
      var generatedLayers = [];
 
      // Match sublayers
      var error = this._updateSublayersRecursively({
        newLayers: newLayers,
        oldLayerMap: oldLayerMap,
        generatedLayers: generatedLayers
      });
 
      // Finalize unmatched layers
      var error2 = this._finalizeOldLayers(oldLayerMap);
 
      var firstError = error || error2;
      return { error: firstError, generatedLayers: generatedLayers };
    }
 
    // Note: adds generated layers to `generatedLayers` array parameter
 
  }, {
    key: '_updateSublayersRecursively',
    value: function _updateSublayersRecursively(_ref14) {
      var newLayers = _ref14.newLayers,
          oldLayerMap = _ref14.oldLayerMap,
          generatedLayers = _ref14.generatedLayers;
 
      var error = null;
 
      var _iteratorNormalCompletion5 = true;
      var _didIteratorError5 = false;
      var _iteratorError5 = undefined;
 
      try {
        for (var _iterator5 = newLayers[Symbol.iterator](), _step5; !(_iteratorNormalCompletion5 = (_step5 = _iterator5.next()).done); _iteratorNormalCompletion5 = true) {
          var newLayer = _step5.value;
 
          newLayer.context = this.context;
 
          // Given a new coming layer, find its matching old layer (if any)
          var oldLayer = oldLayerMap[newLayer.id];
          if (oldLayer === null) {
            // null, rather than undefined, means this id was originally there
            _log2.default.warn('Multiple new layers with same id ' + layerName(newLayer));
          }
          // Remove the old layer from candidates, as it has been matched with this layer
          oldLayerMap[newLayer.id] = null;
 
          var sublayers = null;
 
          // We must not generate exceptions until after layer matching is complete
          try {
            if (!oldLayer) {
              this._initializeLayer(newLayer);
              (0, _seerIntegration.initLayerInSeer)(newLayer); // Initializes layer in seer chrome extension (if connected)
            } else {
              this._transferLayerState(oldLayer, newLayer);
              this._updateLayer(newLayer);
              (0, _seerIntegration.updateLayerInSeer)(newLayer); // Updates layer in seer chrome extension (if connected)
            }
            generatedLayers.push(newLayer);
 
            // Call layer lifecycle method: render sublayers
            sublayers = newLayer.isComposite && newLayer.getSubLayers();
            // End layer lifecycle method: render sublayers
          } catch (err) {
            _log2.default.warn('error during matching of ' + layerName(newLayer), err);
            error = error || err; // Record first exception
          }
 
          if (sublayers) {
            this._updateSublayersRecursively({
              newLayers: sublayers,
              oldLayerMap: oldLayerMap,
              generatedLayers: generatedLayers
            });
          }
        }
      } catch (err) {
        _didIteratorError5 = true;
        _iteratorError5 = err;
      } finally {
        try {
          if (!_iteratorNormalCompletion5 && _iterator5.return) {
            _iterator5.return();
          }
        } finally {
          if (_didIteratorError5) {
            throw _iteratorError5;
          }
        }
      }
 
      return error;
    }
 
    // Finalize any old layers that were not matched
 
  }, {
    key: '_finalizeOldLayers',
    value: function _finalizeOldLayers(oldLayerMap) {
      var error = null;
      for (var layerId in oldLayerMap) {
        var layer = oldLayerMap[layerId];
        if (layer) {
          error = error || this._finalizeLayer(layer);
        }
      }
      return error;
    }
 
    // Initializes a single layer, calling layer methods
 
  }, {
    key: '_initializeLayer',
    value: function _initializeLayer(layer) {
      (0, _assert2.default)(!layer.state);
      (0, _log2.default)(LOG_PRIORITY_LIFECYCLE, 'initializing ' + layerName(layer));
 
      var error = null;
      try {
        layer._initialize();
        layer.lifecycle = _constants.LIFECYCLE.INITIALIZED;
      } catch (err) {
        _log2.default.warn('error while initializing ' + layerName(layer) + '\n', err);
        error = error || err;
        // TODO - what should the lifecycle state be here? LIFECYCLE.INITIALIZATION_FAILED?
      }
 
      (0, _assert2.default)(layer.state);
 
      // Set back pointer (used in picking)
      layer.state.layer = layer;
 
      // Save layer on model for picking purposes
      // store on model.userData rather than directly on model
      var _iteratorNormalCompletion6 = true;
      var _didIteratorError6 = false;
      var _iteratorError6 = undefined;
 
      try {
        for (var _iterator6 = layer.getModels()[Symbol.iterator](), _step6; !(_iteratorNormalCompletion6 = (_step6 = _iterator6.next()).done); _iteratorNormalCompletion6 = true) {
          var model = _step6.value;
 
          model.userData.layer = layer;
        }
      } catch (err) {
        _didIteratorError6 = true;
        _iteratorError6 = err;
      } finally {
        try {
          if (!_iteratorNormalCompletion6 && _iterator6.return) {
            _iterator6.return();
          }
        } finally {
          if (_didIteratorError6) {
            throw _iteratorError6;
          }
        }
      }
 
      return error;
    }
  }, {
    key: '_transferLayerState',
    value: function _transferLayerState(oldLayer, newLayer) {
      if (newLayer !== oldLayer) {
        (0, _log2.default)(LOG_PRIORITY_LIFECYCLE_MINOR, 'matched ' + layerName(newLayer), oldLayer, '->', newLayer);
        newLayer.lifecycle = _constants.LIFECYCLE.MATCHED;
        oldLayer.lifecycle = _constants.LIFECYCLE.AWAITING_GC;
        newLayer._transferState(oldLayer);
      } else {
        _log2.default.log(LOG_PRIORITY_LIFECYCLE_MINOR, 'Matching layer is unchanged ' + newLayer.id);
        newLayer.lifecycle = _constants.LIFECYCLE.MATCHED;
        newLayer.oldProps = newLayer.props;
      }
    }
 
    // Updates a single layer, cleaning all flags
 
  }, {
    key: '_updateLayer',
    value: function _updateLayer(layer) {
      _log2.default.log(LOG_PRIORITY_LIFECYCLE_MINOR, 'updating ' + layer + ' because: ' + layer.printChangeFlags());
      var error = null;
      try {
        layer._update();
      } catch (err) {
        _log2.default.warn('error during update of ' + layerName(layer), err);
        // Save first error
        error = err;
      }
      return error;
    }
 
    // Finalizes a single layer
 
  }, {
    key: '_finalizeLayer',
    value: function _finalizeLayer(layer) {
      (0, _assert2.default)(layer.state);
      (0, _assert2.default)(layer.lifecycle !== _constants.LIFECYCLE.AWAITING_FINALIZATION);
      layer.lifecycle = _constants.LIFECYCLE.AWAITING_FINALIZATION;
      var error = null;
      this.setNeedsRedraw('finalized ' + layerName(layer));
      try {
        layer._finalize();
      } catch (err) {
        _log2.default.warn('error during finalization of ' + layerName(layer), err);
        error = err;
      }
      layer.lifecycle = _constants.LIFECYCLE.FINALIZED;
      (0, _log2.default)(LOG_PRIORITY_LIFECYCLE, 'finalizing ' + layerName(layer));
      return error;
    }
 
    /**
     * Warn if a deck-level mouse event has been specified,
     * but no layers are `pickable`.
     */
 
  }, {
    key: '_validateEventHandling',
    value: function _validateEventHandling() {
      if (this.onLayerClick || this.onLayerHover) {
        if (this.layers.length && !this.layers.some(function (layer) {
          return layer.props.pickable;
        })) {
          _log2.default.warn('You have supplied a top-level input event handler (e.g. `onLayerClick`), ' + 'but none of your layers have set the `pickable` flag.');
        }
      }
    }
 
    /**
     * Route click events to layers.
     * `pickLayer` will call the `onClick` prop of any picked layer,
     * and `onLayerClick` is called directly from here
     * with any picking info generated by `pickLayer`.
     * @param {Object} event  An object encapsulating an input event,
     *                        with the following shape:
     *                        {Object: {x, y}} offsetCenter: center of the event
     *                        {Object} srcEvent:             native JS Event object
     */
 
  }, {
    key: '_onClick',
    value: function _onClick(event) {
      if (!event.offsetCenter) {
        // Do not trigger onHover callbacks when click position is invalid.
        return;
      }
      this._pickAndCallback({
        callback: this._onLayerClick,
        event: event,
        mode: 'click'
      });
    }
 
    /**
     * Route click events to layers.
     * `pickLayer` will call the `onHover` prop of any picked layer,
     * and `onLayerHover` is called directly from here
     * with any picking info generated by `pickLayer`.
     * @param {Object} event  An object encapsulating an input event,
     *                        with the following shape:
     *                        {Object: {x, y}} offsetCenter: center of the event
     *                        {Object} srcEvent:             native JS Event object
     */
 
  }, {
    key: '_onPointerMove',
    value: function _onPointerMove(event) {
      if (event.leftButton || event.rightButton) {
        // Do not trigger onHover callbacks if mouse button is down.
        return;
      }
      this._pickAndCallback({
        callback: this._onLayerHover,
        event: event,
        mode: 'hover'
      });
    }
  }, {
    key: '_onPointerLeave',
    value: function _onPointerLeave(event) {
      this.pickObject({
        x: -1,
        y: -1,
        radius: this._pickingRadius,
        mode: 'hover'
      });
    }
  }, {
    key: '_pickAndCallback',
    value: function _pickAndCallback(options) {
      var pos = options.event.offsetCenter;
      var radius = this._pickingRadius;
      var selectedInfos = this.pickObject({ x: pos.x, y: pos.y, radius: radius, mode: options.mode });
      if (options.callback) {
        var firstInfo = selectedInfos.find(function (info) {
          return info.index >= 0;
        }) || null;
        // As per documentation, send null value when no valid object is picked.
        options.callback(firstInfo, selectedInfos, options.event.srcEvent);
      }
    }
 
    // SEER INTEGRATION
 
    /**
     * Called upon Seer initialization, manually sends layers data.
     */
 
  }, {
    key: '_initSeer',
    value: function _initSeer() {
      this.layers.forEach(function (layer) {
        (0, _seerIntegration.initLayerInSeer)(layer);
        (0, _seerIntegration.updateLayerInSeer)(layer);
      });
    }
 
    /**
     * On Seer property edition, set override and update layers.
     */
 
  }, {
    key: '_editSeer',
    value: function _editSeer(payload) {
      if (payload.type !== 'edit' || payload.valuePath[0] !== 'props') {
        return;
      }
 
      (0, _seerIntegration.setPropOverrides)(payload.itemKey, payload.valuePath.slice(1), payload.value);
      var newLayers = this.layers.map(function (layer) {
        return new layer.constructor(layer.props);
      });
      this.updateLayers({ newLayers: newLayers });
    }
  }]);
 
  return LayerManager;
}();
 
exports.default = LayerManager;
 
/***/ }),
/* 185 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
 
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
 
exports.formatTime = formatTime;
exports.leftPad = leftPad;
 
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
 
var Stats = function () {
  function Stats(_ref) {
    var id = _ref.id;
 
    _classCallCheck(this, Stats);
 
    this.id = id;
    this.time = 0;
    this.total = 0;
    this.average = 0;
    this.count = 0;
 
    this._time = 0;
  }
 
  _createClass(Stats, [{
    key: 'timeStart',
    value: function timeStart() {
      this._time = this.timestampMs();
    }
  }, {
    key: 'timeEnd',
    value: function timeEnd() {
      this.time = this.timestampMs() - this._time;
      this.total += this.time;
      this.count++;
      this.average = this.total / this.count;
    }
  }, {
    key: 'timestampMs',
    value: function timestampMs() {
      /* global window */
      return typeof window !== 'undefined' && window.performance ? window.performance.now() : Date.now();
    }
  }, {
    key: 'getTimeString',
    value: function getTimeString() {
      return this.id + ':' + formatTime(this.time) + '(' + this.count + ')';
    }
  }]);
 
  return Stats;
}();
 
// TODO: Currently unused, keeping in case we want it later for log formatting
 
 
exports.default = Stats;
function formatTime(ms) {
  var formatted = void 0;
  if (ms < 10) {
    formatted = ms.toFixed(2) + 'ms';
  } else if (ms < 100) {
    formatted = ms.toFixed(1) + 'ms';
  } else if (ms < 1000) {
    formatted = ms.toFixed(0) + 'ms';
  } else {
    formatted = (ms / 1000).toFixed(2) + 's';
  }
  return formatted;
}
 
function leftPad(string) {
  var length = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 8;
 
  while (string.length < length) {
    string = ' ' + string;
  }
  return string;
}
 
/***/ }),
/* 186 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.TRANSITION_EVENTS = undefined;
 
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); /* global requestAnimationFrame, cancelAnimationFrame */
 
 
var _linearInterpolator = __webpack_require__(125);
 
var _linearInterpolator2 = _interopRequireDefault(_linearInterpolator);
 
var _transitionUtils = __webpack_require__(84);
 
var _assert = __webpack_require__(1);
 
var _assert2 = _interopRequireDefault(_assert);
 
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
 
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
 
var noop = function noop() {};
 
var TRANSITION_EVENTS = exports.TRANSITION_EVENTS = {
  BREAK: 1,
  SNAP_TO_END: 2,
  IGNORE: 3
};
 
var DEFAULT_PROPS = {
  transitionDuration: 0,
  transitionEasing: function transitionEasing(t) {
    return t;
  },
  transitionInterpolator: new _linearInterpolator2.default(),
  transitionInterruption: TRANSITION_EVENTS.BREAK,
  onTransitionStart: noop,
  onTransitionInterrupt: noop,
  onTransitionEnd: noop
};
 
var DEFAULT_STATE = {
  animation: null,
  propsInTransition: null,
  startProps: null,
  endProps: null
};
 
var TransitionManager = function () {
  function TransitionManager(props) {
    _classCallCheck(this, TransitionManager);
 
    this.props = props;
    this.state = DEFAULT_STATE;
 
    this._onTransitionFrame = this._onTransitionFrame.bind(this);
  }
 
  // Returns current transitioned viewport.
 
 
  _createClass(TransitionManager, [{
    key: 'getViewportInTransition',
    value: function getViewportInTransition() {
      return this.state.propsInTransition;
    }
 
    // Process the vewiport change, either ignore or trigger a new transiton.
    // Return true if a new transition is triggered, false otherwise.
 
  }, {
    key: 'processViewportChange',
    value: function processViewportChange(nextProps) {
      var transitionTriggered = false;
      var currentProps = this.props;
      // Set this.props here as '_triggerTransition' calls '_updateViewport' that uses this.props.
      this.props = nextProps;
 
      // NOTE: Be cautious re-ordering statements in this function.
      if (this._shouldIgnoreViewportChange(currentProps, nextProps)) {
        return transitionTriggered;
      }
 
      var isTransitionInProgress = this._isTransitionInProgress();
 
      if (this._isTransitionEnabled(nextProps)) {
        var startProps = Object.assign({}, currentProps, this.state.interruption === TRANSITION_EVENTS.SNAP_TO_END ? this.state.endProps : this.state.propsInTransition || currentProps);
 
        if (isTransitionInProgress) {
          currentProps.onTransitionInterrupt();
        }
        nextProps.onTransitionStart();
 
        this._triggerTransition(startProps, nextProps);
 
        transitionTriggered = true;
      } else if (isTransitionInProgress) {
        currentProps.onTransitionInterrupt();
        this._endTransition();
      }
 
      return transitionTriggered;
    }
 
    // Helper methods
 
  }, {
    key: '_isTransitionInProgress',
    value: function _isTransitionInProgress() {
      return this.state.propsInTransition;
    }
  }, {
    key: '_isTransitionEnabled',
    value: function _isTransitionEnabled(props) {
      return props.transitionDuration > 0 && props.transitionInterpolator;
    }
  }, {
    key: '_isUpdateDueToCurrentTransition',
    value: function _isUpdateDueToCurrentTransition(props) {
      if (this.state.propsInTransition) {
        return this.state.interpolator.arePropsEqual(props, this.state.propsInTransition);
      }
      return false;
    }
  }, {
    key: '_shouldIgnoreViewportChange',
    value: function _shouldIgnoreViewportChange(currentProps, nextProps) {
      if (this._isTransitionInProgress()) {
        // Ignore update if it is requested to be ignored
        return this.state.interruption === TRANSITION_EVENTS.IGNORE ||
        // Ignore update if it is due to current active transition.
        this._isUpdateDueToCurrentTransition(nextProps);
      } else if (this._isTransitionEnabled(nextProps)) {
        // Ignore if none of the viewport props changed.
        return nextProps.transitionInterpolator.arePropsEqual(currentProps, nextProps);
      }
      return true;
    }
  }, {
    key: '_triggerTransition',
    value: function _triggerTransition(startProps, endProps) {
      (0, _assert2.default)(this._isTransitionEnabled(endProps), 'Transition is not enabled');
 
      cancelAnimationFrame(this.state.animation);
 
      var initialProps = endProps.transitionInterpolator.initializeProps(startProps, endProps);
 
      this.state = {
        // Save current transition props
        duration: endProps.transitionDuration,
        easing: endProps.transitionEasing,
        interpolator: endProps.transitionInterpolator,
        interruption: endProps.transitionInterruption,
 
        startTime: Date.now(),
        startProps: initialProps.start,
        endProps: initialProps.end,
        animation: null,
        propsInTransition: {}
      };
 
      this._onTransitionFrame();
    }
  }, {
    key: '_onTransitionFrame',
    value: function _onTransitionFrame() {
      // _updateViewport() may cancel the animation
      this.state.animation = requestAnimationFrame(this._onTransitionFrame);
      this._updateViewport();
    }
  }, {
    key: '_endTransition',
    value: function _endTransition() {
      cancelAnimationFrame(this.state.animation);
      this.state = DEFAULT_STATE;
    }
  }, {
    key: '_updateViewport',
    value: function _updateViewport() {
      // NOTE: Be cautious re-ordering statements in this function.
      var currentTime = Date.now();
      var _state = this.state,
          startTime = _state.startTime,
          duration = _state.duration,
          easing = _state.easing,
          interpolator = _state.interpolator,
          startProps = _state.startProps,
          endProps = _state.endProps;
 
 
      var shouldEnd = false;
      var t = (currentTime - startTime) / duration;
      if (t >= 1) {
        t = 1;
        shouldEnd = true;
      }
      t = easing(t);
 
      var viewport = interpolator.interpolateProps(startProps, endProps, t);
 
      // This extractViewportFrom gurantees angle props (bearing, longitude) are normalized
      // So when viewports are compared they are in same range.
      this.state.propsInTransition = (0, _transitionUtils.extractViewportFrom)(Object.assign({}, this.props, viewport));
 
      if (this.props.onViewportChange) {
        this.props.onViewportChange(this.state.propsInTransition, { inTransition: true });
      }
 
      if (shouldEnd) {
        this._endTransition();
        this.props.onTransitionEnd();
      }
    }
  }]);
 
  return TransitionManager;
}();
 
exports.default = TransitionManager;
 
 
TransitionManager.defaultProps = DEFAULT_PROPS;
 
/***/ }),
/* 187 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
 
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
 
exports.diffProps = diffProps;
exports.compareProps = compareProps;
 
var _assert = __webpack_require__(1);
 
var _assert2 = _interopRequireDefault(_assert);
 
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
 
// Returns an object with "change flags", either false or strings indicating reason for change
function diffProps(props, oldProps) {
  // First check if any props have changed (ignore props that will be examined separately)
  var propsChangedReason = compareProps({
    newProps: props,
    oldProps: oldProps,
    ignoreProps: { data: null, updateTriggers: null }
  });
 
  // Now check if any data related props have changed
  var dataChangedReason = diffDataProps(props, oldProps);
 
  // Check update triggers to determine if any attributes need regeneration
  // Note - if data has changed, all attributes will need regeneration, so skip this step
  var updateTriggersChangedReason = false;
  if (!dataChangedReason) {
    updateTriggersChangedReason = diffUpdateTriggers(props, oldProps);
  }
 
  return {
    dataChanged: dataChangedReason,
    propsChanged: propsChangedReason,
    updateTriggersChanged: updateTriggersChangedReason
  };
}
 
/**
 * Performs equality by iterating through keys on an object and returning false
 * when any key has values which are not strictly equal between the arguments.
 * @param {Object} opt.oldProps - object with old key/value pairs
 * @param {Object} opt.newProps - object with new key/value pairs
 * @param {Object} opt.ignoreProps={} - object, keys that should not be compared
 * @returns {null|String} - null when values of all keys are strictly equal.
 *   if unequal, returns a string explaining what changed.
 */
/* eslint-disable max-statements, max-depth, complexity */
function compareProps() {
  var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
      newProps = _ref.newProps,
      oldProps = _ref.oldProps,
      _ref$ignoreProps = _ref.ignoreProps,
      ignoreProps = _ref$ignoreProps === undefined ? {} : _ref$ignoreProps,
      _ref$shallowComparePr = _ref.shallowCompareProps,
      shallowCompareProps = _ref$shallowComparePr === undefined ? {} : _ref$shallowComparePr,
      _ref$triggerName = _ref.triggerName,
      triggerName = _ref$triggerName === undefined ? 'props' : _ref$triggerName;
 
  (0, _assert2.default)(oldProps !== undefined && newProps !== undefined, 'compareProps args');
 
  // shallow equality => deep equality
  if (oldProps === newProps) {
    return null;
  }
 
  // TODO - do we need these checks? Should never happen...
  if ((typeof newProps === 'undefined' ? 'undefined' : _typeof(newProps)) !== 'object' || newProps === null) {
    return triggerName + ' changed shallowly';
  }
 
  if ((typeof oldProps === 'undefined' ? 'undefined' : _typeof(oldProps)) !== 'object' || oldProps === null) {
    return triggerName + ' changed shallowly';
  }
 
  // Test if new props different from old props
  for (var key in oldProps) {
    if (!(key in ignoreProps)) {
      if (!(key in newProps)) {
        return triggerName + '.' + key + ' dropped: ' + oldProps[key] + ' -> undefined';
      }
 
      // If object has an equals function, invoke it
      var equals = newProps[key] && oldProps[key] && newProps[key].equals;
      if (equals && !equals.call(newProps[key], oldProps[key])) {
        return triggerName + '.' + key + ' changed deeply: ' + oldProps[key] + ' -> ' + newProps[key];
      }
 
      // If both new and old value are functions, ignore differences
      if (key in shallowCompareProps) {
        var type = _typeof(newProps[key]);
        if (type === 'function' && typeof oldProps[key] === 'function') {
          equals = true;
        }
      }
 
      if (!equals && oldProps[key] !== newProps[key]) {
        return triggerName + '.' + key + ' changed shallowly: ' + oldProps[key] + ' -> ' + newProps[key];
      }
    }
  }
 
  // Test if any new props have been added
  for (var _key in newProps) {
    if (!(_key in ignoreProps)) {
      if (!(_key in oldProps)) {
        return triggerName + '.' + _key + ' added: undefined -> ' + newProps[_key];
      }
    }
  }
 
  return null;
}
/* eslint-enable max-statements, max-depth, complexity */
 
// HELPERS
 
// The comparison of the data prop requires special handling
// the dataComparator should be used if supplied
function diffDataProps(props, oldProps) {
  if (oldProps === null) {
    return 'oldProps is null, initial diff';
  }
 
  // Support optional app defined comparison of data
  var dataComparator = props.dataComparator;
 
  if (dataComparator) {
    if (!dataComparator(props.data, oldProps.data)) {
      return 'Data comparator detected a change';
    }
    // Otherwise, do a shallow equal on props
  } else if (props.data !== oldProps.data) {
    return 'A new data container was supplied';
  }
 
  return null;
}
 
// Checks if any update triggers have changed
// also calls callback to invalidate attributes accordingly.
function diffUpdateTriggers(props, oldProps) {
  if (oldProps === null) {
    return 'oldProps is null, initial diff';
  }
 
  // If the 'all' updateTrigger fires, ignore testing others
  if ('all' in props.updateTriggers) {
    var diffReason = diffUpdateTrigger(oldProps, props, 'all');
    if (diffReason) {
      return { all: true };
    }
  }
 
  var triggerChanged = {};
  var reason = false;
  // If the 'all' updateTrigger didn't fire, need to check all others
  for (var triggerName in props.updateTriggers) {
    if (triggerName !== 'all') {
      var _diffReason = diffUpdateTrigger(oldProps, props, triggerName);
      if (_diffReason) {
        triggerChanged[triggerName] = true;
        reason = triggerChanged;
      }
    }
  }
 
  return reason;
}
 
function diffUpdateTrigger(props, oldProps, triggerName) {
  var newTriggers = props.updateTriggers[triggerName] || {};
  var oldTriggers = oldProps.updateTriggers[triggerName] || {};
  var diffReason = compareProps({
    oldProps: oldTriggers,
    newProps: newTriggers,
    triggerName: triggerName
  });
  return diffReason;
}
 
/***/ }),
/* 188 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
 
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
 
var _propTypes = __webpack_require__(116);
 
var _propTypes2 = _interopRequireDefault(_propTypes);
 
var _mjolnir = __webpack_require__(115);
 
var _mapControls = __webpack_require__(178);
 
var _mapControls2 = _interopRequireDefault(_mapControls);
 
var _mapState = __webpack_require__(82);
 
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
 
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
 
var PREFIX = '-webkit-';
 
var CURSOR = {
  GRABBING: PREFIX + 'grabbing',
  GRAB: PREFIX + 'grab',
  POINTER: 'pointer'
};
 
var propTypes = {
  width: _propTypes2.default.number.isRequired /** The width of the map. */
  , height: _propTypes2.default.number.isRequired /** The height of the map. */
  , longitude: _propTypes2.default.number.isRequired /** The longitude of the center of the map. */
  , latitude: _propTypes2.default.number.isRequired /** The latitude of the center of the map. */
  , zoom: _propTypes2.default.number.isRequired /** The tile zoom level of the map. */
  , bearing: _propTypes2.default.number /** Specify the bearing of the viewport */
  , pitch: _propTypes2.default.number /** Specify the pitch of the viewport */
  , // Note: Non-public API, see https://github.com/mapbox/mapbox-gl-js/issues/1137
  altitude: _propTypes2.default.number /** Altitude of the viewport camera. Default 1.5 "screen heights" */
 
  , /** Viewport constraints */
  maxZoom: _propTypes2.default.number, // Max zoom level
  minZoom: _propTypes2.default.number, // Min zoom level
  maxPitch: _propTypes2.default.number, // Max pitch in degrees
  minPitch: _propTypes2.default.number, // Min pitch in degrees
 
  /**
   * `onViewportChange` callback is fired when the user interacted with the
   * map. The object passed to the callback contains viewport properties
   * such as `longitude`, `latitude`, `zoom` etc.
   */
  onViewportChange: _propTypes2.default.func,
 
  /** Enables control event handling */
  scrollZoom: _propTypes2.default.bool, // Scroll to zoom
  dragPan: _propTypes2.default.bool, // Drag to pan
  dragRotate: _propTypes2.default.bool, // Drag to rotate
  doubleClickZoom: _propTypes2.default.bool, // Double click to zoom
  touchZoomRotate: _propTypes2.default.bool, // Pinch to zoom / rotate
 
  /** Accessor that returns a cursor style to show interactive state */
  getCursor: _propTypes2.default.func,
 
  // A map control instance to replace the default map controls
  // The object must expose one property: `events` as an array of subscribed
  // event names; and two methods: `setState(state)` and `handle(event)`
  controls: _propTypes2.default.shape({
    events: _propTypes2.default.arrayOf(_propTypes2.default.string),
    handleEvent: _propTypes2.default.func
  })
};
 
var getDefaultCursor = function getDefaultCursor(_ref) {
  var isDragging = _ref.isDragging;
  return isDragging ? CURSOR.GRABBING : CURSOR.GRAB;
};
 
var defaultProps = Object.assign({}, _mapState.MAPBOX_LIMITS, {
  onViewportChange: null,
  scrollZoom: true,
  dragPan: true,
  dragRotate: true,
  doubleClickZoom: true,
  touchZoomRotate: true,
  getCursor: getDefaultCursor
});
 
var MapControllerJS = function () {
  function MapControllerJS(props) {
    _classCallCheck(this, MapControllerJS);
 
    props = Object.assign({}, defaultProps, props);
 
    this.props = props;
    this.state = {
      isDragging: false // Whether the cursor is down
    };
 
    this.canvas = props.canvas;
 
    var eventManager = new _mjolnir.EventManager(this.canvas);
 
    this._eventManager = eventManager;
 
    // If props.controls is not provided, fallback to default MapControls instance
    // Cannot use defaultProps here because it needs to be per map instance
    this._controls = this.props.controls || new _mapControls2.default();
    this._controls.setOptions(Object.assign({}, this.props, {
      onStateChange: this._onInteractiveStateChange.bind(this),
      eventManager: eventManager
    }));
  }
 
  _createClass(MapControllerJS, [{
    key: 'setProps',
    value: function setProps(props) {
      props = Object.assign({}, this.props, props);
      this.props = props;
 
      this._controls.setOptions(props);
    }
  }, {
    key: 'finalize',
    value: function finalize() {
      this._eventManager.destroy();
    }
  }, {
    key: '_onInteractiveStateChange',
    value: function _onInteractiveStateChange(_ref2) {
      var _ref2$isDragging = _ref2.isDragging,
          isDragging = _ref2$isDragging === undefined ? false : _ref2$isDragging;
 
      if (isDragging !== this.state.isDragging) {
        this.state.isDragging = isDragging;
        var getCursor = this.props.getCursor;
 
        this.canvas.style.cursor = getCursor(this.state);
      }
    }
  }]);
 
  return MapControllerJS;
}();
 
exports.default = MapControllerJS;
 
 
MapControllerJS.displayName = 'MapController';
MapControllerJS.propTypes = propTypes;
MapControllerJS.defaultProps = defaultProps;
 
/***/ }),
/* 189 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
 
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
 
var _propTypes = __webpack_require__(116);
 
var _propTypes2 = _interopRequireDefault(_propTypes);
 
var _orbitViewport = __webpack_require__(85);
 
var _orbitViewport2 = _interopRequireDefault(_orbitViewport);
 
var _orbitState = __webpack_require__(179);
 
var _orbitState2 = _interopRequireDefault(_orbitState);
 
var _viewportControls = __webpack_require__(121);
 
var _viewportControls2 = _interopRequireDefault(_viewportControls);
 
var _mjolnir = __webpack_require__(115);
 
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
 
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
 
var PREFIX = '-webkit-';
 
var CURSOR = {
  GRABBING: PREFIX + 'grabbing',
  GRAB: PREFIX + 'grab',
  POINTER: 'pointer'
};
 
var propTypes = {
  /* Viewport properties */
  lookAt: _propTypes2.default.arrayOf(_propTypes2.default.number), // target position
  distance: _propTypes2.default.number, // distance from camera to the target
  rotationX: _propTypes2.default.number, // rotation around X axis
  rotationY: _propTypes2.default.number, // rotation around Y axis
  translationX: _propTypes2.default.number, // translation x in screen space
  translationY: _propTypes2.default.number, // translation y in screen space
  zoom: _propTypes2.default.number, // scale in screen space
  minZoom: _propTypes2.default.number,
  maxZoom: _propTypes2.default.number,
  fov: _propTypes2.default.number, // field of view
  near: _propTypes2.default.number,
  far: _propTypes2.default.number,
  width: _propTypes2.default.number.isRequired, // viewport width in pixels
  height: _propTypes2.default.number.isRequired, // viewport height in pixels
 
  /* Model properties */
  bounds: _propTypes2.default.object, // bounds in the shape of {minX, minY, minZ, maxX, maxY, maxZ}
 
  /* Callbacks */
  onViewportChange: _propTypes2.default.func.isRequired,
 
  /** Accessor that returns a cursor style to show interactive state */
  getCursor: _propTypes2.default.func,
 
  /* Controls */
  orbitControls: _propTypes2.default.object
};
 
var getDefaultCursor = function getDefaultCursor(_ref) {
  var isDragging = _ref.isDragging;
  return isDragging ? CURSOR.GRABBING : CURSOR.GRAB;
};
 
var defaultProps = {
  lookAt: [0, 0, 0],
  rotationX: 0,
  rotationY: 0,
  translationX: 0,
  translationY: 0,
  distance: 10,
  zoom: 1,
  minZoom: 0,
  maxZoom: Infinity,
  fov: 50,
  near: 1,
  far: 1000,
  getCursor: getDefaultCursor
};
 
/*
 * Maps mouse interaction to a deck.gl Viewport
 */
 
var OrbitControllerJS = function () {
  _createClass(OrbitControllerJS, null, [{
    key: 'getViewport',
 
    // Returns a deck.gl Viewport instance, to be used with the DeckGL component
    value: function getViewport(viewport) {
      return new _orbitViewport2.default(viewport);
    }
  }]);
 
  function OrbitControllerJS(props) {
    _classCallCheck(this, OrbitControllerJS);
 
    props = Object.assign({}, defaultProps, props);
 
    this.props = props;
 
    this.state = {
      // Whether the cursor is down
      isDragging: false
    };
 
    this.canvas = props.canvas;
 
    var eventManager = new _mjolnir.EventManager(this.canvas);
 
    this._eventManager = eventManager;
 
    this._controls = props.orbitControls || new _viewportControls2.default(_orbitState2.default);
    this._controls.setOptions(Object.assign({}, this.props, {
      onStateChange: this._onInteractiveStateChange.bind(this),
      eventManager: eventManager
    }));
  }
 
  _createClass(OrbitControllerJS, [{
    key: 'setProps',
    value: function setProps(props) {
      props = Object.assign({}, this.props, props);
      this.props = props;
 
      this._controls.setOptions(props);
    }
  }, {
    key: 'finalize',
    value: function finalize() {
      this._eventManager.destroy();
    }
  }, {
    key: '_onInteractiveStateChange',
    value: function _onInteractiveStateChange(_ref2) {
      var _ref2$isDragging = _ref2.isDragging,
          isDragging = _ref2$isDragging === undefined ? false : _ref2$isDragging;
 
      if (isDragging !== this.state.isDragging) {
        this.state.isDragging = isDragging;
        var getCursor = this.props.getCursor;
 
        this.canvas.style.cursor = getCursor(this.state);
      }
    }
  }]);
 
  return OrbitControllerJS;
}();
 
exports.default = OrbitControllerJS;
 
 
OrbitControllerJS.displayName = 'OrbitController';
OrbitControllerJS.propTypes = propTypes;
OrbitControllerJS.defaultProps = defaultProps;
 
/***/ }),
/* 190 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.lighting = exports.project64 = exports.project = exports.picking = exports.fp64 = exports.fp32 = undefined;
exports.initializeShaderModules = initializeShaderModules;
 
var _luma = __webpack_require__(12);
 
var _project = __webpack_require__(83);
 
var _project2 = _interopRequireDefault(_project);
 
var _project3 = __webpack_require__(192);
 
var _project4 = _interopRequireDefault(_project3);
 
var _lighting = __webpack_require__(191);
 
var _lighting2 = _interopRequireDefault(_lighting);
 
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
 
function initializeShaderModules() {
  (0, _luma.registerShaderModules)([_luma.fp32, _luma.fp64, _project2.default, _project4.default, _lighting2.default, _luma.picking]);
 
  (0, _luma.setDefaultShaderModules)([_project2.default]);
} // Copyright (c) 2015 - 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
 
initializeShaderModules();
 
exports.fp32 = _luma.fp32;
exports.fp64 = _luma.fp64;
exports.picking = _luma.picking;
exports.project = _project2.default;
exports.project64 = _project4.default;
exports.lighting = _lighting2.default;
 
/***/ }),
/* 191 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
 
var _lighting = __webpack_require__(342);
 
var _lighting2 = _interopRequireDefault(_lighting);
 
var _project = __webpack_require__(83);
 
var _project2 = _interopRequireDefault(_project);
 
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
 
// Copyright (c) 2015 - 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
 
exports.default = {
  name: 'lighting',
  dependencies: [_project2.default],
  vs: _lighting2.default
};
 
/***/ }),
/* 192 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
 
var _luma = __webpack_require__(12);
 
var _project = __webpack_require__(83);
 
var _project2 = _interopRequireDefault(_project);
 
var _fp = __webpack_require__(195);
 
var _memoize = __webpack_require__(196);
 
var _memoize2 = _interopRequireDefault(_memoize);
 
var _project3 = __webpack_require__(343);
 
var _project4 = _interopRequireDefault(_project3);
 
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
 
exports.default = {
  name: 'project64',
  dependencies: [_project2.default, _luma.fp64],
  vs: _project4.default,
  getUniforms: getUniforms,
  deprecations: [{ type: 'uniform vec2', old: 'projectionFP64[16]', new: 'project_uViewProjectionMatrixFP64' }, { type: 'uniform vec2', old: 'projectionScaleFP64', new: 'project64_uScale' }]
};
 
// TODO - this module should calculate the 64 bit uniforms
// It is currently done by project to minimize duplicated work
 
// Copyright (c) 2015 - 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
 
var DEFAULT_MODULE_OPTIONS = {};
var getMemoizedUniforms = (0, _memoize2.default)(calculateUniforms);
 
function getUniforms() {
  var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : DEFAULT_MODULE_OPTIONS;
  var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
 
  // These two uniforms are generated by the fp32 project module
  var project_uViewProjectionMatrix = context.project_uViewProjectionMatrix,
      project_uScale = context.project_uScale;
 
 
  if (project_uViewProjectionMatrix && project_uScale) {
    // We only need to update fp64 uniforms if fp32 projection is being updated
    return getMemoizedUniforms({ project_uViewProjectionMatrix: project_uViewProjectionMatrix, project_uScale: project_uScale });
  }
  return {};
}
 
function calculateUniforms(_ref) {
  var project_uViewProjectionMatrix = _ref.project_uViewProjectionMatrix,
      project_uScale = _ref.project_uScale;
 
  var glViewProjectionMatrixFP64 = (0, _fp.fp64ifyMatrix4)(project_uViewProjectionMatrix);
  var scaleFP64 = (0, _fp.fp64ify)(project_uScale);
 
  return {
    project_uViewProjectionMatrixFP64: glViewProjectionMatrixFP64,
    project64_uViewProjectionMatrix: glViewProjectionMatrixFP64,
    project64_uScale: scaleFP64
  };
}
 
/***/ }),
/* 193 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
 
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
 
var _math = __webpack_require__(16);
 
var _assert = __webpack_require__(1);
 
var _assert2 = _interopRequireDefault(_assert);
 
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
 
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
 
var TransitionInterpolator = function () {
  function TransitionInterpolator() {
    _classCallCheck(this, TransitionInterpolator);
  }
 
  _createClass(TransitionInterpolator, [{
    key: 'arePropsEqual',
 
    /**
     * Checks if two sets of props need transition in between
     * @param currentProps {object} - a list of viewport props
     * @param nextProps {object} - a list of viewport props
     * @returns {bool} - true if two props are equivalent
     */
    value: function arePropsEqual(currentProps, nextProps) {
      var _iteratorNormalCompletion = true;
      var _didIteratorError = false;
      var _iteratorError = undefined;
 
      try {
        for (var _iterator = (this.propNames || [])[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
          var key = _step.value;
 
          if (!(0, _math.equals)(currentProps[key], nextProps[key])) {
            return false;
          }
        }
      } catch (err) {
        _didIteratorError = true;
        _iteratorError = err;
      } finally {
        try {
          if (!_iteratorNormalCompletion && _iterator.return) {
            _iterator.return();
          }
        } finally {
          if (_didIteratorError) {
            throw _iteratorError;
          }
        }
      }
 
      return true;
    }
 
    /**
     * Called before transition starts to validate/pre-process start and end props
     * @param startProps {object} - a list of starting viewport props
     * @param endProps {object} - a list of target viewport props
     * @returns {Object} {start, end} - start and end props to be passed
     *   to `interpolateProps`
     */
 
  }, {
    key: 'initializeProps',
    value: function initializeProps(startProps, endProps) {
      return { start: startProps, end: endProps };
    }
 
    /**
     * Returns viewport props in transition
     * @param startProps {object} - a list of starting viewport props
     * @param endProps {object} - a list of target viewport props
     * @param t {number} - a time factor between [0, 1]
     * @returns {object} - a list of interpolated viewport props
     */
 
  }, {
    key: 'interpolateProps',
    value: function interpolateProps(startProps, endProps, t) {
      (0, _assert2.default)(false, 'interpolateProps is not implemented');
    }
  }]);
 
  return TransitionInterpolator;
}();
 
exports.default = TransitionInterpolator;
 
/***/ }),
/* 194 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
 
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
 
exports.count = count;
// Copyright (c) 2015 - 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
 
var ERR_NOT_OBJECT = 'count(): argument not an object';
var ERR_NOT_CONTAINER = 'count(): argument not a container';
 
/**
 * Deduces numer of elements in a JavaScript container.
 * - Auto-deduction for ES6 containers that define a count() method
 * - Auto-deduction for ES6 containers that define a size member
 * - Auto-deduction for Classic Arrays via the built-in length attribute
 * - Also handles objects, although note that this an O(N) operation
 */
function count(container) {
  if (!isObject(container)) {
    throw new Error(ERR_NOT_OBJECT);
  }
 
  // Check if ES6 collection "count" function is available
  if (typeof container.count === 'function') {
    return container.count();
  }
 
  // Check if ES6 collection "size" attribute is set
  if (Number.isFinite(container.size)) {
    return container.size;
  }
 
  // Check if array length attribute is set
  // Note: checking this last since some ES6 collections (Immutable.js)
  // emit profuse warnings when trying to access `length` attribute
  if (Number.isFinite(container.length)) {
    return container.length;
  }
 
  // Note that getting the count of an object is O(N)
  if (isPlainObject(container)) {
    return Object.keys(container).length;
  }
 
  throw new Error(ERR_NOT_CONTAINER);
}
 
/**
 * Checks if argument is a plain object (not a class or array etc)
 * @param {*} value - JavaScript value to be tested
 * @return {Boolean} - true if argument is a plain JavaScript object
 */
function isPlainObject(value) {
  return value !== null && (typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object' && value.constructor === Object;
}
 
/**
 * Checks if argument is an indexable object (not a primitive value, nor null)
 * @param {*} value - JavaScript value to be tested
 * @return {Boolean} - true if argument is a JavaScript object
 */
function isObject(value) {
  return value !== null && (typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object';
}
 
/***/ }),
/* 195 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.fp64ify = fp64ify;
exports.fp64ifyMatrix4 = fp64ifyMatrix4;
exports.fp64LowPart = fp64LowPart;
exports.enable64bitSupport = enable64bitSupport;
 
var _log = __webpack_require__(17);
 
var _log2 = _interopRequireDefault(_log);
 
var _constants = __webpack_require__(70);
 
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
 
// TODO - utils should not import from lib
 
/*
 * Frequently used small math utils: bundlers, especially webpack,
 * adds a thunk around every exported function that adds enough overhead to pull down performance.
 * It may be worth it to also export these as part of an object.
 */
// Copyright (c) 2015 - 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
 
// TODO - move to shaderlib utilities
function fp64ify(a) {
  var array = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
  var startIndex = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
 
  var hiPart = Math.fround(a);
  var loPart = a - Math.fround(a);
  array[startIndex] = hiPart;
  array[startIndex + 1] = loPart;
  return array;
}
 
// calculate WebGL 64 bit matrix (transposed "Float64Array")
function fp64ifyMatrix4(matrix) {
  // Transpose the projection matrix to column major for GLSL.
  var matrixFP64 = new Float32Array(32);
  for (var i = 0; i < 4; ++i) {
    for (var j = 0; j < 4; ++j) {
      var index = i * 4 + j;
      fp64ify(matrix[j * 4 + i], matrixFP64, index * 2);
    }
  }
  return matrixFP64;
}
 
function fp64LowPart(a) {
  return a - Math.fround(a);
}
 
function enable64bitSupport(props) {
  if (props.fp64) {
    if (props.coordinateSystem === _constants.COORDINATE_SYSTEM.LNGLAT) {
      return true;
    }
    _log2.default.once(0, '64-bit mode only works with coordinateSystem set to\n      COORDINATE_SYSTEM.LNGLAT. Rendering in 32-bit mode instead');
  }
 
  return false;
}
 
/***/ }),
/* 196 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = memoize;
function isEqual(a, b) {
  if (a === b) {
    return true;
  }
  if (Array.isArray(a)) {
    // Special treatment for arrays: compare 1-level deep
    // This is to support equality of matrix/coordinate props
    var len = a.length;
    if (!b || b.length !== len) {
      return false;
    }
 
    for (var i = 0; i < len; i++) {
      if (a[i] !== b[i]) {
        return false;
      }
    }
    return true;
  }
  return false;
}
 
/**
 * Speed up consecutive function calls by caching the result of calls with identical input
 * https://en.wikipedia.org/wiki/Memoization
 * @param {function} compute - the function to be memoized
 */
function memoize(compute) {
  var cachedArgs = {};
  var cachedResult = void 0;
 
  return function (args) {
    for (var key in args) {
      if (!isEqual(args[key], cachedArgs[key])) {
        cachedResult = compute(args);
        cachedArgs = args;
        break;
      }
    }
    return cachedResult;
  };
}
 
/***/ }),
/* 197 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = autobind;
// Copyright (c) 2015 - 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
 
var PREDEFINED = ['constructor', 'render', 'componentWillMount', 'componentDidMount', 'componentWillReceiveProps', 'shouldComponentUpdate', 'componentWillUpdate', 'componentDidUpdate', 'componentWillUnmount'];
 
/**
 * Binds the "this" argument of all functions on a class instance to the instance
 * @param {Object} obj - class instance (typically a react component)
 */
function autobind(obj) {
  var proto = Object.getPrototypeOf(obj);
  var propNames = Object.getOwnPropertyNames(proto);
  var _iteratorNormalCompletion = true;
  var _didIteratorError = false;
  var _iteratorError = undefined;
 
  try {
    var _loop = function _loop() {
      var key = _step.value;
 
      if (typeof obj[key] === 'function') {
        if (!PREDEFINED.find(function (name) {
          return key === name;
        })) {
          obj[key] = obj[key].bind(obj);
        }
      }
    };
 
    for (var _iterator = propNames[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
      _loop();
    }
  } catch (err) {
    _didIteratorError = true;
    _iteratorError = err;
  } finally {
    try {
      if (!_iteratorNormalCompletion && _iterator.return) {
        _iterator.return();
      }
    } finally {
      if (_didIteratorError) {
        throw _iteratorError;
      }
    }
  }
}
 
/***/ }),
/* 198 */
/***/ (function(module, exports, __webpack_require__) {
 
var cof = __webpack_require__(27);
module.exports = function (it, msg) {
  if (typeof it != 'number' && cof(it) != 'Number') throw TypeError(msg);
  return +it;
};
 
 
/***/ }),
/* 199 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
// 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length)
 
var toObject = __webpack_require__(14);
var toAbsoluteIndex = __webpack_require__(57);
var toLength = __webpack_require__(11);
 
module.exports = [].copyWithin || function copyWithin(target /* = 0 */, start /* = 0, end = @length */) {
  var O = toObject(this);
  var len = toLength(O.length);
  var to = toAbsoluteIndex(target, len);
  var from = toAbsoluteIndex(start, len);
  var end = arguments.length > 2 ? arguments[2] : undefined;
  var count = Math.min((end === undefined ? len : toAbsoluteIndex(end, len)) - from, len - to);
  var inc = 1;
  if (from < to && to < from + count) {
    inc = -1;
    from += count - 1;
    to += count - 1;
  }
  while (count-- > 0) {
    if (from in O) O[to] = O[from];
    else delete O[to];
    to += inc;
    from += inc;
  } return O;
};
 
 
/***/ }),
/* 200 */
/***/ (function(module, exports, __webpack_require__) {
 
var forOf = __webpack_require__(49);
 
module.exports = function (iter, ITERATOR) {
  var result = [];
  forOf(iter, false, result.push, result, ITERATOR);
  return result;
};
 
 
/***/ }),
/* 201 */
/***/ (function(module, exports, __webpack_require__) {
 
var aFunction = __webpack_require__(15);
var toObject = __webpack_require__(14);
var IObject = __webpack_require__(72);
var toLength = __webpack_require__(11);
 
module.exports = function (that, callbackfn, aLen, memo, isRight) {
  aFunction(callbackfn);
  var O = toObject(that);
  var self = IObject(O);
  var length = toLength(O.length);
  var index = isRight ? length - 1 : 0;
  var i = isRight ? -1 : 1;
  if (aLen < 2) for (;;) {
    if (index in self) {
      memo = self[index];
      index += i;
      break;
    }
    index += i;
    if (isRight ? index < 0 : length <= index) {
      throw TypeError('Reduce of empty array with no initial value');
    }
  }
  for (;isRight ? index >= 0 : length > index; index += i) if (index in self) {
    memo = callbackfn(memo, self[index], index, O);
  }
  return memo;
};
 
 
/***/ }),
/* 202 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var aFunction = __webpack_require__(15);
var isObject = __webpack_require__(5);
var invoke = __webpack_require__(208);
var arraySlice = [].slice;
var factories = {};
 
var construct = function (F, len, args) {
  if (!(len in factories)) {
    for (var n = [], i = 0; i < len; i++) n[i] = 'a[' + i + ']';
    // eslint-disable-next-line no-new-func
    factories[len] = Function('F,a', 'return new F(' + n.join(',') + ')');
  } return factories[len](F, args);
};
 
module.exports = Function.bind || function bind(that /* , ...args */) {
  var fn = aFunction(this);
  var partArgs = arraySlice.call(arguments, 1);
  var bound = function (/* args... */) {
    var args = partArgs.concat(arraySlice.call(arguments));
    return this instanceof bound ? construct(fn, args.length, args) : invoke(fn, args, that);
  };
  if (isObject(fn.prototype)) bound.prototype = fn.prototype;
  return bound;
};
 
 
/***/ }),
/* 203 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var dP = __webpack_require__(10).f;
var create = __webpack_require__(51);
var redefineAll = __webpack_require__(55);
var ctx = __webpack_require__(28);
var anInstance = __webpack_require__(48);
var forOf = __webpack_require__(49);
var $iterDefine = __webpack_require__(138);
var step = __webpack_require__(211);
var setSpecies = __webpack_require__(56);
var DESCRIPTORS = __webpack_require__(9);
var fastKey = __webpack_require__(44).fastKey;
var validate = __webpack_require__(66);
var SIZE = DESCRIPTORS ? '_s' : 'size';
 
var getEntry = function (that, key) {
  // fast case
  var index = fastKey(key);
  var entry;
  if (index !== 'F') return that._i[index];
  // frozen object case
  for (entry = that._f; entry; entry = entry.n) {
    if (entry.k == key) return entry;
  }
};
 
module.exports = {
  getConstructor: function (wrapper, NAME, IS_MAP, ADDER) {
    var C = wrapper(function (that, iterable) {
      anInstance(that, C, NAME, '_i');
      that._t = NAME;         // collection type
      that._i = create(null); // index
      that._f = undefined;    // first entry
      that._l = undefined;    // last entry
      that[SIZE] = 0;         // size
      if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that);
    });
    redefineAll(C.prototype, {
      // 23.1.3.1 Map.prototype.clear()
      // 23.2.3.2 Set.prototype.clear()
      clear: function clear() {
        for (var that = validate(this, NAME), data = that._i, entry = that._f; entry; entry = entry.n) {
          entry.r = true;
          if (entry.p) entry.p = entry.p.n = undefined;
          delete data[entry.i];
        }
        that._f = that._l = undefined;
        that[SIZE] = 0;
      },
      // 23.1.3.3 Map.prototype.delete(key)
      // 23.2.3.4 Set.prototype.delete(value)
      'delete': function (key) {
        var that = validate(this, NAME);
        var entry = getEntry(that, key);
        if (entry) {
          var next = entry.n;
          var prev = entry.p;
          delete that._i[entry.i];
          entry.r = true;
          if (prev) prev.n = next;
          if (next) next.p = prev;
          if (that._f == entry) that._f = next;
          if (that._l == entry) that._l = prev;
          that[SIZE]--;
        } return !!entry;
      },
      // 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined)
      // 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined)
      forEach: function forEach(callbackfn /* , that = undefined */) {
        validate(this, NAME);
        var f = ctx(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3);
        var entry;
        while (entry = entry ? entry.n : this._f) {
          f(entry.v, entry.k, this);
          // revert to the last existing entry
          while (entry && entry.r) entry = entry.p;
        }
      },
      // 23.1.3.7 Map.prototype.has(key)
      // 23.2.3.7 Set.prototype.has(value)
      has: function has(key) {
        return !!getEntry(validate(this, NAME), key);
      }
    });
    if (DESCRIPTORS) dP(C.prototype, 'size', {
      get: function () {
        return validate(this, NAME)[SIZE];
      }
    });
    return C;
  },
  def: function (that, key, value) {
    var entry = getEntry(that, key);
    var prev, index;
    // change existing entry
    if (entry) {
      entry.v = value;
    // create new entry
    } else {
      that._l = entry = {
        i: index = fastKey(key, true), // <- index
        k: key,                        // <- key
        v: value,                      // <- value
        p: prev = that._l,             // <- previous entry
        n: undefined,                  // <- next entry
        r: false                       // <- removed
      };
      if (!that._f) that._f = entry;
      if (prev) prev.n = entry;
      that[SIZE]++;
      // add to index
      if (index !== 'F') that._i[index] = entry;
    } return that;
  },
  getEntry: getEntry,
  setStrong: function (C, NAME, IS_MAP) {
    // add .keys, .values, .entries, [@@iterator]
    // 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11
    $iterDefine(C, NAME, function (iterated, kind) {
      this._t = validate(iterated, NAME); // target
      this._k = kind;                     // kind
      this._l = undefined;                // previous
    }, function () {
      var that = this;
      var kind = that._k;
      var entry = that._l;
      // revert to the last existing entry
      while (entry && entry.r) entry = entry.p;
      // get next entry
      if (!that._t || !(that._l = entry = entry ? entry.n : that._t._f)) {
        // or finish the iteration
        that._t = undefined;
        return step(1);
      }
      // return step by kind
      if (kind == 'keys') return step(0, entry.k);
      if (kind == 'values') return step(0, entry.v);
      return step(0, [entry.k, entry.v]);
    }, IS_MAP ? 'entries' : 'values', !IS_MAP, true);
 
    // add [@@species], 23.1.2.2, 23.2.2.2
    setSpecies(NAME);
  }
};
 
 
/***/ }),
/* 204 */
/***/ (function(module, exports, __webpack_require__) {
 
// https://github.com/DavidBruant/Map-Set.prototype.toJSON
var classof = __webpack_require__(71);
var from = __webpack_require__(200);
module.exports = function (NAME) {
  return function toJSON() {
    if (classof(this) != NAME) throw TypeError(NAME + "#toJSON isn't generic");
    return from(this);
  };
};
 
 
/***/ }),
/* 205 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var redefineAll = __webpack_require__(55);
var getWeak = __webpack_require__(44).getWeak;
var anObject = __webpack_require__(2);
var isObject = __webpack_require__(5);
var anInstance = __webpack_require__(48);
var forOf = __webpack_require__(49);
var createArrayMethod = __webpack_require__(32);
var $has = __webpack_require__(18);
var validate = __webpack_require__(66);
var arrayFind = createArrayMethod(5);
var arrayFindIndex = createArrayMethod(6);
var id = 0;
 
// fallback for uncaught frozen keys
var uncaughtFrozenStore = function (that) {
  return that._l || (that._l = new UncaughtFrozenStore());
};
var UncaughtFrozenStore = function () {
  this.a = [];
};
var findUncaughtFrozen = function (store, key) {
  return arrayFind(store.a, function (it) {
    return it[0] === key;
  });
};
UncaughtFrozenStore.prototype = {
  get: function (key) {
    var entry = findUncaughtFrozen(this, key);
    if (entry) return entry[1];
  },
  has: function (key) {
    return !!findUncaughtFrozen(this, key);
  },
  set: function (key, value) {
    var entry = findUncaughtFrozen(this, key);
    if (entry) entry[1] = value;
    else this.a.push([key, value]);
  },
  'delete': function (key) {
    var index = arrayFindIndex(this.a, function (it) {
      return it[0] === key;
    });
    if (~index) this.a.splice(index, 1);
    return !!~index;
  }
};
 
module.exports = {
  getConstructor: function (wrapper, NAME, IS_MAP, ADDER) {
    var C = wrapper(function (that, iterable) {
      anInstance(that, C, NAME, '_i');
      that._t = NAME;      // collection type
      that._i = id++;      // collection id
      that._l = undefined; // leak store for uncaught frozen objects
      if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that);
    });
    redefineAll(C.prototype, {
      // 23.3.3.2 WeakMap.prototype.delete(key)
      // 23.4.3.3 WeakSet.prototype.delete(value)
      'delete': function (key) {
        if (!isObject(key)) return false;
        var data = getWeak(key);
        if (data === true) return uncaughtFrozenStore(validate(this, NAME))['delete'](key);
        return data && $has(data, this._i) && delete data[this._i];
      },
      // 23.3.3.4 WeakMap.prototype.has(key)
      // 23.4.3.4 WeakSet.prototype.has(value)
      has: function has(key) {
        if (!isObject(key)) return false;
        var data = getWeak(key);
        if (data === true) return uncaughtFrozenStore(validate(this, NAME)).has(key);
        return data && $has(data, this._i);
      }
    });
    return C;
  },
  def: function (that, key, value) {
    var data = getWeak(anObject(key), true);
    if (data === true) uncaughtFrozenStore(that).set(key, value);
    else data[that._i] = value;
    return that;
  },
  ufstore: uncaughtFrozenStore
};
 
 
/***/ }),
/* 206 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
// https://tc39.github.io/proposal-flatMap/#sec-FlattenIntoArray
var isArray = __webpack_require__(91);
var isObject = __webpack_require__(5);
var toLength = __webpack_require__(11);
var ctx = __webpack_require__(28);
var IS_CONCAT_SPREADABLE = __webpack_require__(6)('isConcatSpreadable');
 
function flattenIntoArray(target, original, source, sourceLen, start, depth, mapper, thisArg) {
  var targetIndex = start;
  var sourceIndex = 0;
  var mapFn = mapper ? ctx(mapper, thisArg, 3) : false;
  var element, spreadable;
 
  while (sourceIndex < sourceLen) {
    if (sourceIndex in source) {
      element = mapFn ? mapFn(source[sourceIndex], sourceIndex, original) : source[sourceIndex];
 
      spreadable = false;
      if (isObject(element)) {
        spreadable = element[IS_CONCAT_SPREADABLE];
        spreadable = spreadable !== undefined ? !!spreadable : isArray(element);
      }
 
      if (spreadable && depth > 0) {
        targetIndex = flattenIntoArray(target, original, element, toLength(element.length), targetIndex, depth - 1) - 1;
      } else {
        if (targetIndex >= 0x1fffffffffffff) throw TypeError();
        target[targetIndex] = element;
      }
 
      targetIndex++;
    }
    sourceIndex++;
  }
  return targetIndex;
}
 
module.exports = flattenIntoArray;
 
 
/***/ }),
/* 207 */
/***/ (function(module, exports, __webpack_require__) {
 
module.exports = !__webpack_require__(9) && !__webpack_require__(4)(function () {
  return Object.defineProperty(__webpack_require__(131)('div'), 'a', { get: function () { return 7; } }).a != 7;
});
 
 
/***/ }),
/* 208 */
/***/ (function(module, exports) {
 
// fast apply, http://jsperf.lnkit.com/fast-apply/5
module.exports = function (fn, args, that) {
  var un = that === undefined;
  switch (args.length) {
    case 0: return un ? fn()
                      : fn.call(that);
    case 1: return un ? fn(args[0])
                      : fn.call(that, args[0]);
    case 2: return un ? fn(args[0], args[1])
                      : fn.call(that, args[0], args[1]);
    case 3: return un ? fn(args[0], args[1], args[2])
                      : fn.call(that, args[0], args[1], args[2]);
    case 4: return un ? fn(args[0], args[1], args[2], args[3])
                      : fn.call(that, args[0], args[1], args[2], args[3]);
  } return fn.apply(that, args);
};
 
 
/***/ }),
/* 209 */
/***/ (function(module, exports, __webpack_require__) {
 
// 20.1.2.3 Number.isInteger(number)
var isObject = __webpack_require__(5);
var floor = Math.floor;
module.exports = function isInteger(it) {
  return !isObject(it) && isFinite(it) && floor(it) === it;
};
 
 
/***/ }),
/* 210 */
/***/ (function(module, exports, __webpack_require__) {
 
// call something on iterator step with safe closing on error
var anObject = __webpack_require__(2);
module.exports = function (iterator, fn, value, entries) {
  try {
    return entries ? fn(anObject(value)[0], value[1]) : fn(value);
  // 7.4.6 IteratorClose(iterator, completion)
  } catch (e) {
    var ret = iterator['return'];
    if (ret !== undefined) anObject(ret.call(iterator));
    throw e;
  }
};
 
 
/***/ }),
/* 211 */
/***/ (function(module, exports) {
 
module.exports = function (done, value) {
  return { value: value, done: !!done };
};
 
 
/***/ }),
/* 212 */
/***/ (function(module, exports, __webpack_require__) {
 
// 20.2.2.16 Math.fround(x)
var sign = __webpack_require__(140);
var pow = Math.pow;
var EPSILON = pow(2, -52);
var EPSILON32 = pow(2, -23);
var MAX32 = pow(2, 127) * (2 - EPSILON32);
var MIN32 = pow(2, -126);
 
var roundTiesToEven = function (n) {
  return n + 1 / EPSILON - 1 / EPSILON;
};
 
module.exports = Math.fround || function fround(x) {
  var $abs = Math.abs(x);
  var $sign = sign(x);
  var a, result;
  if ($abs < MIN32) return $sign * roundTiesToEven($abs / MIN32 / EPSILON32) * MIN32 * EPSILON32;
  a = (1 + EPSILON32 / EPSILON) * $abs;
  result = a - (a - $abs);
  // eslint-disable-next-line no-self-compare
  if (result > MAX32 || result != result) return $sign * Infinity;
  return $sign * result;
};
 
 
/***/ }),
/* 213 */
/***/ (function(module, exports) {
 
// 20.2.2.20 Math.log1p(x)
module.exports = Math.log1p || function log1p(x) {
  return (x = +x) > -1e-8 && x < 1e-8 ? x - x * x / 2 : Math.log(1 + x);
};
 
 
/***/ }),
/* 214 */
/***/ (function(module, exports) {
 
// https://rwaldron.github.io/proposal-math-extensions/
module.exports = Math.scale || function scale(x, inLow, inHigh, outLow, outHigh) {
  if (
    arguments.length === 0
      // eslint-disable-next-line no-self-compare
      || x != x
      // eslint-disable-next-line no-self-compare
      || inLow != inLow
      // eslint-disable-next-line no-self-compare
      || inHigh != inHigh
      // eslint-disable-next-line no-self-compare
      || outLow != outLow
      // eslint-disable-next-line no-self-compare
      || outHigh != outHigh
  ) return NaN;
  if (x === Infinity || x === -Infinity) return x;
  return (x - inLow) * (outHigh - outLow) / (inHigh - inLow) + outLow;
};
 
 
/***/ }),
/* 215 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
// 19.1.2.1 Object.assign(target, source, ...)
var getKeys = __webpack_require__(53);
var gOPS = __webpack_require__(95);
var pIE = __webpack_require__(73);
var toObject = __webpack_require__(14);
var IObject = __webpack_require__(72);
var $assign = Object.assign;
 
// should work with symbols and should have deterministic property order (V8 bug)
module.exports = !$assign || __webpack_require__(4)(function () {
  var A = {};
  var B = {};
  // eslint-disable-next-line no-undef
  var S = Symbol();
  var K = 'abcdefghijklmnopqrst';
  A[S] = 7;
  K.split('').forEach(function (k) { B[k] = k; });
  return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K;
}) ? function assign(target, source) { // eslint-disable-line no-unused-vars
  var T = toObject(target);
  var aLen = arguments.length;
  var index = 1;
  var getSymbols = gOPS.f;
  var isEnum = pIE.f;
  while (aLen > index) {
    var S = IObject(arguments[index++]);
    var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S);
    var length = keys.length;
    var j = 0;
    var key;
    while (length > j) if (isEnum.call(S, key = keys[j++])) T[key] = S[key];
  } return T;
} : $assign;
 
 
/***/ }),
/* 216 */
/***/ (function(module, exports, __webpack_require__) {
 
var dP = __webpack_require__(10);
var anObject = __webpack_require__(2);
var getKeys = __webpack_require__(53);
 
module.exports = __webpack_require__(9) ? Object.defineProperties : function defineProperties(O, Properties) {
  anObject(O);
  var keys = getKeys(Properties);
  var length = keys.length;
  var i = 0;
  var P;
  while (length > i) dP.f(O, P = keys[i++], Properties[P]);
  return O;
};
 
 
/***/ }),
/* 217 */
/***/ (function(module, exports, __webpack_require__) {
 
// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window
var toIObject = __webpack_require__(24);
var gOPN = __webpack_require__(52).f;
var toString = {}.toString;
 
var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames
  ? Object.getOwnPropertyNames(window) : [];
 
var getWindowNames = function (it) {
  try {
    return gOPN(it);
  } catch (e) {
    return windowNames.slice();
  }
};
 
module.exports.f = function getOwnPropertyNames(it) {
  return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it));
};
 
 
/***/ }),
/* 218 */
/***/ (function(module, exports, __webpack_require__) {
 
var has = __webpack_require__(18);
var toIObject = __webpack_require__(24);
var arrayIndexOf = __webpack_require__(87)(false);
var IE_PROTO = __webpack_require__(144)('IE_PROTO');
 
module.exports = function (object, names) {
  var O = toIObject(object);
  var i = 0;
  var result = [];
  var key;
  for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key);
  // Don't enum bug & hidden keys
  while (names.length > i) if (has(O, key = names[i++])) {
    ~arrayIndexOf(result, key) || result.push(key);
  }
  return result;
};
 
 
/***/ }),
/* 219 */
/***/ (function(module, exports, __webpack_require__) {
 
var getKeys = __webpack_require__(53);
var toIObject = __webpack_require__(24);
var isEnum = __webpack_require__(73).f;
module.exports = function (isEntries) {
  return function (it) {
    var O = toIObject(it);
    var keys = getKeys(O);
    var length = keys.length;
    var i = 0;
    var result = [];
    var key;
    while (length > i) if (isEnum.call(O, key = keys[i++])) {
      result.push(isEntries ? [key, O[key]] : O[key]);
    } return result;
  };
};
 
 
/***/ }),
/* 220 */
/***/ (function(module, exports, __webpack_require__) {
 
// all object keys, includes non-enumerable and symbols
var gOPN = __webpack_require__(52);
var gOPS = __webpack_require__(95);
var anObject = __webpack_require__(2);
var Reflect = __webpack_require__(3).Reflect;
module.exports = Reflect && Reflect.ownKeys || function ownKeys(it) {
  var keys = gOPN.f(anObject(it));
  var getSymbols = gOPS.f;
  return getSymbols ? keys.concat(getSymbols(it)) : keys;
};
 
 
/***/ }),
/* 221 */
/***/ (function(module, exports, __webpack_require__) {
 
var $parseFloat = __webpack_require__(3).parseFloat;
var $trim = __webpack_require__(65).trim;
 
module.exports = 1 / $parseFloat(__webpack_require__(148) + '-0') !== -Infinity ? function parseFloat(str) {
  var string = $trim(String(str), 3);
  var result = $parseFloat(string);
  return result === 0 && string.charAt(0) == '-' ? -0 : result;
} : $parseFloat;
 
 
/***/ }),
/* 222 */
/***/ (function(module, exports, __webpack_require__) {
 
var $parseInt = __webpack_require__(3).parseInt;
var $trim = __webpack_require__(65).trim;
var ws = __webpack_require__(148);
var hex = /^[-+]?0[xX]/;
 
module.exports = $parseInt(ws + '08') !== 8 || $parseInt(ws + '0x16') !== 22 ? function parseInt(str, radix) {
  var string = $trim(String(str), 3);
  return $parseInt(string, (radix >>> 0) || (hex.test(string) ? 16 : 10));
} : $parseInt;
 
 
/***/ }),
/* 223 */
/***/ (function(module, exports) {
 
module.exports = function (exec) {
  try {
    return { e: false, v: exec() };
  } catch (e) {
    return { e: true, v: e };
  }
};
 
 
/***/ }),
/* 224 */
/***/ (function(module, exports, __webpack_require__) {
 
var anObject = __webpack_require__(2);
var isObject = __webpack_require__(5);
var newPromiseCapability = __webpack_require__(142);
 
module.exports = function (C, x) {
  anObject(C);
  if (isObject(x) && x.constructor === C) return x;
  var promiseCapability = newPromiseCapability.f(C);
  var resolve = promiseCapability.resolve;
  resolve(x);
  return promiseCapability.promise;
};
 
 
/***/ }),
/* 225 */
/***/ (function(module, exports, __webpack_require__) {
 
// https://github.com/tc39/proposal-string-pad-start-end
var toLength = __webpack_require__(11);
var repeat = __webpack_require__(147);
var defined = __webpack_require__(34);
 
module.exports = function (that, maxLength, fillString, left) {
  var S = String(defined(that));
  var stringLength = S.length;
  var fillStr = fillString === undefined ? ' ' : String(fillString);
  var intMaxLength = toLength(maxLength);
  if (intMaxLength <= stringLength || fillStr == '') return S;
  var fillLen = intMaxLength - stringLength;
  var stringFiller = repeat.call(fillStr, Math.ceil(fillLen / fillStr.length));
  if (stringFiller.length > fillLen) stringFiller = stringFiller.slice(0, fillLen);
  return left ? stringFiller + S : S + stringFiller;
};
 
 
/***/ }),
/* 226 */
/***/ (function(module, exports, __webpack_require__) {
 
// https://tc39.github.io/ecma262/#sec-toindex
var toInteger = __webpack_require__(36);
var toLength = __webpack_require__(11);
module.exports = function (it) {
  if (it === undefined) return 0;
  var number = toInteger(it);
  var length = toLength(number);
  if (number !== length) throw RangeError('Wrong length!');
  return length;
};
 
 
/***/ }),
/* 227 */
/***/ (function(module, exports, __webpack_require__) {
 
exports.f = __webpack_require__(6);
 
 
/***/ }),
/* 228 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var strong = __webpack_require__(203);
var validate = __webpack_require__(66);
var MAP = 'Map';
 
// 23.1 Map Objects
module.exports = __webpack_require__(88)(MAP, function (get) {
  return function Map() { return get(this, arguments.length > 0 ? arguments[0] : undefined); };
}, {
  // 23.1.3.6 Map.prototype.get(key)
  get: function get(key) {
    var entry = strong.getEntry(validate(this, MAP), key);
    return entry && entry.v;
  },
  // 23.1.3.9 Map.prototype.set(key, value)
  set: function set(key, value) {
    return strong.def(validate(this, MAP), key === 0 ? 0 : key, value);
  }
}, strong, true);
 
 
/***/ }),
/* 229 */
/***/ (function(module, exports, __webpack_require__) {
 
// 21.2.5.3 get RegExp.prototype.flags()
if (__webpack_require__(9) && /./g.flags != 'g') __webpack_require__(10).f(RegExp.prototype, 'flags', {
  configurable: true,
  get: __webpack_require__(90)
});
 
 
/***/ }),
/* 230 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var strong = __webpack_require__(203);
var validate = __webpack_require__(66);
var SET = 'Set';
 
// 23.2 Set Objects
module.exports = __webpack_require__(88)(SET, function (get) {
  return function Set() { return get(this, arguments.length > 0 ? arguments[0] : undefined); };
}, {
  // 23.2.3.1 Set.prototype.add(value)
  add: function add(value) {
    return strong.def(validate(this, SET), value = value === 0 ? 0 : value, value);
  }
}, strong);
 
 
/***/ }),
/* 231 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var each = __webpack_require__(32)(0);
var redefine = __webpack_require__(20);
var meta = __webpack_require__(44);
var assign = __webpack_require__(215);
var weak = __webpack_require__(205);
var isObject = __webpack_require__(5);
var fails = __webpack_require__(4);
var validate = __webpack_require__(66);
var WEAK_MAP = 'WeakMap';
var getWeak = meta.getWeak;
var isExtensible = Object.isExtensible;
var uncaughtFrozenStore = weak.ufstore;
var tmp = {};
var InternalMap;
 
var wrapper = function (get) {
  return function WeakMap() {
    return get(this, arguments.length > 0 ? arguments[0] : undefined);
  };
};
 
var methods = {
  // 23.3.3.3 WeakMap.prototype.get(key)
  get: function get(key) {
    if (isObject(key)) {
      var data = getWeak(key);
      if (data === true) return uncaughtFrozenStore(validate(this, WEAK_MAP)).get(key);
      return data ? data[this._i] : undefined;
    }
  },
  // 23.3.3.5 WeakMap.prototype.set(key, value)
  set: function set(key, value) {
    return weak.def(validate(this, WEAK_MAP), key, value);
  }
};
 
// 23.3 WeakMap Objects
var $WeakMap = module.exports = __webpack_require__(88)(WEAK_MAP, wrapper, methods, weak, true, true);
 
// IE11 WeakMap frozen keys fix
if (fails(function () { return new $WeakMap().set((Object.freeze || Object)(tmp), 7).get(tmp) != 7; })) {
  InternalMap = weak.getConstructor(wrapper, WEAK_MAP);
  assign(InternalMap.prototype, methods);
  meta.NEED = true;
  each(['delete', 'has', 'get', 'set'], function (key) {
    var proto = $WeakMap.prototype;
    var method = proto[key];
    redefine(proto, key, function (a, b) {
      // store frozen objects on internal weakmap shim
      if (isObject(a) && !isExtensible(a)) {
        if (!this._f) this._f = new InternalMap();
        var result = this._f[key](a, b);
        return key == 'set' ? this : result;
      // store all the rest on native weakmap
      } return method.call(this, a, b);
    });
  });
}
 
 
/***/ }),
/* 232 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
module.exports = earcut;
module.exports.default = earcut;
 
function earcut(data, holeIndices, dim) {
 
    dim = dim || 2;
 
    var hasHoles = holeIndices && holeIndices.length,
        outerLen = hasHoles ? holeIndices[0] * dim : data.length,
        outerNode = linkedList(data, 0, outerLen, dim, true),
        triangles = [];
 
    if (!outerNode) return triangles;
 
    var minX, minY, maxX, maxY, x, y, invSize;
 
    if (hasHoles) outerNode = eliminateHoles(data, holeIndices, outerNode, dim);
 
    // if the shape is not too simple, we'll use z-order curve hash later; calculate polygon bbox
    if (data.length > 80 * dim) {
        minX = maxX = data[0];
        minY = maxY = data[1];
 
        for (var i = dim; i < outerLen; i += dim) {
            x = data[i];
            y = data[i + 1];
            if (x < minX) minX = x;
            if (y < minY) minY = y;
            if (x > maxX) maxX = x;
            if (y > maxY) maxY = y;
        }
 
        // minX, minY and invSize are later used to transform coords into integers for z-order calculation
        invSize = Math.max(maxX - minX, maxY - minY);
        invSize = invSize !== 0 ? 1 / invSize : 0;
    }
 
    earcutLinked(outerNode, triangles, dim, minX, minY, invSize);
 
    return triangles;
}
 
// create a circular doubly linked list from polygon points in the specified winding order
function linkedList(data, start, end, dim, clockwise) {
    var i, last;
 
    if (clockwise === (signedArea(data, start, end, dim) > 0)) {
        for (i = start; i < end; i += dim) last = insertNode(i, data[i], data[i + 1], last);
    } else {
        for (i = end - dim; i >= start; i -= dim) last = insertNode(i, data[i], data[i + 1], last);
    }
 
    if (last && equals(last, last.next)) {
        removeNode(last);
        last = last.next;
    }
 
    return last;
}
 
// eliminate colinear or duplicate points
function filterPoints(start, end) {
    if (!start) return start;
    if (!end) end = start;
 
    var p = start,
        again;
    do {
        again = false;
 
        if (!p.steiner && (equals(p, p.next) || area(p.prev, p, p.next) === 0)) {
            removeNode(p);
            p = end = p.prev;
            if (p === p.next) break;
            again = true;
 
        } else {
            p = p.next;
        }
    } while (again || p !== end);
 
    return end;
}
 
// main ear slicing loop which triangulates a polygon (given as a linked list)
function earcutLinked(ear, triangles, dim, minX, minY, invSize, pass) {
    if (!ear) return;
 
    // interlink polygon nodes in z-order
    if (!pass && invSize) indexCurve(ear, minX, minY, invSize);
 
    var stop = ear,
        prev, next;
 
    // iterate through ears, slicing them one by one
    while (ear.prev !== ear.next) {
        prev = ear.prev;
        next = ear.next;
 
        if (invSize ? isEarHashed(ear, minX, minY, invSize) : isEar(ear)) {
            // cut off the triangle
            triangles.push(prev.i / dim);
            triangles.push(ear.i / dim);
            triangles.push(next.i / dim);
 
            removeNode(ear);
 
            // skipping the next vertice leads to less sliver triangles
            ear = next.next;
            stop = next.next;
 
            continue;
        }
 
        ear = next;
 
        // if we looped through the whole remaining polygon and can't find any more ears
        if (ear === stop) {
            // try filtering points and slicing again
            if (!pass) {
                earcutLinked(filterPoints(ear), triangles, dim, minX, minY, invSize, 1);
 
            // if this didn't work, try curing all small self-intersections locally
            } else if (pass === 1) {
                ear = cureLocalIntersections(ear, triangles, dim);
                earcutLinked(ear, triangles, dim, minX, minY, invSize, 2);
 
            // as a last resort, try splitting the remaining polygon into two
            } else if (pass === 2) {
                splitEarcut(ear, triangles, dim, minX, minY, invSize);
            }
 
            break;
        }
    }
}
 
// check whether a polygon node forms a valid ear with adjacent nodes
function isEar(ear) {
    var a = ear.prev,
        b = ear,
        c = ear.next;
 
    if (area(a, b, c) >= 0) return false; // reflex, can't be an ear
 
    // now make sure we don't have other points inside the potential ear
    var p = ear.next.next;
 
    while (p !== ear.prev) {
        if (pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, p.x, p.y) &&
            area(p.prev, p, p.next) >= 0) return false;
        p = p.next;
    }
 
    return true;
}
 
function isEarHashed(ear, minX, minY, invSize) {
    var a = ear.prev,
        b = ear,
        c = ear.next;
 
    if (area(a, b, c) >= 0) return false; // reflex, can't be an ear
 
    // triangle bbox; min & max are calculated like this for speed
    var minTX = a.x < b.x ? (a.x < c.x ? a.x : c.x) : (b.x < c.x ? b.x : c.x),
        minTY = a.y < b.y ? (a.y < c.y ? a.y : c.y) : (b.y < c.y ? b.y : c.y),
        maxTX = a.x > b.x ? (a.x > c.x ? a.x : c.x) : (b.x > c.x ? b.x : c.x),
        maxTY = a.y > b.y ? (a.y > c.y ? a.y : c.y) : (b.y > c.y ? b.y : c.y);
 
    // z-order range for the current triangle bbox;
    var minZ = zOrder(minTX, minTY, minX, minY, invSize),
        maxZ = zOrder(maxTX, maxTY, minX, minY, invSize);
 
    var p = ear.prevZ,
        n = ear.nextZ;
 
    // look for points inside the triangle in both directions
    while (p && p.z >= minZ && n && n.z <= maxZ) {
        if (p !== ear.prev && p !== ear.next &&
            pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, p.x, p.y) &&
            area(p.prev, p, p.next) >= 0) return false;
        p = p.prevZ;
 
        if (n !== ear.prev && n !== ear.next &&
            pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, n.x, n.y) &&
            area(n.prev, n, n.next) >= 0) return false;
        n = n.nextZ;
    }
 
    // look for remaining points in decreasing z-order
    while (p && p.z >= minZ) {
        if (p !== ear.prev && p !== ear.next &&
            pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, p.x, p.y) &&
            area(p.prev, p, p.next) >= 0) return false;
        p = p.prevZ;
    }
 
    // look for remaining points in increasing z-order
    while (n && n.z <= maxZ) {
        if (n !== ear.prev && n !== ear.next &&
            pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, n.x, n.y) &&
            area(n.prev, n, n.next) >= 0) return false;
        n = n.nextZ;
    }
 
    return true;
}
 
// go through all polygon nodes and cure small local self-intersections
function cureLocalIntersections(start, triangles, dim) {
    var p = start;
    do {
        var a = p.prev,
            b = p.next.next;
 
        if (!equals(a, b) && intersects(a, p, p.next, b) && locallyInside(a, b) && locallyInside(b, a)) {
 
            triangles.push(a.i / dim);
            triangles.push(p.i / dim);
            triangles.push(b.i / dim);
 
            // remove two nodes involved
            removeNode(p);
            removeNode(p.next);
 
            p = start = b;
        }
        p = p.next;
    } while (p !== start);
 
    return p;
}
 
// try splitting polygon into two and triangulate them independently
function splitEarcut(start, triangles, dim, minX, minY, invSize) {
    // look for a valid diagonal that divides the polygon into two
    var a = start;
    do {
        var b = a.next.next;
        while (b !== a.prev) {
            if (a.i !== b.i && isValidDiagonal(a, b)) {
                // split the polygon in two by the diagonal
                var c = splitPolygon(a, b);
 
                // filter colinear points around the cuts
                a = filterPoints(a, a.next);
                c = filterPoints(c, c.next);
 
                // run earcut on each half
                earcutLinked(a, triangles, dim, minX, minY, invSize);
                earcutLinked(c, triangles, dim, minX, minY, invSize);
                return;
            }
            b = b.next;
        }
        a = a.next;
    } while (a !== start);
}
 
// link every hole into the outer loop, producing a single-ring polygon without holes
function eliminateHoles(data, holeIndices, outerNode, dim) {
    var queue = [],
        i, len, start, end, list;
 
    for (i = 0, len = holeIndices.length; i < len; i++) {
        start = holeIndices[i] * dim;
        end = i < len - 1 ? holeIndices[i + 1] * dim : data.length;
        list = linkedList(data, start, end, dim, false);
        if (list === list.next) list.steiner = true;
        queue.push(getLeftmost(list));
    }
 
    queue.sort(compareX);
 
    // process holes from left to right
    for (i = 0; i < queue.length; i++) {
        eliminateHole(queue[i], outerNode);
        outerNode = filterPoints(outerNode, outerNode.next);
    }
 
    return outerNode;
}
 
function compareX(a, b) {
    return a.x - b.x;
}
 
// find a bridge between vertices that connects hole with an outer ring and and link it
function eliminateHole(hole, outerNode) {
    outerNode = findHoleBridge(hole, outerNode);
    if (outerNode) {
        var b = splitPolygon(outerNode, hole);
        filterPoints(b, b.next);
    }
}
 
// David Eberly's algorithm for finding a bridge between hole and outer polygon
function findHoleBridge(hole, outerNode) {
    var p = outerNode,
        hx = hole.x,
        hy = hole.y,
        qx = -Infinity,
        m;
 
    // find a segment intersected by a ray from the hole's leftmost point to the left;
    // segment's endpoint with lesser x will be potential connection point
    do {
        if (hy <= p.y && hy >= p.next.y && p.next.y !== p.y) {
            var x = p.x + (hy - p.y) * (p.next.x - p.x) / (p.next.y - p.y);
            if (x <= hx && x > qx) {
                qx = x;
                if (x === hx) {
                    if (hy === p.y) return p;
                    if (hy === p.next.y) return p.next;
                }
                m = p.x < p.next.x ? p : p.next;
            }
        }
        p = p.next;
    } while (p !== outerNode);
 
    if (!m) return null;
 
    if (hx === qx) return m.prev; // hole touches outer segment; pick lower endpoint
 
    // look for points inside the triangle of hole point, segment intersection and endpoint;
    // if there are no points found, we have a valid connection;
    // otherwise choose the point of the minimum angle with the ray as connection point
 
    var stop = m,
        mx = m.x,
        my = m.y,
        tanMin = Infinity,
        tan;
 
    p = m.next;
 
    while (p !== stop) {
        if (hx >= p.x && p.x >= mx && hx !== p.x &&
                pointInTriangle(hy < my ? hx : qx, hy, mx, my, hy < my ? qx : hx, hy, p.x, p.y)) {
 
            tan = Math.abs(hy - p.y) / (hx - p.x); // tangential
 
            if ((tan < tanMin || (tan === tanMin && p.x > m.x)) && locallyInside(p, hole)) {
                m = p;
                tanMin = tan;
            }
        }
 
        p = p.next;
    }
 
    return m;
}
 
// interlink polygon nodes in z-order
function indexCurve(start, minX, minY, invSize) {
    var p = start;
    do {
        if (p.z === null) p.z = zOrder(p.x, p.y, minX, minY, invSize);
        p.prevZ = p.prev;
        p.nextZ = p.next;
        p = p.next;
    } while (p !== start);
 
    p.prevZ.nextZ = null;
    p.prevZ = null;
 
    sortLinked(p);
}
 
// Simon Tatham's linked list merge sort algorithm
// http://www.chiark.greenend.org.uk/~sgtatham/algorithms/listsort.html
function sortLinked(list) {
    var i, p, q, e, tail, numMerges, pSize, qSize,
        inSize = 1;
 
    do {
        p = list;
        list = null;
        tail = null;
        numMerges = 0;
 
        while (p) {
            numMerges++;
            q = p;
            pSize = 0;
            for (i = 0; i < inSize; i++) {
                pSize++;
                q = q.nextZ;
                if (!q) break;
            }
            qSize = inSize;
 
            while (pSize > 0 || (qSize > 0 && q)) {
 
                if (pSize !== 0 && (qSize === 0 || !q || p.z <= q.z)) {
                    e = p;
                    p = p.nextZ;
                    pSize--;
                } else {
                    e = q;
                    q = q.nextZ;
                    qSize--;
                }
 
                if (tail) tail.nextZ = e;
                else list = e;
 
                e.prevZ = tail;
                tail = e;
            }
 
            p = q;
        }
 
        tail.nextZ = null;
        inSize *= 2;
 
    } while (numMerges > 1);
 
    return list;
}
 
// z-order of a point given coords and inverse of the longer side of data bbox
function zOrder(x, y, minX, minY, invSize) {
    // coords are transformed into non-negative 15-bit integer range
    x = 32767 * (x - minX) * invSize;
    y = 32767 * (y - minY) * invSize;
 
    x = (x | (x << 8)) & 0x00FF00FF;
    x = (x | (x << 4)) & 0x0F0F0F0F;
    x = (x | (x << 2)) & 0x33333333;
    x = (x | (x << 1)) & 0x55555555;
 
    y = (y | (y << 8)) & 0x00FF00FF;
    y = (y | (y << 4)) & 0x0F0F0F0F;
    y = (y | (y << 2)) & 0x33333333;
    y = (y | (y << 1)) & 0x55555555;
 
    return x | (y << 1);
}
 
// find the leftmost node of a polygon ring
function getLeftmost(start) {
    var p = start,
        leftmost = start;
    do {
        if (p.x < leftmost.x) leftmost = p;
        p = p.next;
    } while (p !== start);
 
    return leftmost;
}
 
// check if a point lies within a convex triangle
function pointInTriangle(ax, ay, bx, by, cx, cy, px, py) {
    return (cx - px) * (ay - py) - (ax - px) * (cy - py) >= 0 &&
           (ax - px) * (by - py) - (bx - px) * (ay - py) >= 0 &&
           (bx - px) * (cy - py) - (cx - px) * (by - py) >= 0;
}
 
// check if a diagonal between two polygon nodes is valid (lies in polygon interior)
function isValidDiagonal(a, b) {
    return a.next.i !== b.i && a.prev.i !== b.i && !intersectsPolygon(a, b) &&
           locallyInside(a, b) && locallyInside(b, a) && middleInside(a, b);
}
 
// signed area of a triangle
function area(p, q, r) {
    return (q.y - p.y) * (r.x - q.x) - (q.x - p.x) * (r.y - q.y);
}
 
// check if two points are equal
function equals(p1, p2) {
    return p1.x === p2.x && p1.y === p2.y;
}
 
// check if two segments intersect
function intersects(p1, q1, p2, q2) {
    if ((equals(p1, q1) && equals(p2, q2)) ||
        (equals(p1, q2) && equals(p2, q1))) return true;
    return area(p1, q1, p2) > 0 !== area(p1, q1, q2) > 0 &&
           area(p2, q2, p1) > 0 !== area(p2, q2, q1) > 0;
}
 
// check if a polygon diagonal intersects any polygon segments
function intersectsPolygon(a, b) {
    var p = a;
    do {
        if (p.i !== a.i && p.next.i !== a.i && p.i !== b.i && p.next.i !== b.i &&
                intersects(p, p.next, a, b)) return true;
        p = p.next;
    } while (p !== a);
 
    return false;
}
 
// check if a polygon diagonal is locally inside the polygon
function locallyInside(a, b) {
    return area(a.prev, a, a.next) < 0 ?
        area(a, b, a.next) >= 0 && area(a, a.prev, b) >= 0 :
        area(a, b, a.prev) < 0 || area(a, a.next, b) < 0;
}
 
// check if the middle point of a polygon diagonal is inside the polygon
function middleInside(a, b) {
    var p = a,
        inside = false,
        px = (a.x + b.x) / 2,
        py = (a.y + b.y) / 2;
    do {
        if (((p.y > py) !== (p.next.y > py)) && p.next.y !== p.y &&
                (px < (p.next.x - p.x) * (py - p.y) / (p.next.y - p.y) + p.x))
            inside = !inside;
        p = p.next;
    } while (p !== a);
 
    return inside;
}
 
// link two polygon vertices with a bridge; if the vertices belong to the same ring, it splits polygon into two;
// if one belongs to the outer ring and another to a hole, it merges it into a single ring
function splitPolygon(a, b) {
    var a2 = new Node(a.i, a.x, a.y),
        b2 = new Node(b.i, b.x, b.y),
        an = a.next,
        bp = b.prev;
 
    a.next = b;
    b.prev = a;
 
    a2.next = an;
    an.prev = a2;
 
    b2.next = a2;
    a2.prev = b2;
 
    bp.next = b2;
    b2.prev = bp;
 
    return b2;
}
 
// create a node and optionally link it with previous one (in a circular doubly linked list)
function insertNode(i, x, y, last) {
    var p = new Node(i, x, y);
 
    if (!last) {
        p.prev = p;
        p.next = p;
 
    } else {
        p.next = last.next;
        p.prev = last;
        last.next.prev = p;
        last.next = p;
    }
    return p;
}
 
function removeNode(p) {
    p.next.prev = p.prev;
    p.prev.next = p.next;
 
    if (p.prevZ) p.prevZ.nextZ = p.nextZ;
    if (p.nextZ) p.nextZ.prevZ = p.prevZ;
}
 
function Node(i, x, y) {
    // vertice index in coordinates array
    this.i = i;
 
    // vertex coordinates
    this.x = x;
    this.y = y;
 
    // previous and next vertice nodes in a polygon ring
    this.prev = null;
    this.next = null;
 
    // z-order curve value
    this.z = null;
 
    // previous and next nodes in z-order
    this.prevZ = null;
    this.nextZ = null;
 
    // indicates whether this is a steiner point
    this.steiner = false;
}
 
// return a percentage difference between the polygon area and its triangulation area;
// used to verify correctness of triangulation
earcut.deviation = function (data, holeIndices, dim, triangles) {
    var hasHoles = holeIndices && holeIndices.length;
    var outerLen = hasHoles ? holeIndices[0] * dim : data.length;
 
    var polygonArea = Math.abs(signedArea(data, 0, outerLen, dim));
    if (hasHoles) {
        for (var i = 0, len = holeIndices.length; i < len; i++) {
            var start = holeIndices[i] * dim;
            var end = i < len - 1 ? holeIndices[i + 1] * dim : data.length;
            polygonArea -= Math.abs(signedArea(data, start, end, dim));
        }
    }
 
    var trianglesArea = 0;
    for (i = 0; i < triangles.length; i += 3) {
        var a = triangles[i] * dim;
        var b = triangles[i + 1] * dim;
        var c = triangles[i + 2] * dim;
        trianglesArea += Math.abs(
            (data[a] - data[c]) * (data[b + 1] - data[a + 1]) -
            (data[a] - data[b]) * (data[c + 1] - data[a + 1]));
    }
 
    return polygonArea === 0 && trianglesArea === 0 ? 0 :
        Math.abs((trianglesArea - polygonArea) / polygonArea);
};
 
function signedArea(data, start, end, dim) {
    var sum = 0;
    for (var i = start, j = end - dim; i < end; i += dim) {
        sum += (data[j] - data[i]) * (data[i + 1] + data[j + 1]);
        j = i;
    }
    return sum;
}
 
// turn a polygon in a multi-dimensional array form (e.g. as in GeoJSON) into a form Earcut accepts
earcut.flatten = function (data) {
    var dim = data[0][0].length,
        result = {vertices: [], holes: [], dimensions: dim},
        holeIndex = 0;
 
    for (var i = 0; i < data.length; i++) {
        for (var j = 0; j < data[i].length; j++) {
            for (var d = 0; d < dim; d++) result.vertices.push(data[i][j][d]);
        }
        if (i > 0) {
            holeIndex += data[i - 1].length;
            result.holes.push(holeIndex);
        }
    }
    return result;
};
 
 
/***/ }),
/* 233 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
/* WEBPACK VAR INJECTION */(function(process) {/**
 * Copyright (c) 2013-present, Facebook, Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 *
 */
 
 
 
var emptyObject = {};
 
if (process.env.NODE_ENV !== 'production') {
  Object.freeze(emptyObject);
}
 
module.exports = emptyObject;
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(26)))
 
/***/ }),
/* 234 */
/***/ (function(module, exports) {
 
module.exports = ortho;
 
/**
 * Generates a orthogonal projection matrix with the given bounds
 *
 * @param {mat4} out mat4 frustum matrix will be written into
 * @param {number} left Left bound of the frustum
 * @param {number} right Right bound of the frustum
 * @param {number} bottom Bottom bound of the frustum
 * @param {number} top Top bound of the frustum
 * @param {number} near Near bound of the frustum
 * @param {number} far Far bound of the frustum
 * @returns {mat4} out
 */
function ortho(out, left, right, bottom, top, near, far) {
    var lr = 1 / (left - right),
        bt = 1 / (bottom - top),
        nf = 1 / (near - far);
    out[0] = -2 * lr;
    out[1] = 0;
    out[2] = 0;
    out[3] = 0;
    out[4] = 0;
    out[5] = -2 * bt;
    out[6] = 0;
    out[7] = 0;
    out[8] = 0;
    out[9] = 0;
    out[10] = 2 * nf;
    out[11] = 0;
    out[12] = (left + right) * lr;
    out[13] = (top + bottom) * bt;
    out[14] = (far + near) * nf;
    out[15] = 1;
    return out;
};
 
/***/ }),
/* 235 */
/***/ (function(module, exports) {
 
module.exports = rotateY;
 
/**
 * Rotates a matrix by the given angle around the Y axis
 *
 * @param {mat4} out the receiving matrix
 * @param {mat4} a the matrix to rotate
 * @param {Number} rad the angle to rotate the matrix by
 * @returns {mat4} out
 */
function rotateY(out, a, rad) {
    var s = Math.sin(rad),
        c = Math.cos(rad),
        a00 = a[0],
        a01 = a[1],
        a02 = a[2],
        a03 = a[3],
        a20 = a[8],
        a21 = a[9],
        a22 = a[10],
        a23 = a[11];
 
    if (a !== out) { // If the source and destination differ, copy the unchanged rows
        out[4]  = a[4];
        out[5]  = a[5];
        out[6]  = a[6];
        out[7]  = a[7];
        out[12] = a[12];
        out[13] = a[13];
        out[14] = a[14];
        out[15] = a[15];
    }
 
    // Perform axis-specific matrix multiplication
    out[0] = a00 * c - a20 * s;
    out[1] = a01 * c - a21 * s;
    out[2] = a02 * c - a22 * s;
    out[3] = a03 * c - a23 * s;
    out[8] = a00 * s + a20 * c;
    out[9] = a01 * s + a21 * c;
    out[10] = a02 * s + a22 * c;
    out[11] = a03 * s + a23 * c;
    return out;
};
 
/***/ }),
/* 236 */
/***/ (function(module, exports, __webpack_require__) {
 
/**
 * Normalize a quat
 *
 * @param {quat} out the receiving quaternion
 * @param {quat} a quaternion to normalize
 * @returns {quat} out
 * @function
 */
module.exports = __webpack_require__(247)
 
 
/***/ }),
/* 237 */
/***/ (function(module, exports) {
 
module.exports = setAxisAngle
 
/**
 * Sets a quat from the given angle and rotation axis,
 * then returns it.
 *
 * @param {quat} out the receiving quaternion
 * @param {vec3} axis the axis around which to rotate
 * @param {Number} rad the angle in radians
 * @returns {quat} out
 **/
function setAxisAngle (out, axis, rad) {
  rad = rad * 0.5
  var s = Math.sin(rad)
  out[0] = s * axis[0]
  out[1] = s * axis[1]
  out[2] = s * axis[2]
  out[3] = Math.cos(rad)
  return out
}
 
 
/***/ }),
/* 238 */
/***/ (function(module, exports) {
 
module.exports = lerp
 
/**
 * Performs a linear interpolation between two vec2's
 *
 * @param {vec2} out the receiving vector
 * @param {vec2} a the first operand
 * @param {vec2} b the second operand
 * @param {Number} t interpolation amount between the two inputs
 * @returns {vec2} out
 */
function lerp(out, a, b, t) {
    var ax = a[0],
        ay = a[1]
    out[0] = ax + t * (b[0] - ax)
    out[1] = ay + t * (b[1] - ay)
    return out
}
 
/***/ }),
/* 239 */
/***/ (function(module, exports) {
 
module.exports = cross;
 
/**
 * Computes the cross product of two vec3's
 *
 * @param {vec3} out the receiving vector
 * @param {vec3} a the first operand
 * @param {vec3} b the second operand
 * @returns {vec3} out
 */
function cross(out, a, b) {
    var ax = a[0], ay = a[1], az = a[2],
        bx = b[0], by = b[1], bz = b[2]
 
    out[0] = ay * bz - az * by
    out[1] = az * bx - ax * bz
    out[2] = ax * by - ay * bx
    return out
}
 
/***/ }),
/* 240 */
/***/ (function(module, exports) {
 
module.exports = dot;
 
/**
 * Calculates the dot product of two vec3's
 *
 * @param {vec3} a the first operand
 * @param {vec3} b the second operand
 * @returns {Number} dot product of a and b
 */
function dot(a, b) {
    return a[0] * b[0] + a[1] * b[1] + a[2] * b[2]
}
 
/***/ }),
/* 241 */
/***/ (function(module, exports) {
 
module.exports = length;
 
/**
 * Calculates the length of a vec3
 *
 * @param {vec3} a vector to calculate length of
 * @returns {Number} length of a
 */
function length(a) {
    var x = a[0],
        y = a[1],
        z = a[2]
    return Math.sqrt(x*x + y*y + z*z)
}
 
/***/ }),
/* 242 */
/***/ (function(module, exports) {
 
module.exports = normalize;
 
/**
 * Normalize a vec3
 *
 * @param {vec3} out the receiving vector
 * @param {vec3} a vector to normalize
 * @returns {vec3} out
 */
function normalize(out, a) {
    var x = a[0],
        y = a[1],
        z = a[2]
    var len = x*x + y*y + z*z
    if (len > 0) {
        //TODO: evaluate use of glm_invsqrt here?
        len = 1 / Math.sqrt(len)
        out[0] = a[0] * len
        out[1] = a[1] * len
        out[2] = a[2] * len
    }
    return out
}
 
/***/ }),
/* 243 */
/***/ (function(module, exports) {
 
module.exports = add
 
/**
 * Adds two vec4's
 *
 * @param {vec4} out the receiving vector
 * @param {vec4} a the first operand
 * @param {vec4} b the second operand
 * @returns {vec4} out
 */
function add (out, a, b) {
  out[0] = a[0] + b[0]
  out[1] = a[1] + b[1]
  out[2] = a[2] + b[2]
  out[3] = a[3] + b[3]
  return out
}
 
 
/***/ }),
/* 244 */
/***/ (function(module, exports) {
 
module.exports = dot
 
/**
 * Calculates the dot product of two vec4's
 *
 * @param {vec4} a the first operand
 * @param {vec4} b the second operand
 * @returns {Number} dot product of a and b
 */
function dot (a, b) {
  return a[0] * b[0] + a[1] * b[1] + a[2] * b[2] + a[3] * b[3]
}
 
 
/***/ }),
/* 245 */
/***/ (function(module, exports) {
 
module.exports = lerp
 
/**
 * Performs a linear interpolation between two vec4's
 *
 * @param {vec4} out the receiving vector
 * @param {vec4} a the first operand
 * @param {vec4} b the second operand
 * @param {Number} t interpolation amount between the two inputs
 * @returns {vec4} out
 */
function lerp (out, a, b, t) {
  var ax = a[0],
    ay = a[1],
    az = a[2],
    aw = a[3]
  out[0] = ax + t * (b[0] - ax)
  out[1] = ay + t * (b[1] - ay)
  out[2] = az + t * (b[2] - az)
  out[3] = aw + t * (b[3] - aw)
  return out
}
 
 
/***/ }),
/* 246 */
/***/ (function(module, exports) {
 
module.exports = multiply
 
/**
 * Multiplies two vec4's
 *
 * @param {vec4} out the receiving vector
 * @param {vec4} a the first operand
 * @param {vec4} b the second operand
 * @returns {vec4} out
 */
function multiply (out, a, b) {
  out[0] = a[0] * b[0]
  out[1] = a[1] * b[1]
  out[2] = a[2] * b[2]
  out[3] = a[3] * b[3]
  return out
}
 
 
/***/ }),
/* 247 */
/***/ (function(module, exports) {
 
module.exports = normalize
 
/**
 * Normalize a vec4
 *
 * @param {vec4} out the receiving vector
 * @param {vec4} a vector to normalize
 * @returns {vec4} out
 */
function normalize (out, a) {
  var x = a[0],
    y = a[1],
    z = a[2],
    w = a[3]
  var len = x * x + y * y + z * z + w * w
  if (len > 0) {
    len = 1 / Math.sqrt(len)
    out[0] = x * len
    out[1] = y * len
    out[2] = z * len
    out[3] = w * len
  }
  return out
}
 
 
/***/ }),
/* 248 */
/***/ (function(module, exports) {
 
module.exports = set
 
/**
 * Set the components of a vec4 to the given values
 *
 * @param {vec4} out the receiving vector
 * @param {Number} x X component
 * @param {Number} y Y component
 * @param {Number} z Z component
 * @param {Number} w W component
 * @returns {vec4} out
 */
function set (out, x, y, z, w) {
  out[0] = x
  out[1] = y
  out[2] = z
  out[3] = w
  return out
}
 
 
/***/ }),
/* 249 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["b"] = requestAnimationFrame;
/* harmony export (immutable) */ __webpack_exports__["c"] = cancelAnimationFrame;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils__ = __webpack_require__(8);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__webgl_utils__ = __webpack_require__(60);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__webgl__ = __webpack_require__(61);
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
 
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
 
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
 
/* global window, setTimeout, clearTimeout */
 
 
 
 
 
// Node.js polyfills for requestAnimationFrame and cancelAnimationFrame
function requestAnimationFrame(callback) {
  return __WEBPACK_IMPORTED_MODULE_0__utils__["a" /* isBrowser */] ? window.requestAnimationFrame(callback) : setTimeout(callback, 1000 / 60);
}
 
function cancelAnimationFrame(timerId) {
  return __WEBPACK_IMPORTED_MODULE_0__utils__["a" /* isBrowser */] ? window.cancelAnimationFrame(timerId) : clearTimeout(timerId);
}
 
var DEFAULT_GL_OPTIONS = {
  preserveDrawingBuffer: true
};
 
var AnimationLoop = /*#__PURE__*/function () {
  /*
   * @param {HTMLCanvasElement} canvas - if provided, width and height will be passed to context
   */
  function AnimationLoop() {
    var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
 
    _classCallCheck(this, AnimationLoop);
 
    var _props$onCreateContex = props.onCreateContext,
        onCreateContext = _props$onCreateContex === undefined ? function (opts) {
      return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__webgl__["createGLContext"])(opts);
    } : _props$onCreateContex,
        _props$onInitialize = props.onInitialize,
        onInitialize = _props$onInitialize === undefined ? function () {} : _props$onInitialize,
        _props$onRender = props.onRender,
        onRender = _props$onRender === undefined ? function () {} : _props$onRender,
        _props$onFinalize = props.onFinalize,
        onFinalize = _props$onFinalize === undefined ? function () {} : _props$onFinalize,
        _props$gl = props.gl,
        gl = _props$gl === undefined ? null : _props$gl,
        _props$glOptions = props.glOptions,
        glOptions = _props$glOptions === undefined ? {} : _props$glOptions,
        _props$width = props.width,
        width = _props$width === undefined ? null : _props$width,
        _props$height = props.height,
        height = _props$height === undefined ? null : _props$height,
        _props$createFramebuf = props.createFramebuffer,
        createFramebuffer = _props$createFramebuf === undefined ? false : _props$createFramebuf,
        _props$autoResizeView = props.autoResizeViewport,
        autoResizeViewport = _props$autoResizeView === undefined ? true : _props$autoResizeView,
        _props$autoResizeDraw = props.autoResizeDrawingBuffer,
        autoResizeDrawingBuffer = _props$autoResizeDraw === undefined ? true : _props$autoResizeDraw;
    var _props$useDevicePixel = props.useDevicePixels,
        useDevicePixels = _props$useDevicePixel === undefined ? true : _props$useDevicePixel;
    //iclient
        var _props$isGeographicCoordinateSystem = props.isGeographicCoordinateSystem,
    isGeographicCoordinateSystem = _props$isGeographicCoordinateSystem === undefined ? false : _props$isGeographicCoordinateSystem;
    this.isGeographicCoordinateSystem=isGeographicCoordinateSystem;
 
    if ('useDevicePixelRatio' in props) {
      __WEBPACK_IMPORTED_MODULE_0__utils__["b" /* log */].deprecated('useDevicePixelRatio', 'useDevicePixels');
      useDevicePixels = props.useDevicePixelRatio;
    }
 
    this._onCreateContext = onCreateContext;
    this.start = this.start.bind(this);
    this.stop = this.stop.bind(this);
    this._renderFrame = this._renderFrame.bind(this);
 
    this.glOptions = glOptions;
    this._createFramebuffer = createFramebuffer;
 
    this._onInitialize = onInitialize;
    this._onRender = onRender;
    this._onFinalize = onFinalize;
 
    this.width = width;
    this.height = height;
 
    this.gl = gl;
 
    this.setProps({
      autoResizeViewport: autoResizeViewport,
      autoResizeDrawingBuffer: autoResizeDrawingBuffer,
      useDevicePixels: useDevicePixels
    });
 
    return this;
  }
 
  _createClass(AnimationLoop, [{
    key: 'setNeedsRedraw',
    value: function setNeedsRedraw(reason) {
      this.needsRedraw = this.needsRedraw || reason;
      return this;
    }
  }, {
    key: 'setProps',
    value: function setProps(props) {
      if ('autoResizeViewport' in props) {
        this.autoResizeViewport = props.autoResizeViewport;
      }
      if ('autoResizeDrawingBuffer' in props) {
        this.autoResizeDrawingBuffer = props.autoResizeDrawingBuffer;
      }
      if ('useDevicePixels' in props) {
        this.useDevicePixels = props.useDevicePixels;
      }
      return this;
    }
 
    // Starts a render loop if not already running
    // @param {Object} context - contains frame specific info (E.g. tick, width, height, etc)
 
  }, {
    key: 'start',
    value: function start() {
      var _this = this;
 
      var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
 
      this._stopped = false;
      // console.debug(`Starting ${this.constructor.name}`);
      if (!this._animationFrameId) {
        // Wait for start promise before rendering frame
        this._startPromise = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__webgl_utils__["g" /* getPageLoadPromise */])().then(function () {
          if (_this._stopped) {
            return null;
          }
 
          // Create the WebGL context
          _this._createWebGLContext(opts);
 
          // Initialize the callback data
          _this._initializeCallbackData();
          _this._updateCallbackData();
 
          // Default viewport setup, in case onInitialize wants to render
          _this._resizeCanvasDrawingBuffer();
          _this._resizeViewport();
 
          // Note: onIntialize can return a promise (in case it needs to load resources)
          return _this._onInitialize(_this._callbackData);
        }).then(function (appContext) {
          if (!_this._stopped) {
            _this._addCallbackData(appContext || {});
            if (appContext !== false && !_this._animationFrameId) {
              _this._animationFrameId = requestAnimationFrame(_this._renderFrame);
            }
          }
        });
      }
      return this;
    }
 
    // Stops a render loop if already running, finalizing
 
  }, {
    key: 'stop',
    value: function stop() {
      // console.debug(`Stopping ${this.constructor.name}`);
      if (this._animationFrameId) {
        this._finalizeCallbackData();
        cancelAnimationFrame(this._animationFrameId);
        this._animationFrameId = null;
        this._stopped = true;
      }
      return this;
    }
 
    // DEPRECATED METHODS
 
    // Update parameters
 
  }, {
    key: 'setViewParameters',
    value: function setViewParameters(_ref) {
      var _ref$autoResizeDrawin = _ref.autoResizeDrawingBuffer,
          autoResizeDrawingBuffer = _ref$autoResizeDrawin === undefined ? true : _ref$autoResizeDrawin,
          _ref$autoResizeCanvas = _ref.autoResizeCanvas,
          autoResizeCanvas = _ref$autoResizeCanvas === undefined ? true : _ref$autoResizeCanvas,
          _ref$autoResizeViewpo = _ref.autoResizeViewport,
          autoResizeViewport = _ref$autoResizeViewpo === undefined ? true : _ref$autoResizeViewpo,
          _ref$useDevicePixels = _ref.useDevicePixels,
          useDevicePixels = _ref$useDevicePixels === undefined ? true : _ref$useDevicePixels,
          _ref$useDevicePixelRa = _ref.useDevicePixelRatio,
          useDevicePixelRatio = _ref$useDevicePixelRa === undefined ? null : _ref$useDevicePixelRa;
 
      __WEBPACK_IMPORTED_MODULE_0__utils__["b" /* log */].deprecated('AnimationLoop.setViewParameters', 'AnimationLoop.setProps');
      this.autoResizeViewport = autoResizeViewport;
      this.autoResizeCanvas = autoResizeCanvas;
      this.autoResizeDrawingBuffer = autoResizeDrawingBuffer;
      this.useDevicePixels = useDevicePixels;
      if (useDevicePixelRatio !== null) {
        __WEBPACK_IMPORTED_MODULE_0__utils__["b" /* log */].deprecated('useDevicePixelRatio', 'useDevicePixels');
        this.useDevicePixels = useDevicePixelRatio;
      }
      return this;
    }
 
    // PRIVATE METHODS
 
  }, {
    key: '_setupFrame',
    value: function _setupFrame() {
      if (this._onSetupFrame) {
        // call callback
        this._onSetupFrame(this._callbackData);
        // end callback
      } else {
        this._resizeCanvasDrawingBuffer();
        this._resizeViewport();
        this._resizeFramebuffer();
      }
    }
 
    /**
     * @private
     * Handles a render loop frame- updates context and calls the application
     * callback
     */
 
  }, {
    key: '_renderFrame',
    value: function _renderFrame() {
      this._setupFrame();
      this._updateCallbackData();
 
      // call callback
      this._onRender(this._callbackData);
      // end callback
 
      // Increment tick
      this._callbackData.tick++;
 
      if (!this._stopped) {
        // Request another render frame (now )
        this._animationFrameId = requestAnimationFrame(this._renderFrame);
      }
    }
 
    // Initialize the  object that will be passed to app callbacks
 
  }, {
    key: '_initializeCallbackData',
    value: function _initializeCallbackData() {
      this._callbackData = {
        gl: this.gl,
        canvas: this.gl.canvas,
        framebuffer: this.framebuffer,
        stop: this.stop,
        // Initial values
        tick: 0,
        tock: 0,
        //iclient
        isGeographicCoordinateSystem:this.isGeographicCoordinateSystem,
        useDevicePixels: this.useDevicePixels
      };
    }
 
    // Update the context object that will be passed to app callbacks
 
  }, {
    key: '_updateCallbackData',
    value: function _updateCallbackData() {
      // CallbackData width and height represent drawing buffer width and height
      var canvas = this.gl.canvas;
 
      this._callbackData.width = canvas.width;
      this._callbackData.height = canvas.height;
      this._callbackData.aspect = canvas.width / canvas.height;
    }
  }, {
    key: '_finalizeCallbackData',
    value: function _finalizeCallbackData() {
      // call callback
      this._onFinalize(this._callbackData);
      // end callback
    }
 
    // Add application's data to the app context object
 
  }, {
    key: '_addCallbackData',
    value: function _addCallbackData(appContext) {
      if ((typeof appContext === 'undefined' ? 'undefined' : _typeof(appContext)) === 'object' && appContext !== null) {
        this._callbackData = Object.assign({}, this._callbackData, appContext);
      }
    }
 
    // Either uses supplied or existing context, or calls provided callback to create one
 
  }, {
    key: '_createWebGLContext',
    value: function _createWebGLContext(opts) {
      // Create the WebGL context if necessary
      opts = Object.assign({}, opts, DEFAULT_GL_OPTIONS, this.glOptions);
      if (opts.gl) {
        this.gl = opts.gl;
      } else {
        this.gl = this._onCreateContext(opts);
      }
      if (!__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__webgl__["isWebGL"])(this.gl)) {
        throw new Error('AnimationLoop.onCreateContext - illegal context returned');
      }
 
      // Setup default framebuffer
      if (this._createFramebuffer) {
        this.framebuffer = new __WEBPACK_IMPORTED_MODULE_2__webgl__["Framebuffer"](this.gl);
      }
      // Reset the WebGL context.
      __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__webgl__["resetParameters"])(this.gl);
    }
 
    // Default viewport setup
 
  }, {
    key: '_resizeViewport',
    value: function _resizeViewport() {
      if (this.autoResizeViewport) {
        this.gl.viewport(0, 0, this.gl.canvas.width, this.gl.canvas.height);
      }
    }
  }, {
    key: '_resizeFramebuffer',
    value: function _resizeFramebuffer() {
      if (this.framebuffer) {
        this.framebuffer.resize({ width: this.gl.canvas.width, height: this.gl.canvas.height });
      }
    }
 
    // Resize the render buffer of the canvas to match canvas client size
    // Optionally multiplying with devicePixel ratio
 
  }, {
    key: '_resizeCanvasDrawingBuffer',
    value: function _resizeCanvasDrawingBuffer() {
      if (this.autoResizeDrawingBuffer) {
        __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__webgl_utils__["h" /* resizeDrawingBuffer */])(this.gl.canvas, { useDevicePixels: this.useDevicePixels });
      }
    }
  }]);
 
  return AnimationLoop;
}();
 
/* harmony default export */ __webpack_exports__["a"] = (AnimationLoop);
//# sourceMappingURL=animation-loop.js.map
 
/***/ }),
/* 250 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils__ = __webpack_require__(8);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_math_gl__ = __webpack_require__(16);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_assert__ = __webpack_require__(1);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_assert___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_assert__);
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
 
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
 
 
 
 
 
var Object3D = /*#__PURE__*/function () {
  function Object3D(_ref) {
    var id = _ref.id,
        _ref$display = _ref.display,
        display = _ref$display === undefined ? true : _ref$display;
 
    _classCallCheck(this, Object3D);
 
    // model position, rotation, scale and all in all matrix
    this.position = new __WEBPACK_IMPORTED_MODULE_1_math_gl__["Vector3"]();
    this.rotation = new __WEBPACK_IMPORTED_MODULE_1_math_gl__["Vector3"]();
    this.scale = new __WEBPACK_IMPORTED_MODULE_1_math_gl__["Vector3"](1, 1, 1);
    this.matrix = new __WEBPACK_IMPORTED_MODULE_1_math_gl__["Matrix4"]();
 
    // whether to display the object at all
    this.id = id || __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__utils__["d" /* uid */])(this.constructor.name);
    this.display = true;
    this.userData = {};
  }
 
  _createClass(Object3D, [{
    key: 'setPosition',
    value: function setPosition(position) {
      __WEBPACK_IMPORTED_MODULE_2_assert___default()(position.length === 3, 'setPosition requires vector argument');
      this.position = position;
      return this;
    }
  }, {
    key: 'setRotation',
    value: function setRotation(rotation) {
      __WEBPACK_IMPORTED_MODULE_2_assert___default()(rotation.length === 3, 'setRotation requires vector argument');
      this.rotation = rotation;
      return this;
    }
  }, {
    key: 'setScale',
    value: function setScale(scale) {
      __WEBPACK_IMPORTED_MODULE_2_assert___default()(scale.length === 3, 'setScale requires vector argument');
      this.scale = scale;
      return this;
    }
  }, {
    key: 'setMatrixComponents',
    value: function setMatrixComponents(_ref2) {
      var position = _ref2.position,
          rotation = _ref2.rotation,
          scale = _ref2.scale,
          _ref2$update = _ref2.update,
          update = _ref2$update === undefined ? true : _ref2$update;
 
      if (position) {
        this.setPosition(position);
      }
      if (rotation) {
        this.setRotation(rotation);
      }
      if (scale) {
        this.setScale(scale);
      }
      if (update) {
        this.updateMatrix();
      }
      return this;
    }
  }, {
    key: 'updateMatrix',
    value: function updateMatrix() {
      var pos = this.position;
      var rot = this.rotation;
      var scale = this.scale;
 
      this.matrix.identity();
      this.matrix.translate(pos);
      this.matrix.rotateXYZ(rot);
      this.matrix.scale(scale);
      return this;
    }
  }, {
    key: 'update',
    value: function update() {
      var _ref3 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
          position = _ref3.position,
          rotation = _ref3.rotation,
          scale = _ref3.scale;
 
      if (position) {
        this.setPosition(position);
      }
      if (rotation) {
        this.setRotation(rotation);
      }
      if (scale) {
        this.setScale(scale);
      }
      this.updateMatrix();
      return this;
    }
  }, {
    key: 'getCoordinateUniforms',
    value: function getCoordinateUniforms(viewMatrix, modelMatrix) {
      // TODO - solve multiple class problem
      // assert(viewMatrix instanceof Matrix4);
      __WEBPACK_IMPORTED_MODULE_2_assert___default()(viewMatrix);
      modelMatrix = modelMatrix || this.matrix;
      var worldMatrix = new __WEBPACK_IMPORTED_MODULE_1_math_gl__["Matrix4"](viewMatrix).multiplyRight(modelMatrix);
      var worldInverse = worldMatrix.invert();
      var worldInverseTranspose = worldInverse.transpose();
 
      return {
        viewMatrix: viewMatrix,
        modelMatrix: modelMatrix,
        objectMatrix: modelMatrix,
        worldMatrix: worldMatrix,
        worldInverseMatrix: worldInverse,
        worldInverseTransposeMatrix: worldInverseTranspose
      };
    }
 
    // TODO - copied code, not yet vetted
 
  }, {
    key: 'transform',
    value: function transform() {
 
      if (!this.parent) {
        this.endPosition.set(this.position);
        this.endRotation.set(this.rotation);
        this.endScale.set(this.scale);
      } else {
        var parent = this.parent;
        this.endPosition.set(this.position.add(parent.endPosition));
        this.endRotation.set(this.rotation.add(parent.endRotation));
        this.endScale.set(this.scale.add(parent.endScale));
      }
 
      var ch = this.children;
      for (var i = 0; i < ch.length; ++i) {
        ch[i].transform();
      }
 
      return this;
    }
  }]);
 
  return Object3D;
}();
 
/* harmony default export */ __webpack_exports__["a"] = (Object3D);
//# sourceMappingURL=object-3d.js.map
 
/***/ }),
/* 251 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__truncated_cone_geometry__ = __webpack_require__(105);
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
 
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
 
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
 
 
 
var ConeGeometry = /*#__PURE__*/function (_TruncatedConeGeometr) {
  _inherits(ConeGeometry, _TruncatedConeGeometr);
 
  function ConeGeometry() {
    var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
 
    _classCallCheck(this, ConeGeometry);
 
    var _opts$radius = opts.radius,
        radius = _opts$radius === undefined ? 1 : _opts$radius,
        _opts$cap = opts.cap,
        cap = _opts$cap === undefined ? true : _opts$cap;
    return _possibleConstructorReturn(this, (ConeGeometry.__proto__ || Object.getPrototypeOf(ConeGeometry)).call(this, Object.assign({}, opts, {
      topRadius: 0,
      topCap: Boolean(cap),
      bottomCap: Boolean(cap),
      bottomRadius: radius
    })));
  }
 
  return ConeGeometry;
}(__WEBPACK_IMPORTED_MODULE_0__truncated_cone_geometry__["a" /* default */]);
 
/* harmony default export */ __webpack_exports__["a"] = (ConeGeometry);
//# sourceMappingURL=cone-geometry.js.map
 
/***/ }),
/* 252 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__geometry__ = __webpack_require__(45);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__utils__ = __webpack_require__(8);
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
 
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
 
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
 
 
 
 
var CubeGeometry = /*#__PURE__*/function (_Geometry) {
  _inherits(CubeGeometry, _Geometry);
 
  function CubeGeometry() {
    var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
 
    _classCallCheck(this, CubeGeometry);
 
    var _opts$id = opts.id,
        id = _opts$id === undefined ? __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__utils__["d" /* uid */])('cube-geometry') : _opts$id;
    return _possibleConstructorReturn(this, (CubeGeometry.__proto__ || Object.getPrototypeOf(CubeGeometry)).call(this, Object.assign({}, opts, { id: id, attributes: getCubeAttributes() })));
  }
 
  return CubeGeometry;
}(__WEBPACK_IMPORTED_MODULE_0__geometry__["a" /* default */]);
 
/* eslint-disable no-multi-spaces, indent */
 
 
/* harmony default export */ __webpack_exports__["a"] = (CubeGeometry);
var CUBE_INDICES = new Uint16Array([0, 1, 2, 0, 2, 3, 4, 5, 6, 4, 6, 7, 8, 9, 10, 8, 10, 11, 12, 13, 14, 12, 14, 15, 16, 17, 18, 16, 18, 19, 20, 21, 22, 20, 22, 23]);
 
var CUBE_POSITIONS = new Float32Array([-1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, -1, -1, -1, -1, 1, -1, 1, 1, -1, 1, -1, -1, -1, 1, -1, -1, 1, 1, 1, 1, 1, 1, 1, -1, -1, -1, -1, 1, -1, -1, 1, -1, 1, -1, -1, 1, 1, -1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, -1, -1, -1, -1, -1, 1, -1, 1, 1, -1, 1, -1]);
 
var CUBE_NORMALS = new Float32Array([
// Front face
0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0,
 
// Back face
0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0,
 
// Top face
0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0,
 
// Bottom face
0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0,
 
// Right face
1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0,
 
// Left face
-1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0]);
 
var CUBE_TEX_COORDS = new Float32Array([
// Front face
0.0, 0.0, 1.0, 0.0, 1.0, 1.0, 0.0, 1.0,
 
// Back face
1.0, 0.0, 1.0, 1.0, 0.0, 1.0, 0.0, 0.0,
 
// Top face
0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 1.0, 1.0,
 
// Bottom face
1.0, 1.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0,
 
// Right face
1.0, 0.0, 1.0, 1.0, 0.0, 1.0, 0.0, 0.0,
 
// Left face
0.0, 0.0, 1.0, 0.0, 1.0, 1.0, 0.0, 1.0]);
/* eslint-enable no-multi-spaces, indent */
 
function getCubeAttributes() {
  return {
    indices: new Uint16Array(CUBE_INDICES),
    positions: new Float32Array(CUBE_POSITIONS),
    normals: new Float32Array(CUBE_NORMALS),
    texCoords: new Float32Array(CUBE_TEX_COORDS)
  };
}
//# sourceMappingURL=cube-geometry.js.map
 
/***/ }),
/* 253 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__truncated_cone_geometry__ = __webpack_require__(105);
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
 
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
 
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
 
 
 
var CylinderGeometry = /*#__PURE__*/function (_TruncatedConeGeometr) {
  _inherits(CylinderGeometry, _TruncatedConeGeometr);
 
  function CylinderGeometry() {
    var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
 
    _classCallCheck(this, CylinderGeometry);
 
    var _opts$radius = opts.radius,
        radius = _opts$radius === undefined ? 1 : _opts$radius;
    return _possibleConstructorReturn(this, (CylinderGeometry.__proto__ || Object.getPrototypeOf(CylinderGeometry)).call(this, Object.assign({}, opts, {
      bottomRadius: radius,
      topRadius: radius
    })));
  }
 
  return CylinderGeometry;
}(__WEBPACK_IMPORTED_MODULE_0__truncated_cone_geometry__["a" /* default */]);
 
/* harmony default export */ __webpack_exports__["a"] = (CylinderGeometry);
//# sourceMappingURL=cylinder-geometry.js.map
 
/***/ }),
/* 254 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__geometry__ = __webpack_require__(45);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_math_gl__ = __webpack_require__(16);
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
 
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
 
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
 
 
 
 
/* eslint-disable comma-spacing, max-statements, complexity */
 
var ICO_POSITIONS = [-1, 0, 0, 0, 1, 0, 0, 0, -1, 0, 0, 1, 0, -1, 0, 1, 0, 0];
var ICO_INDICES = [3, 4, 5, 3, 5, 1, 3, 1, 0, 3, 0, 4, 4, 0, 2, 4, 2, 5, 2, 0, 1, 5, 2, 1];
 
var IcoSphereGeometry = /*#__PURE__*/function (_Geometry) {
  _inherits(IcoSphereGeometry, _Geometry);
 
  function IcoSphereGeometry() {
    var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
 
    _classCallCheck(this, IcoSphereGeometry);
 
    var _opts$iterations = opts.iterations,
        iterations = _opts$iterations === undefined ? 0 : _opts$iterations;
 
 
    var PI = Math.PI;
    var PI2 = PI * 2;
 
    var positions = [].concat(ICO_POSITIONS);
    var indices = [].concat(ICO_INDICES);
 
    positions.push();
    indices.push();
 
    var getMiddlePoint = function () {
      var pointMemo = {};
 
      return function (i1, i2) {
        i1 *= 3;
        i2 *= 3;
        var mini = i1 < i2 ? i1 : i2;
        var maxi = i1 > i2 ? i1 : i2;
        var key = mini + '|' + maxi;
 
        if (key in pointMemo) {
          return pointMemo[key];
        }
 
        var x1 = positions[i1];
        var y1 = positions[i1 + 1];
        var z1 = positions[i1 + 2];
        var x2 = positions[i2];
        var y2 = positions[i2 + 1];
        var z2 = positions[i2 + 2];
        var xm = (x1 + x2) / 2;
        var ym = (y1 + y2) / 2;
        var zm = (z1 + z2) / 2;
        var len = Math.sqrt(xm * xm + ym * ym + zm * zm);
 
        xm /= len;
        ym /= len;
        zm /= len;
 
        positions.push(xm, ym, zm);
 
        return pointMemo[key] = positions.length / 3 - 1;
      };
    }();
 
    for (var i = 0; i < iterations; i++) {
      var indices2 = [];
      for (var j = 0; j < indices.length; j += 3) {
        var a = getMiddlePoint(indices[j + 0], indices[j + 1]);
        var b = getMiddlePoint(indices[j + 1], indices[j + 2]);
        var c = getMiddlePoint(indices[j + 2], indices[j + 0]);
 
        indices2.push(c, indices[j + 0], a, a, indices[j + 1], b, b, indices[j + 2], c, a, b, c);
      }
      indices = indices2;
    }
 
    // Calculate texCoords and normals
    var normals = new Array(indices.length * 3);
    var texCoords = new Array(indices.length * 2);
 
    var l = indices.length;
    for (var _i = l - 3; _i >= 0; _i -= 3) {
      var i1 = indices[_i + 0];
      var i2 = indices[_i + 1];
      var i3 = indices[_i + 2];
      var in1 = i1 * 3;
      var in2 = i2 * 3;
      var in3 = i3 * 3;
      var iu1 = i1 * 2;
      var iu2 = i2 * 2;
      var iu3 = i3 * 2;
      var x1 = positions[in1 + 0];
      var y1 = positions[in1 + 1];
      var z1 = positions[in1 + 2];
      var theta1 = Math.acos(z1 / Math.sqrt(x1 * x1 + y1 * y1 + z1 * z1));
      var phi1 = Math.atan2(y1, x1) + PI;
      var v1 = theta1 / PI;
      var u1 = 1 - phi1 / PI2;
      var x2 = positions[in2 + 0];
      var y2 = positions[in2 + 1];
      var z2 = positions[in2 + 2];
      var theta2 = Math.acos(z2 / Math.sqrt(x2 * x2 + y2 * y2 + z2 * z2));
      var phi2 = Math.atan2(y2, x2) + PI;
      var v2 = theta2 / PI;
      var u2 = 1 - phi2 / PI2;
      var x3 = positions[in3 + 0];
      var y3 = positions[in3 + 1];
      var z3 = positions[in3 + 2];
      var theta3 = Math.acos(z3 / Math.sqrt(x3 * x3 + y3 * y3 + z3 * z3));
      var phi3 = Math.atan2(y3, x3) + PI;
      var v3 = theta3 / PI;
      var u3 = 1 - phi3 / PI2;
      var vec1 = [x3 - x2, y3 - y2, z3 - z2];
      var vec2 = [x1 - x2, y1 - y2, z1 - z2];
      var normal = new __WEBPACK_IMPORTED_MODULE_1_math_gl__["Vector3"](vec1).cross(vec2).normalize();
      var newIndex = void 0;
 
      if ((u1 === 0 || u2 === 0 || u3 === 0) && (u1 === 0 || u1 > 0.5) && (u2 === 0 || u2 > 0.5) && (u3 === 0 || u3 > 0.5)) {
 
        positions.push(positions[in1 + 0], positions[in1 + 1], positions[in1 + 2]);
        newIndex = positions.length / 3 - 1;
        indices.push(newIndex);
        texCoords[newIndex * 2 + 0] = 1;
        texCoords[newIndex * 2 + 1] = v1;
        normals[newIndex * 3 + 0] = normal.x;
        normals[newIndex * 3 + 1] = normal.y;
        normals[newIndex * 3 + 2] = normal.z;
 
        positions.push(positions[in2 + 0], positions[in2 + 1], positions[in2 + 2]);
        newIndex = positions.length / 3 - 1;
        indices.push(newIndex);
        texCoords[newIndex * 2 + 0] = 1;
        texCoords[newIndex * 2 + 1] = v2;
        normals[newIndex * 3 + 0] = normal.x;
        normals[newIndex * 3 + 1] = normal.y;
        normals[newIndex * 3 + 2] = normal.z;
 
        positions.push(positions[in3 + 0], positions[in3 + 1], positions[in3 + 2]);
        newIndex = positions.length / 3 - 1;
        indices.push(newIndex);
        texCoords[newIndex * 2 + 0] = 1;
        texCoords[newIndex * 2 + 1] = v3;
        normals[newIndex * 3 + 0] = normal.x;
        normals[newIndex * 3 + 1] = normal.y;
        normals[newIndex * 3 + 2] = normal.z;
      }
 
      normals[in1 + 0] = normals[in2 + 0] = normals[in3 + 0] = normal.x;
      normals[in1 + 1] = normals[in2 + 1] = normals[in3 + 1] = normal.y;
      normals[in1 + 2] = normals[in2 + 2] = normals[in3 + 2] = normal.z;
 
      texCoords[iu1 + 0] = u1;
      texCoords[iu1 + 1] = v1;
 
      texCoords[iu2 + 0] = u2;
      texCoords[iu2 + 1] = v2;
 
      texCoords[iu3 + 0] = u3;
      texCoords[iu3 + 1] = v3;
    }
 
    return _possibleConstructorReturn(this, (IcoSphereGeometry.__proto__ || Object.getPrototypeOf(IcoSphereGeometry)).call(this, Object.assign({}, opts, {
      attributes: {
        positions: new Float32Array(positions),
        normals: new Float32Array(normals),
        texCoords: new Float32Array(texCoords),
        indices: new Uint16Array(indices)
      }
    })));
  }
 
  return IcoSphereGeometry;
}(__WEBPACK_IMPORTED_MODULE_0__geometry__["a" /* default */]);
 
/* harmony default export */ __webpack_exports__["a"] = (IcoSphereGeometry);
//# sourceMappingURL=ico-sphere-geometry.js.map
 
/***/ }),
/* 255 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__geometry__ = __webpack_require__(45);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__utils__ = __webpack_require__(8);
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
 
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
 
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
 
 
 
 
var PlaneGeometry = /*#__PURE__*/function (_Geometry) {
  _inherits(PlaneGeometry, _Geometry);
 
  // Primitives inspired by TDL http://code.google.com/p/webglsamples/,
  // copyright 2011 Google Inc. new BSD License
  // (http://www.opensource.org/licenses/bsd-license.php).
  /* eslint-disable max-statements, complexity */
  /* eslint-disable complexity, max-statements */
  function PlaneGeometry() {
    var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
 
    _classCallCheck(this, PlaneGeometry);
 
    var _opts$type = opts.type,
        type = _opts$type === undefined ? 'x,y' : _opts$type,
        _opts$offset = opts.offset,
        offset = _opts$offset === undefined ? 0 : _opts$offset,
        _opts$flipCull = opts.flipCull,
        flipCull = _opts$flipCull === undefined ? false : _opts$flipCull,
        _opts$unpack = opts.unpack,
        unpack = _opts$unpack === undefined ? false : _opts$unpack,
        _opts$id = opts.id,
        id = _opts$id === undefined ? __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__utils__["d" /* uid */])('plane-geometry') : _opts$id;
 
 
    var coords = type.split(',');
    // width, height
    var c1len = opts[coords[0] + 'len'];
    var c2len = opts[coords[1] + 'len'];
    // subdivisionsWidth, subdivisionsDepth
    var subdivisions1 = opts['n' + coords[0]] || 1;
    var subdivisions2 = opts['n' + coords[1]] || 1;
    var numVertices = (subdivisions1 + 1) * (subdivisions2 + 1);
 
    var positions = new Float32Array(numVertices * 3);
    var normals = new Float32Array(numVertices * 3);
    var texCoords = new Float32Array(numVertices * 2);
 
    if (flipCull) {
      c1len = -c1len;
    }
 
    var i2 = 0;
    var i3 = 0;
    for (var z = 0; z <= subdivisions2; z++) {
      for (var x = 0; x <= subdivisions1; x++) {
        var u = x / subdivisions1;
        var v = z / subdivisions2;
        texCoords[i2 + 0] = flipCull ? 1 - u : u;
        texCoords[i2 + 1] = v;
 
        switch (type) {
          case 'x,y':
            positions[i3 + 0] = c1len * u - c1len * 0.5;
            positions[i3 + 1] = c2len * v - c2len * 0.5;
            positions[i3 + 2] = offset;
 
            normals[i3 + 0] = 0;
            normals[i3 + 1] = 0;
            normals[i3 + 2] = flipCull ? 1 : -1;
            break;
 
          case 'x,z':
            positions[i3 + 0] = c1len * u - c1len * 0.5;
            positions[i3 + 1] = offset;
            positions[i3 + 2] = c2len * v - c2len * 0.5;
 
            normals[i3 + 0] = 0;
            normals[i3 + 1] = flipCull ? 1 : -1;
            normals[i3 + 2] = 0;
            break;
 
          case 'y,z':
            positions[i3 + 0] = offset;
            positions[i3 + 1] = c1len * u - c1len * 0.5;
            positions[i3 + 2] = c2len * v - c2len * 0.5;
 
            normals[i3 + 0] = flipCull ? 1 : -1;
            normals[i3 + 1] = 0;
            normals[i3 + 2] = 0;
            break;
 
          default:
            break;
        }
 
        i2 += 2;
        i3 += 3;
      }
    }
 
    var numVertsAcross = subdivisions1 + 1;
    var indices = new Uint16Array(subdivisions1 * subdivisions2 * 6);
 
    for (var _z = 0; _z < subdivisions2; _z++) {
      for (var _x2 = 0; _x2 < subdivisions1; _x2++) {
        var index = (_z * subdivisions1 + _x2) * 6;
        // Make triangle 1 of quad.
        indices[index + 0] = (_z + 0) * numVertsAcross + _x2;
        indices[index + 1] = (_z + 1) * numVertsAcross + _x2;
        indices[index + 2] = (_z + 0) * numVertsAcross + _x2 + 1;
 
        // Make triangle 2 of quad.
        indices[index + 3] = (_z + 1) * numVertsAcross + _x2;
        indices[index + 4] = (_z + 1) * numVertsAcross + _x2 + 1;
        indices[index + 5] = (_z + 0) * numVertsAcross + _x2 + 1;
      }
    }
 
    // Optionally, unpack indexed geometry
    if (unpack) {
      var positions2 = new Float32Array(indices.length * 3);
      var normals2 = new Float32Array(indices.length * 3);
      var texCoords2 = new Float32Array(indices.length * 2);
 
      for (var _x3 = 0; _x3 < indices.length; ++_x3) {
        var _index = indices[_x3];
        positions2[_x3 * 3 + 0] = positions[_index * 3 + 0];
        positions2[_x3 * 3 + 1] = positions[_index * 3 + 1];
        positions2[_x3 * 3 + 2] = positions[_index * 3 + 2];
        normals2[_x3 * 3 + 0] = normals[_index * 3 + 0];
        normals2[_x3 * 3 + 1] = normals[_index * 3 + 1];
        normals2[_x3 * 3 + 2] = normals[_index * 3 + 2];
        texCoords2[_x3 * 2 + 0] = texCoords[_index * 2 + 0];
        texCoords2[_x3 * 2 + 1] = texCoords[_index * 2 + 1];
      }
 
      positions = positions2;
      normals = normals2;
      texCoords = texCoords2;
      indices = undefined;
    }
 
    var attributes = {
      positions: positions,
      normals: normals,
      texCoords: texCoords
    };
 
    if (indices) {
      attributes.indices = indices;
    }
 
    return _possibleConstructorReturn(this, (PlaneGeometry.__proto__ || Object.getPrototypeOf(PlaneGeometry)).call(this, Object.assign({}, opts, { attributes: attributes, id: id })));
  }
 
  return PlaneGeometry;
}(__WEBPACK_IMPORTED_MODULE_0__geometry__["a" /* default */]);
 
/* harmony default export */ __webpack_exports__["a"] = (PlaneGeometry);
//# sourceMappingURL=plane-geometry.js.map
 
/***/ }),
/* 256 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__geometry__ = __webpack_require__(45);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__utils__ = __webpack_require__(8);
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
 
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
 
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
 
 
 
 
var SphereGeometry = /*#__PURE__*/function (_Geometry) {
  _inherits(SphereGeometry, _Geometry);
 
  function SphereGeometry() {
    var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
 
    _classCallCheck(this, SphereGeometry);
 
    var _opts$nlat = opts.nlat,
        nlat = _opts$nlat === undefined ? 10 : _opts$nlat,
        _opts$nlong = opts.nlong,
        nlong = _opts$nlong === undefined ? 10 : _opts$nlong,
        _opts$radius = opts.radius,
        radius = _opts$radius === undefined ? 1 : _opts$radius,
        _opts$id = opts.id,
        id = _opts$id === undefined ? __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__utils__["d" /* uid */])('sphere-geometry') : _opts$id;
    return _possibleConstructorReturn(this, (SphereGeometry.__proto__ || Object.getPrototypeOf(SphereGeometry)).call(this, Object.assign({}, opts, { id: id, attributes: getSphereAttributes(nlat, nlong, radius) })));
  }
 
  return SphereGeometry;
}(__WEBPACK_IMPORTED_MODULE_0__geometry__["a" /* default */]);
 
// Primitives inspired by TDL http://code.google.com/p/webglsamples/,
// copyright 2011 Google Inc. new BSD License
// (http://www.opensource.org/licenses/bsd-license.php).
/* eslint-disable max-statements, complexity */
 
 
/* harmony default export */ __webpack_exports__["a"] = (SphereGeometry);
function getSphereAttributes(nlat, nlong, radius) {
  var startLat = 0;
  var endLat = Math.PI;
  var latRange = endLat - startLat;
  var startLong = 0;
  var endLong = 2 * Math.PI;
  var longRange = endLong - startLong;
  var numVertices = (nlat + 1) * (nlong + 1);
 
  if (typeof radius === 'number') {
    var value = radius;
    radius = function radius(n1, n2, n3, u, v) {
      return value;
    };
  }
 
  var positions = new Float32Array(numVertices * 3);
  var normals = new Float32Array(numVertices * 3);
  var texCoords = new Float32Array(numVertices * 2);
  var indices = new Uint16Array(nlat * nlong * 6);
 
  // Create positions, normals and texCoords
  for (var y = 0; y <= nlat; y++) {
    for (var x = 0; x <= nlong; x++) {
 
      var u = x / nlong;
      var v = y / nlat;
 
      var index = x + y * (nlong + 1);
      var i2 = index * 2;
      var i3 = index * 3;
 
      var theta = longRange * u;
      var phi = latRange * v;
      var sinTheta = Math.sin(theta);
      var cosTheta = Math.cos(theta);
      var sinPhi = Math.sin(phi);
      var cosPhi = Math.cos(phi);
      var ux = cosTheta * sinPhi;
      var uy = cosPhi;
      var uz = sinTheta * sinPhi;
 
      var r = radius(ux, uy, uz, u, v);
 
      positions[i3 + 0] = r * ux;
      positions[i3 + 1] = r * uy;
      positions[i3 + 2] = r * uz;
 
      normals[i3 + 0] = ux;
      normals[i3 + 1] = uy;
      normals[i3 + 2] = uz;
 
      texCoords[i2 + 0] = u;
      texCoords[i2 + 1] = v;
    }
  }
 
  // Create indices
  var numVertsAround = nlat + 1;
  for (var _x2 = 0; _x2 < nlat; _x2++) {
    for (var _y = 0; _y < nlong; _y++) {
      var _index = (_x2 * nlong + _y) * 6;
 
      indices[_index + 0] = _y * numVertsAround + _x2;
      indices[_index + 1] = _y * numVertsAround + _x2 + 1;
      indices[_index + 2] = (_y + 1) * numVertsAround + _x2;
 
      indices[_index + 3] = (_y + 1) * numVertsAround + _x2;
      indices[_index + 4] = _y * numVertsAround + _x2 + 1;
      indices[_index + 5] = (_y + 1) * numVertsAround + _x2 + 1;
    }
  }
 
  return {
    positions: positions,
    indices: indices,
    normals: normals,
    texCoords: texCoords
  };
}
//# sourceMappingURL=sphere-geometry.js.map
 
/***/ }),
/* 257 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.setPathPrefix = setPathPrefix;
exports.loadFile = loadFile;
exports.loadImage = loadImage;
 
var _browserRequestFile = __webpack_require__(629);
 
var pathPrefix = '';
 
/*
 * Set a relative path prefix
 */
function setPathPrefix(prefix) {
  pathPrefix = prefix;
}
 
function loadFile(url, opts) {
  if (typeof url !== 'string' && !opts) {
    // TODO - warn for deprecated mode
    opts = url;
    url = opts.url;
  }
  opts.url = pathPrefix ? pathPrefix + url : url;
  return (0, _browserRequestFile.requestFile)(opts);
}
 
/* global Image */
 
/*
 * Loads images asynchronously
 * image.crossOrigin can be set via opts.crossOrigin, default to 'anonymous'
 * returns a promise tracking the load
 */
function loadImage(url, opts) {
  url = pathPrefix ? pathPrefix + url : url;
 
  return new Promise(function (resolve, reject) {
    try {
      var image = new Image();
      image.onload = function () {
        return resolve(image);
      };
      image.onerror = function () {
        return reject(new Error('Could not load image ' + url + '.'));
      };
      image.crossOrigin = opts && opts.crossOrigin || 'anonymous';
      image.src = url;
    } catch (error) {
      reject(error);
    }
  });
}
//# sourceMappingURL=browser-load.js.map
 
/***/ }),
/* 258 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = assembleShaders;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__shader_modules__ = __webpack_require__(162);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__platform_defines__ = __webpack_require__(643);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__modules_module_injectors__ = __webpack_require__(655);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_assert__ = __webpack_require__(1);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_assert___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_assert__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__utils__ = __webpack_require__(8);
var _SHADER_TYPE, _MODULE_INJECTORS;
 
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
 
 
 
 
 
 
 
var VERTEX_SHADER = 'vs';
var FRAGMENT_SHADER = 'fs';
 
var SHADER_TYPE = (_SHADER_TYPE = {}, _defineProperty(_SHADER_TYPE, VERTEX_SHADER, 'vertex'), _defineProperty(_SHADER_TYPE, FRAGMENT_SHADER, 'fragment'), _SHADER_TYPE);
 
var MODULE_INJECTORS = (_MODULE_INJECTORS = {}, _defineProperty(_MODULE_INJECTORS, VERTEX_SHADER, __WEBPACK_IMPORTED_MODULE_2__modules_module_injectors__["a" /* MODULE_INJECTORS_VS */]), _defineProperty(_MODULE_INJECTORS, FRAGMENT_SHADER, __WEBPACK_IMPORTED_MODULE_2__modules_module_injectors__["b" /* MODULE_INJECTORS_FS */]), _MODULE_INJECTORS);
 
// Precision prologue to inject before functions are injected in shader
// TODO - extract any existing prologue in the fragment source and move it up...
var FRAGMENT_SHADER_PROLOGUE = '#ifdef GL_ES\nprecision highp float;\n#endif\n\n';
 
// Generate "glslify-compatible" SHADER_NAME defines
// These are understood by the GLSL error parsing function
// If id is provided and no SHADER_NAME constant is present in source, create one
function getShaderName(_ref) {
  var id = _ref.id,
      source = _ref.source,
      type = _ref.type;
 
  var injectShaderName = id && typeof id === 'string' && source.indexOf('SHADER_NAME') === -1;
  return injectShaderName ? '\n#define SHADER_NAME ' + id + '_' + SHADER_TYPE[type] + '\n\n' : '';
}
 
// Generates application defines from an object
function getApplicationDefines() {
  var defines = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
 
  var count = 0;
  var sourceText = '';
  for (var define in defines) {
    if (count === 0) {
      sourceText += '\n// APPLICATION DEFINES\n';
    }
    count++;
    sourceText += '#define ' + define.toUpperCase() + ' ' + defines[define] + '\n';
  }
  if (count === 0) {
    sourceText += '\n';
  }
  return sourceText;
}
 
// Warn about deprecated uniforms or functions
function checkDeprecation(moduleName, shaderSource) {
  var shaderModule = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__shader_modules__["c" /* getShaderModule */])(moduleName);
 
  shaderModule.deprecations.forEach(function (def) {
    if (def.regex.test(shaderSource)) {
      if (def.deprecated) {
        __WEBPACK_IMPORTED_MODULE_4__utils__["b" /* log */].deprecated(def.old, def.new);
      } else {
        __WEBPACK_IMPORTED_MODULE_4__utils__["b" /* log */].removed(def.old, def.new);
      }
    }
  });
}
 
// Extracts the source code chunk for the specified shader type from the named shader module
function getModuleSource(moduleName, type) {
  var shaderModule = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__shader_modules__["c" /* getShaderModule */])(moduleName);
  var moduleSource = void 0;
  switch (type) {
    case VERTEX_SHADER:
      moduleSource = shaderModule.vs || shaderModule.vertexShader;
      break;
    case FRAGMENT_SHADER:
      moduleSource = shaderModule.fs || shaderModule.fragmentShader;
      break;
    default:
      __WEBPACK_IMPORTED_MODULE_3_assert___default()(false);
  }
 
  if (typeof moduleSource !== 'string') {
    return '';
  }
 
  return '#define MODULE_' + moduleName.toUpperCase() + '\n' + moduleSource + '// END MODULE_' + moduleName + '\n\n';
}
 
// Pulls together complete source code for either a vertex or a fragment shader
// adding prologues, requested module chunks, and any final injections.
function assembleShader(gl, _ref2) {
  var id = _ref2.id,
      source = _ref2.source,
      type = _ref2.type,
      _ref2$modules = _ref2.modules,
      modules = _ref2$modules === undefined ? [] : _ref2$modules,
      _ref2$defines = _ref2.defines,
      defines = _ref2$defines === undefined ? {} : _ref2$defines;
 
  __WEBPACK_IMPORTED_MODULE_3_assert___default()(typeof source === 'string', 'shader source must be a string');
 
  var sourceLines = source.split('\n');
  var versionLine = '';
  var coreSource = source;
  // Extract any version directive string from source.
  // TODO : keep all pre-processor statements at the begining of the shader.
  if (sourceLines[0].indexOf('#version ') === 0) {
    versionLine = sourceLines[0];
    coreSource = sourceLines.slice(1).join('\n');
  }
 
  // Add platform defines (use these to work around platform-specific bugs and limitations)
  // Add common defines (GLSL version compatibility, feature detection)
  // Add precision declaration for fragment shaders
  var assembledSource = getShaderName({ id: id, source: source, type: type }) + '\n' + __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__platform_defines__["a" /* getPlatformShaderDefines */])(gl) + '\n' + __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__platform_defines__["b" /* getVersionDefines */])(gl) + '\n' + getApplicationDefines(defines) + '\n' + (type === FRAGMENT_SHADER ? FRAGMENT_SHADER_PROLOGUE : '') + '\n';
 
  // Add source of dependent modules in resolved order
  var inject = false;
  var _iteratorNormalCompletion = true;
  var _didIteratorError = false;
  var _iteratorError = undefined;
 
  try {
    for (var _iterator = modules[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
      var moduleName = _step.value;
 
      switch (moduleName) {
        case 'inject':
          inject = true;
          break;
        default:
          checkDeprecation(moduleName, coreSource);
          // Add the module source, and a #define that declares it presence
          assembledSource += getModuleSource(moduleName, type);
      }
    }
 
    // Add the version directive and actual source of this shader
  } catch (err) {
    _didIteratorError = true;
    _iteratorError = err;
  } finally {
    try {
      if (!_iteratorNormalCompletion && _iterator.return) {
        _iterator.return();
      }
    } finally {
      if (_didIteratorError) {
        throw _iteratorError;
      }
    }
  }
 
  assembledSource = versionLine + assembledSource + coreSource;
 
  // Finally, if requested, insert an automatic module injector chunk
  if (inject) {
    assembledSource.replace('}\s*$', MODULE_INJECTORS);
  }
 
  return assembledSource;
}
 
// Returns a combined `getUniforms` covering the options for all the modules,
// the created function will pass on options to the inidividual `getUniforms`
// function of each shader module and combine the results into one object that
// can be passed to setUniforms.
function assembleGetUniforms(modules) {
 
  return function getUniforms(opts) {
    var uniforms = {};
    var _iteratorNormalCompletion2 = true;
    var _didIteratorError2 = false;
    var _iteratorError2 = undefined;
 
    try {
      for (var _iterator2 = modules[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
        var moduleName = _step2.value;
 
        var shaderModule = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__shader_modules__["c" /* getShaderModule */])(moduleName);
        // `modules` is already sorted by dependency level. This guarantees that
        // modules have access to the uniforms that are generated by their dependencies.
        var moduleUniforms = shaderModule.getUniforms ? shaderModule.getUniforms(opts, uniforms) : {};
        Object.assign(uniforms, moduleUniforms);
      }
    } catch (err) {
      _didIteratorError2 = true;
      _iteratorError2 = err;
    } finally {
      try {
        if (!_iteratorNormalCompletion2 && _iterator2.return) {
          _iterator2.return();
        }
      } finally {
        if (_didIteratorError2) {
          throw _iteratorError2;
        }
      }
    }
 
    return uniforms;
  };
}
 
// Returns a map with module names as keys, resolving to their module definitions
// The presence of a key indicates that the module is available in this program,
// whether directly included, or through a dependency of some other module
function assembleModuleMap(modules) {
  var result = {};
  var _iteratorNormalCompletion3 = true;
  var _didIteratorError3 = false;
  var _iteratorError3 = undefined;
 
  try {
    for (var _iterator3 = modules[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {
      var moduleName = _step3.value;
 
      var shaderModule = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__shader_modules__["c" /* getShaderModule */])(moduleName);
      result[moduleName] = shaderModule;
    }
  } catch (err) {
    _didIteratorError3 = true;
    _iteratorError3 = err;
  } finally {
    try {
      if (!_iteratorNormalCompletion3 && _iterator3.return) {
        _iterator3.return();
      }
    } finally {
      if (_didIteratorError3) {
        throw _iteratorError3;
      }
    }
  }
 
  return result;
}
 
/**
 * Apply set of modules
 */
function assembleShaders(gl) {
  var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  var vs = opts.vs,
      fs = opts.fs;
 
  var modules = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__shader_modules__["d" /* resolveModules */])(opts.modules || []);
  return {
    gl: gl,
    vs: assembleShader(gl, Object.assign({}, opts, { source: vs, type: VERTEX_SHADER, modules: modules })),
    fs: assembleShader(gl, Object.assign({}, opts, { source: fs, type: FRAGMENT_SHADER, modules: modules })),
    getUniforms: assembleGetUniforms(modules),
    modules: assembleModuleMap(modules)
  };
}
//# sourceMappingURL=assemble-shaders.js.map
 
/***/ }),
/* 259 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__webgl_shader__ = __webpack_require__(111);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__webgl_program__ = __webpack_require__(109);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_assert__ = __webpack_require__(1);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_assert___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_assert__);
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
 
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
 
 
 
 
 
var ShaderCache = /*#__PURE__*/function () {
 
  /**
   * A cache of compiled shaders, keyed by shader source strings.
   * Compilation of long shaders can be time consuming.
   * By using this class, the application can ensure that each shader
   * is only compiled once.
   */
  function ShaderCache() {
    var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
        gl = _ref.gl,
        _ref$_cachePrograms = _ref._cachePrograms,
        _cachePrograms = _ref$_cachePrograms === undefined ? false : _ref$_cachePrograms;
 
    _classCallCheck(this, ShaderCache);
 
    __WEBPACK_IMPORTED_MODULE_2_assert___default()(gl);
    this.gl = gl;
    this.vertexShaders = {};
    this.fragmentShaders = {};
    this.programs = {};
    this._cachePrograms = _cachePrograms;
  }
 
  /**
   * Deletes shader references
   * @return {ShaderCache} - returns this for chaining
   */
 
 
  _createClass(ShaderCache, [{
    key: 'delete',
    value: function _delete() {
      // TODO - requires reference counting to avoid deleting shaders in use
      return this;
    }
 
    /**
     * Returns a compiled `VertexShader` object corresponding to the supplied
     * GLSL source code string, if possible from cache.
     *
     * @param {WebGLRenderingContext} gl - gl context
     * @param {String} source - Source code for shader
     * @return {VertexShader} - a compiled vertex shader
     */
 
  }, {
    key: 'getVertexShader',
    value: function getVertexShader(gl, source) {
      __WEBPACK_IMPORTED_MODULE_2_assert___default()(typeof source === 'string');
      __WEBPACK_IMPORTED_MODULE_2_assert___default()(this._compareContexts(gl, this.gl));
 
      var shader = this.vertexShaders[source];
      if (!shader) {
        shader = new __WEBPACK_IMPORTED_MODULE_0__webgl_shader__["b" /* VertexShader */](gl, source);
        this.vertexShaders[source] = shader;
      }
      return shader;
    }
 
    /**
     * Returns a compiled `VertexShader` object corresponding to the supplied
     * GLSL source code string, if possible from cache.
     * @param {WebGLRenderingContext} gl - gl context
     * @param {String} source - Source code for shader
     * @return {FragmentShader} - a compiled fragment shader, possibly from chache
     */
 
  }, {
    key: 'getFragmentShader',
    value: function getFragmentShader(gl, source) {
      __WEBPACK_IMPORTED_MODULE_2_assert___default()(typeof source === 'string');
      __WEBPACK_IMPORTED_MODULE_2_assert___default()(this._compareContexts(gl, this.gl));
 
      var shader = this.fragmentShaders[source];
      if (!shader) {
        shader = new __WEBPACK_IMPORTED_MODULE_0__webgl_shader__["c" /* FragmentShader */](gl, source);
        this.fragmentShaders[source] = shader;
      }
      return shader;
    }
 
    // Retrive Shaders from cache if exists, otherwise create new instance.
 
  }, {
    key: 'getProgram',
    value: function getProgram(gl, opts) {
      __WEBPACK_IMPORTED_MODULE_2_assert___default()(this._compareContexts(gl, this.gl));
      __WEBPACK_IMPORTED_MODULE_2_assert___default()(typeof opts.vs === 'string');
      __WEBPACK_IMPORTED_MODULE_2_assert___default()(typeof opts.fs === 'string');
      __WEBPACK_IMPORTED_MODULE_2_assert___default()(typeof opts.id === 'string');
 
      var cacheKey = this._getProgramKey(opts);
      var program = this.programs[cacheKey];
      if (program) {
        this._resetProgram(program);
        return program;
      }
 
      program = this._createNewProgram(gl, opts);
 
      // Check if program can be cached
      // Program caching is experimental and expects
      // each Model to have a unique-id (wich is used in key generation)
      if (this._cachePrograms && this._checkProgramProp(program)) {
        this.programs[cacheKey] = program;
      }
 
      return program;
    }
  }, {
    key: '_getProgramKey',
    value: function _getProgramKey(opts) {
      return opts.id + '-' + opts.vs + '-' + opts.fs;
    }
  }, {
    key: '_checkProgramProp',
    value: function _checkProgramProp(program) {
      // Check for transform feedback props (varyings, etc), we can't key such programs for now
      return !program.varyings;
    }
  }, {
    key: '_createNewProgram',
    value: function _createNewProgram(gl, opts) {
      var vs = opts.vs,
          fs = opts.fs;
 
      var vertexShader = this.getVertexShader(gl, vs);
      var fragmentShader = this.getFragmentShader(gl, fs);
      return new __WEBPACK_IMPORTED_MODULE_1__webgl_program__["a" /* default */](this.gl, Object.assign({}, opts, {
        vs: vertexShader,
        fs: fragmentShader
      }));
    }
  }, {
    key: '_resetProgram',
    value: function _resetProgram(program, opts) {
      program.reset();
    }
 
    // Handle debug contexts
 
  }, {
    key: '_compareContexts',
    value: function _compareContexts(gl1, gl2) {
      return (gl1.gl || gl1) === (gl2.gl || gl2);
    }
  }]);
 
  return ShaderCache;
}();
 
/* harmony default export */ __webpack_exports__["a"] = (ShaderCache);
//# sourceMappingURL=shader-cache.js.map
 
/***/ }),
/* 260 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_math_gl__ = __webpack_require__(16);
 
 
var IDENTITY_MATRIX = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];
 
var DEFAULT_MODULE_OPTIONS = {
  modelMatrix: IDENTITY_MATRIX,
  viewMatrix: IDENTITY_MATRIX,
  projectionMatrix: IDENTITY_MATRIX,
  cameraPositionWorld: [0, 0, 0]
};
 
function getUniforms() {
  var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : DEFAULT_MODULE_OPTIONS;
  var prevUniforms = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
 
  // const viewProjectionInverse = viewProjection.invert();
  // viewInverseMatrix: view.invert(),
  // viewProjectionInverseMatrix: viewProjectionInverse
 
  var uniforms = {};
  if (opts.modelMatrix !== undefined) {
    uniforms.modelMatrix = opts.modelMatrix;
  }
  if (opts.viewMatrix !== undefined) {
    uniforms.viewMatrix = opts.viewMatrix;
  }
  if (opts.projectionMatrix !== undefined) {
    uniforms.projectionMatrix = opts.projectionMatrix;
  }
  if (opts.cameraPositionWorld !== undefined) {
    uniforms.cameraPositionWorld = opts.cameraPositionWorld;
  }
 
  // COMPOSITE UNIFORMS
  if (opts.projectionMatrix !== undefined || opts.viewMatrix !== undefined) {
    uniforms.viewProjectionMatrix = new __WEBPACK_IMPORTED_MODULE_0_math_gl__["Matrix4"](opts.projectionMatrix).multiplyRight(opts.viewMatrix);
  }
 
  return uniforms;
}
 
var common = 'varying vec4 project_vPositionWorld;\nvarying vec3 project_vNormalWorld;\n\nvec4 project_getPosition_World() {\n  return project_vPositionWorld;\n}\n\nvec3 project_getNormal_World() {\n  return project_vNormalWorld;\n}\n';
 
var vs = common + '\n\n// Unprefixed uniforms\nuniform mat4 modelMatrix;\nuniform mat4 viewMatrix;\nuniform mat4 projectionMatrix;\nuniform mat4 viewProjectionMatrix;\nuniform vec3 cameraPositionWorld;\n\nstruct World {\n  vec3 position;\n  vec3 normal;\n};\n\nWorld world;\n\nvoid project_setPosition(vec4 position) {\n  project_vPositionWorld = position;\n}\n\nvoid project_setNormal(vec3 normal) {\n  project_vNormalWorld = normal;\n}\n\nvoid project_setPositionAndNormal_World(vec3 position, vec3 normal) {\n  world.position = position;\n  world.normal = normal;\n}\n\nvoid project_setPositionAndNormal_Model(vec3 position, vec3 normal) {\n  world.position = (modelMatrix * vec4(position, 1.)).xyz;\n  world.normal = mat3(modelMatrix) * normal;\n}\n\nvec4 project_model_to_clipspace(vec4 position) {\n  return viewProjectionMatrix * modelMatrix * position;\n}\n\nvec4 project_model_to_clipspace(vec3 position) {\n  return viewProjectionMatrix * modelMatrix * vec4(position, 1.);\n}\n\nvec4 project_world_to_clipspace(vec3 position) {\n  return viewProjectionMatrix * vec4(position, 1.);\n}\n\nvec4 project_view_to_clipspace(vec3 position) {\n  return projectionMatrix * vec4(position, 1.);\n}\n\nvec4 project_to_clipspace(vec3 position) {\n  return viewProjectionMatrix * vec4(position, 1.);\n}\n';
 
var fs = '\n' + common;
 
/* harmony default export */ __webpack_exports__["a"] = ({
  name: 'project',
  getUniforms: getUniforms,
  vs: vs,
  fs: fs
});
//# sourceMappingURL=project.js.map
 
/***/ }),
/* 261 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* WEBPACK VAR INJECTION */(function(global) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return window_; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return global_; });
/* unused harmony export document */
/* global window, global, document */
var window_ = typeof window !== 'undefined' ? window : global;
var global_ = typeof global !== 'undefined' ? global : window;
var document_ = typeof document !== 'undefined' ? document : {};
 
 
//# sourceMappingURL=globals.js.map
/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(47)))
 
/***/ }),
/* 262 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* WEBPACK VAR INJECTION */(function(process) {/* unused harmony export isNode */
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return isBrowser; });
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
 
// This function is needed in initialization stages,
// make sure it can be imported in isolation
/* global process */
 
var isNode = (typeof process === 'undefined' ? 'undefined' : _typeof(process)) === 'object' && String(process) === '[object process]' && !process.browser;
 
var isBrowser = !isNode;
 
/* unused harmony default export */ var _unused_webpack_default_export = (isBrowser);
//# sourceMappingURL=is-browser.js.map
/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(26)))
 
/***/ }),
/* 263 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["b"] = formatValue;
/* eslint-disable no-console */
/* global console, window, Image */
 
console.debug = console.debug || console.log;
 
var cache = {};
 
var _log = {
  priority: 0,
  table: function table(priority, _table) {
    if (priority <= _log.priority && _table) {
      console.table(_table);
    }
  },
  log: function log(priority, arg) {
    if (priority <= _log.priority) {
      var _console;
 
      for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
        args[_key - 2] = arguments[_key];
      }
 
      (_console = console).debug.apply(_console, ['luma.gl: ' + arg].concat(args));
    }
  },
  info: function info(priority, arg) {
    if (priority <= _log.priority) {
      var _console2;
 
      for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
        args[_key2 - 2] = arguments[_key2];
      }
 
      (_console2 = console).log.apply(_console2, ['luma.gl: ' + arg].concat(args));
    }
  },
  once: function once(priority, arg) {
    if (!cache[arg]) {
      for (var _len3 = arguments.length, args = Array(_len3 > 2 ? _len3 - 2 : 0), _key3 = 2; _key3 < _len3; _key3++) {
        args[_key3 - 2] = arguments[_key3];
      }
 
      _log.log.apply(_log, [priority, arg].concat(args));
      cache[arg] = true;
    }
  },
  warn: function warn(arg) {
    if (!cache[arg]) {
      var _console3;
 
      for (var _len4 = arguments.length, args = Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) {
        args[_key4 - 1] = arguments[_key4];
      }
 
      (_console3 = console).warn.apply(_console3, ['luma.gl: ' + arg].concat(args));
      cache[arg] = true;
    }
  },
  error: function error(arg) {
    var _console4;
 
    for (var _len5 = arguments.length, args = Array(_len5 > 1 ? _len5 - 1 : 0), _key5 = 1; _key5 < _len5; _key5++) {
      args[_key5 - 1] = arguments[_key5];
    }
 
    (_console4 = console).error.apply(_console4, ['luma.gl: ' + arg].concat(args));
  },
  image: function image(_ref) {
    var priority = _ref.priority,
        _image = _ref.image,
        _ref$message = _ref.message,
        message = _ref$message === undefined ? '' : _ref$message,
        _ref$scale = _ref.scale,
        scale = _ref$scale === undefined ? 1 : _ref$scale;
 
    if (priority > _log.priority) {
      return;
    }
    if (typeof window === 'undefined') {
      // Let's not try this under node
      return;
    }
    if (typeof _image === 'string') {
      var img = new Image();
      img.onload = logImage.bind(null, img, message, scale);
      img.src = _image;
    }
    var element = _image.nodeName || '';
    if (element.toLowerCase() === 'img') {
      logImage(_image, message, scale);
    }
    if (element.toLowerCase() === 'canvas') {
      var _img = new Image();
      _img.onload = logImage.bind(null, _img, message, scale);
      _img.src = _image.toDataURL();
    }
  },
  deprecated: function deprecated(oldUsage, newUsage) {
    _log.warn('`' + oldUsage + '` is deprecated and will be removed in a later version. Use `' + newUsage + '` instead');
  },
  removed: function removed(oldUsage, newUsage) {
    _log.error('`' + oldUsage + '` is no longer supported. Use `' + newUsage + '` instead,   check our Upgrade Guide for more details');
  },
  group: function group(priority, arg) {
    var _ref2 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},
        _ref2$collapsed = _ref2.collapsed,
        collapsed = _ref2$collapsed === undefined ? false : _ref2$collapsed;
 
    if (priority <= _log.priority) {
      if (collapsed) {
        console.groupCollapsed('luma.gl: ' + arg);
      } else {
        console.group('luma.gl: ' + arg);
      }
    }
  },
  groupEnd: function groupEnd(priority, arg) {
    if (priority <= _log.priority) {
      console.groupEnd('luma.gl: ' + arg);
    }
  },
  time: function time(priority, label) {
    if (priority <= _log.priority) {
      // In case the platform doesn't have console.time
      if (console.time) {
        console.time(label);
      } else {
        console.info(label);
      }
    }
  },
  timeEnd: function timeEnd(priority, label) {
    if (priority <= _log.priority) {
      // In case the platform doesn't have console.timeEnd
      if (console.timeEnd) {
        console.timeEnd(label);
      } else {
        console.info(label);
      }
    }
  }
};
 
// Inspired by https://github.com/hughsk/console-image (MIT license)
function logImage(image, message, scale) {
  var width = image.width * scale;
  var height = image.height * scale;
  var imageUrl = image.src.replace(/\(/g, '%28').replace(/\)/g, '%29');
 
  console.log(message + ' %c+', ['font-size:1px;', 'padding:' + Math.floor(height / 2) + 'px ' + Math.floor(width / 2) + 'px;', 'line-height:' + height + 'px;', 'background:url(' + imageUrl + ');', 'background-size:' + width + 'px ' + height + 'px;', 'color:transparent;'].join(''));
}
 
function formatArrayValue(v, opts) {
  var _opts$maxElts = opts.maxElts,
      maxElts = _opts$maxElts === undefined ? 16 : _opts$maxElts,
      _opts$size = opts.size,
      size = _opts$size === undefined ? 1 : _opts$size;
 
  var string = '[';
  for (var i = 0; i < v.length && i < maxElts; ++i) {
    if (i > 0) {
      string += ',' + (i % size === 0 ? ' ' : '');
    }
    string += formatValue(v[i], opts);
  }
  var terminator = v.length > maxElts ? '...' : ']';
  return '' + string + terminator;
}
 
function formatValue(v) {
  var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
 
  var EPSILON = 1e-16;
  var _opts$isInteger = opts.isInteger,
      isInteger = _opts$isInteger === undefined ? false : _opts$isInteger;
 
  if (Array.isArray(v) || ArrayBuffer.isView(v)) {
    return formatArrayValue(v, opts);
  }
  if (!Number.isFinite(v)) {
    return String(v);
  }
  if (Math.abs(v) < EPSILON) {
    return isInteger ? '0' : '0.';
  }
  if (isInteger) {
    return v.toFixed(0);
  }
  if (Math.abs(v) > 100 && Math.abs(v) < 10000) {
    return v.toFixed(0);
  }
  var string = v.toPrecision(2);
  var decimal = string.indexOf('.0');
  return decimal === string.length - 2 ? string.slice(0, -1) : string;
}
 
/* harmony default export */ __webpack_exports__["a"] = (_log);
//# sourceMappingURL=log.js.map
 
/***/ }),
/* 264 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = getShaderName;
/* harmony export (immutable) */ __webpack_exports__["b"] = getShaderTypeName;
var GL_FRAGMENT_SHADER = 0x8B30;
var GL_VERTEX_SHADER = 0x8B31;
 
// Supports GLSLIFY style naming of shaders
// #define SHADER_NAME ...
function getShaderName(shader) {
  var SHADER_NAME_REGEXP = /#define[\s*]SHADER_NAME[\s*]([A-Za-z0-9_-]+)[\s*]/;
  var match = shader.match(SHADER_NAME_REGEXP);
  return match ? match[1] : 'unnamed';
}
 
function getShaderTypeName(type) {
  switch (type) {
    case GL_FRAGMENT_SHADER:
      return 'fragment';
    case GL_VERTEX_SHADER:
      return 'vertex';
    default:
      return 'unknown type';
  }
}
//# sourceMappingURL=get-shader-name.js.map
 
/***/ }),
/* 265 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = polyfillContext;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_assert__ = __webpack_require__(1);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_assert___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_assert__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__polyfill_get_parameter__ = __webpack_require__(666);
var _WEBGL_CONTEXT_POLYFI;
 
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
 
// WebGL1/WebGL2 extension polyfill support
//
// Provides a function that creates polyfills for WebGL2 functions based
// on available extensions and installs them on a supplied target (could be
// the WebGLContext or its prototype, or a separate object).
//
// This is intended to be a stand-alone file with minimal dependencies,
// easy to reuse or repurpose in other projects.
 
/* eslint-disable camelcase, brace-style */
 
 
 
var OES_vertex_array_object = 'OES_vertex_array_object';
var ANGLE_instanced_arrays = 'ANGLE_instanced_arrays';
var WEBGL_draw_buffers = 'WEBGL_draw_buffers';
var EXT_disjoint_timer_query = 'EXT_disjoint_timer_query';
var EXT_disjoint_timer_query_webgl2 = 'EXT_disjoint_timer_query_webgl2';
var EXT_texture_filter_anisotropic = 'EXT_texture_filter_anisotropic';
 
var ERR_VAO_NOT_SUPPORTED = 'VertexArray requires WebGL2 or OES_vertex_array_object extension';
 
// Return true if WebGL2 context
function isWebGL2(gl) {
  var GL_TEXTURE_BINDING_3D = 0x806A;
  return gl && gl.TEXTURE_BINDING_3D === GL_TEXTURE_BINDING_3D;
}
 
// Return object with webgl2 flag and an extension
function getExtensionData(gl, extension) {
  return {
    webgl2: isWebGL2(gl),
    ext: gl.getExtension(extension)
  };
}
 
// function mapExtensionConstant(gl, constant) {
//   switch (constant) {
//   case ext.FRAGMENT_SHADER_DERIVATIVE_HINT_OES: return GL.FRAGMENT_SHADER_DERIVATIVE_HINT;
//   }
// }
 
var WEBGL_CONTEXT_POLYFILLS = (_WEBGL_CONTEXT_POLYFI = {}, _defineProperty(_WEBGL_CONTEXT_POLYFI, OES_vertex_array_object, {
  meta: { suffix: 'OES' },
  // NEW METHODS
  createVertexArray: function createVertexArray() {
    __WEBPACK_IMPORTED_MODULE_0_assert___default()(false, ERR_VAO_NOT_SUPPORTED);
  },
  deleteVertexArray: function deleteVertexArray() {},
  bindVertexArray: function bindVertexArray() {},
  isVertexArray: function isVertexArray() {
    return false;
  }
}), _defineProperty(_WEBGL_CONTEXT_POLYFI, ANGLE_instanced_arrays, {
  meta: {
    suffix: 'ANGLE'
    // constants: {
    //   VERTEX_ATTRIB_ARRAY_DIVISOR: 'VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE'
    // }
  },
  vertexAttribDivisor: function vertexAttribDivisor(location, divisor) {
    // Accept divisor 0 even if instancing is not supported (0 = no instancing)
    __WEBPACK_IMPORTED_MODULE_0_assert___default()(divisor === 0, 'WebGL instanced rendering not supported');
  },
 
  drawElementsInstanced: function drawElementsInstanced() {},
  drawArraysInstanced: function drawArraysInstanced() {}
}), _defineProperty(_WEBGL_CONTEXT_POLYFI, WEBGL_draw_buffers, {
  meta: {
    suffix: 'WEBGL'
  },
  drawBuffers: function drawBuffers() {
    __WEBPACK_IMPORTED_MODULE_0_assert___default()(false);
  }
}), _defineProperty(_WEBGL_CONTEXT_POLYFI, EXT_disjoint_timer_query, {
  meta: { suffix: 'EXT' },
  // WebGL1: Polyfills the WebGL2 Query API
  createQuery: function createQuery() {
    __WEBPACK_IMPORTED_MODULE_0_assert___default()(false);
  },
  deleteQuery: function deleteQuery() {
    __WEBPACK_IMPORTED_MODULE_0_assert___default()(false);
  },
  beginQuery: function beginQuery() {
    __WEBPACK_IMPORTED_MODULE_0_assert___default()(false);
  },
  endQuery: function endQuery() {},
  getQuery: function getQuery(handle, pname) {
    return this.getQueryObject(handle, pname);
  },
 
  // The WebGL1 extension uses getQueryObject rather then getQueryParameter
  getQueryParameter: function getQueryParameter(handle, pname) {
    return this.getQueryObject(handle, pname);
  },
 
  // plus the additional `queryCounter` method
  queryCounter: function queryCounter() {},
  getQueryObject: function getQueryObject() {}
}), _defineProperty(_WEBGL_CONTEXT_POLYFI, EXT_disjoint_timer_query_webgl2, {
  meta: { suffix: 'EXT' },
  // install `queryCounter`
  // `null` avoids overwriting WebGL1 `queryCounter` if the WebGL2 extension is not available
  queryCounter: null
}), _defineProperty(_WEBGL_CONTEXT_POLYFI, 'OVERRIDES', {
  // Ensure readBuffer is a no-op
  readBuffer: function readBuffer(gl, originalFunc, attachment) {
    if (isWebGL2(gl)) {
      originalFunc(attachment);
    } else {
      // assert(attachment !== GL_COLOR_ATTACHMENT0 && attachment !== GL_FRONT);
    }
  },
  // Override for getVertexAttrib that returns sane values for non-WebGL1 constants
  getVertexAttrib: function getVertexAttrib(gl, originalFunc, location, pname) {
    // const gl = this; // eslint-disable-line
    var _getExtensionData = getExtensionData(gl, ANGLE_instanced_arrays),
        webgl2 = _getExtensionData.webgl2,
        ext = _getExtensionData.ext;
 
    var GL_VERTEX_ATTRIB_ARRAY_INTEGER = 0x88FD;
    var GL_VERTEX_ATTRIB_ARRAY_DIVISOR = 0x88FE;
 
    var result = void 0;
    switch (pname) {
      // WebGL1 attributes will never be integer
      case GL_VERTEX_ATTRIB_ARRAY_INTEGER:
        result = !webgl2 ? false : undefined;break;
      // if instancing is not available, return 0 meaning divisor has not been set
      case GL_VERTEX_ATTRIB_ARRAY_DIVISOR:
        result = !webgl2 && !ext ? 0 : undefined;break;
      default:
    }
 
    return result !== undefined ? result : originalFunc(location, pname);
  },
  // Handle transform feedback and uniform block queries in WebGL1
  getProgramParameter: function getProgramParameter(gl, originalFunc, program, pname) {
    var GL_TRANSFORM_FEEDBACK_BUFFER_MODE = 0x8C7F;
    var GL_TRANSFORM_FEEDBACK_VARYINGS = 0x8C83;
    var GL_ACTIVE_UNIFORM_BLOCKS = 0x8A36;
    var GL_SEPARATE_ATTRIBS = 0x8C8D;
 
    if (!isWebGL2(gl)) {
      switch (pname) {
        case GL_TRANSFORM_FEEDBACK_BUFFER_MODE:
          return GL_SEPARATE_ATTRIBS;
        case GL_TRANSFORM_FEEDBACK_VARYINGS:
          return 0;
        case GL_ACTIVE_UNIFORM_BLOCKS:
          return 0;
        default:
      }
    }
    return originalFunc(program, pname);
  },
  getInternalformatParameter: function getInternalformatParameter(gl, originalFunc, target, format, pname) {
    var GL_SAMPLES = 0x80A9;
    if (!isWebGL2(gl)) {
      switch (pname) {
        case GL_SAMPLES:
          return new Int32Array([0]);
        default:
      }
    }
    return gl.getInternalformatParameter(target, format, pname);
  },
  getTexParameter: function getTexParameter(gl, originalFunc, target, pname) {
    var GL_TEXTURE_MAX_ANISOTROPY_EXT = 0x84FE;
    switch (pname) {
      case GL_TEXTURE_MAX_ANISOTROPY_EXT:
        var extensions = gl.luma.extensions;
 
        var ext = extensions[EXT_texture_filter_anisotropic];
        pname = ext && ext.TEXTURE_MAX_ANISOTROPY_EXT || GL_TEXTURE_MAX_ANISOTROPY_EXT;
        break;
      default:
    }
    return originalFunc(target, pname);
  },
 
  getParameter: __WEBPACK_IMPORTED_MODULE_1__polyfill_get_parameter__["a" /* getParameterPolyfill */],
  hint: function hint(gl, originalFunc, pname, value) {
    // TODO - handle GL.FRAGMENT_SHADER_DERIVATIVE_HINT:
    // switch (pname) {
    // case GL.FRAGMENT_SHADER_DERIVATIVE_HINT:
    // }
    return originalFunc(pname, value);
  }
}), _WEBGL_CONTEXT_POLYFI);
 
function initializeExtensions(gl) {
  gl.luma.extensions = {};
  var EXTENSIONS = gl.getSupportedExtensions();
  var _iteratorNormalCompletion = true;
  var _didIteratorError = false;
  var _iteratorError = undefined;
 
  try {
    for (var _iterator = EXTENSIONS[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
      var extension = _step.value;
 
      gl.luma[extension] = gl.getExtension(extension);
    }
  } catch (err) {
    _didIteratorError = true;
    _iteratorError = err;
  } finally {
    try {
      if (!_iteratorNormalCompletion && _iterator.return) {
        _iterator.return();
      }
    } finally {
      if (_didIteratorError) {
        throw _iteratorError;
      }
    }
  }
}
 
// Polyfills a single WebGL extension into the `target` object
function polyfillExtension(gl, _ref) {
  var extension = _ref.extension,
      target = _ref.target,
      target2 = _ref.target2;
 
  var defaults = WEBGL_CONTEXT_POLYFILLS[extension];
  __WEBPACK_IMPORTED_MODULE_0_assert___default()(defaults);
 
  var _defaults$meta = defaults.meta,
      meta = _defaults$meta === undefined ? {} : _defaults$meta;
  var _meta$suffix = meta.suffix,
      suffix = _meta$suffix === undefined ? '' : _meta$suffix;
 
 
  var ext = gl.getExtension(extension);
 
  Object.keys(defaults).forEach(function (key) {
    var extKey = '' + key + suffix;
 
    var polyfill = null;
    if (key === 'meta') {
      // ignore
    } else if (typeof gl[key] === 'function') {
      // WebGL2 implementation is already
    } else if (ext && typeof ext[extKey] === 'function') {
      // pick extension implemenentation,if available
      polyfill = function polyfill() {
        return ext[extKey].apply(ext, arguments);
      };
    } else if (typeof defaults[key] === 'function') {
      // pick the mock implementation, if no implementation was detected
      polyfill = defaults[key].bind(target);
    }
 
    if (polyfill) {
      target[key] = polyfill;
      target2[key] = polyfill;
    }
  });
}
 
// Install simple overrides (mostly get* functions)
function installOverrides(gl, _ref2) {
  var target = _ref2.target,
      target2 = _ref2.target2;
  var OVERRIDES = WEBGL_CONTEXT_POLYFILLS.OVERRIDES;
 
  Object.keys(OVERRIDES).forEach(function (key) {
    if (typeof OVERRIDES[key] === 'function') {
      // install an override, if no implementation was detected
      var originalFunc = gl[key] ? gl[key].bind(gl) : function () {};
      var polyfill = OVERRIDES[key].bind(null, gl, originalFunc);
      target[key] = polyfill;
      target2[key] = polyfill;
    }
  });
}
 
// Registers polyfill or mock functions for all known extensions
function polyfillContext(gl) {
  gl.luma = gl.luma || {};
  initializeExtensions(gl);
  if (!gl.luma.polyfilled) {
    for (var extension in WEBGL_CONTEXT_POLYFILLS) {
      if (extension !== 'overrides') {
        polyfillExtension(gl, { extension: extension, target: gl.luma, target2: gl });
      }
    }
    installOverrides(gl, { target: gl.luma, target2: gl });
    gl.luma.polyfilled = true;
  }
  return gl;
}
//# sourceMappingURL=polyfill-context.js.map
 
/***/ }),
/* 266 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return GL_PARAMETER_DEFAULTS; });
/* unused harmony export GL_PARAMETER_SETTERS */
/* unused harmony export GL_PARAMETER_GETTERS */
/* harmony export (immutable) */ __webpack_exports__["e"] = setParameter;
/* harmony export (immutable) */ __webpack_exports__["c"] = setParameters;
/* harmony export (immutable) */ __webpack_exports__["d"] = getParameter;
/* harmony export (immutable) */ __webpack_exports__["a"] = getParameters;
/* unused harmony export getDefaultParameters */
/* harmony export (immutable) */ __webpack_exports__["f"] = resetParameters;
/* harmony export (immutable) */ __webpack_exports__["g"] = getModifiedParameters;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__constants__ = __webpack_require__(46);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__webgl_context__ = __webpack_require__(7);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_assert__ = __webpack_require__(1);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_assert___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_assert__);
var _GL_PARAMETER_DEFAULT, _GL_PARAMETER_SETTERS, _GL_PARAMETER_GETTERS;
 
function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
 
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
 
// Provides a unified API for getting and setting any WebGL parameter
// Also knows default values of all parameters, enabling fast cache initialization
// Provides base functionality for the state caching.
 
 
 
 
// DEFAULT SETTINGS - FOR FAST CACHE INITIALIZATION AND CONTEXT RESETS
 
var GL_PARAMETER_DEFAULTS = (_GL_PARAMETER_DEFAULT = {}, _defineProperty(_GL_PARAMETER_DEFAULT, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].BLEND, false), _defineProperty(_GL_PARAMETER_DEFAULT, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].BLEND_COLOR, new Float32Array([0, 0, 0, 0])), _defineProperty(_GL_PARAMETER_DEFAULT, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].BLEND_EQUATION_RGB, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].FUNC_ADD), _defineProperty(_GL_PARAMETER_DEFAULT, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].BLEND_EQUATION_ALPHA, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].FUNC_ADD), _defineProperty(_GL_PARAMETER_DEFAULT, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].BLEND_SRC_RGB, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].ONE), _defineProperty(_GL_PARAMETER_DEFAULT, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].BLEND_DST_RGB, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].ZERO), _defineProperty(_GL_PARAMETER_DEFAULT, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].BLEND_SRC_ALPHA, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].ONE), _defineProperty(_GL_PARAMETER_DEFAULT, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].BLEND_DST_ALPHA, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].ZERO), _defineProperty(_GL_PARAMETER_DEFAULT, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].COLOR_CLEAR_VALUE, new Float32Array([0, 0, 0, 0])), _defineProperty(_GL_PARAMETER_DEFAULT, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].COLOR_WRITEMASK, [true, true, true, true]), _defineProperty(_GL_PARAMETER_DEFAULT, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].CULL_FACE, false), _defineProperty(_GL_PARAMETER_DEFAULT, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].CULL_FACE_MODE, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].BACK), _defineProperty(_GL_PARAMETER_DEFAULT, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].DEPTH_TEST, false), _defineProperty(_GL_PARAMETER_DEFAULT, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].DEPTH_CLEAR_VALUE, 1), _defineProperty(_GL_PARAMETER_DEFAULT, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].DEPTH_FUNC, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].LESS), _defineProperty(_GL_PARAMETER_DEFAULT, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].DEPTH_RANGE, new Float32Array([0, 1])), _defineProperty(_GL_PARAMETER_DEFAULT, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].DEPTH_WRITEMASK, true), _defineProperty(_GL_PARAMETER_DEFAULT, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].DITHER, true), _defineProperty(_GL_PARAMETER_DEFAULT, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].FRAMEBUFFER_BINDING, null), _defineProperty(_GL_PARAMETER_DEFAULT, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].FRONT_FACE, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].CCW), _defineProperty(_GL_PARAMETER_DEFAULT, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].GENERATE_MIPMAP_HINT, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].DONT_CARE), _defineProperty(_GL_PARAMETER_DEFAULT, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].LINE_WIDTH, 1), _defineProperty(_GL_PARAMETER_DEFAULT, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].POLYGON_OFFSET_FILL, false), _defineProperty(_GL_PARAMETER_DEFAULT, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].POLYGON_OFFSET_FACTOR, 0), _defineProperty(_GL_PARAMETER_DEFAULT, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].POLYGON_OFFSET_UNITS, 0), _defineProperty(_GL_PARAMETER_DEFAULT, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].SAMPLE_COVERAGE_VALUE, 1.0), _defineProperty(_GL_PARAMETER_DEFAULT, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].SAMPLE_COVERAGE_INVERT, false), _defineProperty(_GL_PARAMETER_DEFAULT, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].SCISSOR_TEST, false), _defineProperty(_GL_PARAMETER_DEFAULT, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].SCISSOR_BOX, new Int32Array([0, 0, 1024, 1024])), _defineProperty(_GL_PARAMETER_DEFAULT, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].STENCIL_TEST, false), _defineProperty(_GL_PARAMETER_DEFAULT, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].STENCIL_CLEAR_VALUE, 0), _defineProperty(_GL_PARAMETER_DEFAULT, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].STENCIL_WRITEMASK, 0xFFFFFFFF), _defineProperty(_GL_PARAMETER_DEFAULT, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].STENCIL_BACK_WRITEMASK, 0xFFFFFFFF), _defineProperty(_GL_PARAMETER_DEFAULT, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].STENCIL_FUNC, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].ALWAYS), _defineProperty(_GL_PARAMETER_DEFAULT, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].STENCIL_REF, 0), _defineProperty(_GL_PARAMETER_DEFAULT, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].STENCIL_VALUE_MASK, 0xFFFFFFFF), _defineProperty(_GL_PARAMETER_DEFAULT, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].STENCIL_BACK_FUNC, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].ALWAYS), _defineProperty(_GL_PARAMETER_DEFAULT, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].STENCIL_BACK_REF, 0), _defineProperty(_GL_PARAMETER_DEFAULT, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].STENCIL_BACK_VALUE_MASK, 0xFFFFFFFF), _defineProperty(_GL_PARAMETER_DEFAULT, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].STENCIL_FAIL, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].KEEP), _defineProperty(_GL_PARAMETER_DEFAULT, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].STENCIL_PASS_DEPTH_FAIL, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].KEEP), _defineProperty(_GL_PARAMETER_DEFAULT, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].STENCIL_PASS_DEPTH_PASS, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].KEEP), _defineProperty(_GL_PARAMETER_DEFAULT, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].STENCIL_BACK_FAIL, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].KEEP), _defineProperty(_GL_PARAMETER_DEFAULT, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].STENCIL_BACK_PASS_DEPTH_FAIL, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].KEEP), _defineProperty(_GL_PARAMETER_DEFAULT, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].STENCIL_BACK_PASS_DEPTH_PASS, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].KEEP), _defineProperty(_GL_PARAMETER_DEFAULT, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].VIEWPORT, new Int32Array([0, 0, 1024, 1024])), _defineProperty(_GL_PARAMETER_DEFAULT, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].PACK_ALIGNMENT, 4), _defineProperty(_GL_PARAMETER_DEFAULT, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].UNPACK_ALIGNMENT, 4), _defineProperty(_GL_PARAMETER_DEFAULT, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].UNPACK_FLIP_Y_WEBGL, false), _defineProperty(_GL_PARAMETER_DEFAULT, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].UNPACK_PREMULTIPLY_ALPHA_WEBGL, false), _defineProperty(_GL_PARAMETER_DEFAULT, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].UNPACK_COLORSPACE_CONVERSION_WEBGL, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].BROWSER_DEFAULT_WEBGL), _defineProperty(_GL_PARAMETER_DEFAULT, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].FRAGMENT_SHADER_DERIVATIVE_HINT, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].DONT_CARE), _defineProperty(_GL_PARAMETER_DEFAULT, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].READ_FRAMEBUFFER_BINDING, null), _defineProperty(_GL_PARAMETER_DEFAULT, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].RASTERIZER_DISCARD, false), _defineProperty(_GL_PARAMETER_DEFAULT, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].PACK_ROW_LENGTH, 0), _defineProperty(_GL_PARAMETER_DEFAULT, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].PACK_SKIP_PIXELS, 0), _defineProperty(_GL_PARAMETER_DEFAULT, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].PACK_SKIP_ROWS, 0), _defineProperty(_GL_PARAMETER_DEFAULT, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].UNPACK_ROW_LENGTH, 0), _defineProperty(_GL_PARAMETER_DEFAULT, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].UNPACK_IMAGE_HEIGHT, 0), _defineProperty(_GL_PARAMETER_DEFAULT, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].UNPACK_SKIP_PIXELS, 0), _defineProperty(_GL_PARAMETER_DEFAULT, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].UNPACK_SKIP_ROWS, 0), _defineProperty(_GL_PARAMETER_DEFAULT, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].UNPACK_SKIP_IMAGES, 0), _GL_PARAMETER_DEFAULT);
 
// SETTER TABLES - ENABLES SETTING ANY PARAMETER WITH A COMMON API
 
var enable = function enable(gl, value, key) {
  return value ? gl.enable(key) : gl.disable(key);
};
var hint = function hint(gl, value, key) {
  return gl.hint(key, value);
};
var pixelStorei = function pixelStorei(gl, value, key) {
  return gl.pixelStorei(key, value);
};
 
var drawFramebuffer = function drawFramebuffer(gl, value) {
  var target = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__webgl_context__["b" /* isWebGL2 */])(gl) ? __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].DRAW_FRAMEBUFFER : __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].FRAMEBUFFER;
  return gl.bindFramebuffer(target, value);
};
var readFramebuffer = function readFramebuffer(gl, value) {
  return gl.bindFramebuffer(__WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].READ_FRAMEBUFFER, value);
};
 
// Map from WebGL parameter names to corresponding WebGL setter functions
// WegGL constants are read by parameter names, but set by function names
// NOTE: When value type is a string, it will be handled by 'COMPOSITE_GL_PARAMETER_SETTERS'
var GL_PARAMETER_SETTERS = (_GL_PARAMETER_SETTERS = {}, _defineProperty(_GL_PARAMETER_SETTERS, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].BLEND, enable), _defineProperty(_GL_PARAMETER_SETTERS, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].BLEND_COLOR, function (gl, value) {
  return gl.blendColor.apply(gl, _toConsumableArray(value));
}), _defineProperty(_GL_PARAMETER_SETTERS, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].BLEND_EQUATION_RGB, 'blendEquation'), _defineProperty(_GL_PARAMETER_SETTERS, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].BLEND_EQUATION_ALPHA, 'blendEquation'), _defineProperty(_GL_PARAMETER_SETTERS, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].BLEND_SRC_RGB, 'blendFunc'), _defineProperty(_GL_PARAMETER_SETTERS, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].BLEND_DST_RGB, 'blendFunc'), _defineProperty(_GL_PARAMETER_SETTERS, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].BLEND_SRC_ALPHA, 'blendFunc'), _defineProperty(_GL_PARAMETER_SETTERS, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].BLEND_DST_ALPHA, 'blendFunc'), _defineProperty(_GL_PARAMETER_SETTERS, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].COLOR_CLEAR_VALUE, function (gl, value) {
  return gl.clearColor.apply(gl, _toConsumableArray(value));
}), _defineProperty(_GL_PARAMETER_SETTERS, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].COLOR_WRITEMASK, function (gl, value) {
  return gl.colorMask.apply(gl, _toConsumableArray(value));
}), _defineProperty(_GL_PARAMETER_SETTERS, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].CULL_FACE, enable), _defineProperty(_GL_PARAMETER_SETTERS, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].CULL_FACE_MODE, function (gl, value) {
  return gl.cullFace(value);
}), _defineProperty(_GL_PARAMETER_SETTERS, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].DEPTH_TEST, enable), _defineProperty(_GL_PARAMETER_SETTERS, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].DEPTH_CLEAR_VALUE, function (gl, value) {
  return gl.clearDepth(value);
}), _defineProperty(_GL_PARAMETER_SETTERS, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].DEPTH_FUNC, function (gl, value) {
  return gl.depthFunc(value);
}), _defineProperty(_GL_PARAMETER_SETTERS, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].DEPTH_RANGE, function (gl, value) {
  return gl.depthRange.apply(gl, _toConsumableArray(value));
}), _defineProperty(_GL_PARAMETER_SETTERS, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].DEPTH_WRITEMASK, function (gl, value) {
  return gl.depthMask(value);
}), _defineProperty(_GL_PARAMETER_SETTERS, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].DITHER, enable), _defineProperty(_GL_PARAMETER_SETTERS, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].FRAGMENT_SHADER_DERIVATIVE_HINT, hint), _defineProperty(_GL_PARAMETER_SETTERS, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].FRAMEBUFFER_BINDING, drawFramebuffer), _defineProperty(_GL_PARAMETER_SETTERS, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].FRONT_FACE, function (gl, value) {
  return gl.frontFace(value);
}), _defineProperty(_GL_PARAMETER_SETTERS, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].GENERATE_MIPMAP_HINT, hint), _defineProperty(_GL_PARAMETER_SETTERS, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].LINE_WIDTH, function (gl, value) {
  return gl.lineWidth(value);
}), _defineProperty(_GL_PARAMETER_SETTERS, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].POLYGON_OFFSET_FILL, enable), _defineProperty(_GL_PARAMETER_SETTERS, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].POLYGON_OFFSET_FACTOR, 'polygonOffset'), _defineProperty(_GL_PARAMETER_SETTERS, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].POLYGON_OFFSET_UNITS, 'polygonOffset'), _defineProperty(_GL_PARAMETER_SETTERS, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].RASTERIZER_DISCARD, enable), _defineProperty(_GL_PARAMETER_SETTERS, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].SAMPLE_COVERAGE_VALUE, 'sampleCoverage'), _defineProperty(_GL_PARAMETER_SETTERS, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].SAMPLE_COVERAGE_INVERT, 'sampleCoverage'), _defineProperty(_GL_PARAMETER_SETTERS, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].SCISSOR_TEST, enable), _defineProperty(_GL_PARAMETER_SETTERS, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].SCISSOR_BOX, function (gl, value) {
  return gl.scissor.apply(gl, _toConsumableArray(value));
}), _defineProperty(_GL_PARAMETER_SETTERS, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].STENCIL_TEST, enable), _defineProperty(_GL_PARAMETER_SETTERS, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].STENCIL_CLEAR_VALUE, function (gl, value) {
  return gl.clearStencil(value);
}), _defineProperty(_GL_PARAMETER_SETTERS, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].STENCIL_WRITEMASK, function (gl, value) {
  return gl.stencilMaskSeparate(__WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].FRONT, value);
}), _defineProperty(_GL_PARAMETER_SETTERS, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].STENCIL_BACK_WRITEMASK, function (gl, value) {
  return gl.stencilMaskSeparate(__WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].BACK, value);
}), _defineProperty(_GL_PARAMETER_SETTERS, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].STENCIL_FUNC, 'stencilFuncFront'), _defineProperty(_GL_PARAMETER_SETTERS, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].STENCIL_REF, 'stencilFuncFront'), _defineProperty(_GL_PARAMETER_SETTERS, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].STENCIL_VALUE_MASK, 'stencilFuncFront'), _defineProperty(_GL_PARAMETER_SETTERS, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].STENCIL_BACK_FUNC, 'stencilFuncBack'), _defineProperty(_GL_PARAMETER_SETTERS, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].STENCIL_BACK_REF, 'stencilFuncBack'), _defineProperty(_GL_PARAMETER_SETTERS, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].STENCIL_BACK_VALUE_MASK, 'stencilFuncBack'), _defineProperty(_GL_PARAMETER_SETTERS, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].STENCIL_FAIL, 'stencilOpFront'), _defineProperty(_GL_PARAMETER_SETTERS, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].STENCIL_PASS_DEPTH_FAIL, 'stencilOpFront'), _defineProperty(_GL_PARAMETER_SETTERS, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].STENCIL_PASS_DEPTH_PASS, 'stencilOpFront'), _defineProperty(_GL_PARAMETER_SETTERS, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].STENCIL_BACK_FAIL, 'stencilOpBack'), _defineProperty(_GL_PARAMETER_SETTERS, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].STENCIL_BACK_PASS_DEPTH_FAIL, 'stencilOpBack'), _defineProperty(_GL_PARAMETER_SETTERS, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].STENCIL_BACK_PASS_DEPTH_PASS, 'stencilOpBack'), _defineProperty(_GL_PARAMETER_SETTERS, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].VIEWPORT, function (gl, value) {
  return gl.viewport.apply(gl, _toConsumableArray(value));
}), _defineProperty(_GL_PARAMETER_SETTERS, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].PACK_ALIGNMENT, pixelStorei), _defineProperty(_GL_PARAMETER_SETTERS, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].UNPACK_ALIGNMENT, pixelStorei), _defineProperty(_GL_PARAMETER_SETTERS, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].UNPACK_FLIP_Y_WEBGL, pixelStorei), _defineProperty(_GL_PARAMETER_SETTERS, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].UNPACK_PREMULTIPLY_ALPHA_WEBGL, pixelStorei), _defineProperty(_GL_PARAMETER_SETTERS, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].UNPACK_COLORSPACE_CONVERSION_WEBGL, pixelStorei), _defineProperty(_GL_PARAMETER_SETTERS, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].PACK_ROW_LENGTH, pixelStorei), _defineProperty(_GL_PARAMETER_SETTERS, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].PACK_SKIP_PIXELS, pixelStorei), _defineProperty(_GL_PARAMETER_SETTERS, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].PACK_SKIP_ROWS, pixelStorei), _defineProperty(_GL_PARAMETER_SETTERS, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].READ_FRAMEBUFFER_BINDING, readFramebuffer), _defineProperty(_GL_PARAMETER_SETTERS, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].UNPACK_ROW_LENGTH, pixelStorei), _defineProperty(_GL_PARAMETER_SETTERS, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].UNPACK_IMAGE_HEIGHT, pixelStorei), _defineProperty(_GL_PARAMETER_SETTERS, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].UNPACK_SKIP_PIXELS, pixelStorei), _defineProperty(_GL_PARAMETER_SETTERS, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].UNPACK_SKIP_ROWS, pixelStorei), _defineProperty(_GL_PARAMETER_SETTERS, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].UNPACK_SKIP_IMAGES, pixelStorei), _GL_PARAMETER_SETTERS);
 
// COMPOSITE_WEBGL_PARAMETER_
var COMPOSITE_GL_PARAMETER_SETTERS = {
  blendEquation: function blendEquation(gl, values) {
    return gl.blendEquationSeparate(values[__WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].BLEND_EQUATION_RGB], values[__WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].BLEND_EQUATION_ALPHA]);
  },
  blendFunc: function blendFunc(gl, values) {
    return gl.blendFuncSeparate(values[__WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].BLEND_SRC_RGB], values[__WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].BLEND_DST_RGB], values[__WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].BLEND_SRC_ALPHA], values[__WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].BLEND_DST_ALPHA]);
  },
  polygonOffset: function polygonOffset(gl, values) {
    return gl.polygonOffset(values[__WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].POLYGON_OFFSET_FACTOR], values[__WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].POLYGON_OFFSET_UNITS]);
  },
  sampleCoverage: function sampleCoverage(gl, values) {
    return gl.sampleCoverage(values[__WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].SAMPLE_COVERAGE_VALUE], values[__WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].SAMPLE_COVERAGE_INVERT]);
  },
  stencilFuncFront: function stencilFuncFront(gl, values) {
    return gl.stencilFuncSeparate(__WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].FRONT, values[__WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].STENCIL_FUNC], values[__WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].STENCIL_REF], values[__WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].STENCIL_VALUE_MASK]);
  },
  stencilFuncBack: function stencilFuncBack(gl, values) {
    return gl.stencilFuncSeparate(__WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].BACK, values[__WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].STENCIL_BACK_FUNC], values[__WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].STENCIL_BACK_REF], values[__WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].STENCIL_BACK_VALUE_MASK]);
  },
  stencilOpFront: function stencilOpFront(gl, values) {
    return gl.stencilOpSeparate(__WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].FRONT, values[__WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].STENCIL_FAIL], values[__WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].STENCIL_PASS_DEPTH_FAIL], values[__WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].STENCIL_PASS_DEPTH_PASS]);
  },
  stencilOpBack: function stencilOpBack(gl, values) {
    return gl.stencilOpSeparate(__WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].BACK, values[__WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].STENCIL_BACK_FAIL], values[__WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].STENCIL_BACK_PASS_DEPTH_FAIL], values[__WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].STENCIL_BACK_PASS_DEPTH_PASS]);
  }
};
 
// GETTER TABLE - FOR READING OUT AN ENTIRE CONTEXT
 
var isEnabled = function isEnabled(gl, key) {
  return gl.isEnabled(key);
};
 
// Exceptions for any keys that cannot be queried by gl.getParameters
var GL_PARAMETER_GETTERS = (_GL_PARAMETER_GETTERS = {}, _defineProperty(_GL_PARAMETER_GETTERS, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].BLEND, isEnabled), _defineProperty(_GL_PARAMETER_GETTERS, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].CULL_FACE, isEnabled), _defineProperty(_GL_PARAMETER_GETTERS, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].DEPTH_TEST, isEnabled), _defineProperty(_GL_PARAMETER_GETTERS, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].DITHER, isEnabled), _defineProperty(_GL_PARAMETER_GETTERS, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].POLYGON_OFFSET_FILL, isEnabled), _defineProperty(_GL_PARAMETER_GETTERS, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].SAMPLE_ALPHA_TO_COVERAGE, isEnabled), _defineProperty(_GL_PARAMETER_GETTERS, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].SAMPLE_COVERAGE, isEnabled), _defineProperty(_GL_PARAMETER_GETTERS, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].SCISSOR_TEST, isEnabled), _defineProperty(_GL_PARAMETER_GETTERS, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].STENCIL_TEST, isEnabled), _defineProperty(_GL_PARAMETER_GETTERS, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].RASTERIZER_DISCARD, isEnabled), _GL_PARAMETER_GETTERS);
 
// HELPER METHODS
 
var deepArrayEqual = function deepArrayEqual(x, y) {
  if (x === y) {
    return true;
  }
  var isArrayX = Array.isArray(x) || ArrayBuffer.isView(x);
  var isArrayY = Array.isArray(y) || ArrayBuffer.isView(y);
  if (isArrayX && isArrayY && x.length === y.length) {
    for (var i = 0; i < x.length; ++i) {
      if (x[i] !== y[i]) {
        return false;
      }
    }
    return true;
  }
  return false;
};
 
// PUBLIC METHODS
 
// Sets any single GL parameter regardless of function (gl.getParameter/gl.isEnabled...)
// Returns the previous value
// Note: limited to parameter values
function setParameter(gl, key, value) {
  var getter = GL_PARAMETER_GETTERS[key];
  var prevValue = getter ? getter(gl, Number(key)) : gl.getParameter(Number(key));
  var setter = GL_PARAMETER_SETTERS[key];
  __WEBPACK_IMPORTED_MODULE_2_assert___default()(typeof setter === 'function');
  setter(gl, value, Number(key));
  return prevValue;
}
 
// Sets any GL parameter regardless of function (gl.blendMode, ...)
// Note: requires a `cache` object to be set on the context (gl.state.cache)
// This object is used to fill in any missing values for composite setter functions
function setParameters(gl, values) {
  var compositeSetters = {};
 
  // HANDLE PRIMITIVE SETTERS (and make note of any composite setters)
 
  for (var key in values) {
    var setter = GL_PARAMETER_SETTERS[key];
    if (setter) {
      // Composite setters should only be called once, so save them
      if (typeof setter === 'string') {
        compositeSetters[setter] = true;
        // only call setter if value has changed
        // TODO - deep equal on values?
      } else {
        // Note - the setter will automatically update this.state
        setter(gl, values[key], Number(key));
      }
    }
  }
 
  // HANDLE COMPOSITE SETTERS
 
  // NOTE: any non-provided values needed by composite setters are filled in from state cache
  // The cache parameter is automatically retrieved from the context
  // This depends on `trackContextState`, which is technically a "circular" dependency.
  // But it is too inconvenient to always require a cache parameter here.
  // This is the ONLY external dependency in this module/
  var cache = gl.state && gl.state.cache;
  if (cache) {
    var mergedValues = Object.assign({}, cache, values);
 
    for (var _key in compositeSetters) {
      // TODO - avoid calling composite setters if values have not changed.
      var compositeSetter = COMPOSITE_GL_PARAMETER_SETTERS[_key];
      // Note - if `trackContextState` has been called,
      // the setter will automatically update this.state.cache
      compositeSetter(gl, mergedValues);
    }
  }
  // Add a log for the else case?
}
 
// Queries any single GL parameter regardless of function (gl.getParameter/gl.isEnabled...)
function getParameter(gl, key) {
  var getter = GL_PARAMETER_GETTERS[key];
  return getter ? getter(gl, Number(key)) : gl.getParameter(Number(key));
}
 
// Copies the state from a context (gl.getParameter should not be overriden)
// Reads the entire WebGL state from a context
// Caveat: This generates a huge amount of synchronous driver roundtrips and should be
// considered a very slow operation, to be used only if/when a context already manipulated
// by external code needs to be synchronized for the first time
// @return {Object} - a newly created map, with values keyed by GL parameters
function getParameters(gl, parameters) {
  // default to querying all parameters
  parameters = parameters || GL_PARAMETER_DEFAULTS;
  // support both arrays of parameters and objects (keys represent parameters)
  var parameterKeys = Array.isArray(parameters) ? parameters : Object.keys(parameters);
 
  var state = {};
  var _iteratorNormalCompletion = true;
  var _didIteratorError = false;
  var _iteratorError = undefined;
 
  try {
    for (var _iterator = parameterKeys[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
      var key = _step.value;
 
      state[key] = getParameter(gl, key);
    }
  } catch (err) {
    _didIteratorError = true;
    _iteratorError = err;
  } finally {
    try {
      if (!_iteratorNormalCompletion && _iterator.return) {
        _iterator.return();
      }
    } finally {
      if (_didIteratorError) {
        throw _iteratorError;
      }
    }
  }
 
  return state;
}
 
function getDefaultParameters(gl) {
  // TODO - Query GL.VIEWPORT and GL.SCISSOR_BOX since these are dynamic
  return Object.assign({}, GL_PARAMETER_DEFAULTS, {
    // TODO: For viewport and scissor default values are set at the time of
    // context creation based on canvas size, we can query them here but it will
    // not match with what we have in GL_PARAMETER_DEFAULTS table, we should revisit.
    // [GL.VIEWPORT]: gl.constructor.prototype.getParameter.call(gl, GL.VIEWPORT),
    // [GL.SCISSOR_BOX]: gl.constructor.prototype.getParameter.call(gl, GL.SCISSOR_BOX)
  });
}
 
// Reset all parameters to a pure context state
function resetParameters(gl) {
  setParameters(gl, getDefaultParameters(gl));
}
 
// Get all parameters that have been modified from a pure context state
function getModifiedParameters(gl) {
  var values = getParameters(GL_PARAMETER_DEFAULTS);
  var modified = {};
  for (var key in GL_PARAMETER_DEFAULTS) {
    if (!deepArrayEqual(values[key], GL_PARAMETER_DEFAULTS[key])) {
      modified[key] = values[key];
    }
  }
  return modified;
}
//# sourceMappingURL=set-parameters.js.map
 
/***/ }),
/* 267 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* unused harmony export GLenum */
/* unused harmony export GLfloat */
/* unused harmony export GLint */
/* unused harmony export GLuint */
/* unused harmony export GLboolean */
/* harmony export (immutable) */ __webpack_exports__["a"] = installParameterDefinitions;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__webgl_utils_constants__ = __webpack_require__(46);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__buffer__ = __webpack_require__(67);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__fence_sync__ = __webpack_require__(271);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__framebuffer__ = __webpack_require__(69);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__program__ = __webpack_require__(109);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__renderbuffer__ = __webpack_require__(110);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__sampler__ = __webpack_require__(274);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__texture__ = __webpack_require__(62);
var _BUFFER_PARAMETERS, _FRAMEBUFFER_STATUS, _PROGRAM_PARAMETERS, _RENDERBUFFER_PARAMET, _SAMPLER_PARAMETERS, _TEXTURE_PARAMETERS;
 
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
 
// Parameter support.
// Installs definitions that enable querying an object for all its parameters
// with resource.getParameters(). This is mainly useful during debugging.
// Note: Kept separate to avoid bundling in production applications
 
 
 
// TODO - separate install parameter definitions function from api metadata
 
 
 
 
 
 
// import Shader from './shader';
 
 
// WebGL specification 'types'
var GLenum = 'GLenum';
var GLfloat = 'GLfloat';
var GLint = 'GLint';
var GLuint = 'GLint';
var GLboolean = 'GLboolean';
 
/*
 TODO - will most likely remove some of these fields from the main struct
 but they can be useful for debugging/seer integration, so keep them here for now
export const DBG_PARAMETERS = {
  blend: {
    type: GLboolean,
    params: GL.BLEND,
    value: false,
    setter: (gl, value) => value ? gl.enable(GL.BLEND) : gl.disable(GL.BLEND)
  },
 
  blendColor: {
    type: new Float32Array(4),
    value: new Float32Array([0, 0, 0, 0]),
    params: GL.BLEND_COLOR,
    setter: (gl, value) => gl.blendColor(...value)
  },
 
  blendEquation: {
    type: [GLenum, GLenum],
    object: ['rgb', 'alpha'],
    alias: 'blendEquationSeparate',
    value: [GL.FUNC_ADD, GL.FUNC_ADD],
    params: [GL.BLEND_EQUATION_RGB, GL.BLEND_EQUATION_ALPHA],
    setter: (gl, value) => gl.blendEquationSeparate(...value),
    normalizeArgs: args => isArray(args) ? args : [args, args]
  },
 
  // blend func
  blendFunc: {
    type: [GLenum, GLenum, GLenum, GLenum],
    object: ['srcRgb', 'dstRgb', 'srcAlpha', 'dstAlpha'],
    value: [GL.ONE, GL.ZERO, GL.ONE, GL.ZERO],
    params: [GL.BLEND_SRC_RGB, GL.BLEND_DST_RGB, GL.BLEND_SRC_ALPHA, GL.BLEND_DST_ALPHA],
    setter: (gl, value) => gl.blendFuncSeparate(...value),
    normalizeArgs: args => isArray(args) && args.length === 3 ? [...args, ...args] : args
  },
 
  clearColor: {
    type: new Float32Array(4),
    params: GL.COLOR_CLEAR_VALUE,
    value: new Float32Array([0, 0, 0, 0]), // TBD
    setter: (gl, value) => gl.clearColor(...value)
  },
 
  colorMask: {
    type: [GLboolean, GLboolean, GLboolean, GLboolean],
    params: GL.COLOR_WRITEMASK,
    value: [true, true, true, true],
    setter: (gl, value) => gl.colorMask(...value)
  },
 
  // TODO - We have a name clash here
  cullFace: {
    type: GLboolean,
    params: GL.CULL_FACE,
    value: false,
    setter: (gl, value) => value ? gl.enable(GL.CULL_FACE) : gl.disable(GL.CULL_FACE)
  },
 
  cullFaceMode: {
    type: GLenum,
    params: GL.CULL_FACE_MODE,
    value: GL.BACK,
    setter: (gl, value) => gl.cullFace(value)
  },
 
  depthTest: {
    type: GLboolean,
    params: GL.DEPTH_TEST,
    value: false,
    setter: (gl, value) => value ? gl.enable(GL.DEPTH_TEST) : gl.disable(GL.DEPTH_TEST)
  },
 
  depthClearValue: {
    type: GLfloat,
    params: GL.DEPTH_CLEAR_VALUE,
    value: 1,
    setter: (gl, value) => gl.clearDepth(value)
  },
 
  depthFunc: {
    type: GLenum,
    params: GL.DEPTH_FUNC,
    value: GL.LESS,
    setter: (gl, value) => gl.depthFunc(value)
  },
 
  depthRange: {
    type: new Float32Array(2),
    object: ['min', 'max'],
    params: GL.DEPTH_RANGE,
    value: new Float32Array([0, 1]), // TBD
    setter: (gl, value) => gl.depthRange(...value)
  },
 
  depthWritemask: {
    type: GLboolean,
    params: GL.DEPTH_WRITEMASK,
    value: true,
    setter: (gl, value) => gl.depthMask(value)
  },
 
  dither: {
    type: GLboolean,
    params: GL.DITHER,
    value: true,
    setter: (gl, value) => value ? gl.enable(GL.DITHER) : gl.disable(GL.DITHER)
  },
 
  fragmentShaderDerivativeHint: {
    type: GLenum,
    params: GL.FRAGMENT_SHADER_DERIVATIVE_HINT,
    value: GL.DONT_CARE,
    setter: (gl, value) => gl.hint(GL.FRAGMENT_SHADER_DERIVATIVE_HINT, value),
    gl1: 'OES_standard_derivatives'
  },
 
  frontFace: {
    type: GLenum,
    params: GL.FRONT_FACE,
    value: GL.CCW,
    setter: (gl, value) => gl.frontFace(value)
  },
 
  // Hint for quality of images generated with glGenerateMipmap
  generateMipmapHint: {
    type: GLenum,
    params: GL.GENERATE_MIPMAP_HINT,
    value: GL.DONT_CARE,
    setter: (gl, value) => gl.hint(GL.GENERATE_MIPMAP_HINT, value)
  },
 
  lineWidth: {
    type: GLfloat,
    params: GL.LINE_WIDTH,
    value: 1,
    setter: (gl, value) => gl.lineWidth(value)
  },
 
  polygonOffsetFill: {
    type: GLboolean,
    params: GL.POLYGON_OFFSET_FILL,
    value: false,
    setter: (gl, value) =>
      value ? gl.enable(GL.POLYGON_OFFSET_FILL) : gl.disable(GL.POLYGON_OFFSET_FILL)
  },
 
  // Add small offset to fragment depth values (by factor × DZ + r × units)
  // Useful for rendering hidden-line images, for applying decals to surfaces,
  // and for rendering solids with highlighted edges.
  // https://www.khronos.org/opengles/sdk/docs/man/xhtml/glPolygonOffset.xml
  polygonOffset: {
    type: [GLfloat, GLfloat],
    object: ['factor', 'units'],
    params: [GL.POLYGON_OFFSET_FACTOR, GL.POLYGON_OFFSET_UNITS],
    value: [0, 0],
    setter: (gl, value) => gl.polygonOffset(...value)
  },
 
  // TODO - enabling multisampling
  // glIsEnabled with argument GL_SAMPLE_ALPHA_TO_COVERAGE
  // glIsEnabled with argument GL_SAMPLE_COVERAGE
 
  // specify multisample coverage parameters
  // https://www.khronos.org/opengles/sdk/docs/man/xhtml/glSampleCoverage.xml
  sampleCoverage: {
    type: [GLfloat, GLboolean],
    object: ['value', 'invert'],
    params: [GL.SAMPLE_COVERAGE_VALUE, GL.SAMPLE_COVERAGE_INVERT],
    value: [1.0, false],
    setter: (gl, value) => gl.sampleCoverage(...value)
  },
 
  scissorTest: {
    type: GLboolean,
    params: GL.SCISSOR_TEST,
    value: false,
    setter: (gl, value) => value ? gl.enable(GL.SCISSOR_TEST) : gl.disable(GL.SCISSOR_TEST)
  },
 
  scissorBox: {
    type: new Int32Array(4),
    object: ['x', 'y', 'width', 'height'],
    // When scissor test enabled we expect users to set correct scissor box,
    // otherwise we default to following value array.
    params: GL.SCISSOR_BOX,
    value: new Int32Array([0, 0, 1024, 1024]),
    setter: (gl, value) => gl.scissor(...value)
  },
 
  stencilTest: {
    type: GLboolean,
    params: GL.STENCIL_TEST,
    value: false,
    setter: (gl, value) => value ? gl.enable(GL.STENCIL_TEST) : gl.disable(GL.STENCIL_TEST)
  },
 
  // Sets index used when stencil buffer is cleared.
  stencilClearValue: {
    type: GLint,
    params: GL.STENCIL_CLEAR_VALUE,
    value: 0,
    setter: (gl, value) => gl.clearStencil(value)
  },
 
  // Sets bit mask enabling writing of individual bits in the stencil planes
  // https://www.khronos.org/opengles/sdk/docs/man/xhtml/glStencilMaskSeparate.xml
  stencilMask: {
    type: [GLuint, GLuint],
    object: ['mask', 'backMask'],
    value: [0xFFFFFFFF, 0xFFFFFFFF],
    params: [GL.STENCIL_WRITEMASK, GL.STENCIL_BACK_WRITEMASK],
    setter: (gl, value) => {
      value = isArray(value) ? value : [value, value];
      const [mask, backMask] = value;
      gl.stencilMaskSeparate(GL.FRONT, mask);
      gl.stencilMaskSeparate(GL.BACK, backMask);
    }
  },
 
  // Set stencil testing function, reference value and mask for front and back
  // https://www.khronos.org/opengles/sdk/docs/man/xhtml/glStencilFuncSeparate.xml
  stencilFunc: {
    type: [GLenum, GLint, GLuint, GLenum, GLint, GLuint],
    object: [
      'func', 'ref', 'valueMask', 'backFunc', 'backRef', 'backValueMask'
    ],
    value: [GL.ALWAYS, 0, 0xFFFFFFFF, GL.ALWAYS, 0, 0xFFFFFFFF],
    params: [
      // front
      GL.STENCIL_FUNC,
      GL.STENCIL_REF,
      GL.STENCIL_VALUE_MASK,
      // back
      GL.STENCIL_BACK_FUNC,
      GL.STENCIL_BACK_REF,
      GL.STENCIL_BACK_VALUE_MASK
    ],
    setter: (gl, value) => {
      const [func, ref, mask, backFunc, backRef, backMask] = value;
      gl.stencilFuncSeparate(GL.FRONT, func, ref, mask);
      gl.stencilFuncSeparate(GL.BACK, backFunc, backRef, backMask);
    }
  },
 
  // Specifies the action to take when the stencil test fails, front and back.
  // Stencil test fail action, depth test fail action, pass action
  // GL.KEEP, GL.ZERO, GL.REPLACE, GL.INCR, GL.INCR_WRAP, GL.DECR, GL.DECR_WRAP,
  // and GL.INVERT
  // https://www.khronos.org/opengles/sdk/docs/man/xhtml/glStencilOpSeparate.xml
  stencilOp: {
    type: [GLenum, GLenum, GLenum, GLenum, GLenum, GLenum],
    object: [
      'fail', 'passDepthFail', 'passDepthPass',
      'backFail', 'backPassDepthFail', 'backPassDepthPass'
    ],
    params: [
      // front
      GL.STENCIL_FAIL,
      GL.STENCIL_PASS_DEPTH_FAIL,
      GL.STENCIL_PASS_DEPTH_PASS,
      // back
      GL.STENCIL_BACK_FAIL,
      GL.STENCIL_BACK_PASS_DEPTH_FAIL,
      GL.STENCIL_BACK_PASS_DEPTH_PASS
    ],
    value: [GL.KEEP, GL.KEEP, GL.KEEP, GL.KEEP, GL.KEEP, GL.KEEP],
    setter: (gl, value) => {
      const [sfail, dpfail, dppass, backSfail, backDpfail, backDppass] = value;
      gl.stencilOpSeparate(GL.FRONT, sfail, dpfail, dppass);
      gl.stencilOpSeparate(GL.BACK, backSfail, backDpfail, backDppass);
    }
  },
 
  viewport: {
    type: new Int32Array(4),
    object: ['x', 'y', 'width', 'height'],
    // We use [0, 0, 1024, 1024] as default, but usually this is updated in each frame.
    params: GL.VIEWPORT,
    value: new Int32Array([0, 0, 1024, 1024]),
    setter: (gl, value) => gl.viewport(...value)
  },
 
  // WEBGL1 PIXEL PACK/UNPACK MODES
 
  // Packing of pixel data in memory (1,2,4,8)
  [GL.PACK_ALIGNMENT]: {
    type: GLint,
    params: GL.PACK_ALIGNMENT,
    value: 4,
    setter: (gl, value) => gl.pixelStorei(GL.PACK_ALIGNMENT, value)
  },
  // Unpacking pixel data from memory(1,2,4,8)
  [GL.UNPACK_ALIGNMENT]: {
    type: GLint,
    params: GL.UNPACK_ALIGNMENT,
    value: 4,
    setter: (gl, value) => gl.pixelStorei(GL.UNPACK_ALIGNMENT, value)
  },
  // Flip source data along its vertical axis
  [GL.UNPACK_FLIP_Y_WEBGL]: {
    type: GLboolean,
    params: GL.UNPACK_FLIP_Y_WEBGL,
    value: false,
    setter: (gl, value) => gl.pixelStorei(GL.UNPACK_FLIP_Y_WEBGL, value)
  },
  // Multiplies the alpha channel into the other color channels
  [GL.UNPACK_PREMULTIPLY_ALPHA_WEBGL]: {
    type: GLboolean,
    params: GL.UNPACK_PREMULTIPLY_ALPHA_WEBGL,
    value: false,
    setter: (gl, value) => gl.pixelStorei(GL.UNPACK_PREMULTIPLY_ALPHA_WEBGL, value)
  },
  // Default color space conversion or no color space conversion.
  [GL.UNPACK_COLORSPACE_CONVERSION_WEBGL]: {
    type: GLenum,
    params: GL.UNPACK_COLORSPACE_CONVERSION_WEBGL,
    value: GL.BROWSER_DEFAULT_WEBGL,
    setter: (gl, value) => gl.pixelStorei(GL.UNPACK_COLORSPACE_CONVERSION_WEBGL, value)
  },
 
  // WEBGL2 PIXEL PACK/UNPACK MODES
 
  // Number of pixels in a row.
  [GL.PACK_ROW_LENGTH]: {
    type: GLint,
    params: GL.PACK_ROW_LENGTH,
    value: 0,
    setter: (gl, value) => gl.pixelStorei(GL.PACK_ROW_LENGTH, value),
    webgl2: true
  },
  // Number of pixels skipped before the first pixel is written into memory.
  [GL.PACK_SKIP_PIXELS]: {
    type: GLint,
    params: GL.PACK_SKIP_PIXELS,
    value: 0,
    setter: (gl, value) => gl.pixelStorei(GL.PACK_SKIP_PIXELS, value),
    webgl2: true
  },
  // Number of rows of pixels skipped before first pixel is written to memory.
  [GL.PACK_SKIP_ROWS]: {
    type: GLint,
    params: GL.PACK_SKIP_ROWS,
    value: 0,
    setter: (gl, value) => gl.pixelStorei(GL.PACK_SKIP_ROWS, value),
    webgl2: true
  },
  // Number of pixels in a row.
  [GL.UNPACK_ROW_LENGTH]: {
    type: GLint,
    params: GL.UNPACK_ROW_LENGTH,
    value: 0,
    setter: (gl, value) => gl.pixelStorei(GL.UNPACK_ROW_LENGTH, value),
    webgl2: true
  },
  // Image height used for reading pixel data from memory
  [GL.UNPACK_IMAGE_HEIGHT]: {
    type: GLint,
    params: GL.UNPACK_IMAGE_HEIGHT,
    value: 0,
    setter: (gl, value) => gl.pixelStorei(GL.UNPACK_IMAGE_HEIGHT, value),
    webgl2: true
  },
  // Number of pixel images skipped before first pixel is read from memory
  [GL.UNPACK_SKIP_PIXELS]: {
    type: GLint,
    params: GL.UNPACK_SKIP_PIXELS,
    value: 0,
    setter: (gl, value) => gl.pixelStorei(GL.UNPACK_SKIP_PIXELS, value),
    webgl2: true
  },
  // Number of rows of pixels skipped before first pixel is read from memory
  [GL.UNPACK_SKIP_ROWS]: {
    type: GLint,
    params: GL.UNPACK_SKIP_ROWS,
    value: 0,
    setter: (gl, value) => gl.pixelStorei(GL.UNPACK_SKIP_ROWS, value),
    webgl2: true
  },
  // Number of pixel images skipped before first pixel is read from memory
  [GL.UNPACK_SKIP_IMAGES]: {
    type: GLint,
    params: GL.UNPACK_SKIP_IMAGES,
    value: 0,
    setter: (gl, value) => gl.pixelStorei(GL.UNPACK_SKIP_IMAGES, value),
    webgl2: true
  }
};
*/
 
var BUFFER_PARAMETERS = (_BUFFER_PARAMETERS = {}, _defineProperty(_BUFFER_PARAMETERS, __WEBPACK_IMPORTED_MODULE_0__webgl_utils_constants__["a" /* default */].BUFFER_SIZE, { webgl1: 0 }), _defineProperty(_BUFFER_PARAMETERS, __WEBPACK_IMPORTED_MODULE_0__webgl_utils_constants__["a" /* default */].BUFFER_USAGE, { webgl1: 0 // GLenum indicating the usage pattern of the buffer.
}), _BUFFER_PARAMETERS);
 
var FENCE_SYNC_PARAMETERS = [__WEBPACK_IMPORTED_MODULE_0__webgl_utils_constants__["a" /* default */].OBJECT_TYPE, // GLenum, type of sync object (always GL.SYNC_FENCE).
__WEBPACK_IMPORTED_MODULE_0__webgl_utils_constants__["a" /* default */].SYNC_STATUS, // GLenum, status of sync object (GL.SIGNALED/GL.UNSIGNALED)
__WEBPACK_IMPORTED_MODULE_0__webgl_utils_constants__["a" /* default */].SYNC_CONDITION, // GLenum. object condition (always GL.SYNC_GPU_COMMANDS_COMPLETE).
__WEBPACK_IMPORTED_MODULE_0__webgl_utils_constants__["a" /* default */].SYNC_FLAGS // GLenum, flags sync object was created with (always 0)
];
 
var FRAMEBUFFER_ATTACHMENT_PARAMETERS = [__WEBPACK_IMPORTED_MODULE_0__webgl_utils_constants__["a" /* default */].FRAMEBUFFER_ATTACHMENT_OBJECT_NAME, // WebGLRenderbuffer or WebGLTexture
__WEBPACK_IMPORTED_MODULE_0__webgl_utils_constants__["a" /* default */].FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE, // GL.RENDERBUFFER, GL.TEXTURE, GL.NONE
__WEBPACK_IMPORTED_MODULE_0__webgl_utils_constants__["a" /* default */].FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE, // GL.TEXTURE_CUBE_MAP_POSITIVE_X, etc.
__WEBPACK_IMPORTED_MODULE_0__webgl_utils_constants__["a" /* default */].FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL, // GLint
// EXT_sRGB or WebGL2
__WEBPACK_IMPORTED_MODULE_0__webgl_utils_constants__["a" /* default */].FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING, // GL.LINEAR, GL.SRBG
// WebGL2
__WEBPACK_IMPORTED_MODULE_0__webgl_utils_constants__["a" /* default */].FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER, // GLint
__WEBPACK_IMPORTED_MODULE_0__webgl_utils_constants__["a" /* default */].FRAMEBUFFER_ATTACHMENT_RED_SIZE, // GLint
__WEBPACK_IMPORTED_MODULE_0__webgl_utils_constants__["a" /* default */].FRAMEBUFFER_ATTACHMENT_GREEN_SIZE, // GLint
__WEBPACK_IMPORTED_MODULE_0__webgl_utils_constants__["a" /* default */].FRAMEBUFFER_ATTACHMENT_BLUE_SIZE, // GLint
__WEBPACK_IMPORTED_MODULE_0__webgl_utils_constants__["a" /* default */].FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE, // GLint
__WEBPACK_IMPORTED_MODULE_0__webgl_utils_constants__["a" /* default */].FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE, // GLint
__WEBPACK_IMPORTED_MODULE_0__webgl_utils_constants__["a" /* default */].FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE, // GLint
__WEBPACK_IMPORTED_MODULE_0__webgl_utils_constants__["a" /* default */].FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE
// GL.FLOAT, GL.INT, GL.UNSIGNED_INT, GL.SIGNED_NORMALIZED, OR GL.UNSIGNED_NORMALIZED.
];
 
var FRAMEBUFFER_STATUS = (_FRAMEBUFFER_STATUS = {}, _defineProperty(_FRAMEBUFFER_STATUS, __WEBPACK_IMPORTED_MODULE_0__webgl_utils_constants__["a" /* default */].FRAMEBUFFER_COMPLETE, 'Success. Framebuffer is correctly set up'), _defineProperty(_FRAMEBUFFER_STATUS, __WEBPACK_IMPORTED_MODULE_0__webgl_utils_constants__["a" /* default */].FRAMEBUFFER_INCOMPLETE_ATTACHMENT, 'Framebuffer attachment types mismatched or some attachment point not attachment complete'), _defineProperty(_FRAMEBUFFER_STATUS, __WEBPACK_IMPORTED_MODULE_0__webgl_utils_constants__["a" /* default */].FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT, 'Framebuffer has no attachment'), _defineProperty(_FRAMEBUFFER_STATUS, __WEBPACK_IMPORTED_MODULE_0__webgl_utils_constants__["a" /* default */].FRAMEBUFFER_INCOMPLETE_DIMENSIONS, 'Framebuffer attachments do not have the same size'), _defineProperty(_FRAMEBUFFER_STATUS, __WEBPACK_IMPORTED_MODULE_0__webgl_utils_constants__["a" /* default */].FRAMEBUFFER_UNSUPPORTED, 'Framebuffer attachment format not supported or depth and stencil attachments are not same'), _defineProperty(_FRAMEBUFFER_STATUS, __WEBPACK_IMPORTED_MODULE_0__webgl_utils_constants__["a" /* default */].FRAMEBUFFER_INCOMPLETE_MULTISAMPLE, 'Framebuffer attachement SAMPLES differs among renderbuffers, or are mixed with textures'), _FRAMEBUFFER_STATUS);
 
var PROGRAM_PARAMETERS = (_PROGRAM_PARAMETERS = {}, _defineProperty(_PROGRAM_PARAMETERS, __WEBPACK_IMPORTED_MODULE_0__webgl_utils_constants__["a" /* default */].DELETE_STATUS, { webgl1: 0 }), _defineProperty(_PROGRAM_PARAMETERS, __WEBPACK_IMPORTED_MODULE_0__webgl_utils_constants__["a" /* default */].LINK_STATUS, { webgl1: 0 }), _defineProperty(_PROGRAM_PARAMETERS, __WEBPACK_IMPORTED_MODULE_0__webgl_utils_constants__["a" /* default */].VALIDATE_STATUS, { webgl1: 0 }), _defineProperty(_PROGRAM_PARAMETERS, __WEBPACK_IMPORTED_MODULE_0__webgl_utils_constants__["a" /* default */].ATTACHED_SHADERS, { webgl1: 0 }), _defineProperty(_PROGRAM_PARAMETERS, __WEBPACK_IMPORTED_MODULE_0__webgl_utils_constants__["a" /* default */].ACTIVE_ATTRIBUTES, { webgl1: 0 }), _defineProperty(_PROGRAM_PARAMETERS, __WEBPACK_IMPORTED_MODULE_0__webgl_utils_constants__["a" /* default */].ACTIVE_UNIFORMS, { webgl1: 0 }), _defineProperty(_PROGRAM_PARAMETERS, __WEBPACK_IMPORTED_MODULE_0__webgl_utils_constants__["a" /* default */].TRANSFORM_FEEDBACK_BUFFER_MODE, { webgl2: 0 }), _defineProperty(_PROGRAM_PARAMETERS, __WEBPACK_IMPORTED_MODULE_0__webgl_utils_constants__["a" /* default */].TRANSFORM_FEEDBACK_VARYINGS, { webgl2: 0 }), _defineProperty(_PROGRAM_PARAMETERS, __WEBPACK_IMPORTED_MODULE_0__webgl_utils_constants__["a" /* default */].ACTIVE_UNIFORM_BLOCKS, { webgl2: 0 // GLint
}), _PROGRAM_PARAMETERS);
 
//  parameters
var RENDERBUFFER_PARAMETERS = (_RENDERBUFFER_PARAMET = {}, _defineProperty(_RENDERBUFFER_PARAMET, __WEBPACK_IMPORTED_MODULE_0__webgl_utils_constants__["a" /* default */].RENDERBUFFER_WIDTH, { webgl1: 0 }), _defineProperty(_RENDERBUFFER_PARAMET, __WEBPACK_IMPORTED_MODULE_0__webgl_utils_constants__["a" /* default */].RENDERBUFFER_HEIGHT, { webgl1: 0 }), _defineProperty(_RENDERBUFFER_PARAMET, __WEBPACK_IMPORTED_MODULE_0__webgl_utils_constants__["a" /* default */].RENDERBUFFER_INTERNAL_FORMAT, { type: 'GLenum', webgl1: __WEBPACK_IMPORTED_MODULE_0__webgl_utils_constants__["a" /* default */].RGBA4 }), _defineProperty(_RENDERBUFFER_PARAMET, __WEBPACK_IMPORTED_MODULE_0__webgl_utils_constants__["a" /* default */].RENDERBUFFER_GREEN_SIZE, { webgl1: 0 }), _defineProperty(_RENDERBUFFER_PARAMET, __WEBPACK_IMPORTED_MODULE_0__webgl_utils_constants__["a" /* default */].RENDERBUFFER_BLUE_SIZE, { webgl1: 0 }), _defineProperty(_RENDERBUFFER_PARAMET, __WEBPACK_IMPORTED_MODULE_0__webgl_utils_constants__["a" /* default */].RENDERBUFFER_RED_SIZE, { webgl1: 0 }), _defineProperty(_RENDERBUFFER_PARAMET, __WEBPACK_IMPORTED_MODULE_0__webgl_utils_constants__["a" /* default */].RENDERBUFFER_ALPHA_SIZE, { webgl1: 0 }), _defineProperty(_RENDERBUFFER_PARAMET, __WEBPACK_IMPORTED_MODULE_0__webgl_utils_constants__["a" /* default */].RENDERBUFFER_DEPTH_SIZE, { webgl1: 0 }), _defineProperty(_RENDERBUFFER_PARAMET, __WEBPACK_IMPORTED_MODULE_0__webgl_utils_constants__["a" /* default */].RENDERBUFFER_STENCIL_SIZE, { webgl1: 0 }), _defineProperty(_RENDERBUFFER_PARAMET, __WEBPACK_IMPORTED_MODULE_0__webgl_utils_constants__["a" /* default */].RENDERBUFFER_SAMPLES, { webgl2: 1 }), _RENDERBUFFER_PARAMET);
 
var SAMPLER_PARAMETERS = (_SAMPLER_PARAMETERS = {}, _defineProperty(_SAMPLER_PARAMETERS, __WEBPACK_IMPORTED_MODULE_0__webgl_utils_constants__["a" /* default */].TEXTURE_MAG_FILTER, { webgl2: true }), _defineProperty(_SAMPLER_PARAMETERS, __WEBPACK_IMPORTED_MODULE_0__webgl_utils_constants__["a" /* default */].TEXTURE_MIN_FILTER, { webgl2: true }), _defineProperty(_SAMPLER_PARAMETERS, __WEBPACK_IMPORTED_MODULE_0__webgl_utils_constants__["a" /* default */].TEXTURE_WRAP_S, { webgl2: true }), _defineProperty(_SAMPLER_PARAMETERS, __WEBPACK_IMPORTED_MODULE_0__webgl_utils_constants__["a" /* default */].TEXTURE_WRAP_T, { webgl2: true }), _defineProperty(_SAMPLER_PARAMETERS, __WEBPACK_IMPORTED_MODULE_0__webgl_utils_constants__["a" /* default */].TEXTURE_WRAP_R, { webgl2: true }), _defineProperty(_SAMPLER_PARAMETERS, __WEBPACK_IMPORTED_MODULE_0__webgl_utils_constants__["a" /* default */].TEXTURE_BASE_LEVEL, { webgl2: true }), _defineProperty(_SAMPLER_PARAMETERS, __WEBPACK_IMPORTED_MODULE_0__webgl_utils_constants__["a" /* default */].TEXTURE_MAX_LEVEL, { webgl2: true }), _defineProperty(_SAMPLER_PARAMETERS, __WEBPACK_IMPORTED_MODULE_0__webgl_utils_constants__["a" /* default */].TEXTURE_COMPARE_FUNC, { webgl2: true }), _defineProperty(_SAMPLER_PARAMETERS, __WEBPACK_IMPORTED_MODULE_0__webgl_utils_constants__["a" /* default */].TEXTURE_COMPARE_MODE, { webgl2: true }), _defineProperty(_SAMPLER_PARAMETERS, __WEBPACK_IMPORTED_MODULE_0__webgl_utils_constants__["a" /* default */].TEXTURE_MIN_LOD, { webgl2: true }), _defineProperty(_SAMPLER_PARAMETERS, __WEBPACK_IMPORTED_MODULE_0__webgl_utils_constants__["a" /* default */].TEXTURE_MAX_LOD, { webgl2: true // maximum level-of-detail value
 
  // [GL.TEXTURE_MAX_ANISOTROPY_EXT]: {webgl2: 'EXT_texture_filter_anisotropic'}
}), _SAMPLER_PARAMETERS);
 
// const SHADER_PARAMETERS = [
//   GL.DELETE_STATUS, // GLboolean - whether shader is flagged for deletion.
//   GL.COMPILE_STATUS, // GLboolean - was last shader compilation successful.
//   GL.SHADER_TYPE // GLenum - GL.VERTEX_SHADER or GL.FRAGMENT_SHADER.
// ];
 
var TEXTURE_PARAMETERS = (_TEXTURE_PARAMETERS = {}, _defineProperty(_TEXTURE_PARAMETERS, __WEBPACK_IMPORTED_MODULE_0__webgl_utils_constants__["a" /* default */].TEXTURE_MAG_FILTER, { type: 'GLenum', webgl1: __WEBPACK_IMPORTED_MODULE_0__webgl_utils_constants__["a" /* default */].LINEAR }), _defineProperty(_TEXTURE_PARAMETERS, __WEBPACK_IMPORTED_MODULE_0__webgl_utils_constants__["a" /* default */].TEXTURE_MIN_FILTER, { type: 'GLenum', webgl1: __WEBPACK_IMPORTED_MODULE_0__webgl_utils_constants__["a" /* default */].NEAREST_MIPMAP_LINEAR }), _defineProperty(_TEXTURE_PARAMETERS, __WEBPACK_IMPORTED_MODULE_0__webgl_utils_constants__["a" /* default */].TEXTURE_WRAP_S, { type: 'GLenum', webgl1: __WEBPACK_IMPORTED_MODULE_0__webgl_utils_constants__["a" /* default */].REPEAT }), _defineProperty(_TEXTURE_PARAMETERS, __WEBPACK_IMPORTED_MODULE_0__webgl_utils_constants__["a" /* default */].TEXTURE_WRAP_T, { type: 'GLenum', webgl1: __WEBPACK_IMPORTED_MODULE_0__webgl_utils_constants__["a" /* default */].REPEAT }), _defineProperty(_TEXTURE_PARAMETERS, __WEBPACK_IMPORTED_MODULE_0__webgl_utils_constants__["a" /* default */].TEXTURE_WRAP_R, { type: 'GLenum', webgl2: __WEBPACK_IMPORTED_MODULE_0__webgl_utils_constants__["a" /* default */].REPEAT }), _defineProperty(_TEXTURE_PARAMETERS, __WEBPACK_IMPORTED_MODULE_0__webgl_utils_constants__["a" /* default */].TEXTURE_BASE_LEVEL, { webgl2: 0 }), _defineProperty(_TEXTURE_PARAMETERS, __WEBPACK_IMPORTED_MODULE_0__webgl_utils_constants__["a" /* default */].TEXTURE_MAX_LEVEL, { webgl2: 1000 }), _defineProperty(_TEXTURE_PARAMETERS, __WEBPACK_IMPORTED_MODULE_0__webgl_utils_constants__["a" /* default */].TEXTURE_COMPARE_FUNC, { type: 'GLenum', webgl2: __WEBPACK_IMPORTED_MODULE_0__webgl_utils_constants__["a" /* default */].LEQUAL }), _defineProperty(_TEXTURE_PARAMETERS, __WEBPACK_IMPORTED_MODULE_0__webgl_utils_constants__["a" /* default */].TEXTURE_COMPARE_MODE, { type: 'GLenum', webgl2: __WEBPACK_IMPORTED_MODULE_0__webgl_utils_constants__["a" /* default */].NONE }), _defineProperty(_TEXTURE_PARAMETERS, __WEBPACK_IMPORTED_MODULE_0__webgl_utils_constants__["a" /* default */].TEXTURE_MIN_LOD, { webgl2: -1000 }), _defineProperty(_TEXTURE_PARAMETERS, __WEBPACK_IMPORTED_MODULE_0__webgl_utils_constants__["a" /* default */].TEXTURE_MAX_LOD, { webgl2: 1000 }), _defineProperty(_TEXTURE_PARAMETERS, __WEBPACK_IMPORTED_MODULE_0__webgl_utils_constants__["a" /* default */].TEXTURE_WIDTH, { webgl1: 0 }), _defineProperty(_TEXTURE_PARAMETERS, __WEBPACK_IMPORTED_MODULE_0__webgl_utils_constants__["a" /* default */].TEXTURE_HEIGHT, { webgl1: 0 }), _TEXTURE_PARAMETERS);
 
function installParameterDefinitions() {
  __WEBPACK_IMPORTED_MODULE_1__buffer__["a" /* default */].PARAMETERS = BUFFER_PARAMETERS;
  __WEBPACK_IMPORTED_MODULE_2__fence_sync__["a" /* default */].PARAMETERS = FENCE_SYNC_PARAMETERS;
  __WEBPACK_IMPORTED_MODULE_3__framebuffer__["a" /* default */].ATTACHMENT_PARAMETERS = FRAMEBUFFER_ATTACHMENT_PARAMETERS;
  __WEBPACK_IMPORTED_MODULE_3__framebuffer__["a" /* default */].STATUS = FRAMEBUFFER_STATUS;
  __WEBPACK_IMPORTED_MODULE_4__program__["a" /* default */].PARAMETERS = PROGRAM_PARAMETERS;
  __WEBPACK_IMPORTED_MODULE_5__renderbuffer__["a" /* default */].PARAMETERS = RENDERBUFFER_PARAMETERS;
  __WEBPACK_IMPORTED_MODULE_6__sampler__["a" /* default */].PARAMETERS = SAMPLER_PARAMETERS;
  // Shader.PARAMETERS = SHADER_PARAMETERS;
  __WEBPACK_IMPORTED_MODULE_7__texture__["a" /* default */].PARAMETERS = TEXTURE_PARAMETERS;
}
//# sourceMappingURL=debug-parameters.js.map
 
/***/ }),
/* 268 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return webGLTypesAvailable; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return Image; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return WebGLRenderingContext; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return WebGLProgram; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return WebGLShader; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return WebGLBuffer; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return WebGLFramebuffer; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return WebGLRenderbuffer; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return WebGLTexture; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return WebGLUniformLocation; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "l", function() { return WebGLActiveInfo; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "m", function() { return WebGLShaderPrecisionFormat; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return WebGL2RenderingContext; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__init__ = __webpack_require__(106);
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
 
// WEBGL BUILT-IN TYPES
// 1) Exports all WebGL constants as {GL}
// 2) Enables app to "import" WebGL types
//    - Importing these types makes them known to eslint etc.
//    - Provides dummy types for WebGL2 when not available to streamline
//      library code.
//    - Exports types from headless gl when running under Node.js
 
 
 
var DummyType = /*#__PURE__*/function DummyType() {
  _classCallCheck(this, DummyType);
};
 
var _ref = __WEBPACK_IMPORTED_MODULE_0__init__["default"].globals.headlessTypes || __WEBPACK_IMPORTED_MODULE_0__init__["global"],
    _ref$WebGLRenderingCo = _ref.WebGLRenderingContext,
    WebGLRenderingContext = _ref$WebGLRenderingCo === undefined ? DummyType : _ref$WebGLRenderingCo,
    _ref$WebGLProgram = _ref.WebGLProgram,
    WebGLProgram = _ref$WebGLProgram === undefined ? DummyType : _ref$WebGLProgram,
    _ref$WebGLShader = _ref.WebGLShader,
    WebGLShader = _ref$WebGLShader === undefined ? DummyType : _ref$WebGLShader,
    _ref$WebGLBuffer = _ref.WebGLBuffer,
    WebGLBuffer = _ref$WebGLBuffer === undefined ? DummyType : _ref$WebGLBuffer,
    _ref$WebGLFramebuffer = _ref.WebGLFramebuffer,
    WebGLFramebuffer = _ref$WebGLFramebuffer === undefined ? DummyType : _ref$WebGLFramebuffer,
    _ref$WebGLRenderbuffe = _ref.WebGLRenderbuffer,
    WebGLRenderbuffer = _ref$WebGLRenderbuffe === undefined ? DummyType : _ref$WebGLRenderbuffe,
    _ref$WebGLTexture = _ref.WebGLTexture,
    WebGLTexture = _ref$WebGLTexture === undefined ? DummyType : _ref$WebGLTexture,
    _ref$WebGLUniformLoca = _ref.WebGLUniformLocation,
    WebGLUniformLocation = _ref$WebGLUniformLoca === undefined ? DummyType : _ref$WebGLUniformLoca,
    _ref$WebGLActiveInfo = _ref.WebGLActiveInfo,
    WebGLActiveInfo = _ref$WebGLActiveInfo === undefined ? DummyType : _ref$WebGLActiveInfo,
    _ref$WebGLShaderPreci = _ref.WebGLShaderPrecisionFormat,
    WebGLShaderPrecisionFormat = _ref$WebGLShaderPreci === undefined ? DummyType : _ref$WebGLShaderPreci;
 
var webGLTypesAvailable = WebGLRenderingContext !== DummyType && WebGLProgram !== DummyType && WebGLShader !== DummyType && WebGLBuffer !== DummyType && WebGLFramebuffer !== DummyType && WebGLRenderbuffer !== DummyType && WebGLTexture !== DummyType && WebGLUniformLocation !== DummyType && WebGLActiveInfo !== DummyType && WebGLShaderPrecisionFormat !== DummyType;
 
// Ensures that WebGL2RenderingContext is defined in non-WebGL2 environments
// so that apps can test their gl contexts with instanceof
// E.g. if (gl instanceof WebGL2RenderingContext) { }
function getWebGL2RenderingContext() {
  var WebGL2RenderingContextNotSupported = /*#__PURE__*/function WebGL2RenderingContextNotSupported() {
    _classCallCheck(this, WebGL2RenderingContextNotSupported);
  };
 
  return __WEBPACK_IMPORTED_MODULE_0__init__["global"].WebGL2RenderingContext || WebGL2RenderingContextNotSupported;
}
 
// Ensure that Image is defined under Node.js
function getImage() {
  var ImageNotSupported = /*#__PURE__*/function ImageNotSupported() {
    _classCallCheck(this, ImageNotSupported);
  };
 
  return __WEBPACK_IMPORTED_MODULE_0__init__["global"].Image || ImageNotSupported;
}
 
var WebGL2RenderingContext = getWebGL2RenderingContext();
var Image = getImage();
 
// Export the standard WebGL types
 
//# sourceMappingURL=types.js.map
 
/***/ }),
/* 269 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* unused harmony export enableDebug */
/* harmony export (immutable) */ __webpack_exports__["a"] = makeDebugContext;
/* unused harmony export getRealContext */
/* unused harmony export getDebugContext */
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_webgl_debug__ = __webpack_require__(688);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_webgl_debug___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_webgl_debug__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__utils__ = __webpack_require__(8);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__api_debug_parameters__ = __webpack_require__(267);
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
 
// Khronos Debug support module
 
 
 
 
__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__api_debug_parameters__["a" /* installParameterDefinitions */])();
 
// Helper to get shared context data
function getContextData(gl) {
  gl.luma = gl.luma || {};
  return gl.luma;
}
 
// Enable or disable debug checks in debug contexts
// Non-debug contexts do not have checks (to ensure performance)
// Turning off debug for debug contexts removes most of the performance penalty
function enableDebug(debug) {
  __WEBPACK_IMPORTED_MODULE_1__utils__["b" /* log */].debug = debug;
}
 
// Returns (a potentially new) context with debug instrumentation turned off or on.
// Note that this actually returns a new context
function makeDebugContext(gl) {
  var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
      debug = _ref.debug;
 
  if (gl === null) {
    // Return to ensure we don't create a context in this case.
    return null;
  }
 
  return debug ? getDebugContext(gl) : getRealContext(gl);
}
 
// Returns the real context from either of the real/debug contexts
function getRealContext(gl) {
  if (gl === null) {
    // Return to ensure we don't create a context in this case.
    return null;
  }
 
  var data = getContextData(gl);
  // If the context has a realContext member, it is a debug context so return the realContext
  return data.realContext ? data.realContext : gl;
}
 
// Returns the debug context from either of the real/debug contexts
function getDebugContext(gl) {
  if (gl === null) {
    // Return to ensure we don't create a context in this case.
    return null;
  }
 
  var data = getContextData(gl);
  // If this *is* a debug context, return itself
  if (data.realContext) {
    return gl;
  }
 
  // If this already has a debug context, return it.
  if (data.debugContext) {
    return data.debugContext;
  }
 
  // Create a new debug context
 
  var WebGLDebugContext = /*#__PURE__*/function WebGLDebugContext() {
    _classCallCheck(this, WebGLDebugContext);
  };
 
  var debugContext = __WEBPACK_IMPORTED_MODULE_0_webgl_debug___default.a.makeDebugContext(gl, throwOnError, validateArgsAndLog);
  Object.assign(WebGLDebugContext.prototype, debugContext);
 
  // Store the debug context
  data.debugContext = debugContext;
  debugContext.debug = true;
  debugContext.gl = gl;
 
  // Return it
  return debugContext;
}
 
// DEBUG TRACING
 
function getFunctionString(functionName, functionArgs) {
  var args = __WEBPACK_IMPORTED_MODULE_0_webgl_debug___default.a.glFunctionArgsToString(functionName, functionArgs);
  args = '' + args.slice(0, 100) + (args.length > 100 ? '...' : '');
  return 'gl.' + functionName + '(' + args + ')';
}
 
function throwOnError(err, functionName, args) {
  if (!__WEBPACK_IMPORTED_MODULE_1__utils__["b" /* log */].nothrow) {
    var errorMessage = __WEBPACK_IMPORTED_MODULE_0_webgl_debug___default.a.glEnumToString(err);
    var functionArgs = __WEBPACK_IMPORTED_MODULE_0_webgl_debug___default.a.glFunctionArgsToString(functionName, args);
    throw new Error(errorMessage + ' in gl.' + functionName + '(' + functionArgs + ')');
  }
}
 
// Don't generate function string until it is needed
function validateArgsAndLog(functionName, functionArgs) {
  if (!__WEBPACK_IMPORTED_MODULE_1__utils__["b" /* log */].debug) {
    return;
  }
 
  var functionString = void 0;
  if (__WEBPACK_IMPORTED_MODULE_1__utils__["b" /* log */].priority >= 4) {
    functionString = getFunctionString(functionName, functionArgs);
    __WEBPACK_IMPORTED_MODULE_1__utils__["b" /* log */].info(4, '' + functionString);
  }
 
  if (__WEBPACK_IMPORTED_MODULE_1__utils__["b" /* log */].break) {
    functionString = functionString || getFunctionString(functionName, functionArgs);
    var isBreakpoint = __WEBPACK_IMPORTED_MODULE_1__utils__["b" /* log */].break && __WEBPACK_IMPORTED_MODULE_1__utils__["b" /* log */].break.every(function (breakOn) {
      return functionString.indexOf(breakOn) !== -1;
    });
    if (isBreakpoint) {
      /* eslint-disable no-debugger */
      debugger;
      /* eslint-enable no-debugger */
    }
  }
 
  var _iteratorNormalCompletion = true;
  var _didIteratorError = false;
  var _iteratorError = undefined;
 
  try {
    for (var _iterator = functionArgs[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
      var arg = _step.value;
 
      if (arg === undefined) {
        functionString = functionString || getFunctionString(functionName, functionArgs);
        throw new Error('Undefined argument: ' + functionString);
      }
    }
  } catch (err) {
    _didIteratorError = true;
    _iteratorError = err;
  } finally {
    try {
      if (!_iteratorNormalCompletion && _iterator.return) {
        _iterator.return();
      }
    } finally {
      if (_didIteratorError) {
        throw _iteratorError;
      }
    }
  }
}
//# sourceMappingURL=context-debug.js.map
 
/***/ }),
/* 270 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = draw;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__gl_constants__ = __webpack_require__(25);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__context__ = __webpack_require__(7);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_assert__ = __webpack_require__(1);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_assert___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_assert__);
/* eslint-disable */
// TODO - generic draw call
// One of the good things about GL is that there are so many ways to draw things
 
 
 
 
// A good thing about webGL is that there are so many ways to draw things,
// e.g. depending on whether data is indexed and/or isInstanced.
// This function unifies those into a single call with simple parameters
// that have sane defaults.
function draw(gl, _ref) {
  var _ref$drawMode = _ref.drawMode,
      drawMode = _ref$drawMode === undefined ? __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].TRIANGLES : _ref$drawMode,
      vertexCount = _ref.vertexCount,
      _ref$offset = _ref.offset,
      offset = _ref$offset === undefined ? 0 : _ref$offset,
      _ref$isIndexed = _ref.isIndexed,
      isIndexed = _ref$isIndexed === undefined ? false : _ref$isIndexed,
      _ref$indexType = _ref.indexType,
      indexType = _ref$indexType === undefined ? __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].UNSIGNED_SHORT : _ref$indexType,
      _ref$isInstanced = _ref.isInstanced,
      isInstanced = _ref$isInstanced === undefined ? false : _ref$isInstanced,
      _ref$instanceCount = _ref.instanceCount,
      instanceCount = _ref$instanceCount === undefined ? 0 : _ref$instanceCount;
 
  __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__context__["j" /* assertWebGLContext */])(gl);
 
  var extension = gl.getExtension('ANGLE_instanced_arrays');
 
  // TODO - Use polyfilled WebGL2RenderingContext instead of ANGLE extension
  if (isInstanced) {
    var webgl2 = isWebGL2(gl);
    var _extension = gl.getExtension('ANGLE_instanced_arrays');
    var context = webgl2 ? gl : _extension;
    var suffix = webgl2 ? '' : 'ANGLE';
    var drawElements = 'drawElementsInstanced' + suffix;
    var drawArrays = 'drawArraysInstanced' + suffix;
 
    if (isIndexed) {
      context[drawElements](drawMode, vertexCount, indexType, offset, instanceCount);
    } else {
      context[drawArrays](drawMode, offset, vertexCount, instanceCount);
    }
  } else if (isIndexed) {
    gl.drawElements(drawMode, vertexCount, indexType, offset);
  } else {
    gl.drawArrays(drawMode, offset, vertexCount);
  }
}
//# sourceMappingURL=draw.js.map
 
/***/ }),
/* 271 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__api__ = __webpack_require__(38);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__context__ = __webpack_require__(7);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__resource__ = __webpack_require__(30);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__helpers_query_manager__ = __webpack_require__(166);
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
 
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
 
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
 
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
 
 
 
 
 
 
var FenceSync = /*#__PURE__*/function (_Resource) {
  _inherits(FenceSync, _Resource);
 
  /*
   * @class
   * @param {WebGL2RenderingContext} gl
   */
  function FenceSync(gl, opts) {
    _classCallCheck(this, FenceSync);
 
    __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__context__["g" /* assertWebGL2Context */])(gl);
 
    // query manager needs a promise field
    var _this = _possibleConstructorReturn(this, (FenceSync.__proto__ || Object.getPrototypeOf(FenceSync)).call(this, gl, opts));
 
    _this.promise = null;
    Object.seal(_this);
    return _this;
  }
 
  /**
   * The method is a no-op in the absence of the possibility of
   * synchronizing between multiple GL contexts.
   * Prevent commands from being added to GPU command queue.
   * Note: commands can still be buffered in driver.
   *
   * @param {GLbitfield} flags
   * @param {GLint64} timeout
   * @return {Sync} status
   */
 
 
  _createClass(FenceSync, [{
    key: 'wait',
    value: function wait() {
      var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
          _ref$flags = _ref.flags,
          flags = _ref$flags === undefined ? 0 : _ref$flags,
          _ref$timeout = _ref.timeout,
          timeout = _ref$timeout === undefined ? __WEBPACK_IMPORTED_MODULE_0__api__["a" /* default */].TIMEOUT_IGNORED : _ref$timeout;
 
      this.gl.waitSync(this.handle, flags, timeout);
      return this;
    }
 
    /**
     * Block all CPU operations until fence is signalled
     * @param {GLbitfield} flags
     * @param {GLint64} timeout
     * @return {GLenum} result
     */
 
  }, {
    key: 'clientWait',
    value: function clientWait(_ref2) {
      var _ref2$flags = _ref2.flags,
          flags = _ref2$flags === undefined ? __WEBPACK_IMPORTED_MODULE_0__api__["a" /* default */].SYNC_FLUSH_COMMANDS_BIT : _ref2$flags,
          timeout = _ref2.timeout;
 
      var result = this.gl.clientWaitSync(this.handle, flags, timeout);
      // TODO - map to boolean?
      switch (result) {
        case __WEBPACK_IMPORTED_MODULE_0__api__["a" /* default */].ALREADY_SIGNALED:
          // Indicates that sync object was signaled when this method was called.
          break;
        case __WEBPACK_IMPORTED_MODULE_0__api__["a" /* default */].TIMEOUT_EXPIRED:
          // Indicates that timeout time passed, sync object did not become signaled
          break;
        case __WEBPACK_IMPORTED_MODULE_0__api__["a" /* default */].CONDITION_SATISFIED:
          // Indicates that sync object was signaled before timeout expired.
          break;
        case __WEBPACK_IMPORTED_MODULE_0__api__["a" /* default */].WAIT_FAILED:
          // Indicates that an error occurred during execution.
          break;
        default:
      }
      return result;
    }
  }, {
    key: 'cancel',
    value: function cancel() {
      __WEBPACK_IMPORTED_MODULE_3__helpers_query_manager__["a" /* default */].cancelQuery(this);
    }
  }, {
    key: 'isSignaled',
    value: function isSignaled() {
      return this.getParameter(__WEBPACK_IMPORTED_MODULE_0__api__["a" /* default */].SYNC_STATUS) === __WEBPACK_IMPORTED_MODULE_0__api__["a" /* default */].SIGNALED;
    }
 
    // TODO - Query manager needs these?
 
  }, {
    key: 'isResultAvailable',
    value: function isResultAvailable() {
      return this.isSignaled();
    }
  }, {
    key: 'getResult',
    value: function getResult() {
      return this.isSignaled();
    }
  }, {
    key: 'getParameter',
    value: function getParameter(pname) {
      return this.gl.getSyncParameter(this.handle, pname);
    }
 
    // PRIVATE METHODS
 
  }, {
    key: '_createHandle',
    value: function _createHandle() {
      return this.gl.fenceSync(__WEBPACK_IMPORTED_MODULE_0__api__["a" /* default */].SYNC_GPU_COMMANDS_COMPLETE, 0);
    }
  }, {
    key: '_deleteHandle',
    value: function _deleteHandle() {
      __WEBPACK_IMPORTED_MODULE_3__helpers_query_manager__["a" /* default */].deleteQuery(this);
      this.gl.deleteSync(this.handle);
    }
  }]);
 
  return FenceSync;
}(__WEBPACK_IMPORTED_MODULE_2__resource__["a" /* default */]);
 
/* harmony default export */ __webpack_exports__["a"] = (FenceSync);
//# sourceMappingURL=fence-sync.js.map
 
/***/ }),
/* 272 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = readPixels;
/* unused harmony export readPixelsToBuffer */
/* unused harmony export blitFramebuffer */
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__api__ = __webpack_require__(38);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__context__ = __webpack_require__(7);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_assert__ = __webpack_require__(1);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_assert___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_assert__);
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
 
/* eslint-disable */
// TODO - generic draw call
// One of the good things about GL is that there are so many ways to draw things
 
 
 
 
 
/**
 * Read pixels from a target
 *
 * Will read from the currently bound framebuffer, or the currently bound
 *  drawing buffer - if context has been created with
 *  preserveDrawingBuffers
 *
 * @param {WebGLRenderingContext} gl
 * @param {Object} opts
 * @param {Number} opts.x - leftmost coord to be read
 * @param {Number} opts.y - bottommost (or topmost if sourceHeight supplied)
 * @param {Number} opts.width=1 - width of area to be read
 * @param {Number} opts.height=1 - height of area to be read
 * @param {Number} opts.sourceHeight= - target height, implies top left coords
 * @param {Number} opts.dataOffset=0 - WebGL2 only - offset into data array
 * @param {Number} opts.format=GL.RBGA - Can be set to GL.RGB or GL.ALPHA
 *
 * @return {ArrayView} - types array, either passed in or autoallocated
 */
function readPixels(gl, _ref) {
  var x = _ref.x,
      y = _ref.y,
      _ref$width = _ref.width,
      width = _ref$width === undefined ? 1 : _ref$width,
      _ref$height = _ref.height,
      height = _ref$height === undefined ? 1 : _ref$height,
      data = _ref.data,
      _ref$dataOffset = _ref.dataOffset,
      dataOffset = _ref$dataOffset === undefined ? 0 : _ref$dataOffset,
      _ref$type = _ref.type,
      type = _ref$type === undefined ? __WEBPACK_IMPORTED_MODULE_0__api__["a" /* default */].UNSIGNED_BYTE : _ref$type,
      sourceHeight = _ref.sourceHeight,
      _ref$format = _ref.format,
      format = _ref$format === undefined ? __WEBPACK_IMPORTED_MODULE_0__api__["a" /* default */].RGBA : _ref$format;
 
  // Read color in the central pixel, to be mapped with picking colors
  data = data || new Uint8Array(4 * width * height);
  // If source height is specified, a top left coordinate system is used
  y = sourceHeight ? sourceHeight - y : y;
  if (dataOffset) {
    __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__context__["g" /* assertWebGL2Context */])(gl);
    gl.readPixels(x, y, width, height, format, type, data, dataOffset);
  } else {
    gl.readPixels(x, y, width, height, format, type, data);
  }
  return data;
}
 
/**
 * Read pixels directly into webgl buffer
 * NOTE: WebGL2 only
 *
 * @param {WebGLRenderingContext} gl
 * @param {Object} options
 * @return {WebGLBuffer} the passed in buffer
 */
function readPixelsToBuffer(gl, _ref2) {
  var x = _ref2.x,
      y = _ref2.y,
      _ref2$width = _ref2.width,
      width = _ref2$width === undefined ? 1 : _ref2$width,
      _ref2$height = _ref2.height,
      height = _ref2$height === undefined ? 1 : _ref2$height,
      buffer = _ref2.buffer,
      _ref2$dataOffset = _ref2.dataOffset,
      dataOffset = _ref2$dataOffset === undefined ? 0 : _ref2$dataOffset,
      _ref2$type = _ref2.type,
      type = _ref2$type === undefined ? __WEBPACK_IMPORTED_MODULE_0__api__["a" /* default */].UNSIGNED_BYTE : _ref2$type,
      sourceHeight = _ref2.sourceHeight,
      _ref2$format = _ref2.format,
      format = _ref2$format === undefined ? __WEBPACK_IMPORTED_MODULE_0__api__["a" /* default */].RGBA : _ref2$format;
 
  __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__context__["g" /* assertWebGL2Context */])(gl);
 
  // If source height is specified, a top left coordinate system is used
  y = sourceHeight ? sourceHeight - y : y;
 
  gl.bindBuffer(__WEBPACK_IMPORTED_MODULE_0__api__["a" /* default */].PIXEL_PACK_BUFFER, buffer.handle);
 
  gl.readPixels(x, y, width, height, format, type, dataOffset);
 
  gl.bindBuffer(__WEBPACK_IMPORTED_MODULE_0__api__["a" /* default */].PIXEL_PACK_BUFFER, null);
 
  return buffer;
}
 
/*
* @param {} opt.filter
 */
function blitFramebuffer(gl, _ref3) {
  var _ref3$source = _slicedToArray(_ref3.source, 4),
      sourceX = _ref3$source[0],
      sourceY = _ref3$source[1],
      sourceWidth = _ref3$source[2],
      sourceHeight = _ref3$source[3],
      _ref3$dest = _slicedToArray(_ref3.dest, 4),
      destX = _ref3$dest[0],
      destY = _ref3$dest[1],
      destWidth = _ref3$dest[2],
      destHeight = _ref3$dest[3],
      _ref3$mask = _ref3.mask,
      mask = _ref3$mask === undefined ? __WEBPACK_IMPORTED_MODULE_0__api__["a" /* default */].COLOR_BUFFER_BIT | __WEBPACK_IMPORTED_MODULE_0__api__["a" /* default */].DEPTH_BUFFER_BIT | __WEBPACK_IMPORTED_MODULE_0__api__["a" /* default */].STENCIL_BUFFER_BIT : _ref3$mask,
      _ref3$filter = _ref3.filter,
      filter = _ref3$filter === undefined ? __WEBPACK_IMPORTED_MODULE_0__api__["a" /* default */].LINEAR : _ref3$filter;
}
//# sourceMappingURL=functions.js.map
 
/***/ }),
/* 273 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__resource__ = __webpack_require__(30);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__helpers_query_manager__ = __webpack_require__(166);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__context_features__ = __webpack_require__(108);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__context__ = __webpack_require__(7);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__webgl_utils__ = __webpack_require__(60);
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
 
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
 
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
 
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
 
// WebGL2 Query (also handles disjoint timer extensions)
 
 
 
 
 
 
 
var noop = function noop(x) {
  return x;
};
 
var ERR_GPU_DISJOINT = 'Disjoint GPU operation invalidated timer queries';
var ERR_TIMER_QUERY_NOT_SUPPORTED = 'Timer queries require "EXT_disjoint_timer_query" extension';
 
var GL_QUERY_COUNTER_BITS_EXT = 0x8864; // # bits in query result for the given target.
 
var GL_QUERY_RESULT = 0x8866; // Returns a GLuint containing the query result.
var GL_QUERY_RESULT_AVAILABLE = 0x8867; // whether query result is available.
 
var GL_TIME_ELAPSED_EXT = 0x88BF; // Elapsed time (in nanoseconds).
var GL_TIMESTAMP_EXT = 0x8E28; // The current time.
var GL_GPU_DISJOINT_EXT = 0x8FBB; // Whether GPU performed any disjoint operation.
 
var GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN = 0x8C88; // #primitives written to feedback buffers
var GL_ANY_SAMPLES_PASSED = 0x8C2F; // Occlusion query (if drawing passed depth test)
var GL_ANY_SAMPLES_PASSED_CONSERVATIVE = 0x8D6A; // Occlusion query less accurate/faster version
 
var Query = /*#__PURE__*/function (_Resource) {
  _inherits(Query, _Resource);
 
  _createClass(Query, null, [{
    key: 'isSupported',
 
 
    // Returns true if Query is supported by the WebGL implementation
    // Can also check whether timestamp queries are available.
    value: function isSupported(gl) {
      var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
          _ref$queries = _ref.queries,
          queries = _ref$queries === undefined ? false : _ref$queries,
          _ref$timers = _ref.timers,
          timers = _ref$timers === undefined ? false : _ref$timers,
          _ref$timestamps = _ref.timestamps,
          timestamps = _ref$timestamps === undefined ? false : _ref$timestamps;
 
      var webgl2 = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__context__["b" /* isWebGL2 */])(gl);
      var hasTimerQueries = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__context_features__["c" /* hasFeatures */])(gl, __WEBPACK_IMPORTED_MODULE_2__context_features__["a" /* FEATURES */].TIMER_QUERY);
 
      var supported = webgl2 || hasTimerQueries;
      if (queries) {
        supported = supported && webgl2;
      }
 
      if (timers) {
        supported = supported && hasTimerQueries;
      }
 
      if (timestamps) {
        __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__webgl_utils__["f" /* polyfillContext */])(gl);
        var queryCounterBits = gl.getQuery(GL_TIMESTAMP_EXT, GL_QUERY_COUNTER_BITS_EXT);
        supported = supported && queryCounterBits > 0;
      }
 
      return supported;
    }
 
    // Create a query class
 
  }]);
 
  function Query(gl) {
    var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
 
    _classCallCheck(this, Query);
 
    var _this = _possibleConstructorReturn(this, (Query.__proto__ || Object.getPrototypeOf(Query)).call(this, gl, opts));
 
    var _opts$onComplete = opts.onComplete,
        onComplete = _opts$onComplete === undefined ? noop : _opts$onComplete,
        _opts$onError = opts.onError,
        onError = _opts$onError === undefined ? noop : _opts$onError;
 
 
    _this.target = null;
    _this.onComplete = onComplete;
    _this.onError = onError;
 
    // query manager needs a promise field
    _this.promise = null;
 
    Object.seal(_this);
    return _this;
  }
 
  // Shortcut for timer query (dependent on extension in both WebGL1 and 2)
  // Measures GPU time delta between this call and a matching `end` call in the
  // GPU instruction stream.
 
 
  _createClass(Query, [{
    key: 'beginTimeElapsedQuery',
    value: function beginTimeElapsedQuery() {
      return this.begin(GL_TIME_ELAPSED_EXT);
    }
 
    // Shortcut for occlusion queries
 
  }, {
    key: 'beginOcclusionQuery',
    value: function beginOcclusionQuery() {
      var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
          _ref2$conservative = _ref2.conservative,
          conservative = _ref2$conservative === undefined ? false : _ref2$conservative;
 
      return this.begin(conservative ? GL_ANY_SAMPLES_PASSED_CONSERVATIVE : GL_ANY_SAMPLES_PASSED);
    }
 
    // Shortcut for transformFeedbackQuery
 
  }, {
    key: 'beginTransformFeedbackQuery',
    value: function beginTransformFeedbackQuery() {
      return this.begin(GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN);
    }
 
    // Generates a GPU time stamp when the GPU instruction stream reaches this instruction.
    // To measure time deltas, two timestamp queries are needed.
    // Note: timestamp() queries may not be available even when the timer query extension is.
 
  }, {
    key: 'getTimestamp',
    value: function getTimestamp() {
      __WEBPACK_IMPORTED_MODULE_1__helpers_query_manager__["a" /* default */].beginQuery(this, this.onComplete, this.onError);
      try {
        this.gl.queryCounter(this.handle, GL_TIMESTAMP_EXT);
      } catch (error) {
        __WEBPACK_IMPORTED_MODULE_1__helpers_query_manager__["a" /* default */].rejectQuery(this, ERR_TIMER_QUERY_NOT_SUPPORTED);
      }
      return this;
    }
 
    // Due to OpenGL API limitations, after calling `begin()` on one Query
    // instance, `end()` must be called on that same instance before
    // calling `begin()` on another query. While there can be multiple
    // outstanding queries representing disjoint `begin()`/`end()` intervals.
    // It is not possible to interleave or overlap `begin` and `end` calls.
 
  }, {
    key: 'begin',
    value: function begin(target) {
      // - Triggering a new query when a Query is already tracking an
      //   unresolved query causes that query to be cancelled.
      __WEBPACK_IMPORTED_MODULE_1__helpers_query_manager__["a" /* default */].beginQuery(this, this.onComplete, this.onError);
      this.target = target;
 
      try {
        this.gl.beginQuery(this.target, this.handle);
      } catch (error) {
        __WEBPACK_IMPORTED_MODULE_1__helpers_query_manager__["a" /* default */].rejectQuery(this, 'Query not supported');
      }
      return this;
    }
 
    // ends the current query
 
  }, {
    key: 'end',
    value: function end() {
      // Note: calling end does not affect the pending promise
      if (this.target) {
        this.ext.endQuery(this.target);
        this.target = null;
      }
      return this;
    }
 
    // Cancels a pending query
 
  }, {
    key: 'cancel',
    value: function cancel() {
      this.end();
      __WEBPACK_IMPORTED_MODULE_1__helpers_query_manager__["a" /* default */].cancelQuery(this);
      return this;
    }
 
    // Returns true if the query result is available
 
  }, {
    key: 'isResultAvailable',
    value: function isResultAvailable() {
      return this.gl.getQueryParameter(this.handle, GL_QUERY_RESULT_AVAILABLE);
    }
 
    // Returns the query result, converted to milliseconds to match JavaScript conventions.
    // TODO - what about non-timer queries
 
  }, {
    key: 'getResult',
    value: function getResult() {
      var result = this.gl.getQueryParameter(this.handle, GL_QUERY_RESULT);
      return Number.isFinite(result) ? result / 1e6 : 0;
    }
  }, {
    key: '_createHandle',
    value: function _createHandle() {
      return Query.isSupported(this.gl) ? this.gl.createQuery() : null;
    }
  }, {
    key: '_deleteHandle',
    value: function _deleteHandle() {
      __WEBPACK_IMPORTED_MODULE_1__helpers_query_manager__["a" /* default */].deleteQuery(this);
      this.gl.deleteQuery(this.handle);
    }
  }], [{
    key: 'poll',
    value: function poll(gl) {
      __WEBPACK_IMPORTED_MODULE_1__helpers_query_manager__["a" /* default */].poll(gl);
    }
  }]);
 
  return Query;
}(__WEBPACK_IMPORTED_MODULE_0__resource__["a" /* default */]);
 
// NOTE: This call lets the queryManager know how to detect disjoint GPU state
// It will check dsjoint state on polls and before adding a new query
// and reject any outstanding TimerQueries with our supplied error message.
 
 
/* harmony default export */ __webpack_exports__["a"] = (Query);
__WEBPACK_IMPORTED_MODULE_1__helpers_query_manager__["a" /* default */].setInvalidator({
  queryType: Query,
  errorMessage: ERR_GPU_DISJOINT,
  // Note: Querying the disjoint state resets it
  checkInvalid: function checkInvalid(gl) {
    return gl.getParameter(GL_GPU_DISJOINT_EXT);
  }
});
//# sourceMappingURL=query.js.map
 
/***/ }),
/* 274 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__api__ = __webpack_require__(38);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__context__ = __webpack_require__(7);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__resource__ = __webpack_require__(30);
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
 
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
 
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
 
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
 
/* eslint-disable no-inline-comments */
 
 
 
 
var Sampler = /*#__PURE__*/function (_Resource) {
  _inherits(Sampler, _Resource);
 
  _createClass(Sampler, null, [{
    key: 'isSupported',
    value: function isSupported(gl) {
      return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__context__["b" /* isWebGL2 */])(gl);
    }
  }, {
    key: 'isHandle',
    value: function isHandle(handle) {
      return this.gl.isSampler(this.handle);
    }
  }]);
 
  function Sampler(gl, opts) {
    _classCallCheck(this, Sampler);
 
    __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__context__["g" /* assertWebGL2Context */])(gl);
 
    var _this = _possibleConstructorReturn(this, (Sampler.__proto__ || Object.getPrototypeOf(Sampler)).call(this, gl, opts));
 
    Object.seal(_this);
    return _this;
  }
 
  /**
   * Bind to the same texture unit as a texture to control sampling for that texture
   * @param {GLuint} unit - texture unit index
   * @return {Sampler} - returns self to enable chaining
   */
 
 
  _createClass(Sampler, [{
    key: 'bind',
    value: function bind(unit) {
      this.gl.bindSampler(unit, this.handle);
      return this;
    }
 
    /**
     * Bind to the same texture unit as a texture to control sampling for that texture
     * @param {GLuint} unit - texture unit index
     * @return {Sampler} - returns self to enable chaining
     */
 
  }, {
    key: 'unbind',
    value: function unbind(unit) {
      this.gl.bindSampler(unit, null);
      return this;
    }
 
    // RESOURCE METHODS
 
  }, {
    key: '_createHandle',
    value: function _createHandle() {
      return this.gl.createSampler();
    }
  }, {
    key: '_deleteHandle',
    value: function _deleteHandle() {
      this.gl.deleteSampler(this.handle);
    }
  }, {
    key: '_getParameter',
    value: function _getParameter(pname) {
      var value = this.gl.getSamplerParameter(this.handle, pname);
      return value;
    }
  }, {
    key: '_setParameter',
    value: function _setParameter(pname, param) {
      // Apparently there are some conversion integer/float rules that made
      // the WebGL committe expose two parameter setting functions in JavaScript.
      // For now, pick the float version for parameters specified as GLfloat.
      switch (pname) {
        case __WEBPACK_IMPORTED_MODULE_0__api__["a" /* default */].TEXTURE_MIN_LOD:
        case __WEBPACK_IMPORTED_MODULE_0__api__["a" /* default */].TEXTURE_MAX_LOD:
          this.gl.samplerParameterf(this.handle, pname, param);
          break;
        default:
          this.gl.samplerParameteri(this.handle, pname, param);
          break;
      }
      return this;
    }
  }]);
 
  return Sampler;
}(__WEBPACK_IMPORTED_MODULE_2__resource__["a" /* default */]);
 
/* harmony default export */ __webpack_exports__["a"] = (Sampler);
//# sourceMappingURL=sampler.js.map
 
/***/ }),
/* 275 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__gl_constants__ = __webpack_require__(25);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__texture__ = __webpack_require__(62);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_assert__ = __webpack_require__(1);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_assert___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_assert__);
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
 
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
 
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
 
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
 
 
 
// import {withParameters} from './context';
 
 
var FACES = [__WEBPACK_IMPORTED_MODULE_0__gl_constants__["d" /* GL */].TEXTURE_CUBE_MAP_POSITIVE_X, __WEBPACK_IMPORTED_MODULE_0__gl_constants__["d" /* GL */].TEXTURE_CUBE_MAP_NEGATIVE_X, __WEBPACK_IMPORTED_MODULE_0__gl_constants__["d" /* GL */].TEXTURE_CUBE_MAP_POSITIVE_Y, __WEBPACK_IMPORTED_MODULE_0__gl_constants__["d" /* GL */].TEXTURE_CUBE_MAP_NEGATIVE_Y, __WEBPACK_IMPORTED_MODULE_0__gl_constants__["d" /* GL */].TEXTURE_CUBE_MAP_POSITIVE_Z, __WEBPACK_IMPORTED_MODULE_0__gl_constants__["d" /* GL */].TEXTURE_CUBE_MAP_NEGATIVE_Z];
 
var TextureCube = /*#__PURE__*/function (_Texture) {
  _inherits(TextureCube, _Texture);
 
  function TextureCube(gl) {
    var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
 
    _classCallCheck(this, TextureCube);
 
    var _this = _possibleConstructorReturn(this, (TextureCube.__proto__ || Object.getPrototypeOf(TextureCube)).call(this, gl, Object.assign({}, opts, { target: __WEBPACK_IMPORTED_MODULE_0__gl_constants__["d" /* GL */].TEXTURE_CUBE_MAP })));
 
    _this.initialize(opts);
    Object.seal(_this);
    return _this;
  }
 
  /* eslint-disable max-len, max-statements */
 
 
  _createClass(TextureCube, [{
    key: 'initialize',
    value: function initialize() {
      var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
      var _opts$format = opts.format,
          format = _opts$format === undefined ? __WEBPACK_IMPORTED_MODULE_0__gl_constants__["d" /* GL */].RGBA : _opts$format,
          _opts$mipmaps = opts.mipmaps,
          mipmaps = _opts$mipmaps === undefined ? true : _opts$mipmaps;
      var _opts$width = opts.width,
          width = _opts$width === undefined ? 1 : _opts$width,
          _opts$height = opts.height,
          height = _opts$height === undefined ? 1 : _opts$height,
          _opts$type = opts.type,
          type = _opts$type === undefined ? __WEBPACK_IMPORTED_MODULE_0__gl_constants__["d" /* GL */].UNSIGNED_BYTE : _opts$type,
          dataFormat = opts.dataFormat;
 
      // Deduce width and height based on one of the faces
 
      var _deduceParameters = this._deduceParameters({ format: format, type: type, dataFormat: dataFormat });
 
      type = _deduceParameters.type;
      dataFormat = _deduceParameters.dataFormat;
 
      // Enforce cube
      var _deduceImageSize = this._deduceImageSize({
        data: opts[__WEBPACK_IMPORTED_MODULE_0__gl_constants__["d" /* GL */].TEXTURE_CUBE_MAP_POSITIVE_X], width: width, height: height
      });
 
      width = _deduceImageSize.width;
      height = _deduceImageSize.height;
      __WEBPACK_IMPORTED_MODULE_2_assert___default()(width === height);
 
      // Temporarily apply any pixel store paramaters and build textures
      // withParameters(this.gl, opts, () => {
      //   for (const face of CUBE_MAP_FACES) {
      //     this.setImageData({
      //       target: face,
      //       data: opts[face],
      //       width, height, format, type, dataFormat, border, mipmaps
      //     });
      //   }
      // });
 
      this.setCubeMapImageData(opts);
 
      // Called here so that GL.
      // TODO - should genMipmap() be called on the cubemap or on the faces?
      if (mipmaps) {
        this.generateMipmap(opts);
      }
 
      // Store opts for accessors
      this.opts = opts;
    }
  }, {
    key: 'subImage',
    value: function subImage(_ref) {
      var face = _ref.face,
          data = _ref.data,
          _ref$x = _ref.x,
          x = _ref$x === undefined ? 0 : _ref$x,
          _ref$y = _ref.y,
          y = _ref$y === undefined ? 0 : _ref$y,
          _ref$mipmapLevel = _ref.mipmapLevel,
          mipmapLevel = _ref$mipmapLevel === undefined ? 0 : _ref$mipmapLevel;
 
      return this._subImage({ target: face, data: data, x: x, y: y, mipmapLevel: mipmapLevel });
    }
 
    /* eslint-disable max-statements, max-len */
 
  }, {
    key: 'setCubeMapImageData',
    value: function setCubeMapImageData(_ref2) {
      var width = _ref2.width,
          height = _ref2.height,
          pixels = _ref2.pixels,
          data = _ref2.data,
          _ref2$border = _ref2.border,
          border = _ref2$border === undefined ? 0 : _ref2$border,
          _ref2$format = _ref2.format,
          format = _ref2$format === undefined ? __WEBPACK_IMPORTED_MODULE_0__gl_constants__["d" /* GL */].RGBA : _ref2$format,
          _ref2$type = _ref2.type,
          type = _ref2$type === undefined ? __WEBPACK_IMPORTED_MODULE_0__gl_constants__["d" /* GL */].UNSIGNED_BYTE : _ref2$type,
          _ref2$generateMipmap = _ref2.generateMipmap,
          generateMipmap = _ref2$generateMipmap === undefined ? false : _ref2$generateMipmap;
      var gl = this.gl;
 
      pixels = pixels || data;
      this.bind();
      if (this.width || this.height) {
        var _iteratorNormalCompletion = true;
        var _didIteratorError = false;
        var _iteratorError = undefined;
 
        try {
          for (var _iterator = FACES[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
            var face = _step.value;
 
            gl.texImage2D(face, 0, format, width, height, border, format, type, pixels[face]);
          }
        } catch (err) {
          _didIteratorError = true;
          _iteratorError = err;
        } finally {
          try {
            if (!_iteratorNormalCompletion && _iterator.return) {
              _iterator.return();
            }
          } finally {
            if (_didIteratorError) {
              throw _iteratorError;
            }
          }
        }
      } else {
        var _iteratorNormalCompletion2 = true;
        var _didIteratorError2 = false;
        var _iteratorError2 = undefined;
 
        try {
          for (var _iterator2 = FACES[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
            var _face = _step2.value;
 
            gl.texImage2D(_face, 0, format, format, type, pixels[_face]);
          }
        } catch (err) {
          _didIteratorError2 = true;
          _iteratorError2 = err;
        } finally {
          try {
            if (!_iteratorNormalCompletion2 && _iterator2.return) {
              _iterator2.return();
            }
          } finally {
            if (_didIteratorError2) {
              throw _iteratorError2;
            }
          }
        }
      }
    }
  }, {
    key: 'bind',
    value: function bind() {
      var _ref3 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
          index = _ref3.index;
 
      if (index !== undefined) {
        this.gl.activeTexture(__WEBPACK_IMPORTED_MODULE_0__gl_constants__["d" /* GL */].TEXTURE0 + index);
      }
      this.gl.bindTexture(__WEBPACK_IMPORTED_MODULE_0__gl_constants__["d" /* GL */].TEXTURE_CUBE_MAP, this.handle);
      return index;
    }
  }, {
    key: 'unbind',
    value: function unbind() {
      this.gl.bindTexture(__WEBPACK_IMPORTED_MODULE_0__gl_constants__["d" /* GL */].TEXTURE_CUBE_MAP, null);
      return this;
    }
  }]);
 
  return TextureCube;
}(__WEBPACK_IMPORTED_MODULE_1__texture__["a" /* default */]);
 
/* harmony default export */ __webpack_exports__["a"] = (TextureCube);
 
 
TextureCube.FACES = FACES;
//# sourceMappingURL=texture-cube.js.map
 
/***/ }),
/* 276 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* unused harmony export getPrimitiveCount */
/* unused harmony export getVertexCount */
/* harmony export (immutable) */ __webpack_exports__["b"] = getTransformFeedbackMode;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__gl_constants__ = __webpack_require__(25);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__resource__ = __webpack_require__(30);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__context__ = __webpack_require__(7);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_assert__ = __webpack_require__(1);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_assert___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_assert__);
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
 
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
 
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
 
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
 
 
 
 
 
 
var GL_TRANSFORM_FEEDBACK_BUFFER = 0x8C8E;
var GL_TRANSFORM_FEEDBACK = 0x8E22;
 
var TranformFeedback = /*#__PURE__*/function (_Resource) {
  _inherits(TranformFeedback, _Resource);
 
  _createClass(TranformFeedback, null, [{
    key: 'isSupported',
    value: function isSupported(gl) {
      return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__context__["b" /* isWebGL2 */])(gl);
    }
  }, {
    key: 'isHandle',
    value: function isHandle(handle) {
      return this.gl.isTransformFeedback(this.handle);
    }
 
    /**
     * @class
     * @param {WebGL2RenderingContext} gl - context
     * @param {Object} opts - options
     */
 
  }]);
 
  function TranformFeedback(gl) {
    var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
 
    _classCallCheck(this, TranformFeedback);
 
    __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__context__["g" /* assertWebGL2Context */])(gl);
 
    var _this = _possibleConstructorReturn(this, (TranformFeedback.__proto__ || Object.getPrototypeOf(TranformFeedback)).call(this, gl, opts));
 
    _this.buffers = {};
    Object.seal(_this);
 
    _this.initialize(opts);
    return _this;
  }
 
  _createClass(TranformFeedback, [{
    key: 'initialize',
    value: function initialize(_ref) {
      var _ref$buffers = _ref.buffers,
          buffers = _ref$buffers === undefined ? {} : _ref$buffers,
          _ref$varyingMap = _ref.varyingMap,
          varyingMap = _ref$varyingMap === undefined ? {} : _ref$varyingMap;
 
      this.bindBuffers(buffers, { clear: true, varyingMap: varyingMap });
    }
  }, {
    key: 'bindBuffers',
    value: function bindBuffers() {
      var buffers = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
 
      var _ref2 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
          _ref2$clear = _ref2.clear,
          clear = _ref2$clear === undefined ? false : _ref2$clear,
          _ref2$varyingMap = _ref2.varyingMap,
          varyingMap = _ref2$varyingMap === undefined ? {} : _ref2$varyingMap;
 
      if (clear) {
        this._unbindBuffers();
        this.buffers = {};
      }
      for (var bufferName in buffers) {
        var buffer = buffers[bufferName];
        var index = Number.isFinite(Number(bufferName)) ? Number(bufferName) : varyingMap[bufferName];
        __WEBPACK_IMPORTED_MODULE_3_assert___default()(Number.isFinite(index));
        this.buffers[index] = buffer;
      }
    }
 
    // TODO: Activation is tightly coupled to the current program. Since we try to encapsulate
    // program.use, should we move these methods (begin/pause/resume/end) to the Program?
 
  }, {
    key: 'begin',
    value: function begin(primitiveMode) {
      this._bindBuffers();
      this.gl.bindTransformFeedback(GL_TRANSFORM_FEEDBACK, this.handle);
      this.gl.beginTransformFeedback(primitiveMode);
      return this;
    }
  }, {
    key: 'pause',
    value: function pause() {
      this.gl.bindTransformFeedback(GL_TRANSFORM_FEEDBACK, this.handle);
      this.gl.pauseTransformFeedback();
      this.gl.bindTransformFeedback(GL_TRANSFORM_FEEDBACK, null);
      this._unbindBuffers();
      return this;
    }
  }, {
    key: 'resume',
    value: function resume() {
      this._bindBuffers();
      this.gl.bindTransformFeedback(GL_TRANSFORM_FEEDBACK, this.handle);
      this.gl.resumeTransformFeedback();
      return this;
    }
  }, {
    key: 'end',
    value: function end() {
      this.gl.bindTransformFeedback(GL_TRANSFORM_FEEDBACK, this.handle);
      this.gl.endTransformFeedback();
      this.gl.bindTransformFeedback(GL_TRANSFORM_FEEDBACK, null);
      this._unbindBuffers();
      return this;
    }
  }, {
    key: 'bindBuffer',
    value: function bindBuffer(_ref3) {
      var index = _ref3.index,
          buffer = _ref3.buffer,
          _ref3$offset = _ref3.offset,
          offset = _ref3$offset === undefined ? 0 : _ref3$offset,
          size = _ref3.size;
 
      // Need to avoid chrome bug where buffer that is already bound to a different target
      // cannot be bound to 'TRANSFORM_FEEDBACK_BUFFER' target.
      buffer.unbind();
      this.gl.bindTransformFeedback(GL_TRANSFORM_FEEDBACK, this.handle);
      if (size === undefined) {
        this.gl.bindBufferBase(GL_TRANSFORM_FEEDBACK_BUFFER, index, buffer.handle);
      } else {
        this.gl.bindBufferRange(GL_TRANSFORM_FEEDBACK_BUFFER, index, buffer.handle, offset, size);
      }
      return this;
    }
  }, {
    key: 'unbindBuffer',
    value: function unbindBuffer(_ref4) {
      var index = _ref4.index;
 
      this.gl.bindTransformFeedback(GL_TRANSFORM_FEEDBACK, this.handle);
      this.gl.bindBufferBase(GL_TRANSFORM_FEEDBACK_BUFFER, index, null);
      return this;
    }
 
    // PRIVATE METHODS
 
    // See https://github.com/KhronosGroup/WebGL/issues/2346
    // If it was true that having a buffer on an unused TF was a problem
    // it would make the entire concept of transform feedback objects pointless.
    // The whole point of them is like VertexArrayObjects.
    // You set them up with all in outputs at init time and
    // then in one call you can setup all the outputs just before drawing.
    // Since the point of transform feedback is to generate data that will
    // then be used as inputs to attributes it makes zero sense you'd
    // have to unbind them from every unused transform feedback object
    // before you could use them in an attribute. If that was the case
    // there would be no reason to setup transform feedback objects ever.
    // You'd always use the default because you'd always have to bind and
    // unbind all the buffers.
 
  }, {
    key: '_bindBuffers',
    value: function _bindBuffers() {
      for (var bufferIndex in this.buffers) {
        this.bindBuffer({ buffer: this.buffers[bufferIndex], index: Number(bufferIndex) });
      }
    }
  }, {
    key: '_unbindBuffers',
    value: function _unbindBuffers() {
      for (var bufferIndex in this.buffers) {
        this.unbindBuffer({ buffer: this.buffers[bufferIndex], index: Number(bufferIndex) });
      }
    }
 
    // RESOURCE METHODS
 
  }, {
    key: '_createHandle',
    value: function _createHandle() {
      return this.gl.createTransformFeedback();
    }
  }, {
    key: '_deleteHandle',
    value: function _deleteHandle() {
      this.gl.deleteTransformFeedback(this.handle);
    }
  }]);
 
  return TranformFeedback;
}(__WEBPACK_IMPORTED_MODULE_1__resource__["a" /* default */]);
 
// Counts the number of complete "primitives" given a number of vertices and a drawMode
 
 
/* harmony default export */ __webpack_exports__["a"] = (TranformFeedback);
function getPrimitiveCount(_ref5) {
  var drawMode = _ref5.drawMode,
      vertexCount = _ref5.vertexCount,
      countVertices = _ref5.countVertices;
 
  switch (drawMode) {
    case __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].POINTS:
      return vertexCount;
    case __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].LINES:
      return vertexCount / 2;
    case __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].LINE_STRIP:
      return vertexCount - 1;
    case __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].LINE_LOOP:
      return vertexCount;
    case __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].TRIANGLES:
      return vertexCount / 3;
    case __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].TRIANGLE_STRIP:
      return vertexCount - 2;
    case __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].TRIANGLE_FAN:
      return vertexCount - 2;
    default:
      __WEBPACK_IMPORTED_MODULE_3_assert___default()(false);return 0;
  }
}
 
// Counts the number of vertices after splitting the vertex stream into separate "primitives"
function getVertexCount(_ref6) {
  var drawMode = _ref6.drawMode,
      vertexCount = _ref6.vertexCount;
 
  var primitiveCount = getPrimitiveCount({ drawMode: drawMode, vertexCount: vertexCount });
  switch (drawMode) {
    case __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].POINTS:
      return primitiveCount;
    case __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].LINES:
    case __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].LINE_STRIP:
    case __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].LINE_LOOP:
      return vertexCount * 2;
    case __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].TRIANGLES:
    case __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].TRIANGLE_STRIP:
    case __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].TRIANGLE_FAN:
      return vertexCount * 3;
    default:
      __WEBPACK_IMPORTED_MODULE_3_assert___default()(false);return 0;
  }
}
 
// Counts the number of complete primitives given a number of vertices and a drawMode
function getTransformFeedbackMode(_ref7) {
  var drawMode = _ref7.drawMode;
 
  switch (drawMode) {
    case __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].POINTS:
      return __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].POINTS;
    case __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].LINES:
      return __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].LINES;
    case __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].LINE_STRIP:
      return __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].LINES;
    case __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].LINE_LOOP:
      return __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].LINES;
    case __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].TRIANGLES:
      return __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].TRIANGLES;
    case __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].TRIANGLE_STRIP:
      return __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].TRIANGLES;
    case __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].TRIANGLE_FAN:
      return __WEBPACK_IMPORTED_MODULE_0__gl_constants__["a" /* default */].TRIANGLES;
    default:
      __WEBPACK_IMPORTED_MODULE_3_assert___default()(false);return 0;
  }
}
//# sourceMappingURL=transform-feedback.js.map
 
/***/ }),
/* 277 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = assert;
function assert(condition,message){if(!condition)throw new Error("Assertion failed. "+message)}
//# sourceMappingURL=assert.js.map
 
/***/ }),
/* 278 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* unused harmony export validateMatrix4 */
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__math_array__ = __webpack_require__(112);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__common__ = __webpack_require__(31);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__vector2__ = __webpack_require__(280);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__vector3__ = __webpack_require__(113);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__vector4__ = __webpack_require__(281);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__lib_assert__ = __webpack_require__(277);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_gl_mat4_determinant__ = __webpack_require__(569);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_gl_mat4_determinant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_gl_mat4_determinant__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_gl_mat4_fromQuat__ = __webpack_require__(570);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_gl_mat4_fromQuat___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_gl_mat4_fromQuat__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_gl_mat4_frustum__ = __webpack_require__(571);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_gl_mat4_frustum___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_gl_mat4_frustum__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_gl_mat4_lookAt__ = __webpack_require__(102);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_gl_mat4_lookAt___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_gl_mat4_lookAt__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10_gl_mat4_ortho__ = __webpack_require__(234);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10_gl_mat4_ortho___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_10_gl_mat4_ortho__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11_gl_mat4_perspective__ = __webpack_require__(76);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11_gl_mat4_perspective___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_11_gl_mat4_perspective__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12_gl_mat4_transpose__ = __webpack_require__(574);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12_gl_mat4_transpose___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_12_gl_mat4_transpose__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13_gl_mat4_invert__ = __webpack_require__(156);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13_gl_mat4_invert___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_13_gl_mat4_invert__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14_gl_mat4_multiply__ = __webpack_require__(75);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14_gl_mat4_multiply___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_14_gl_mat4_multiply__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15_gl_mat4_rotateX__ = __webpack_require__(157);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15_gl_mat4_rotateX___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_15_gl_mat4_rotateX__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16_gl_mat4_rotateY__ = __webpack_require__(235);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16_gl_mat4_rotateY___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_16_gl_mat4_rotateY__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17_gl_mat4_rotateZ__ = __webpack_require__(158);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17_gl_mat4_rotateZ___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_17_gl_mat4_rotateZ__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_18_gl_mat4_rotate__ = __webpack_require__(573);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_18_gl_mat4_rotate___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_18_gl_mat4_rotate__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_19_gl_mat4_scale__ = __webpack_require__(77);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_19_gl_mat4_scale___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_19_gl_mat4_scale__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_20_gl_mat4_translate__ = __webpack_require__(78);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_20_gl_mat4_translate___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_20_gl_mat4_translate__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_21_gl_vec2_transformMat4__ = __webpack_require__(602);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_21_gl_vec2_transformMat4___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_21_gl_vec2_transformMat4__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_22_gl_vec3_transformMat4__ = __webpack_require__(615);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_22_gl_vec3_transformMat4___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_22_gl_vec3_transformMat4__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_23_gl_vec4_transformMat4__ = __webpack_require__(103);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_23_gl_vec4_transformMat4___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_23_gl_vec4_transformMat4__);
var _slicedToArray=function(){function sliceIterator(arr,i){var _arr=[],_n=!0,_d=!1,_e=void 0;try{for(var _s,_i=arr[Symbol.iterator]();!(_n=(_s=_i.next()).done)&&(_arr.push(_s.value),!(i&&_arr.length===i));_n=!0);}catch(err){_d=!0,_e=err}finally{try{!_n&&_i['return']&&_i['return']()}finally{if(_d)throw _e}}return _arr}return function(arr,i){if(Array.isArray(arr))return arr;if(Symbol.iterator in Object(arr))return sliceIterator(arr,i);throw new TypeError('Invalid attempt to destructure non-iterable instance')}}(),_createClass=function(){function defineProperties(target,props){for(var descriptor,i=0;i<props.length;i++)descriptor=props[i],descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,'value'in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}();function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError('Cannot call a class as a function')}function _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError('this hasn\'t been initialised - super() hasn\'t been called');return call&&('object'==typeof call||'function'==typeof call)?call:self}function _inherits(subClass,superClass){if('function'!=typeof superClass&&null!==superClass)throw new TypeError('Super expression must either be null or a function, not '+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass)}var IDENTITY=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function validateMatrix4(m){var _NumberisFinite=Number.isFinite;return 16===m.length&&_NumberisFinite(m[0])&&_NumberisFinite(m[1])&&_NumberisFinite(m[2])&&_NumberisFinite(m[3])&&_NumberisFinite(m[4])&&_NumberisFinite(m[5])&&_NumberisFinite(m[6])&&_NumberisFinite(m[7])&&_NumberisFinite(m[8])&&_NumberisFinite(m[9])&&_NumberisFinite(m[10])&&_NumberisFinite(m[11])&&_NumberisFinite(m[12])&&_NumberisFinite(m[13])&&_NumberisFinite(m[14])&&_NumberisFinite(m[15])}var tempVector4=[0,0,0,0],Matrix4=function(_MathArray){function Matrix4(){for(var _len=arguments.length,args=Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];_classCallCheck(this,Matrix4);var _this=_possibleConstructorReturn(this,(Matrix4.__proto__||Object.getPrototypeOf(Matrix4)).call(this));return Array.isArray(args[0])&&1===arguments.length?_this.copy(args[0]):_this.identity(),_this}return _inherits(Matrix4,_MathArray),_createClass(Matrix4,[{key:'setRowMajor',value:function setRowMajor(){var m00=0<arguments.length&&void 0!==arguments[0]?arguments[0]:1,m10=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,m20=2<arguments.length&&void 0!==arguments[2]?arguments[2]:0,m30=3<arguments.length&&void 0!==arguments[3]?arguments[3]:0,m01=4<arguments.length&&void 0!==arguments[4]?arguments[4]:0,m11=5<arguments.length&&void 0!==arguments[5]?arguments[5]:1,m21=6<arguments.length&&void 0!==arguments[6]?arguments[6]:0,m31=7<arguments.length&&void 0!==arguments[7]?arguments[7]:0,m02=8<arguments.length&&void 0!==arguments[8]?arguments[8]:0,m12=9<arguments.length&&void 0!==arguments[9]?arguments[9]:0,m22=10<arguments.length&&void 0!==arguments[10]?arguments[10]:1,m32=11<arguments.length&&void 0!==arguments[11]?arguments[11]:0,m03=12<arguments.length&&void 0!==arguments[12]?arguments[12]:0,m13=13<arguments.length&&void 0!==arguments[13]?arguments[13]:0,m23=14<arguments.length&&void 0!==arguments[14]?arguments[14]:0,m33=15<arguments.length&&void 0!==arguments[15]?arguments[15]:1;return this.set(m00,m01,m02,m03,m10,m11,m12,m13,m20,m21,m22,m23,m30,m31,m32,m33)}},{key:'setColumnMajor',value:function setColumnMajor(){var m00=0<arguments.length&&void 0!==arguments[0]?arguments[0]:1,m01=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,m02=2<arguments.length&&void 0!==arguments[2]?arguments[2]:0,m03=3<arguments.length&&void 0!==arguments[3]?arguments[3]:0,m10=4<arguments.length&&void 0!==arguments[4]?arguments[4]:0,m11=5<arguments.length&&void 0!==arguments[5]?arguments[5]:1,m12=6<arguments.length&&void 0!==arguments[6]?arguments[6]:0,m13=7<arguments.length&&void 0!==arguments[7]?arguments[7]:0,m20=8<arguments.length&&void 0!==arguments[8]?arguments[8]:0,m21=9<arguments.length&&void 0!==arguments[9]?arguments[9]:0,m22=10<arguments.length&&void 0!==arguments[10]?arguments[10]:1,m23=11<arguments.length&&void 0!==arguments[11]?arguments[11]:0,m30=12<arguments.length&&void 0!==arguments[12]?arguments[12]:0,m31=13<arguments.length&&void 0!==arguments[13]?arguments[13]:0,m32=14<arguments.length&&void 0!==arguments[14]?arguments[14]:0,m33=15<arguments.length&&void 0!==arguments[15]?arguments[15]:1;return this.set(m00,m01,m02,m03,m10,m11,m12,m13,m20,m21,m22,m23,m30,m31,m32,m33)}},{key:'set',value:function set(m00,m01,m02,m03,m10,m11,m12,m13,m20,m21,m22,m23,m30,m31,m32,m33){return this[0]=m00,this[1]=m01,this[2]=m02,this[3]=m03,this[4]=m10,this[5]=m11,this[6]=m12,this[7]=m13,this[8]=m20,this[9]=m21,this[10]=m22,this[11]=m23,this[12]=m30,this[13]=m31,this[14]=m32,this[15]=m33,this.check(),this}},{key:'determinant',value:function determinant(){return __WEBPACK_IMPORTED_MODULE_6_gl_mat4_determinant___default()(this)}},{key:'identity',value:function identity(){for(var i=0;i<IDENTITY.length;++i)this[i]=IDENTITY[i];return this.check(),this}},{key:'fromQuaternion',value:function fromQuaternion(q){return __WEBPACK_IMPORTED_MODULE_7_gl_mat4_fromQuat___default()(this,q),this.check(),this}},{key:'frustum',value:function frustum(_ref){var left=_ref.left,right=_ref.right,bottom=_ref.bottom,top=_ref.top,near=_ref.near,far=_ref.far;return __WEBPACK_IMPORTED_MODULE_8_gl_mat4_frustum___default()(this,left,right,bottom,top,near,far),this.check(),this}},{key:'lookAt',value:function lookAt(){var _ref2=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},eye=_ref2.eye,_ref2$center=_ref2.center,center=void 0===_ref2$center?[0,0,0]:_ref2$center,_ref2$up=_ref2.up,up=void 0===_ref2$up?[0,1,0]:_ref2$up;return __WEBPACK_IMPORTED_MODULE_9_gl_mat4_lookAt___default()(this,eye,center,up),this.check(),this}},{key:'ortho',value:function ortho(_ref3){var left=_ref3.left,right=_ref3.right,bottom=_ref3.bottom,top=_ref3.top,_ref3$near=_ref3.near,near=void 0===_ref3$near?.1:_ref3$near,_ref3$far=_ref3.far,far=void 0===_ref3$far?500:_ref3$far;return __WEBPACK_IMPORTED_MODULE_10_gl_mat4_ortho___default()(this,left,right,bottom,top,near,far),this.check(),this}},{key:'perspective',value:function perspective(){var _MathPI=Math.PI,_ref4=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},_ref4$fov=_ref4.fov,fov=void 0===_ref4$fov?45*_MathPI/180:_ref4$fov,_ref4$aspect=_ref4.aspect,aspect=void 0===_ref4$aspect?1:_ref4$aspect,_ref4$near=_ref4.near,near=void 0===_ref4$near?.1:_ref4$near,_ref4$far=_ref4.far,far=void 0===_ref4$far?500:_ref4$far;if(fov>2*_MathPI)throw Error('radians');return __WEBPACK_IMPORTED_MODULE_11_gl_mat4_perspective___default()(this,fov,aspect,near,far),this.check(),this}},{key:'transpose',value:function transpose(){return __WEBPACK_IMPORTED_MODULE_12_gl_mat4_transpose___default()(this,this),this.check(),this}},{key:'invert',value:function invert(){return __WEBPACK_IMPORTED_MODULE_13_gl_mat4_invert___default()(this,this),this.check(),this}},{key:'multiplyLeft',value:function multiplyLeft(a){return __WEBPACK_IMPORTED_MODULE_14_gl_mat4_multiply___default()(this,a,this),this.check(),this}},{key:'multiplyRight',value:function multiplyRight(a){return __WEBPACK_IMPORTED_MODULE_14_gl_mat4_multiply___default()(this,this,a),this.check(),this}},{key:'rotateX',value:function rotateX(radians){return __WEBPACK_IMPORTED_MODULE_15_gl_mat4_rotateX___default()(this,this,radians),this.check(),this}},{key:'rotateY',value:function rotateY(radians){return __WEBPACK_IMPORTED_MODULE_16_gl_mat4_rotateY___default()(this,this,radians),this.check(),this}},{key:'rotateZ',value:function rotateZ(radians){return __WEBPACK_IMPORTED_MODULE_17_gl_mat4_rotateZ___default()(this,this,radians),this.check(),this}},{key:'rotateXYZ',value:function rotateXYZ(_ref5){var _ref6=_slicedToArray(_ref5,3),rx=_ref6[0],ry=_ref6[1],rz=_ref6[2];return this.rotateX(rx).rotateY(ry).rotateZ(rz)}},{key:'rotateAxis',value:function rotateAxis(radians,axis){return __WEBPACK_IMPORTED_MODULE_18_gl_mat4_rotate___default()(this,this,radians,axis),this.check(),this}},{key:'scale',value:function scale(vec){return __WEBPACK_IMPORTED_MODULE_19_gl_mat4_scale___default()(this,this,vec),this.check(),this}},{key:'translate',value:function translate(vec){return __WEBPACK_IMPORTED_MODULE_20_gl_mat4_translate___default()(this,this,vec),this.check(),this}},{key:'transformVector2',value:function transformVector2(vector,out){return out=out||new __WEBPACK_IMPORTED_MODULE_2__vector2__["a" /* default */],__WEBPACK_IMPORTED_MODULE_21_gl_vec2_transformMat4___default()(out,vector,this),__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__lib_assert__["a" /* default */])(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__vector2__["b" /* validateVector2 */])(out)),out}},{key:'transformVector3',value:function transformVector3(vector){var out=1<arguments.length&&void 0!==arguments[1]?arguments[1]:new __WEBPACK_IMPORTED_MODULE_3__vector3__["a" /* default */];return out=out||new __WEBPACK_IMPORTED_MODULE_3__vector3__["a" /* default */],__WEBPACK_IMPORTED_MODULE_22_gl_vec3_transformMat4___default()(out,vector,this),__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__lib_assert__["a" /* default */])(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__vector3__["b" /* validateVector3 */])(out)),out}},{key:'transformVector4',value:function transformVector4(vector){var out=1<arguments.length&&void 0!==arguments[1]?arguments[1]:new __WEBPACK_IMPORTED_MODULE_4__vector4__["a" /* default */];return out=out||new __WEBPACK_IMPORTED_MODULE_4__vector4__["a" /* default */],__WEBPACK_IMPORTED_MODULE_23_gl_vec4_transformMat4___default()(out,vector,this),__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__lib_assert__["a" /* default */])(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__vector4__["b" /* validateVector4 */])(out)),out}},{key:'transformVector',value:function transformVector(vector,out){switch(vector.length){case 2:return this.transformVector2(vector,out);case 3:return this.transformVector3(vector,out);case 4:return this.transformVector4(vector,out);default:throw new Error('Illegal vector');}}},{key:'transformDirection',value:function transformDirection(vector,out){switch(vector.length){case 2:__WEBPACK_IMPORTED_MODULE_23_gl_vec4_transformMat4___default()(tempVector4,[vector[0],vector[1],0,0],this),out=out||new __WEBPACK_IMPORTED_MODULE_2__vector2__["a" /* default */],out[0]=tempVector4[0],out[1]=tempVector4[1];break;case 3:__WEBPACK_IMPORTED_MODULE_23_gl_vec4_transformMat4___default()(tempVector4,[vector[0],vector[1],vector[2],0],this),out=out||new __WEBPACK_IMPORTED_MODULE_3__vector3__["a" /* default */],out[0]=tempVector4[0],out[1]=tempVector4[1],out[2]=tempVector4[2];break;case 4:__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__lib_assert__["a" /* default */])(0===vector[3]),out=out||new __WEBPACK_IMPORTED_MODULE_4__vector4__["a" /* default */],__WEBPACK_IMPORTED_MODULE_23_gl_vec4_transformMat4___default()(out,vector,this);break;default:throw new Error('Illegal vector');}return out}},{key:'transformPoint',value:function transformPoint(vector,out){switch(vector.length){case 2:out=out||new __WEBPACK_IMPORTED_MODULE_2__vector2__["a" /* default */],__WEBPACK_IMPORTED_MODULE_23_gl_vec4_transformMat4___default()(out,[vector[0],vector[1],0,1],this),out.length=2,__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__lib_assert__["a" /* default */])(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__vector2__["b" /* validateVector2 */])(out));break;case 3:out=out||new __WEBPACK_IMPORTED_MODULE_3__vector3__["a" /* default */],__WEBPACK_IMPORTED_MODULE_23_gl_vec4_transformMat4___default()(out,[vector[0],vector[1],vector[2],1],this),out.length=3,__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__lib_assert__["a" /* default */])(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__vector3__["b" /* validateVector3 */])(out));break;case 4:__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__lib_assert__["a" /* default */])(0!==vector[3]),out=out||new __WEBPACK_IMPORTED_MODULE_4__vector4__["a" /* default */],__WEBPACK_IMPORTED_MODULE_23_gl_vec4_transformMat4___default()(out,vector,this),__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__lib_assert__["a" /* default */])(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__vector4__["b" /* validateVector4 */])(out));break;default:throw new Error('Illegal vector');}return out}},{key:'ELEMENTS',get:function get(){return 16}},{key:'m00',get:function get(){return this[0]},set:function set(value){return this[0]=__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__common__["g" /* checkNumber */])(value)}},{key:'m01',get:function get(){return this[4]},set:function set(value){return this[4]=__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__common__["g" /* checkNumber */])(value)}},{key:'m02',get:function get(){return this[8]},set:function set(value){return this[8]=__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__common__["g" /* checkNumber */])(value)}},{key:'m03',get:function get(){return this[12]},set:function set(value){return this[12]=__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__common__["g" /* checkNumber */])(value)}},{key:'m10',get:function get(){return this[1]},set:function set(value){return this[1]=__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__common__["g" /* checkNumber */])(value)}},{key:'m11',get:function get(){return this[5]},set:function set(value){return this[5]=__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__common__["g" /* checkNumber */])(value)}},{key:'m12',get:function get(){return this[9]},set:function set(value){return this[9]=__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__common__["g" /* checkNumber */])(value)}},{key:'m13',get:function get(){return this[13]},set:function set(value){return this[13]=__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__common__["g" /* checkNumber */])(value)}},{key:'m20',get:function get(){return this[2]},set:function set(value){return this[2]=__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__common__["g" /* checkNumber */])(value)}},{key:'m21',get:function get(){return this[6]},set:function set(value){return this[6]=__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__common__["g" /* checkNumber */])(value)}},{key:'m22',get:function get(){return this[10]},set:function set(value){return this[10]=__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__common__["g" /* checkNumber */])(value)}},{key:'m23',get:function get(){return this[14]},set:function set(value){return this[14]=__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__common__["g" /* checkNumber */])(value)}},{key:'m30',get:function get(){return this[3]},set:function set(value){return this[3]=__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__common__["g" /* checkNumber */])(value)}},{key:'m31',get:function get(){return this[7]},set:function set(value){return this[7]=__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__common__["g" /* checkNumber */])(value)}},{key:'m32',get:function get(){return this[11]},set:function set(value){return this[11]=__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__common__["g" /* checkNumber */])(value)}},{key:'m33',get:function get(){return this[15]},set:function set(value){return this[15]=__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__common__["g" /* checkNumber */])(value)}}]),Matrix4}(__WEBPACK_IMPORTED_MODULE_0__math_array__["a" /* default */]);/* harmony default export */ __webpack_exports__["a"] = (Matrix4);
//# sourceMappingURL=matrix4.js.map
 
/***/ }),
/* 279 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* unused harmony export validateQuaternion */
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__math_array__ = __webpack_require__(112);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__common__ = __webpack_require__(31);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_gl_quat_fromMat3__ = __webpack_require__(579);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_gl_quat_fromMat3___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_gl_quat_fromMat3__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_gl_quat_identity__ = __webpack_require__(580);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_gl_quat_identity___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_gl_quat_identity__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_gl_quat_length__ = __webpack_require__(582);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_gl_quat_length___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_gl_quat_length__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_gl_quat_squaredLength__ = __webpack_require__(592);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_gl_quat_squaredLength___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_gl_quat_squaredLength__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_gl_quat_dot__ = __webpack_require__(578);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_gl_quat_dot___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_gl_quat_dot__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_gl_quat_rotationTo__ = __webpack_require__(588);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_gl_quat_rotationTo___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_gl_quat_rotationTo__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_gl_quat_add__ = __webpack_require__(575);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_gl_quat_add___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_gl_quat_add__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_gl_quat_calculateW__ = __webpack_require__(576);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_gl_quat_calculateW___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_gl_quat_calculateW__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10_gl_quat_conjugate__ = __webpack_require__(577);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10_gl_quat_conjugate___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_10_gl_quat_conjugate__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11_gl_quat_invert__ = __webpack_require__(581);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11_gl_quat_invert___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_11_gl_quat_invert__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12_gl_quat_lerp__ = __webpack_require__(583);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12_gl_quat_lerp___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_12_gl_quat_lerp__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13_gl_quat_multiply__ = __webpack_require__(584);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13_gl_quat_multiply___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_13_gl_quat_multiply__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14_gl_quat_normalize__ = __webpack_require__(236);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14_gl_quat_normalize___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_14_gl_quat_normalize__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15_gl_quat_rotateX__ = __webpack_require__(585);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15_gl_quat_rotateX___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_15_gl_quat_rotateX__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16_gl_quat_rotateY__ = __webpack_require__(586);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16_gl_quat_rotateY___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_16_gl_quat_rotateY__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17_gl_quat_rotateZ__ = __webpack_require__(587);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17_gl_quat_rotateZ___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_17_gl_quat_rotateZ__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_18_gl_quat_scale__ = __webpack_require__(589);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_18_gl_quat_scale___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_18_gl_quat_scale__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_19_gl_quat_set__ = __webpack_require__(590);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_19_gl_quat_set___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_19_gl_quat_set__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_20_gl_quat_setAxisAngle__ = __webpack_require__(237);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_20_gl_quat_setAxisAngle___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_20_gl_quat_setAxisAngle__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_21_gl_quat_slerp__ = __webpack_require__(591);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_21_gl_quat_slerp___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_21_gl_quat_slerp__);
var _createClass=function(){function defineProperties(target,props){for(var descriptor,i=0;i<props.length;i++)descriptor=props[i],descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,'value'in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}();function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError('Cannot call a class as a function')}function _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError('this hasn\'t been initialised - super() hasn\'t been called');return call&&('object'==typeof call||'function'==typeof call)?call:self}function _inherits(subClass,superClass){if('function'!=typeof superClass&&null!==superClass)throw new TypeError('Super expression must either be null or a function, not '+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass)}var IDENTITY_QUATERNION=[0,0,0,1];function validateQuaternion(q){var _NumberisFinite=Number.isFinite;return 4===q.length&&_NumberisFinite(q[0])&&_NumberisFinite(q[1])&&_NumberisFinite(q[2])&&_NumberisFinite(q[3])}var Quaternion=function(_MathArray){function Quaternion(){var x=0<arguments.length&&void 0!==arguments[0]?arguments[0]:0,y=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,z=2<arguments.length&&void 0!==arguments[2]?arguments[2]:0,w=3<arguments.length&&void 0!==arguments[3]?arguments[3]:1;_classCallCheck(this,Quaternion);var _this=_possibleConstructorReturn(this,(Quaternion.__proto__||Object.getPrototypeOf(Quaternion)).call(this));return Array.isArray(x)&&1===arguments.length?_this.copy(x):_this.set(x,y,z,w),_this}return _inherits(Quaternion,_MathArray),_createClass(Quaternion,[{key:'fromMatrix3',value:function fromMatrix3(m){return __WEBPACK_IMPORTED_MODULE_2_gl_quat_fromMat3___default()(this,m),this.check(),this}},{key:'fromValues',value:function fromValues(x,y,z,w){return this.set(x,y,z,w)}},{key:'identity',value:function identity(){return __WEBPACK_IMPORTED_MODULE_3_gl_quat_identity___default()(this),this.check(),this}},{key:'length',value:function length(){return __WEBPACK_IMPORTED_MODULE_4_gl_quat_length___default()(this)}},{key:'squaredLength',value:function squaredLength(){return __WEBPACK_IMPORTED_MODULE_5_gl_quat_squaredLength___default()(this)}},{key:'dot',value:function dot(a,b){if(void 0!==b)throw new Error('Quaternion.dot only takes one argument');return __WEBPACK_IMPORTED_MODULE_6_gl_quat_dot___default()(this,a)}},{key:'rotationTo',value:function rotationTo(vectorA,vectorB){return __WEBPACK_IMPORTED_MODULE_7_gl_quat_rotationTo___default()(this,vectorA,vectorB),this.check(),this}},{key:'add',value:function add(a,b){if(void 0!==b)throw new Error('Quaternion.add only takes one argument');return __WEBPACK_IMPORTED_MODULE_8_gl_quat_add___default()(this,a),this.check(),this}},{key:'calculateW',value:function calculateW(){return __WEBPACK_IMPORTED_MODULE_9_gl_quat_calculateW___default()(this,this),this.check(),this}},{key:'conjugate',value:function conjugate(){return __WEBPACK_IMPORTED_MODULE_10_gl_quat_conjugate___default()(this,this),this.check(),this}},{key:'invert',value:function invert(){return __WEBPACK_IMPORTED_MODULE_11_gl_quat_invert___default()(this,this),this.check(),this}},{key:'lerp',value:function lerp(a,b,t){return __WEBPACK_IMPORTED_MODULE_12_gl_quat_lerp___default()(this,a,b,t),this.check(),this}},{key:'multiply',value:function multiply(a,b){if(void 0!==b)throw new Error('Quaternion.multiply only takes one argument');return __WEBPACK_IMPORTED_MODULE_13_gl_quat_multiply___default()(this,this,b),this.check(),this}},{key:'normalize',value:function normalize(){return __WEBPACK_IMPORTED_MODULE_14_gl_quat_normalize___default()(this,this),this.check(),this}},{key:'rotateX',value:function rotateX(rad){return __WEBPACK_IMPORTED_MODULE_15_gl_quat_rotateX___default()(this,this,rad),this.check(),this}},{key:'rotateY',value:function rotateY(rad){return __WEBPACK_IMPORTED_MODULE_16_gl_quat_rotateY___default()(this,this,rad),this.check(),this}},{key:'rotateZ',value:function rotateZ(rad){return __WEBPACK_IMPORTED_MODULE_17_gl_quat_rotateZ___default()(this,this,rad),this.check(),this}},{key:'scale',value:function scale(b){return __WEBPACK_IMPORTED_MODULE_18_gl_quat_scale___default()(this,this,b),this.check(),this}},{key:'set',value:function set(i,j,k,l){return __WEBPACK_IMPORTED_MODULE_19_gl_quat_set___default()(this,i,j,k,l),this.check(),this}},{key:'setAxisAngle',value:function setAxisAngle(axis,rad){return __WEBPACK_IMPORTED_MODULE_20_gl_quat_setAxisAngle___default()(this,axis,rad),this.check(),this}},{key:'slerp',value:function slerp(_ref){var _ref$start=_ref.start,start=void 0===_ref$start?IDENTITY_QUATERNION:_ref$start,target=_ref.target,ratio=_ref.ratio;return __WEBPACK_IMPORTED_MODULE_21_gl_quat_slerp___default()(this,start,target,ratio),this.check(),this}},{key:'ELEMENTS',get:function get(){return 4}},{key:'x',get:function get(){return this[0]},set:function set(value){return this[0]=__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__common__["g" /* checkNumber */])(value)}},{key:'y',get:function get(){return this[1]},set:function set(value){return this[1]=__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__common__["g" /* checkNumber */])(value)}},{key:'z',get:function get(){return this[2]},set:function set(value){return this[2]=__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__common__["g" /* checkNumber */])(value)}},{key:'w',get:function get(){return this[3]},set:function set(value){return this[3]=__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__common__["g" /* checkNumber */])(value)}}]),Quaternion}(__WEBPACK_IMPORTED_MODULE_0__math_array__["a" /* default */]);/* harmony default export */ __webpack_exports__["a"] = (Quaternion);
//# sourceMappingURL=quaternion.js.map
 
/***/ }),
/* 280 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["b"] = validateVector2;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__vector__ = __webpack_require__(170);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__common__ = __webpack_require__(31);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_gl_vec2_set__ = __webpack_require__(600);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_gl_vec2_set___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_gl_vec2_set__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_gl_vec2_add__ = __webpack_require__(159);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_gl_vec2_add___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_gl_vec2_add__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_gl_vec2_subtract__ = __webpack_require__(601);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_gl_vec2_subtract___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_gl_vec2_subtract__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_gl_vec2_multiply__ = __webpack_require__(596);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_gl_vec2_multiply___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_gl_vec2_multiply__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_gl_vec2_divide__ = __webpack_require__(594);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_gl_vec2_divide___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_gl_vec2_divide__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_gl_vec2_scale__ = __webpack_require__(598);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_gl_vec2_scale___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_gl_vec2_scale__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_gl_vec2_scaleAndAdd__ = __webpack_require__(599);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_gl_vec2_scaleAndAdd___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_gl_vec2_scaleAndAdd__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_gl_vec2_negate__ = __webpack_require__(160);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_gl_vec2_negate___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_gl_vec2_negate__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10_gl_vec2_normalize__ = __webpack_require__(597);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10_gl_vec2_normalize___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_10_gl_vec2_normalize__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11_gl_vec2_dot__ = __webpack_require__(595);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11_gl_vec2_dot___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_11_gl_vec2_dot__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12_gl_vec2_cross__ = __webpack_require__(593);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12_gl_vec2_cross___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_12_gl_vec2_cross__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13_gl_vec2_lerp__ = __webpack_require__(238);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13_gl_vec2_lerp___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_13_gl_vec2_lerp__);
var _createClass=function(){function defineProperties(target,props){for(var descriptor,i=0;i<props.length;i++)descriptor=props[i],descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,'value'in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}();function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError('Cannot call a class as a function')}function _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError('this hasn\'t been initialised - super() hasn\'t been called');return call&&('object'==typeof call||'function'==typeof call)?call:self}function _inherits(subClass,superClass){if('function'!=typeof superClass&&null!==superClass)throw new TypeError('Super expression must either be null or a function, not '+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass)}function validateVector2(v){var _NumberisFinite=Number.isFinite;return 2===v.length&&_NumberisFinite(v[0])&&_NumberisFinite(v[1])}var Vector2=function(_Vector){function Vector2(){var x=0<arguments.length&&void 0!==arguments[0]?arguments[0]:0,y=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0;_classCallCheck(this,Vector2);var _this=_possibleConstructorReturn(this,(Vector2.__proto__||Object.getPrototypeOf(Vector2)).call(this));return Array.isArray(x)&&1===arguments.length?_this.copy(x):_this.set(x,y),_this}var _Mathatan=Math.atan2;return _inherits(Vector2,_Vector),_createClass(Vector2,[{key:'set',value:function set(x,y){return __WEBPACK_IMPORTED_MODULE_2_gl_vec2_set___default()(this,x,y),this.check(),this}},{key:'add',value:function add(){for(var _len=arguments.length,vectors=Array(_len),_key=0;_key<_len;_key++)vectors[_key]=arguments[_key];var _iteratorNormalCompletion=!0,_didIteratorError=!1,_iteratorError=void 0;try{for(var _step,vector,_iterator=vectors[Symbol.iterator]();!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=!0)vector=_step.value,__WEBPACK_IMPORTED_MODULE_3_gl_vec2_add___default()(this,this,vector)}catch(err){_didIteratorError=!0,_iteratorError=err}finally{try{!_iteratorNormalCompletion&&_iterator.return&&_iterator.return()}finally{if(_didIteratorError)throw _iteratorError}}return this}},{key:'subtract',value:function subtract(){for(var _len2=arguments.length,vectors=Array(_len2),_key2=0;_key2<_len2;_key2++)vectors[_key2]=arguments[_key2];var _iteratorNormalCompletion2=!0,_didIteratorError2=!1,_iteratorError2=void 0;try{for(var _step2,vector,_iterator2=vectors[Symbol.iterator]();!(_iteratorNormalCompletion2=(_step2=_iterator2.next()).done);_iteratorNormalCompletion2=!0)vector=_step2.value,__WEBPACK_IMPORTED_MODULE_4_gl_vec2_subtract___default()(this,this,vector)}catch(err){_didIteratorError2=!0,_iteratorError2=err}finally{try{!_iteratorNormalCompletion2&&_iterator2.return&&_iterator2.return()}finally{if(_didIteratorError2)throw _iteratorError2}}return this.check(),this}},{key:'multiply',value:function multiply(){for(var _len3=arguments.length,vectors=Array(_len3),_key3=0;_key3<_len3;_key3++)vectors[_key3]=arguments[_key3];var _iteratorNormalCompletion3=!0,_didIteratorError3=!1,_iteratorError3=void 0;try{for(var _step3,vector,_iterator3=vectors[Symbol.iterator]();!(_iteratorNormalCompletion3=(_step3=_iterator3.next()).done);_iteratorNormalCompletion3=!0)vector=_step3.value,__WEBPACK_IMPORTED_MODULE_5_gl_vec2_multiply___default()(this,this,vector)}catch(err){_didIteratorError3=!0,_iteratorError3=err}finally{try{!_iteratorNormalCompletion3&&_iterator3.return&&_iterator3.return()}finally{if(_didIteratorError3)throw _iteratorError3}}return this.check(),this}},{key:'divide',value:function divide(){for(var _len4=arguments.length,vectors=Array(_len4),_key4=0;_key4<_len4;_key4++)vectors[_key4]=arguments[_key4];var _iteratorNormalCompletion4=!0,_didIteratorError4=!1,_iteratorError4=void 0;try{for(var _step4,vector,_iterator4=vectors[Symbol.iterator]();!(_iteratorNormalCompletion4=(_step4=_iterator4.next()).done);_iteratorNormalCompletion4=!0)vector=_step4.value,__WEBPACK_IMPORTED_MODULE_6_gl_vec2_divide___default()(this,this,vector)}catch(err){_didIteratorError4=!0,_iteratorError4=err}finally{try{!_iteratorNormalCompletion4&&_iterator4.return&&_iterator4.return()}finally{if(_didIteratorError4)throw _iteratorError4}}return this.check(),this}},{key:'scale',value:function scale(_scale){return Number.isFinite(_scale)&&__WEBPACK_IMPORTED_MODULE_7_gl_vec2_scale___default()(this,this,_scale),this.check(),this}},{key:'scaleAndAdd',value:function scaleAndAdd(vector,scale){return __WEBPACK_IMPORTED_MODULE_8_gl_vec2_scaleAndAdd___default()(this,this,vector,scale),this.check(),this}},{key:'negate',value:function negate(){return __WEBPACK_IMPORTED_MODULE_9_gl_vec2_negate___default()(this,this),this.check(),this}},{key:'normalize',value:function normalize(){return __WEBPACK_IMPORTED_MODULE_10_gl_vec2_normalize___default()(this,this),this.check(),this}},{key:'dot',value:function dot(vector){return __WEBPACK_IMPORTED_MODULE_11_gl_vec2_dot___default()(this,vector)}},{key:'cross',value:function cross(vector){return __WEBPACK_IMPORTED_MODULE_12_gl_vec2_cross___default()(this,this,vector),this.check(),this}},{key:'lerp',value:function lerp(vector,coeff){return __WEBPACK_IMPORTED_MODULE_13_gl_vec2_lerp___default()(this,this,vector,coeff),this.check(),this}},{key:'horizontalAngle',value:function horizontalAngle(){return _Mathatan(this.y,this.x)}},{key:'verticalAngle',value:function verticalAngle(){return _Mathatan(this.x,this.y)}},{key:'operation',value:function operation(_operation){for(var _len5=arguments.length,args=Array(1<_len5?_len5-1:0),_key5=1;_key5<_len5;_key5++)args[_key5-1]=arguments[_key5];return _operation.apply(void 0,[this,this].concat(args)),this.check(),this}},{key:'ELEMENTS',get:function get(){return 2}},{key:'x',get:function get(){return this[0]},set:function set(value){return this[0]=__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__common__["g" /* checkNumber */])(value)}},{key:'y',get:function get(){return this[1]},set:function set(value){return this[1]=__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__common__["g" /* checkNumber */])(value)}}]),Vector2}(__WEBPACK_IMPORTED_MODULE_0__vector__["a" /* default */]);/* harmony default export */ __webpack_exports__["a"] = (Vector2);
//# sourceMappingURL=vector2.js.map
 
/***/ }),
/* 281 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["b"] = validateVector4;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__vector__ = __webpack_require__(170);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__common__ = __webpack_require__(31);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_gl_vec4_set__ = __webpack_require__(248);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_gl_vec4_set___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_gl_vec4_set__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_gl_vec4_distance__ = __webpack_require__(616);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_gl_vec4_distance___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_gl_vec4_distance__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_gl_vec4_add__ = __webpack_require__(243);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_gl_vec4_add___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_gl_vec4_add__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_gl_vec4_subtract__ = __webpack_require__(623);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_gl_vec4_subtract___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_gl_vec4_subtract__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_gl_vec4_multiply__ = __webpack_require__(246);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_gl_vec4_multiply___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_gl_vec4_multiply__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_gl_vec4_divide__ = __webpack_require__(617);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_gl_vec4_divide___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_gl_vec4_divide__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_gl_vec4_scale__ = __webpack_require__(161);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_gl_vec4_scale___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8_gl_vec4_scale__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_gl_vec4_scaleAndAdd__ = __webpack_require__(621);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_gl_vec4_scaleAndAdd___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_gl_vec4_scaleAndAdd__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10_gl_vec4_negate__ = __webpack_require__(620);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10_gl_vec4_negate___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_10_gl_vec4_negate__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11_gl_vec4_inverse__ = __webpack_require__(618);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11_gl_vec4_inverse___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_11_gl_vec4_inverse__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12_gl_vec4_normalize__ = __webpack_require__(247);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12_gl_vec4_normalize___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_12_gl_vec4_normalize__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13_gl_vec4_dot__ = __webpack_require__(244);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13_gl_vec4_dot___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_13_gl_vec4_dot__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14_gl_vec4_lerp__ = __webpack_require__(245);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14_gl_vec4_lerp___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_14_gl_vec4_lerp__);
var _createClass=function(){function defineProperties(target,props){for(var descriptor,i=0;i<props.length;i++)descriptor=props[i],descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,'value'in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}();function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError('Cannot call a class as a function')}function _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError('this hasn\'t been initialised - super() hasn\'t been called');return call&&('object'==typeof call||'function'==typeof call)?call:self}function _inherits(subClass,superClass){if('function'!=typeof superClass&&null!==superClass)throw new TypeError('Super expression must either be null or a function, not '+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass)}function validateVector4(v){var _NumberisFinite=Number.isFinite;return 4===v.length&&_NumberisFinite(v[0])&&_NumberisFinite(v[1])&&_NumberisFinite(v[2])&&_NumberisFinite(v[3])}var Vector4=function(_Vector){function Vector4(){var x=0<arguments.length&&void 0!==arguments[0]?arguments[0]:0,y=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,z=2<arguments.length&&void 0!==arguments[2]?arguments[2]:0,w=3<arguments.length&&void 0!==arguments[3]?arguments[3]:0;_classCallCheck(this,Vector4);var _this=_possibleConstructorReturn(this,(Vector4.__proto__||Object.getPrototypeOf(Vector4)).call(this));return Array.isArray(x)&&1===arguments.length?_this.copy(x):_this.set(x,y,z,w),_this}return _inherits(Vector4,_Vector),_createClass(Vector4,[{key:'set',value:function set(x,y,z,w){return __WEBPACK_IMPORTED_MODULE_2_gl_vec4_set___default()(this,x,y,z,w),this.check(),this}},{key:'distance',value:function distance(vector){return __WEBPACK_IMPORTED_MODULE_3_gl_vec4_distance___default()(vector)}},{key:'add',value:function add(){for(var _len=arguments.length,vectors=Array(_len),_key=0;_key<_len;_key++)vectors[_key]=arguments[_key];var _iteratorNormalCompletion=!0,_didIteratorError=!1,_iteratorError=void 0;try{for(var _step,vector,_iterator=vectors[Symbol.iterator]();!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=!0)vector=_step.value,__WEBPACK_IMPORTED_MODULE_4_gl_vec4_add___default()(this,this,vector)}catch(err){_didIteratorError=!0,_iteratorError=err}finally{try{!_iteratorNormalCompletion&&_iterator.return&&_iterator.return()}finally{if(_didIteratorError)throw _iteratorError}}return this.check(),this}},{key:'subtract',value:function subtract(){for(var _len2=arguments.length,vectors=Array(_len2),_key2=0;_key2<_len2;_key2++)vectors[_key2]=arguments[_key2];var _iteratorNormalCompletion2=!0,_didIteratorError2=!1,_iteratorError2=void 0;try{for(var _step2,vector,_iterator2=vectors[Symbol.iterator]();!(_iteratorNormalCompletion2=(_step2=_iterator2.next()).done);_iteratorNormalCompletion2=!0)vector=_step2.value,__WEBPACK_IMPORTED_MODULE_5_gl_vec4_subtract___default()(this,this,vector)}catch(err){_didIteratorError2=!0,_iteratorError2=err}finally{try{!_iteratorNormalCompletion2&&_iterator2.return&&_iterator2.return()}finally{if(_didIteratorError2)throw _iteratorError2}}return this.check(),this}},{key:'multiply',value:function multiply(){for(var _len3=arguments.length,vectors=Array(_len3),_key3=0;_key3<_len3;_key3++)vectors[_key3]=arguments[_key3];var _iteratorNormalCompletion3=!0,_didIteratorError3=!1,_iteratorError3=void 0;try{for(var _step3,vector,_iterator3=vectors[Symbol.iterator]();!(_iteratorNormalCompletion3=(_step3=_iterator3.next()).done);_iteratorNormalCompletion3=!0)vector=_step3.value,__WEBPACK_IMPORTED_MODULE_6_gl_vec4_multiply___default()(this,this,vector)}catch(err){_didIteratorError3=!0,_iteratorError3=err}finally{try{!_iteratorNormalCompletion3&&_iterator3.return&&_iterator3.return()}finally{if(_didIteratorError3)throw _iteratorError3}}return this.check(),this}},{key:'divide',value:function divide(){for(var _len4=arguments.length,vectors=Array(_len4),_key4=0;_key4<_len4;_key4++)vectors[_key4]=arguments[_key4];var _iteratorNormalCompletion4=!0,_didIteratorError4=!1,_iteratorError4=void 0;try{for(var _step4,vector,_iterator4=vectors[Symbol.iterator]();!(_iteratorNormalCompletion4=(_step4=_iterator4.next()).done);_iteratorNormalCompletion4=!0)vector=_step4.value,__WEBPACK_IMPORTED_MODULE_7_gl_vec4_divide___default()(this,this,vector)}catch(err){_didIteratorError4=!0,_iteratorError4=err}finally{try{!_iteratorNormalCompletion4&&_iterator4.return&&_iterator4.return()}finally{if(_didIteratorError4)throw _iteratorError4}}return this.check(),this}},{key:'scale',value:function scale(_scale){return __WEBPACK_IMPORTED_MODULE_8_gl_vec4_scale___default()(this,this,_scale),this.check(),this}},{key:'scaleAndAdd',value:function scaleAndAdd(vector,scale){return __WEBPACK_IMPORTED_MODULE_9_gl_vec4_scaleAndAdd___default()(this,this,vector,scale),this.check(),this}},{key:'negate',value:function negate(){return __WEBPACK_IMPORTED_MODULE_10_gl_vec4_negate___default()(this,this),this.check(),this}},{key:'inverse',value:function inverse(){return __WEBPACK_IMPORTED_MODULE_11_gl_vec4_inverse___default()(this,this),this.check(),this}},{key:'normalize',value:function normalize(){return __WEBPACK_IMPORTED_MODULE_12_gl_vec4_normalize___default()(this,this),this.check(),this}},{key:'dot',value:function dot(vector){return __WEBPACK_IMPORTED_MODULE_13_gl_vec4_dot___default()(this,vector)}},{key:'lerp',value:function lerp(vector,coeff){return __WEBPACK_IMPORTED_MODULE_14_gl_vec4_lerp___default()(this,this,vector,coeff),this.check(),this}},{key:'ELEMENTS',get:function get(){return 4}},{key:'x',get:function get(){return this[0]},set:function set(value){return this[0]=__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__common__["g" /* checkNumber */])(value)}},{key:'y',get:function get(){return this[1]},set:function set(value){return this[1]=__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__common__["g" /* checkNumber */])(value)}},{key:'z',get:function get(){return this[2]},set:function set(value){return this[2]=__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__common__["g" /* checkNumber */])(value)}},{key:'w',get:function get(){return this[3]},set:function set(value){return this[3]=__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__common__["g" /* checkNumber */])(value)}}]),Vector4}(__WEBPACK_IMPORTED_MODULE_0__vector__["a" /* default */]);/* harmony default export */ __webpack_exports__["a"] = (Vector4);
//# sourceMappingURL=vector4.js.map
 
/***/ }),
/* 282 */
/***/ (function(module, exports, __webpack_require__) {
 
/* WEBPACK VAR INJECTION */(function(process, global) {var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
 
// Copyright (c) 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
 
// Copyright (c) 2015 - 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
 
// Purpose: include this in your module to avoids adding dependencies on
// micro modules like 'global' and 'is-browser';
 
/* global process, window, global, document, navigator */
var isBrowser = (typeof process === 'undefined' ? 'undefined' : _typeof(process)) !== 'object' || String(process) !== '[object process]' || process.browser;
 
var userAgent = typeof navigator !== 'undefined' ? navigator.userAgent.toLowerCase() : '';
 
module.exports = {
  window: typeof window !== 'undefined' ? window : global,
  global: typeof global !== 'undefined' ? global : window,
  document: typeof document !== 'undefined' ? document : {},
  isBrowser: isBrowser,
  userAgent: userAgent
};
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy91dGlscy9nbG9iYWxzLmpzIl0sIm5hbWVzIjpbImlzQnJvd3NlciIsInByb2Nlc3MiLCJTdHJpbmciLCJicm93c2VyIiwidXNlckFnZW50IiwibmF2aWdhdG9yIiwidG9Mb3dlckNhc2UiLCJtb2R1bGUiLCJleHBvcnRzIiwid2luZG93IiwiZ2xvYmFsIiwiZG9jdW1lbnQiXSwibWFwcGluZ3MiOiI7O0FBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBLElBQU1BLFlBQ0osUUFBT0MsT0FBUCx5Q0FBT0EsT0FBUCxPQUFtQixRQUFuQixJQUNBQyxPQUFPRCxPQUFQLE1BQW9CLGtCQURwQixJQUVBQSxRQUFRRSxPQUhWOztBQUtBLElBQU1DLFlBQVksT0FBT0MsU0FBUCxLQUFxQixXQUFyQixHQUNoQkEsVUFBVUQsU0FBVixDQUFvQkUsV0FBcEIsRUFEZ0IsR0FDb0IsRUFEdEM7O0FBR0FDLE9BQU9DLE9BQVAsR0FBaUI7QUFDZkMsVUFBUSxPQUFPQSxNQUFQLEtBQWtCLFdBQWxCLEdBQWdDQSxNQUFoQyxHQUF5Q0MsTUFEbEM7QUFFZkEsVUFBUSxPQUFPQSxNQUFQLEtBQWtCLFdBQWxCLEdBQWdDQSxNQUFoQyxHQUF5Q0QsTUFGbEM7QUFHZkUsWUFBVSxPQUFPQSxRQUFQLEtBQW9CLFdBQXBCLEdBQWtDQSxRQUFsQyxHQUE2QyxFQUh4QztBQUlmWCxzQkFKZTtBQUtmSTtBQUxlLENBQWpCIiwiZmlsZSI6Imdsb2JhbHMuanMiLCJzb3VyY2VzQ29udGVudCI6WyIvLyBDb3B5cmlnaHQgKGMpIDIwMTcgVWJlciBUZWNobm9sb2dpZXMsIEluYy5cbi8vXG4vLyBQZXJtaXNzaW9uIGlzIGhlcmVieSBncmFudGVkLCBmcmVlIG9mIGNoYXJnZSwgdG8gYW55IHBlcnNvbiBvYnRhaW5pbmcgYSBjb3B5XG4vLyBvZiB0aGlzIHNvZnR3YXJlIGFuZCBhc3NvY2lhdGVkIGRvY3VtZW50YXRpb24gZmlsZXMgKHRoZSBcIlNvZnR3YXJlXCIpLCB0byBkZWFsXG4vLyBpbiB0aGUgU29mdHdhcmUgd2l0aG91dCByZXN0cmljdGlvbiwgaW5jbHVkaW5nIHdpdGhvdXQgbGltaXRhdGlvbiB0aGUgcmlnaHRzXG4vLyB0byB1c2UsIGNvcHksIG1vZGlmeSwgbWVyZ2UsIHB1Ymxpc2gsIGRpc3RyaWJ1dGUsIHN1YmxpY2Vuc2UsIGFuZC9vciBzZWxsXG4vLyBjb3BpZXMgb2YgdGhlIFNvZnR3YXJlLCBhbmQgdG8gcGVybWl0IHBlcnNvbnMgdG8gd2hvbSB0aGUgU29mdHdhcmUgaXNcbi8vIGZ1cm5pc2hlZCB0byBkbyBzbywgc3ViamVjdCB0byB0aGUgZm9sbG93aW5nIGNvbmRpdGlvbnM6XG4vL1xuLy8gVGhlIGFib3ZlIGNvcHlyaWdodCBub3RpY2UgYW5kIHRoaXMgcGVybWlzc2lvbiBub3RpY2Ugc2hhbGwgYmUgaW5jbHVkZWQgaW5cbi8vIGFsbCBjb3BpZXMgb3Igc3Vic3RhbnRpYWwgcG9ydGlvbnMgb2YgdGhlIFNvZnR3YXJlLlxuLy9cbi8vIFRIRSBTT0ZUV0FSRSBJUyBQUk9WSURFRCBcIkFTIElTXCIsIFdJVEhPVVQgV0FSUkFOVFkgT0YgQU5ZIEtJTkQsIEVYUFJFU1MgT1Jcbi8vIElNUExJRUQsIElOQ0xVRElORyBCVVQgTk9UIExJTUlURUQgVE8gVEhFIFdBUlJBTlRJRVMgT0YgTUVSQ0hBTlRBQklMSVRZLFxuLy8gRklUTkVTUyBGT1IgQSBQQVJUSUNVTEFSIFBVUlBPU0UgQU5EIE5PTklORlJJTkdFTUVOVC4gSU4gTk8gRVZFTlQgU0hBTEwgVEhFXG4vLyBBVVRIT1JTIE9SIENPUFlSSUdIVCBIT0xERVJTIEJFIExJQUJMRSBGT1IgQU5ZIENMQUlNLCBEQU1BR0VTIE9SIE9USEVSXG4vLyBMSUFCSUxJVFksIFdIRVRIRVIgSU4gQU4gQUNUSU9OIE9GIENPTlRSQUNULCBUT1JUIE9SIE9USEVSV0lTRSwgQVJJU0lORyBGUk9NLFxuLy8gT1VUIE9GIE9SIElOIENPTk5FQ1RJT04gV0lUSCBUSEUgU09GVFdBUkUgT1IgVEhFIFVTRSBPUiBPVEhFUiBERUFMSU5HUyBJTlxuLy8gVEhFIFNPRlRXQVJFLlxuXG4vLyBDb3B5cmlnaHQgKGMpIDIwMTUgLSAyMDE3IFViZXIgVGVjaG5vbG9naWVzLCBJbmMuXG4vL1xuLy8gUGVybWlzc2lvbiBpcyBoZXJlYnkgZ3JhbnRlZCwgZnJlZSBvZiBjaGFyZ2UsIHRvIGFueSBwZXJzb24gb2J0YWluaW5nIGEgY29weVxuLy8gb2YgdGhpcyBzb2Z0d2FyZSBhbmQgYXNzb2NpYXRlZCBkb2N1bWVudGF0aW9uIGZpbGVzICh0aGUgXCJTb2Z0d2FyZVwiKSwgdG8gZGVhbFxuLy8gaW4gdGhlIFNvZnR3YXJlIHdpdGhvdXQgcmVzdHJpY3Rpb24sIGluY2x1ZGluZyB3aXRob3V0IGxpbWl0YXRpb24gdGhlIHJpZ2h0c1xuLy8gdG8gdXNlLCBjb3B5LCBtb2RpZnksIG1lcmdlLCBwdWJsaXNoLCBkaXN0cmlidXRlLCBzdWJsaWNlbnNlLCBhbmQvb3Igc2VsbFxuLy8gY29waWVzIG9mIHRoZSBTb2Z0d2FyZSwgYW5kIHRvIHBlcm1pdCBwZXJzb25zIHRvIHdob20gdGhlIFNvZnR3YXJlIGlzXG4vLyBmdXJuaXNoZWQgdG8gZG8gc28sIHN1YmplY3QgdG8gdGhlIGZvbGxvd2luZyBjb25kaXRpb25zOlxuLy9cbi8vIFRoZSBhYm92ZSBjb3B5cmlnaHQgbm90aWNlIGFuZCB0aGlzIHBlcm1pc3Npb24gbm90aWNlIHNoYWxsIGJlIGluY2x1ZGVkIGluXG4vLyBhbGwgY29waWVzIG9yIHN1YnN0YW50aWFsIHBvcnRpb25zIG9mIHRoZSBTb2Z0d2FyZS5cbi8vXG4vLyBUSEUgU09GVFdBUkUgSVMgUFJPVklERUQgXCJBUyBJU1wiLCBXSVRIT1VUIFdBUlJBTlRZIE9GIEFOWSBLSU5ELCBFWFBSRVNTIE9SXG4vLyBJTVBMSUVELCBJTkNMVURJTkcgQlVUIE5PVCBMSU1JVEVEIFRPIFRIRSBXQVJSQU5USUVTIE9GIE1FUkNIQU5UQUJJTElUWSxcbi8vIEZJVE5FU1MgRk9SIEEgUEFSVElDVUxBUiBQVVJQT1NFIEFORCBOT05JTkZSSU5HRU1FTlQuIElOIE5PIEVWRU5UIFNIQUxMIFRIRVxuLy8gQVVUSE9SUyBPUiBDT1BZUklHSFQgSE9MREVSUyBCRSBMSUFCTEUgRk9SIEFOWSBDTEFJTSwgREFNQUdFUyBPUiBPVEhFUlxuLy8gTElBQklMSVRZLCBXSEVUSEVSIElOIEFOIEFDVElPTiBPRiBDT05UUkFDVCwgVE9SVCBPUiBPVEhFUldJU0UsIEFSSVNJTkcgRlJPTSxcbi8vIE9VVCBPRiBPUiBJTiBDT05ORUNUSU9OIFdJVEggVEhFIFNPRlRXQVJFIE9SIFRIRSBVU0UgT1IgT1RIRVIgREVBTElOR1MgSU5cbi8vIFRIRSBTT0ZUV0FSRS5cblxuLy8gUHVycG9zZTogaW5jbHVkZSB0aGlzIGluIHlvdXIgbW9kdWxlIHRvIGF2b2lkcyBhZGRpbmcgZGVwZW5kZW5jaWVzIG9uXG4vLyBtaWNybyBtb2R1bGVzIGxpa2UgJ2dsb2JhbCcgYW5kICdpcy1icm93c2VyJztcblxuLyogZ2xvYmFsIHByb2Nlc3MsIHdpbmRvdywgZ2xvYmFsLCBkb2N1bWVudCwgbmF2aWdhdG9yICovXG5jb25zdCBpc0Jyb3dzZXIgPVxuICB0eXBlb2YgcHJvY2VzcyAhPT0gJ29iamVjdCcgfHxcbiAgU3RyaW5nKHByb2Nlc3MpICE9PSAnW29iamVjdCBwcm9jZXNzXScgfHxcbiAgcHJvY2Vzcy5icm93c2VyO1xuXG5jb25zdCB1c2VyQWdlbnQgPSB0eXBlb2YgbmF2aWdhdG9yICE9PSAndW5kZWZpbmVkJyA/XG4gIG5hdmlnYXRvci51c2VyQWdlbnQudG9Mb3dlckNhc2UoKSA6ICcnO1xuXG5tb2R1bGUuZXhwb3J0cyA9IHtcbiAgd2luZG93OiB0eXBlb2Ygd2luZG93ICE9PSAndW5kZWZpbmVkJyA/IHdpbmRvdyA6IGdsb2JhbCxcbiAgZ2xvYmFsOiB0eXBlb2YgZ2xvYmFsICE9PSAndW5kZWZpbmVkJyA/IGdsb2JhbCA6IHdpbmRvdyxcbiAgZG9jdW1lbnQ6IHR5cGVvZiBkb2N1bWVudCAhPT0gJ3VuZGVmaW5lZCcgPyBkb2N1bWVudCA6IHt9LFxuICBpc0Jyb3dzZXIsXG4gIHVzZXJBZ2VudFxufTtcbiJdfQ==
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(26), __webpack_require__(47)))
 
/***/ }),
/* 283 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Manager; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__globals__ = __webpack_require__(282);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__globals___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__globals__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__hammer_overrides__ = __webpack_require__(677);
// Copyright (c) 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
 
 
 
 
var hammerjs = void 0;
if (__WEBPACK_IMPORTED_MODULE_0__globals__["isBrowser"]) {
  hammerjs = __webpack_require__(624);
}
 
// Hammer.Manager mock for use in environments without `document` / `window`.
function HammerManagerMock(m) {
  var instance = {};
  var chainedNoop = function chainedNoop() {
    return instance;
  };
  instance.get = function () {
    return null;
  };
  instance.set = chainedNoop;
  instance.on = chainedNoop;
  instance.off = chainedNoop;
  instance.destroy = chainedNoop;
  instance.emit = chainedNoop;
  return instance;
}
 
if (hammerjs) {
  __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__hammer_overrides__["a" /* enhancePointerEventInput */])(hammerjs.PointerEventInput);
  __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__hammer_overrides__["b" /* enhanceMouseInput */])(hammerjs.MouseInput);
}
 
var Manager = hammerjs ? hammerjs.Manager : HammerManagerMock;
 
/* harmony default export */ __webpack_exports__["b"] = (hammerjs);
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy91dGlscy9oYW1tZXIuanMiXSwibmFtZXMiOlsiaXNCcm93c2VyIiwiZW5oYW5jZVBvaW50ZXJFdmVudElucHV0IiwiZW5oYW5jZU1vdXNlSW5wdXQiLCJoYW1tZXJqcyIsInJlcXVpcmUiLCJIYW1tZXJNYW5hZ2VyTW9jayIsIm0iLCJpbnN0YW5jZSIsImNoYWluZWROb29wIiwiZ2V0Iiwic2V0Iiwib24iLCJvZmYiLCJkZXN0cm95IiwiZW1pdCIsIlBvaW50ZXJFdmVudElucHV0IiwiTW91c2VJbnB1dCIsIk1hbmFnZXIiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBLFNBQVFBLFNBQVIsUUFBd0IsV0FBeEI7QUFDQSxTQUFRQyx3QkFBUixFQUFrQ0MsaUJBQWxDLFFBQTBELG9CQUExRDs7QUFFQSxJQUFJQyxpQkFBSjtBQUNBLElBQUlILFNBQUosRUFBZTtBQUNiRyxhQUFXQyxRQUFRLFVBQVIsQ0FBWDtBQUNEOztBQUVEO0FBQ0EsU0FBU0MsaUJBQVQsQ0FBMkJDLENBQTNCLEVBQThCO0FBQzVCLE1BQU1DLFdBQVcsRUFBakI7QUFDQSxNQUFNQyxjQUFjLFNBQWRBLFdBQWM7QUFBQSxXQUFNRCxRQUFOO0FBQUEsR0FBcEI7QUFDQUEsV0FBU0UsR0FBVCxHQUFlO0FBQUEsV0FBTSxJQUFOO0FBQUEsR0FBZjtBQUNBRixXQUFTRyxHQUFULEdBQWVGLFdBQWY7QUFDQUQsV0FBU0ksRUFBVCxHQUFjSCxXQUFkO0FBQ0FELFdBQVNLLEdBQVQsR0FBZUosV0FBZjtBQUNBRCxXQUFTTSxPQUFULEdBQW1CTCxXQUFuQjtBQUNBRCxXQUFTTyxJQUFULEdBQWdCTixXQUFoQjtBQUNBLFNBQU9ELFFBQVA7QUFDRDs7QUFFRCxJQUFJSixRQUFKLEVBQWM7QUFDWkYsMkJBQXlCRSxTQUFTWSxpQkFBbEM7QUFDQWIsb0JBQWtCQyxTQUFTYSxVQUEzQjtBQUNEOztBQUVELE9BQU8sSUFBTUMsVUFBVWQsV0FBV0EsU0FBU2MsT0FBcEIsR0FBOEJaLGlCQUE5Qzs7QUFFUCxlQUFlRixRQUFmIiwiZmlsZSI6ImhhbW1lci5qcyIsInNvdXJjZXNDb250ZW50IjpbIi8vIENvcHlyaWdodCAoYykgMjAxNyBVYmVyIFRlY2hub2xvZ2llcywgSW5jLlxuLy9cbi8vIFBlcm1pc3Npb24gaXMgaGVyZWJ5IGdyYW50ZWQsIGZyZWUgb2YgY2hhcmdlLCB0byBhbnkgcGVyc29uIG9idGFpbmluZyBhIGNvcHlcbi8vIG9mIHRoaXMgc29mdHdhcmUgYW5kIGFzc29jaWF0ZWQgZG9jdW1lbnRhdGlvbiBmaWxlcyAodGhlIFwiU29mdHdhcmVcIiksIHRvIGRlYWxcbi8vIGluIHRoZSBTb2Z0d2FyZSB3aXRob3V0IHJlc3RyaWN0aW9uLCBpbmNsdWRpbmcgd2l0aG91dCBsaW1pdGF0aW9uIHRoZSByaWdodHNcbi8vIHRvIHVzZSwgY29weSwgbW9kaWZ5LCBtZXJnZSwgcHVibGlzaCwgZGlzdHJpYnV0ZSwgc3VibGljZW5zZSwgYW5kL29yIHNlbGxcbi8vIGNvcGllcyBvZiB0aGUgU29mdHdhcmUsIGFuZCB0byBwZXJtaXQgcGVyc29ucyB0byB3aG9tIHRoZSBTb2Z0d2FyZSBpc1xuLy8gZnVybmlzaGVkIHRvIGRvIHNvLCBzdWJqZWN0IHRvIHRoZSBmb2xsb3dpbmcgY29uZGl0aW9uczpcbi8vXG4vLyBUaGUgYWJvdmUgY29weXJpZ2h0IG5vdGljZSBhbmQgdGhpcyBwZXJtaXNzaW9uIG5vdGljZSBzaGFsbCBiZSBpbmNsdWRlZCBpblxuLy8gYWxsIGNvcGllcyBvciBzdWJzdGFudGlhbCBwb3J0aW9ucyBvZiB0aGUgU29mdHdhcmUuXG4vL1xuLy8gVEhFIFNPRlRXQVJFIElTIFBST1ZJREVEIFwiQVMgSVNcIiwgV0lUSE9VVCBXQVJSQU5UWSBPRiBBTlkgS0lORCwgRVhQUkVTUyBPUlxuLy8gSU1QTElFRCwgSU5DTFVESU5HIEJVVCBOT1QgTElNSVRFRCBUTyBUSEUgV0FSUkFOVElFUyBPRiBNRVJDSEFOVEFCSUxJVFksXG4vLyBGSVRORVNTIEZPUiBBIFBBUlRJQ1VMQVIgUFVSUE9TRSBBTkQgTk9OSU5GUklOR0VNRU5ULiBJTiBOTyBFVkVOVCBTSEFMTCBUSEVcbi8vIEFVVEhPUlMgT1IgQ09QWVJJR0hUIEhPTERFUlMgQkUgTElBQkxFIEZPUiBBTlkgQ0xBSU0sIERBTUFHRVMgT1IgT1RIRVJcbi8vIExJQUJJTElUWSwgV0hFVEhFUiBJTiBBTiBBQ1RJT04gT0YgQ09OVFJBQ1QsIFRPUlQgT1IgT1RIRVJXSVNFLCBBUklTSU5HIEZST00sXG4vLyBPVVQgT0YgT1IgSU4gQ09OTkVDVElPTiBXSVRIIFRIRSBTT0ZUV0FSRSBPUiBUSEUgVVNFIE9SIE9USEVSIERFQUxJTkdTIElOXG4vLyBUSEUgU09GVFdBUkUuXG5cbmltcG9ydCB7aXNCcm93c2VyfSBmcm9tICcuL2dsb2JhbHMnO1xuaW1wb3J0IHtlbmhhbmNlUG9pbnRlckV2ZW50SW5wdXQsIGVuaGFuY2VNb3VzZUlucHV0fSBmcm9tICcuL2hhbW1lci1vdmVycmlkZXMnO1xuXG5sZXQgaGFtbWVyanM7XG5pZiAoaXNCcm93c2VyKSB7XG4gIGhhbW1lcmpzID0gcmVxdWlyZSgnaGFtbWVyanMnKTtcbn1cblxuLy8gSGFtbWVyLk1hbmFnZXIgbW9jayBmb3IgdXNlIGluIGVudmlyb25tZW50cyB3aXRob3V0IGBkb2N1bWVudGAgLyBgd2luZG93YC5cbmZ1bmN0aW9uIEhhbW1lck1hbmFnZXJNb2NrKG0pIHtcbiAgY29uc3QgaW5zdGFuY2UgPSB7fTtcbiAgY29uc3QgY2hhaW5lZE5vb3AgPSAoKSA9PiBpbnN0YW5jZTtcbiAgaW5zdGFuY2UuZ2V0ID0gKCkgPT4gbnVsbDtcbiAgaW5zdGFuY2Uuc2V0ID0gY2hhaW5lZE5vb3A7XG4gIGluc3RhbmNlLm9uID0gY2hhaW5lZE5vb3A7XG4gIGluc3RhbmNlLm9mZiA9IGNoYWluZWROb29wO1xuICBpbnN0YW5jZS5kZXN0cm95ID0gY2hhaW5lZE5vb3A7XG4gIGluc3RhbmNlLmVtaXQgPSBjaGFpbmVkTm9vcDtcbiAgcmV0dXJuIGluc3RhbmNlO1xufVxuXG5pZiAoaGFtbWVyanMpIHtcbiAgZW5oYW5jZVBvaW50ZXJFdmVudElucHV0KGhhbW1lcmpzLlBvaW50ZXJFdmVudElucHV0KTtcbiAgZW5oYW5jZU1vdXNlSW5wdXQoaGFtbWVyanMuTW91c2VJbnB1dCk7XG59XG5cbmV4cG9ydCBjb25zdCBNYW5hZ2VyID0gaGFtbWVyanMgPyBoYW1tZXJqcy5NYW5hZ2VyIDogSGFtbWVyTWFuYWdlck1vY2s7XG5cbmV4cG9ydCBkZWZhdWx0IGhhbW1lcmpzO1xuIl19
 
/***/ }),
/* 284 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
/* WEBPACK VAR INJECTION */(function(process) {/**
 * Copyright (c) 2013-present, Facebook, Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */
 
 
 
if (process.env.NODE_ENV !== 'production') {
  var invariant = __webpack_require__(101);
  var warning = __webpack_require__(155);
  var ReactPropTypesSecret = __webpack_require__(172);
  var loggedTypeFailures = {};
}
 
/**
 * Assert that the values match with the type specs.
 * Error messages are memorized and will only be shown once.
 *
 * @param {object} typeSpecs Map of name to a ReactPropType
 * @param {object} values Runtime values that need to be type-checked
 * @param {string} location e.g. "prop", "context", "child context"
 * @param {string} componentName Name of the component for error messages.
 * @param {?Function} getStack Returns the component stack.
 * @private
 */
function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
  if (process.env.NODE_ENV !== 'production') {
    for (var typeSpecName in typeSpecs) {
      if (typeSpecs.hasOwnProperty(typeSpecName)) {
        var error;
        // Prop type validation may throw. In case they do, we don't want to
        // fail the render phase where it didn't fail before. So we log it.
        // After these have been cleaned up, we'll let them throw.
        try {
          // This is intentionally an invariant that gets caught. It's the same
          // behavior as without this statement except with a better message.
          invariant(typeof typeSpecs[typeSpecName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'the `prop-types` package, but received `%s`.', componentName || 'React class', location, typeSpecName, typeof typeSpecs[typeSpecName]);
          error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
        } catch (ex) {
          error = ex;
        }
        warning(!error || error instanceof Error, '%s: type specification of %s `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error);
        if (error instanceof Error && !(error.message in loggedTypeFailures)) {
          // Only monitor this failure once because there tends to be a lot of the
          // same error.
          loggedTypeFailures[error.message] = true;
 
          var stack = getStack ? getStack() : '';
 
          warning(false, 'Failed %s type: %s%s', location, error.message, stack != null ? stack : '');
        }
      }
    }
  }
}
 
module.exports = checkPropTypes;
 
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(26)))
 
/***/ }),
/* 285 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = fitBounds;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__web_mercator_viewport__ = __webpack_require__(81);
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
 
 
 
/**
 * Returns map settings {latitude, longitude, zoom}
 * that will contain the provided corners within the provided width.
 * Only supports non-perspective mode.
 * @param {Number} width - viewport width
 * @param {Number} height - viewport height
 * @param {Array} bounds - [[lon, lat], [lon, lat]]
 * @param {Number} [padding] - The amount of padding in pixels to add to the given bounds.
 * @param {Array} [offset] - The center of the given bounds relative to the map's center,
 *    [x, y] measured in pixels.
 * @returns {Object} - latitude, longitude and zoom
 */
function fitBounds(_ref) {
  var width = _ref.width,
      height = _ref.height,
      bounds = _ref.bounds,
      _ref$padding = _ref.padding,
      padding = _ref$padding === undefined ? 0 : _ref$padding,
      _ref$offset = _ref.offset,
      offset = _ref$offset === undefined ? [0, 0] : _ref$offset;
 
  var _bounds = _slicedToArray(bounds, 2),
      _bounds$ = _slicedToArray(_bounds[0], 2),
      west = _bounds$[0],
      south = _bounds$[1],
      _bounds$2 = _slicedToArray(_bounds[1], 2),
      east = _bounds$2[0],
      north = _bounds$2[1];
 
  var viewport = new __WEBPACK_IMPORTED_MODULE_0__web_mercator_viewport__["a" /* default */]({
    width: width,
    height: height,
    longitude: 0,
    latitude: 0,
    zoom: 0
  });
 
  var nw = viewport.project([west, north]);
  var se = viewport.project([east, south]);
  var size = [Math.abs(se[0] - nw[0]), Math.abs(se[1] - nw[1])];
  var center = [(se[0] + nw[0]) / 2, (se[1] + nw[1]) / 2];
 
  var scaleX = (width - padding * 2 - Math.abs(offset[0]) * 2) / size[0];
  var scaleY = (height - padding * 2 - Math.abs(offset[1]) * 2) / size[1];
 
  var centerLngLat = viewport.unproject(center);
  var zoom = viewport.zoom + Math.log2(Math.abs(Math.min(scaleX, scaleY)));
 
  return {
    longitude: centerLngLat[0],
    latitude: centerLngLat[1],
    zoom: zoom
  };
}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9maXQtYm91bmRzLmpzIl0sIm5hbWVzIjpbIldlYk1lcmNhdG9yVmlld3BvcnQiLCJmaXRCb3VuZHMiLCJ3aWR0aCIsImhlaWdodCIsImJvdW5kcyIsInBhZGRpbmciLCJvZmZzZXQiLCJ3ZXN0Iiwic291dGgiLCJlYXN0Iiwibm9ydGgiLCJ2aWV3cG9ydCIsImxvbmdpdHVkZSIsImxhdGl0dWRlIiwiem9vbSIsIm53IiwicHJvamVjdCIsInNlIiwic2l6ZSIsIk1hdGgiLCJhYnMiLCJjZW50ZXIiLCJzY2FsZVgiLCJzY2FsZVkiLCJjZW50ZXJMbmdMYXQiLCJ1bnByb2plY3QiLCJsb2cyIiwibWluIl0sIm1hcHBpbmdzIjoiOztBQUFBLE9BQU9BLG1CQUFQLE1BQWdDLHlCQUFoQzs7QUFFQTs7Ozs7Ozs7Ozs7O0FBWUEsZUFBZSxTQUFTQyxTQUFULE9BT1o7QUFBQSxNQU5EQyxLQU1DLFFBTkRBLEtBTUM7QUFBQSxNQUxEQyxNQUtDLFFBTERBLE1BS0M7QUFBQSxNQUpEQyxNQUlDLFFBSkRBLE1BSUM7QUFBQSwwQkFGREMsT0FFQztBQUFBLE1BRkRBLE9BRUMsZ0NBRlMsQ0FFVDtBQUFBLHlCQUREQyxNQUNDO0FBQUEsTUFEREEsTUFDQywrQkFEUSxDQUFDLENBQUQsRUFBSSxDQUFKLENBQ1I7O0FBQUEsK0JBQ3NDRixNQUR0QztBQUFBO0FBQUEsTUFDT0csSUFEUDtBQUFBLE1BQ2FDLEtBRGI7QUFBQTtBQUFBLE1BQ3NCQyxJQUR0QjtBQUFBLE1BQzRCQyxLQUQ1Qjs7QUFHRCxNQUFNQyxXQUFXLElBQUlYLG1CQUFKLENBQXdCO0FBQ3ZDRSxnQkFEdUM7QUFFdkNDLGtCQUZ1QztBQUd2Q1MsZUFBVyxDQUg0QjtBQUl2Q0MsY0FBVSxDQUo2QjtBQUt2Q0MsVUFBTTtBQUxpQyxHQUF4QixDQUFqQjs7QUFRQSxNQUFNQyxLQUFLSixTQUFTSyxPQUFULENBQWlCLENBQUNULElBQUQsRUFBT0csS0FBUCxDQUFqQixDQUFYO0FBQ0EsTUFBTU8sS0FBS04sU0FBU0ssT0FBVCxDQUFpQixDQUFDUCxJQUFELEVBQU9ELEtBQVAsQ0FBakIsQ0FBWDtBQUNBLE1BQU1VLE9BQU8sQ0FDWEMsS0FBS0MsR0FBTCxDQUFTSCxHQUFHLENBQUgsSUFBUUYsR0FBRyxDQUFILENBQWpCLENBRFcsRUFFWEksS0FBS0MsR0FBTCxDQUFTSCxHQUFHLENBQUgsSUFBUUYsR0FBRyxDQUFILENBQWpCLENBRlcsQ0FBYjtBQUlBLE1BQU1NLFNBQVMsQ0FDYixDQUFDSixHQUFHLENBQUgsSUFBUUYsR0FBRyxDQUFILENBQVQsSUFBa0IsQ0FETCxFQUViLENBQUNFLEdBQUcsQ0FBSCxJQUFRRixHQUFHLENBQUgsQ0FBVCxJQUFrQixDQUZMLENBQWY7O0FBS0EsTUFBTU8sU0FBUyxDQUFDcEIsUUFBUUcsVUFBVSxDQUFsQixHQUFzQmMsS0FBS0MsR0FBTCxDQUFTZCxPQUFPLENBQVAsQ0FBVCxJQUFzQixDQUE3QyxJQUFrRFksS0FBSyxDQUFMLENBQWpFO0FBQ0EsTUFBTUssU0FBUyxDQUFDcEIsU0FBU0UsVUFBVSxDQUFuQixHQUF1QmMsS0FBS0MsR0FBTCxDQUFTZCxPQUFPLENBQVAsQ0FBVCxJQUFzQixDQUE5QyxJQUFtRFksS0FBSyxDQUFMLENBQWxFOztBQUVBLE1BQU1NLGVBQWViLFNBQVNjLFNBQVQsQ0FBbUJKLE1BQW5CLENBQXJCO0FBQ0EsTUFBTVAsT0FBT0gsU0FBU0csSUFBVCxHQUFnQkssS0FBS08sSUFBTCxDQUFVUCxLQUFLQyxHQUFMLENBQVNELEtBQUtRLEdBQUwsQ0FBU0wsTUFBVCxFQUFpQkMsTUFBakIsQ0FBVCxDQUFWLENBQTdCOztBQUVBLFNBQU87QUFDTFgsZUFBV1ksYUFBYSxDQUFiLENBRE47QUFFTFgsY0FBVVcsYUFBYSxDQUFiLENBRkw7QUFHTFY7QUFISyxHQUFQO0FBS0QiLCJmaWxlIjoiZml0LWJvdW5kcy5qcyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBXZWJNZXJjYXRvclZpZXdwb3J0IGZyb20gJy4vd2ViLW1lcmNhdG9yLXZpZXdwb3J0JztcblxuLyoqXG4gKiBSZXR1cm5zIG1hcCBzZXR0aW5ncyB7bGF0aXR1ZGUsIGxvbmdpdHVkZSwgem9vbX1cbiAqIHRoYXQgd2lsbCBjb250YWluIHRoZSBwcm92aWRlZCBjb3JuZXJzIHdpdGhpbiB0aGUgcHJvdmlkZWQgd2lkdGguXG4gKiBPbmx5IHN1cHBvcnRzIG5vbi1wZXJzcGVjdGl2ZSBtb2RlLlxuICogQHBhcmFtIHtOdW1iZXJ9IHdpZHRoIC0gdmlld3BvcnQgd2lkdGhcbiAqIEBwYXJhbSB7TnVtYmVyfSBoZWlnaHQgLSB2aWV3cG9ydCBoZWlnaHRcbiAqIEBwYXJhbSB7QXJyYXl9IGJvdW5kcyAtIFtbbG9uLCBsYXRdLCBbbG9uLCBsYXRdXVxuICogQHBhcmFtIHtOdW1iZXJ9IFtwYWRkaW5nXSAtIFRoZSBhbW91bnQgb2YgcGFkZGluZyBpbiBwaXhlbHMgdG8gYWRkIHRvIHRoZSBnaXZlbiBib3VuZHMuXG4gKiBAcGFyYW0ge0FycmF5fSBbb2Zmc2V0XSAtIFRoZSBjZW50ZXIgb2YgdGhlIGdpdmVuIGJvdW5kcyByZWxhdGl2ZSB0byB0aGUgbWFwJ3MgY2VudGVyLFxuICogICAgW3gsIHldIG1lYXN1cmVkIGluIHBpeGVscy5cbiAqIEByZXR1cm5zIHtPYmplY3R9IC0gbGF0aXR1ZGUsIGxvbmdpdHVkZSBhbmQgem9vbVxuICovXG5leHBvcnQgZGVmYXVsdCBmdW5jdGlvbiBmaXRCb3VuZHMoe1xuICB3aWR0aCxcbiAgaGVpZ2h0LFxuICBib3VuZHMsXG4gIC8vIG9wdGlvbnNcbiAgcGFkZGluZyA9IDAsXG4gIG9mZnNldCA9IFswLCAwXVxufSkge1xuICBjb25zdCBbW3dlc3QsIHNvdXRoXSwgW2Vhc3QsIG5vcnRoXV0gPSBib3VuZHM7XG5cbiAgY29uc3Qgdmlld3BvcnQgPSBuZXcgV2ViTWVyY2F0b3JWaWV3cG9ydCh7XG4gICAgd2lkdGgsXG4gICAgaGVpZ2h0LFxuICAgIGxvbmdpdHVkZTogMCxcbiAgICBsYXRpdHVkZTogMCxcbiAgICB6b29tOiAwXG4gIH0pO1xuXG4gIGNvbnN0IG53ID0gdmlld3BvcnQucHJvamVjdChbd2VzdCwgbm9ydGhdKTtcbiAgY29uc3Qgc2UgPSB2aWV3cG9ydC5wcm9qZWN0KFtlYXN0LCBzb3V0aF0pO1xuICBjb25zdCBzaXplID0gW1xuICAgIE1hdGguYWJzKHNlWzBdIC0gbndbMF0pLFxuICAgIE1hdGguYWJzKHNlWzFdIC0gbndbMV0pXG4gIF07XG4gIGNvbnN0IGNlbnRlciA9IFtcbiAgICAoc2VbMF0gKyBud1swXSkgLyAyLFxuICAgIChzZVsxXSArIG53WzFdKSAvIDJcbiAgXTtcblxuICBjb25zdCBzY2FsZVggPSAod2lkdGggLSBwYWRkaW5nICogMiAtIE1hdGguYWJzKG9mZnNldFswXSkgKiAyKSAvIHNpemVbMF07XG4gIGNvbnN0IHNjYWxlWSA9IChoZWlnaHQgLSBwYWRkaW5nICogMiAtIE1hdGguYWJzKG9mZnNldFsxXSkgKiAyKSAvIHNpemVbMV07XG5cbiAgY29uc3QgY2VudGVyTG5nTGF0ID0gdmlld3BvcnQudW5wcm9qZWN0KGNlbnRlcik7XG4gIGNvbnN0IHpvb20gPSB2aWV3cG9ydC56b29tICsgTWF0aC5sb2cyKE1hdGguYWJzKE1hdGgubWluKHNjYWxlWCwgc2NhbGVZKSkpO1xuXG4gIHJldHVybiB7XG4gICAgbG9uZ2l0dWRlOiBjZW50ZXJMbmdMYXRbMF0sXG4gICAgbGF0aXR1ZGU6IGNlbnRlckxuZ0xhdFsxXSxcbiAgICB6b29tXG4gIH07XG59XG4iXX0=
 
/***/ }),
/* 286 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.experimental = exports.DeckGL = exports.default = exports.GeoJsonLayer = exports.PolygonLayer = exports.PathLayer = exports.HexagonCellLayer = exports.HexagonLayer = exports.GridCellLayer = exports.GridLayer = exports.ScreenGridLayer = exports.ScatterplotLayer = exports.PointCloudLayer = exports.LineLayer = exports.IconLayer = exports.ArcLayer = exports.lighting = exports.project64 = exports.project = exports.OrthographicViewport = exports.PerspectiveViewport = exports.WebMercatorViewport = exports.Viewport = exports.CompositeLayer = exports.Layer = exports.AttributeManager = exports.LayerManager = exports.COORDINATE_SYSTEM = undefined;
 
var _core = __webpack_require__(13);
 
Object.defineProperty(exports, 'COORDINATE_SYSTEM', {
  enumerable: true,
  get: function get() {
    return _core.COORDINATE_SYSTEM;
  }
});
Object.defineProperty(exports, 'LayerManager', {
  enumerable: true,
  get: function get() {
    return _core.LayerManager;
  }
});
Object.defineProperty(exports, 'AttributeManager', {
  enumerable: true,
  get: function get() {
    return _core.AttributeManager;
  }
});
Object.defineProperty(exports, 'Layer', {
  enumerable: true,
  get: function get() {
    return _core.Layer;
  }
});
Object.defineProperty(exports, 'CompositeLayer', {
  enumerable: true,
  get: function get() {
    return _core.CompositeLayer;
  }
});
Object.defineProperty(exports, 'Viewport', {
  enumerable: true,
  get: function get() {
    return _core.Viewport;
  }
});
Object.defineProperty(exports, 'WebMercatorViewport', {
  enumerable: true,
  get: function get() {
    return _core.WebMercatorViewport;
  }
});
Object.defineProperty(exports, 'PerspectiveViewport', {
  enumerable: true,
  get: function get() {
    return _core.PerspectiveViewport;
  }
});
Object.defineProperty(exports, 'OrthographicViewport', {
  enumerable: true,
  get: function get() {
    return _core.OrthographicViewport;
  }
});
Object.defineProperty(exports, 'project', {
  enumerable: true,
  get: function get() {
    return _core.project;
  }
});
Object.defineProperty(exports, 'project64', {
  enumerable: true,
  get: function get() {
    return _core.project64;
  }
});
Object.defineProperty(exports, 'lighting', {
  enumerable: true,
  get: function get() {
    return _core.lighting;
  }
});
 
var _coreLayers = __webpack_require__(309);
 
Object.defineProperty(exports, 'ArcLayer', {
  enumerable: true,
  get: function get() {
    return _coreLayers.ArcLayer;
  }
});
Object.defineProperty(exports, 'IconLayer', {
  enumerable: true,
  get: function get() {
    return _coreLayers.IconLayer;
  }
});
Object.defineProperty(exports, 'LineLayer', {
  enumerable: true,
  get: function get() {
    return _coreLayers.LineLayer;
  }
});
Object.defineProperty(exports, 'PointCloudLayer', {
  enumerable: true,
  get: function get() {
    return _coreLayers.PointCloudLayer;
  }
});
Object.defineProperty(exports, 'ScatterplotLayer', {
  enumerable: true,
  get: function get() {
    return _coreLayers.ScatterplotLayer;
  }
});
Object.defineProperty(exports, 'ScreenGridLayer', {
  enumerable: true,
  get: function get() {
    return _coreLayers.ScreenGridLayer;
  }
});
Object.defineProperty(exports, 'GridLayer', {
  enumerable: true,
  get: function get() {
    return _coreLayers.GridLayer;
  }
});
Object.defineProperty(exports, 'GridCellLayer', {
  enumerable: true,
  get: function get() {
    return _coreLayers.GridCellLayer;
  }
});
Object.defineProperty(exports, 'HexagonLayer', {
  enumerable: true,
  get: function get() {
    return _coreLayers.HexagonLayer;
  }
});
Object.defineProperty(exports, 'HexagonCellLayer', {
  enumerable: true,
  get: function get() {
    return _coreLayers.HexagonCellLayer;
  }
});
Object.defineProperty(exports, 'PathLayer', {
  enumerable: true,
  get: function get() {
    return _coreLayers.PathLayer;
  }
});
Object.defineProperty(exports, 'PolygonLayer', {
  enumerable: true,
  get: function get() {
    return _coreLayers.PolygonLayer;
  }
});
Object.defineProperty(exports, 'GeoJsonLayer', {
  enumerable: true,
  get: function get() {
    return _coreLayers.GeoJsonLayer;
  }
});
 
var _react = __webpack_require__(362);
 
Object.defineProperty(exports, 'default', {
  enumerable: true,
  get: function get() {
    return _interopRequireDefault(_react).default;
  }
});
Object.defineProperty(exports, 'DeckGL', {
  enumerable: true,
  get: function get() {
    return _react.DeckGL;
  }
});
 
var _reflectionEffect = __webpack_require__(359);
 
var _reflectionEffect2 = _interopRequireDefault(_reflectionEffect);
 
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
 
// Copyright (c) 2015 - 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
/* eslint-disable max-len */
 
var experimental = {};
 
//
// CORE LIBRARY
//
 
// EXPERIMENTAL CORE LIB CLASSES (May change in minor version bumps, use at your own risk)
var ViewState = _core.experimental.ViewState,
    FirstPersonState = _core.experimental.FirstPersonState,
    OrbitState = _core.experimental.OrbitState,
    MapState = _core.experimental.MapState,
    Controller = _core.experimental.Controller,
    FirstPersonController = _core.experimental.FirstPersonController,
    FirstPersonViewport = _core.experimental.FirstPersonViewport,
    OrbitViewport = _core.experimental.OrbitViewport,
    ThirdPersonViewport = _core.experimental.ThirdPersonViewport,
    TRANSITION_EVENTS = _core.experimental.TRANSITION_EVENTS,
    LinearInterpolator = _core.experimental.LinearInterpolator,
    ViewportFlyToInterpolator = _core.experimental.ViewportFlyToInterpolator,
    DeckGLJS = _core.experimental.DeckGLJS,
    MapControllerJS = _core.experimental.MapControllerJS,
    EffectManager = _core.experimental.EffectManager,
    Effect = _core.experimental.Effect;
 
 
Object.assign(experimental, {
  // Unfinished controller/viewport classes
  ViewState: ViewState,
  FirstPersonState: FirstPersonState,
  OrbitState: OrbitState,
  MapState: MapState,
 
  Controller: Controller,
  FirstPersonController: FirstPersonController,
 
  FirstPersonViewport: FirstPersonViewport,
  OrbitViewport: OrbitViewport,
  ThirdPersonViewport: ThirdPersonViewport,
 
  // Transition bindings
  TRANSITION_EVENTS: TRANSITION_EVENTS,
  LinearInterpolator: LinearInterpolator,
  ViewportFlyToInterpolator: ViewportFlyToInterpolator,
 
  // Pure JS (non-React) API
  DeckGLJS: DeckGLJS,
  MapControllerJS: MapControllerJS,
 
  // Effects base classes
  EffectManager: EffectManager,
  Effect: Effect
});
 
// Experimental Data Accessor Helpers
// INTERNAL - TODO remove from experimental exports
var TransitionManager = _core.experimental.TransitionManager,
    extractViewportFrom = _core.experimental.extractViewportFrom,
    BinSorter = _core.experimental.BinSorter,
    linearScale = _core.experimental.linearScale,
    getLinearScale = _core.experimental.getLinearScale,
    quantizeScale = _core.experimental.quantizeScale,
    getQuantizeScale = _core.experimental.getQuantizeScale,
    clamp = _core.experimental.clamp,
    defaultColorRange = _core.experimental.defaultColorRange,
    log = _core.experimental.log,
    get = _core.experimental.get,
    count = _core.experimental.count,
    flatten = _core.experimental.flatten,
    countVertices = _core.experimental.countVertices,
    flattenVertices = _core.experimental.flattenVertices,
    fillArray = _core.experimental.fillArray,
    enable64bitSupport = _core.experimental.enable64bitSupport,
    fp64ify = _core.experimental.fp64ify,
    fp64LowPart = _core.experimental.fp64LowPart;
 
 
Object.assign(experimental, {
  // For react module
  TransitionManager: TransitionManager,
  extractViewportFrom: extractViewportFrom,
 
  // For layers
  BinSorter: BinSorter,
  linearScale: linearScale,
  getLinearScale: getLinearScale,
  quantizeScale: quantizeScale,
  getQuantizeScale: getQuantizeScale,
  clamp: clamp,
  defaultColorRange: defaultColorRange,
 
  log: log,
 
  get: get,
  count: count,
 
  flatten: flatten,
  countVertices: countVertices,
  flattenVertices: flattenVertices,
  fillArray: fillArray,
 
  enable64bitSupport: enable64bitSupport,
  fp64ify: fp64ify,
  fp64LowPart: fp64LowPart
});
 
//
// CORE LAYERS PACKAGE
//
 
//
// EFFECTS PACKAGE
//
 
Object.assign(experimental, {
  ReflectionEffect: _reflectionEffect2.default
});
 
//
// REACT BINDINGS PACKAGE
//
 
// TODO - do we need to expose these?
 
 
Object.assign(experimental, {
  MapController: _react.MapController,
  OrbitController: _react.OrbitController,
  ViewportController: _react.ViewportController
});
 
//
// EXPERIMENTAL EXPORTS
//
 
exports.experimental = experimental;
 
/***/ }),
/* 287 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
/* WEBPACK VAR INJECTION */(function(global) {
 
__webpack_require__(566);
 
__webpack_require__(366);
 
__webpack_require__(367);
 
if (global._babelPolyfill) {
  throw new Error("only one instance of babel-polyfill is allowed");
}
global._babelPolyfill = true;
 
var DEFINE_PROPERTY = "defineProperty";
function define(O, key, value) {
  O[key] || Object[DEFINE_PROPERTY](O, key, {
    writable: true,
    configurable: true,
    value: value
  });
}
 
define(String.prototype, "padLeft", "".padStart);
define(String.prototype, "padRight", "".padEnd);
 
"pop,reverse,shift,keys,values,entries,indexOf,every,some,forEach,map,filter,find,findIndex,includes,join,slice,concat,push,splice,unshift,sort,lastIndexOf,reduce,reduceRight,copyWithin,fill".split(",").forEach(function (key) {
  [][key] && define(Array, key, Function.call.bind([][key]));
});
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(47)))
 
/***/ }),
/* 288 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
__webpack_require__(287);
 
var _index = __webpack_require__(286);
 
var DeckGL = _interopRequireWildcard(_index);
 
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
 
// Copyright (c) 2015 - 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
 
/* Generate script that can be used in browser without browserify */
 
/* global window */
(function exposeAsGlobal() {
  if (typeof window !== 'undefined') {
    window.DeckGL = DeckGL;
  }
})();
 
/***/ }),
/* 289 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
// Copyright (c) 2015 - 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
 
exports.default = "#define SHADER_NAME arc-layer-fragment-shader\n\n#ifdef GL_ES\nprecision highp float;\n#endif\n\nvarying vec4 vColor;\n\nvoid main(void) {\n  gl_FragColor = vColor;\n\n  // use highlight color if this fragment belongs to the selected object.\n  gl_FragColor = picking_filterHighlightColor(gl_FragColor);\n\n  // use picking color if rendering to picking FBO.\n  gl_FragColor = picking_filterPickingColor(gl_FragColor);\n}\n";
 
/***/ }),
/* 290 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
// Copyright (c) 2015 - 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
 
exports.default = "#define SHADER_NAME arc-layer-vertex-shader-64\n\nattribute vec3 positions;\nattribute vec4 instanceSourceColors;\nattribute vec4 instanceTargetColors;\n\nattribute vec4 instancePositions;\nattribute vec4 instancePositions64Low;\n\nattribute vec3 instancePickingColors;\n\nuniform float numSegments;\nuniform float strokeWidth;\nuniform float opacity;\n\nvarying vec4 vColor;\n\nvec2 paraboloid_fp64(vec2 source[2], vec2 target[2], float ratio) {\n\n  vec2 x[2];\n  vec2_mix_fp64(source, target, ratio, x);\n  vec2 center[2];\n  vec2_mix_fp64(source, target, 0.5, center);\n\n  vec2 dSourceCenter = vec2_distance_fp64(source, center);\n  vec2 dXCenter = vec2_distance_fp64(x, center);\n  return mul_fp64(sum_fp64(dSourceCenter, dXCenter), sub_fp64(dSourceCenter, dXCenter));\n}\n\n// offset vector by strokeWidth pixels\n// offset_direction is -1 (left) or 1 (right)\nvec2 getExtrusionOffset(vec2 line_clipspace, float offset_direction) {\n  // normalized direction of the line\n  vec2 dir_screenspace = normalize(line_clipspace * project_uViewportSize);\n  // rotate by 90 degrees\n  dir_screenspace = vec2(-dir_screenspace.y, dir_screenspace.x);\n\n  vec2 offset_screenspace = dir_screenspace * offset_direction * strokeWidth / 2.0;\n  vec2 offset_clipspace = project_pixel_to_clipspace(offset_screenspace).xy;\n\n  return offset_clipspace;\n}\n\nfloat getSegmentRatio(float index) {\n  return smoothstep(0.0, 1.0, index / (numSegments - 1.0));\n}\n\nvoid get_pos_fp64(vec2 source[2], vec2 target[2], float segmentRatio, out vec2 position[4]) {\n\n  vec2 vertex_height = paraboloid_fp64(source, target, segmentRatio);\n\n  vec2 position_temp[2];\n\n  vec2_mix_fp64(source, target, segmentRatio, position_temp);\n\n  position[0] = position_temp[0];\n  position[1] = position_temp[1];\n\n  if (vertex_height.x < 0.0 || (vertex_height.x == 0.0 && vertex_height.y <= 0.0)) {\n    vertex_height = vec2(0.0, 0.0);\n  }\n\n  position[2] = sqrt_fp64(vertex_height);\n  position[3] = vec2(1.0, 0.0);\n}\n\nvoid main(void) {\n  vec4 instanceSourcePositions64 = vec4(instancePositions.x,\n    instancePositions64Low.x, instancePositions.y, instancePositions64Low.y);\n  vec4 instanceTargetPositions64 = vec4(instancePositions.z,\n    instancePositions64Low.z, instancePositions.w, instancePositions64Low.w);\n\n  vec2 projected_source_coord[2];\n  vec2 projected_target_coord[2];\n\n  project_position_fp64(instanceSourcePositions64, projected_source_coord);\n  project_position_fp64(instanceTargetPositions64, projected_target_coord);\n\n  float segmentIndex = positions.x;\n  float segmentRatio = getSegmentRatio(segmentIndex);\n\n  // if it's the first point, use next - current as direction\n  // otherwise use current - prev\n  float indexDir = mix(-1.0, 1.0, step(segmentIndex, 0.0));\n  float nextSegmentRatio = getSegmentRatio(segmentIndex + indexDir);\n\n  vec2 curr_pos_modelspace[4];\n\n  get_pos_fp64(projected_source_coord, projected_target_coord, segmentRatio,\n    curr_pos_modelspace);\n\n  vec2 next_pos_modelspace[4];\n\n  get_pos_fp64(projected_source_coord, projected_target_coord, nextSegmentRatio,\n    next_pos_modelspace);\n\n  vec4 curr_pos_clipspace = project_to_clipspace_fp64(curr_pos_modelspace);\n  vec4 next_pos_clipspace = project_to_clipspace_fp64(next_pos_modelspace);\n\n  vec2 offset = getExtrusionOffset(next_pos_clipspace.xy - curr_pos_clipspace.xy, positions.y);\n\n  gl_Position = curr_pos_clipspace + vec4(offset, 0.0, 0.0);\n\n  vec4 color = mix(instanceSourceColors, instanceTargetColors, segmentRatio) / 255.;\n  vColor = vec4(color.rgb, color.a * opacity);\n\n  // Set color to be rendered to picking fbo (also used to check for selection highlight).\n  picking_setPickingColor(instancePickingColors);\n}\n";
 
/***/ }),
/* 291 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
// Copyright (c) 2015 - 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
 
exports.default = "#define SHADER_NAME arc-layer-vertex-shader\n\nattribute vec3 positions;\nattribute vec4 instanceSourceColors;\nattribute vec4 instanceTargetColors;\nattribute vec4 instancePositions;\nattribute vec3 instancePickingColors;\n\nuniform float numSegments;\nuniform float strokeWidth;\nuniform float opacity;\n\nvarying vec4 vColor;\n\nfloat paraboloid(vec2 source, vec2 target, float ratio) {\n\n  vec2 x = mix(source, target, ratio);\n  vec2 center = mix(source, target, 0.5);\n\n  float dSourceCenter = distance(source, center);\n  float dXCenter = distance(x, center);\n  return (dSourceCenter + dXCenter) * (dSourceCenter - dXCenter);\n}\n\n// offset vector by strokeWidth pixels\n// offset_direction is -1 (left) or 1 (right)\nvec2 getExtrusionOffset(vec2 line_clipspace, float offset_direction) {\n  // normalized direction of the line\n  vec2 dir_screenspace = normalize(line_clipspace * project_uViewportSize);\n  // rotate by 90 degrees\n  dir_screenspace = vec2(-dir_screenspace.y, dir_screenspace.x);\n\n  vec2 offset_screenspace = dir_screenspace * offset_direction * strokeWidth / 2.0;\n  vec2 offset_clipspace = project_pixel_to_clipspace(offset_screenspace).xy;\n\n  return offset_clipspace;\n}\n\nfloat getSegmentRatio(float index) {\n  return smoothstep(0.0, 1.0, index / (numSegments - 1.0));\n}\n\nvec3 getPos(vec2 source, vec2 target, float segmentRatio) {\n  float vertex_height = paraboloid(source, target, segmentRatio);\n\n  return vec3(\n    mix(source, target, segmentRatio),\n    sqrt(max(0.0, vertex_height))\n  );\n}\n\nvoid main(void) {\n  vec2 source = project_position(instancePositions.xy);\n  vec2 target = project_position(instancePositions.zw);\n\n  float segmentIndex = positions.x;\n  float segmentRatio = getSegmentRatio(segmentIndex);\n  // if it's the first point, use next - current as direction\n  // otherwise use current - prev\n  float indexDir = mix(-1.0, 1.0, step(segmentIndex, 0.0));\n  float nextSegmentRatio = getSegmentRatio(segmentIndex + indexDir);\n\n  vec3 currPos = getPos(source, target, segmentRatio);\n  vec3 nextPos = getPos(source, target, nextSegmentRatio);\n  vec4 curr = project_to_clipspace(vec4(currPos, 1.0));\n  vec4 next = project_to_clipspace(vec4(nextPos, 1.0));\n\n  // extrude\n  vec2 offset = getExtrusionOffset((next.xy - curr.xy) * indexDir, positions.y);\n  gl_Position = curr + vec4(offset, 0.0, 0.0);\n\n  vec4 color = mix(instanceSourceColors, instanceTargetColors, segmentRatio) / 255.;\n  vColor = vec4(color.rgb, color.a * opacity);\n\n  // Set color to be rendered to picking fbo (also used to check for selection highlight).\n  picking_setPickingColor(instancePickingColors);\n}\n";
 
/***/ }),
/* 292 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
 
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
 
var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
 
var _core = __webpack_require__(13);
 
var _luma = __webpack_require__(12);
 
var _arcLayerVertex = __webpack_require__(291);
 
var _arcLayerVertex2 = _interopRequireDefault(_arcLayerVertex);
 
var _arcLayerVertex3 = __webpack_require__(290);
 
var _arcLayerVertex4 = _interopRequireDefault(_arcLayerVertex3);
 
var _arcLayerFragment = __webpack_require__(289);
 
var _arcLayerFragment2 = _interopRequireDefault(_arcLayerFragment);
 
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
 
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
 
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
 
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // Copyright (c) 2015 - 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
 
var fp64LowPart = _core.experimental.fp64LowPart,
    enable64bitSupport = _core.experimental.enable64bitSupport;
 
 
var DEFAULT_COLOR = [0, 0, 0, 255];
 
var defaultProps = {
  strokeWidth: 1,
  fp64: false,
 
  getSourcePosition: function getSourcePosition(x) {
    return x.sourcePosition;
  },
  getTargetPosition: function getTargetPosition(x) {
    return x.targetPosition;
  },
  getSourceColor: function getSourceColor(x) {
    return x.color || DEFAULT_COLOR;
  },
  getTargetColor: function getTargetColor(x) {
    return x.color || DEFAULT_COLOR;
  }
};
 
var ArcLayer = function (_Layer) {
  _inherits(ArcLayer, _Layer);
 
  function ArcLayer() {
    _classCallCheck(this, ArcLayer);
 
    return _possibleConstructorReturn(this, (ArcLayer.__proto__ || Object.getPrototypeOf(ArcLayer)).apply(this, arguments));
  }
 
  _createClass(ArcLayer, [{
    key: 'getShaders',
    value: function getShaders() {
      return enable64bitSupport(this.props) ? { vs: _arcLayerVertex4.default, fs: _arcLayerFragment2.default, modules: ['project64', 'picking'] } : { vs: _arcLayerVertex2.default, fs: _arcLayerFragment2.default, modules: ['picking'] }; // 'project' module added by default.
    }
  }, {
    key: 'initializeState',
    value: function initializeState() {
      var attributeManager = this.getAttributeManager();
 
      /* eslint-disable max-len */
      attributeManager.addInstanced({
        instancePositions: {
          size: 4,
          transition: true,
          accessor: ['getSourcePosition', 'getTargetPosition'],
          update: this.calculateInstancePositions
        },
        instanceSourceColors: {
          size: 4,
          type: _luma.GL.UNSIGNED_BYTE,
          transition: true,
          accessor: 'getSourceColor',
          update: this.calculateInstanceSourceColors
        },
        instanceTargetColors: {
          size: 4,
          type: _luma.GL.UNSIGNED_BYTE,
          transition: true,
          accessor: 'getTargetColor',
          update: this.calculateInstanceTargetColors
        }
      });
      /* eslint-enable max-len */
    }
  }, {
    key: 'updateAttribute',
    value: function updateAttribute(_ref) {
      var props = _ref.props,
          oldProps = _ref.oldProps,
          changeFlags = _ref.changeFlags;
 
      if (props.fp64 !== oldProps.fp64) {
        var attributeManager = this.getAttributeManager();
        attributeManager.invalidateAll();
 
        if (props.fp64 && props.coordinateSystem === _core.COORDINATE_SYSTEM.LNGLAT) {
          attributeManager.addInstanced({
            instancePositions64Low: {
              size: 4,
              accessor: ['getSourcePosition', 'getTargetPosition'],
              update: this.calculateInstancePositions64Low
            }
          });
        } else {
          attributeManager.remove(['instancePositions64Low']);
        }
      }
    }
  }, {
    key: 'updateState',
    value: function updateState(_ref2) {
      var props = _ref2.props,
          oldProps = _ref2.oldProps,
          changeFlags = _ref2.changeFlags;
 
      _get(ArcLayer.prototype.__proto__ || Object.getPrototypeOf(ArcLayer.prototype), 'updateState', this).call(this, { props: props, oldProps: oldProps, changeFlags: changeFlags });
      // Re-generate model if geometry changed
      if (props.fp64 !== oldProps.fp64) {
        var gl = this.context.gl;
 
        this.setState({ model: this._getModel(gl) });
      }
      this.updateAttribute({ props: props, oldProps: oldProps, changeFlags: changeFlags });
    }
  }, {
    key: 'draw',
    value: function draw(_ref3) {
      var uniforms = _ref3.uniforms;
      var strokeWidth = this.props.strokeWidth;
 
 
      this.state.model.render(Object.assign({}, uniforms, {
        strokeWidth: strokeWidth
      }));
    }
  }, {
    key: '_getModel',
    value: function _getModel(gl) {
      var positions = [];
      var NUM_SEGMENTS = 50;
      /*
       *  (0, -1)-------------_(1, -1)
       *       |          _,-"  |
       *       o      _,-"      o
       *       |  _,-"          |
       *   (0, 1)"-------------(1, 1)
       */
      for (var i = 0; i < NUM_SEGMENTS; i++) {
        positions = positions.concat([i, -1, 0, i, 1, 0]);
      }
 
      var model = new _luma.Model(gl, Object.assign({}, this.getShaders(), {
        id: this.props.id,
        geometry: new _luma.Geometry({
          drawMode: _luma.GL.TRIANGLE_STRIP,
          attributes: {
            positions: new Float32Array(positions)
          }
        }),
        isInstanced: true,
        shaderCache: this.context.shaderCache
      }));
 
      model.setUniforms({ numSegments: NUM_SEGMENTS });
 
      return model;
    }
  }, {
    key: 'calculateInstancePositions',
    value: function calculateInstancePositions(attribute) {
      var _props = this.props,
          data = _props.data,
          getSourcePosition = _props.getSourcePosition,
          getTargetPosition = _props.getTargetPosition;
      var value = attribute.value,
          size = attribute.size;
 
      var i = 0;
      var _iteratorNormalCompletion = true;
      var _didIteratorError = false;
      var _iteratorError = undefined;
 
      try {
        for (var _iterator = data[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
          var object = _step.value;
 
          var sourcePosition = getSourcePosition(object);
          var targetPosition = getTargetPosition(object);
          value[i + 0] = sourcePosition[0];
          value[i + 1] = sourcePosition[1];
          value[i + 2] = targetPosition[0];
          value[i + 3] = targetPosition[1];
          i += size;
        }
      } catch (err) {
        _didIteratorError = true;
        _iteratorError = err;
      } finally {
        try {
          if (!_iteratorNormalCompletion && _iterator.return) {
            _iterator.return();
          }
        } finally {
          if (_didIteratorError) {
            throw _iteratorError;
          }
        }
      }
    }
  }, {
    key: 'calculateInstancePositions64Low',
    value: function calculateInstancePositions64Low(attribute) {
      var _props2 = this.props,
          data = _props2.data,
          getSourcePosition = _props2.getSourcePosition,
          getTargetPosition = _props2.getTargetPosition;
      var value = attribute.value,
          size = attribute.size;
 
      var i = 0;
      var _iteratorNormalCompletion2 = true;
      var _didIteratorError2 = false;
      var _iteratorError2 = undefined;
 
      try {
        for (var _iterator2 = data[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
          var object = _step2.value;
 
          var sourcePosition = getSourcePosition(object);
          var targetPosition = getTargetPosition(object);
          value[i + 0] = fp64LowPart(sourcePosition[0]);
          value[i + 1] = fp64LowPart(sourcePosition[1]);
          value[i + 2] = fp64LowPart(targetPosition[0]);
          value[i + 3] = fp64LowPart(targetPosition[1]);
          i += size;
        }
      } catch (err) {
        _didIteratorError2 = true;
        _iteratorError2 = err;
      } finally {
        try {
          if (!_iteratorNormalCompletion2 && _iterator2.return) {
            _iterator2.return();
          }
        } finally {
          if (_didIteratorError2) {
            throw _iteratorError2;
          }
        }
      }
    }
  }, {
    key: 'calculateInstanceSourceColors',
    value: function calculateInstanceSourceColors(attribute) {
      var _props3 = this.props,
          data = _props3.data,
          getSourceColor = _props3.getSourceColor;
      var value = attribute.value,
          size = attribute.size;
 
      var i = 0;
      var _iteratorNormalCompletion3 = true;
      var _didIteratorError3 = false;
      var _iteratorError3 = undefined;
 
      try {
        for (var _iterator3 = data[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {
          var object = _step3.value;
 
          var color = getSourceColor(object);
          value[i + 0] = color[0];
          value[i + 1] = color[1];
          value[i + 2] = color[2];
          value[i + 3] = isNaN(color[3]) ? 255 : color[3];
          i += size;
        }
      } catch (err) {
        _didIteratorError3 = true;
        _iteratorError3 = err;
      } finally {
        try {
          if (!_iteratorNormalCompletion3 && _iterator3.return) {
            _iterator3.return();
          }
        } finally {
          if (_didIteratorError3) {
            throw _iteratorError3;
          }
        }
      }
    }
  }, {
    key: 'calculateInstanceTargetColors',
    value: function calculateInstanceTargetColors(attribute) {
      var _props4 = this.props,
          data = _props4.data,
          getTargetColor = _props4.getTargetColor;
      var value = attribute.value,
          size = attribute.size;
 
      var i = 0;
      var _iteratorNormalCompletion4 = true;
      var _didIteratorError4 = false;
      var _iteratorError4 = undefined;
 
      try {
        for (var _iterator4 = data[Symbol.iterator](), _step4; !(_iteratorNormalCompletion4 = (_step4 = _iterator4.next()).done); _iteratorNormalCompletion4 = true) {
          var object = _step4.value;
 
          var color = getTargetColor(object);
          value[i + 0] = color[0];
          value[i + 1] = color[1];
          value[i + 2] = color[2];
          value[i + 3] = isNaN(color[3]) ? 255 : color[3];
          i += size;
        }
      } catch (err) {
        _didIteratorError4 = true;
        _iteratorError4 = err;
      } finally {
        try {
          if (!_iteratorNormalCompletion4 && _iterator4.return) {
            _iterator4.return();
          }
        } finally {
          if (_didIteratorError4) {
            throw _iteratorError4;
          }
        }
      }
    }
  }]);
 
  return ArcLayer;
}(_core.Layer);
 
exports.default = ArcLayer;
 
 
ArcLayer.layerName = 'ArcLayer';
ArcLayer.defaultProps = defaultProps;
 
/***/ }),
/* 293 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
 
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
 
var _core = __webpack_require__(13);
 
var _scatterplotLayer = __webpack_require__(176);
 
var _scatterplotLayer2 = _interopRequireDefault(_scatterplotLayer);
 
var _pathLayer = __webpack_require__(119);
 
var _pathLayer2 = _interopRequireDefault(_pathLayer);
 
var _solidPolygonLayer = __webpack_require__(177);
 
var _solidPolygonLayer2 = _interopRequireDefault(_solidPolygonLayer);
 
var _geojson = __webpack_require__(294);
 
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
 
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
 
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
 
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // Copyright (c) 2015 - 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
 
var get = _core.experimental.get;
// Use primitive layer to avoid "Composite Composite" layers for now
 
var defaultLineColor = [0x0, 0x0, 0x0, 0xff];
var defaultFillColor = [0x0, 0x0, 0x0, 0xff];
 
var defaultProps = {
  stroked: true,
  filled: true,
  extruded: false,
  wireframe: false,
 
  lineWidthScale: 1,
  lineWidthMinPixels: 0,
  lineWidthMaxPixels: Number.MAX_SAFE_INTEGER,
  lineJointRounded: false,
  lineMiterLimit: 4,
 
  elevationScale: 1,
 
  pointRadiusScale: 1,
  pointRadiusMinPixels: 0, //  min point radius in pixels
  pointRadiusMaxPixels: Number.MAX_SAFE_INTEGER, // max point radius in pixels
 
  fp64: false,
 
  // Line and polygon outline color
  getLineColor: function getLineColor(f) {
    return get(f, 'properties.lineColor') || defaultLineColor;
  },
  // Point and polygon fill color
  getFillColor: function getFillColor(f) {
    return get(f, 'properties.fillColor') || defaultFillColor;
  },
  // Point radius
  getRadius: function getRadius(f) {
    return get(f, 'properties.radius') || get(f, 'properties.size') || 1;
  },
  // Line and polygon outline accessors
  getLineWidth: function getLineWidth(f) {
    return get(f, 'properties.lineWidth') || 1;
  },
  // Polygon extrusion accessor
  getElevation: function getElevation(f) {
    return get(f, 'properties.elevation') || 1000;
  },
 
  subLayers: {
    PointLayer: _scatterplotLayer2.default,
    LineLayer: _pathLayer2.default,
    PolygonLayer: _solidPolygonLayer2.default
  },
 
  // Optional settings for 'lighting' shader module
  lightSettings: {
    lightsPosition: [-122.45, 37.75, 8000, -122.0, 38.0, 5000],
    ambientRatio: 0.05,
    diffuseRatio: 0.6,
    specularRatio: 0.8,
    lightsStrength: [2.0, 0.0, 0.0, 0.0],
    numberOfLights: 2
  }
};
 
var getCoordinates = function getCoordinates(f) {
  return f.geometry.coordinates;
};
 
var GeoJsonLayer = function (_CompositeLayer) {
  _inherits(GeoJsonLayer, _CompositeLayer);
 
  function GeoJsonLayer() {
    _classCallCheck(this, GeoJsonLayer);
 
    return _possibleConstructorReturn(this, (GeoJsonLayer.__proto__ || Object.getPrototypeOf(GeoJsonLayer)).apply(this, arguments));
  }
 
  _createClass(GeoJsonLayer, [{
    key: 'initializeState',
    value: function initializeState() {
      this.state = {
        features: {}
      };
    }
  }, {
    key: 'updateState',
    value: function updateState(_ref) {
      var oldProps = _ref.oldProps,
          props = _ref.props,
          changeFlags = _ref.changeFlags;
 
      if (changeFlags.dataChanged) {
        var data = this.props.data;
 
        var features = (0, _geojson.getGeojsonFeatures)(data);
        this.state.features = (0, _geojson.separateGeojsonFeatures)(features);
      }
    }
  }, {
    key: 'getPickingInfo',
    value: function getPickingInfo(_ref2) {
      var info = _ref2.info;
 
      return Object.assign(info, {
        // override object with picked feature
        object: info.object && info.object.feature || info.object
      });
    }
 
    /* eslint-disable complexity */
 
  }, {
    key: 'renderLayers',
    value: function renderLayers() {
      var features = this.state.features;
      var pointFeatures = features.pointFeatures,
          lineFeatures = features.lineFeatures,
          polygonFeatures = features.polygonFeatures,
          polygonOutlineFeatures = features.polygonOutlineFeatures;
 
      // Layer composition props
 
      var _props = this.props,
          stroked = _props.stroked,
          filled = _props.filled,
          extruded = _props.extruded,
          wireframe = _props.wireframe,
          subLayers = _props.subLayers,
          lightSettings = _props.lightSettings;
 
      // Rendering props underlying layer
 
      var _props2 = this.props,
          lineWidthScale = _props2.lineWidthScale,
          lineWidthMinPixels = _props2.lineWidthMinPixels,
          lineWidthMaxPixels = _props2.lineWidthMaxPixels,
          lineJointRounded = _props2.lineJointRounded,
          lineMiterLimit = _props2.lineMiterLimit,
          pointRadiusScale = _props2.pointRadiusScale,
          pointRadiusMinPixels = _props2.pointRadiusMinPixels,
          pointRadiusMaxPixels = _props2.pointRadiusMaxPixels,
          elevationScale = _props2.elevationScale,
          fp64 = _props2.fp64;
 
      // Accessor props for underlying layers
 
      var _props3 = this.props,
          getLineColor = _props3.getLineColor,
          getFillColor = _props3.getFillColor,
          getRadius = _props3.getRadius,
          getLineWidth = _props3.getLineWidth,
          getElevation = _props3.getElevation,
          updateTriggers = _props3.updateTriggers;
 
 
      var drawPoints = pointFeatures && pointFeatures.length > 0;
      var drawLines = lineFeatures && lineFeatures.length > 0;
      var hasPolygonLines = polygonOutlineFeatures && polygonOutlineFeatures.length > 0;
      var hasPolygon = polygonFeatures && polygonFeatures.length > 0;
 
      // Filled Polygon Layer
      var polygonFillLayer = filled && hasPolygon && new subLayers.PolygonLayer(this.getSubLayerProps({
        id: 'polygon-fill',
        updateTriggers: {
          getElevation: updateTriggers.getElevation,
          getColor: updateTriggers.getFillColor
        }
      }), {
        data: polygonFeatures,
        fp64: fp64,
        extruded: extruded,
        elevationScale: elevationScale,
        wireframe: false,
        lightSettings: lightSettings,
        getPolygon: getCoordinates,
        getElevation: getElevation,
        getColor: getFillColor
      });
 
      var polygonWireframeLayer = wireframe && extruded && hasPolygon && new subLayers.PolygonLayer(this.getSubLayerProps({
        id: 'polygon-wireframe',
        updateTriggers: {
          getElevation: updateTriggers.getElevation,
          getColor: updateTriggers.getLineColor
        }
      }), {
        data: polygonFeatures,
 
        fp64: fp64,
        extruded: extruded,
        elevationScale: elevationScale,
        wireframe: true,
        getPolygon: getCoordinates,
        getElevation: getElevation,
        getColor: getLineColor
      });
 
      var polygonLineLayer = !extruded && stroked && hasPolygonLines && new subLayers.LineLayer(this.getSubLayerProps({
        id: 'polygon-outline',
        updateTriggers: {
          getColor: updateTriggers.getLineColor,
          getWidth: updateTriggers.getLineWidth
        }
      }), {
        data: polygonOutlineFeatures,
 
        fp64: fp64,
        widthScale: lineWidthScale,
        widthMinPixels: lineWidthMinPixels,
        widthMaxPixels: lineWidthMaxPixels,
        rounded: lineJointRounded,
        miterLimit: lineMiterLimit,
 
        getPath: getCoordinates,
        getColor: getLineColor,
        getWidth: getLineWidth
      });
 
      var pathLayer = drawLines && new subLayers.LineLayer(this.getSubLayerProps({
        id: 'line-paths',
        updateTriggers: {
          getColor: updateTriggers.getLineColor,
          getWidth: updateTriggers.getLineWidth
        }
      }), {
        data: lineFeatures,
 
        fp64: fp64,
        widthScale: lineWidthScale,
        widthMinPixels: lineWidthMinPixels,
        widthMaxPixels: lineWidthMaxPixels,
        rounded: lineJointRounded,
        miterLimit: lineMiterLimit,
 
        getPath: getCoordinates,
        getColor: getLineColor,
        getWidth: getLineWidth
      });
 
      var pointLayer = drawPoints && new subLayers.PointLayer(this.getSubLayerProps({
        id: 'points',
        updateTriggers: {
          getColor: updateTriggers.getFillColor,
          getRadius: updateTriggers.getRadius
        }
      }), {
        data: pointFeatures,
 
        fp64: fp64,
        radiusScale: pointRadiusScale,
        radiusMinPixels: pointRadiusMinPixels,
        radiusMaxPixels: pointRadiusMaxPixels,
 
        getPosition: getCoordinates,
        getColor: getFillColor,
        getRadius: getRadius
      });
 
      return [
      // If not extruded: flat fill layer is drawn below outlines
      !extruded && polygonFillLayer, polygonWireframeLayer, polygonLineLayer, pathLayer, pointLayer,
      // If extruded: draw fill layer last for correct blending behavior
      extruded && polygonFillLayer];
    }
    /* eslint-enable complexity */
 
  }]);
 
  return GeoJsonLayer;
}(_core.CompositeLayer);
 
exports.default = GeoJsonLayer;
 
 
GeoJsonLayer.layerName = 'GeoJsonLayer';
GeoJsonLayer.defaultProps = defaultProps;
 
/***/ }),
/* 294 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.getGeojsonFeatures = getGeojsonFeatures;
exports.separateGeojsonFeatures = separateGeojsonFeatures;
 
var _assert = __webpack_require__(1);
 
var _assert2 = _interopRequireDefault(_assert);
 
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
 
/**
 * "Normalizes" complete or partial GeoJSON data into iterable list of features
 * Can accept GeoJSON geometry or "Feature", "FeatureCollection" in addition
 * to plain arrays and iterables.
 * Works by extracting the feature array or wrapping single objects in an array,
 * so that subsequent code can simply iterate over features.
 *
 * @param {object} geojson - geojson data
 * @param {Object|Array} data - geojson object (FeatureCollection, Feature or
 *  Geometry) or array of features
 * @return {Array|"iteratable"} - iterable list of features
 */
function getGeojsonFeatures(geojson) {
  // If array, assume this is a list of features
  if (Array.isArray(geojson)) {
    return geojson;
  }
 
  (0, _assert2.default)(geojson.type, 'GeoJSON does not have type');
 
  switch (geojson.type) {
    case 'GeometryCollection':
      (0, _assert2.default)(Array.isArray(geojson.geometries), 'GeoJSON does not have geometries array');
      return geojson.geometries.map(function (geometry) {
        return { geometry: geometry };
      });
    case 'Feature':
      // Wrap the feature in a 'Features' array
      return [geojson];
    case 'FeatureCollection':
      // Just return the 'Features' array from the collection
      (0, _assert2.default)(Array.isArray(geojson.features), 'GeoJSON does not have features array');
      return geojson.features;
    default:
      // Assume it's a geometry, we'll check type in separateGeojsonFeatures
      // Wrap the geometry object in a 'Feature' object and wrap in an array
      return [{ geometry: geojson }];
  }
}
 
// Linearize
// Copyright (c) 2015 - 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
 
function separateGeojsonFeatures(features) {
  var pointFeatures = [];
  var lineFeatures = [];
  var polygonFeatures = [];
  var polygonOutlineFeatures = [];
 
  features.forEach(function (feature) {
    (0, _assert2.default)(feature && feature.geometry, 'GeoJSON does not have geometry');
 
    var _feature$geometry = feature.geometry,
        type = _feature$geometry.type,
        coordinates = _feature$geometry.coordinates,
        properties = feature.properties;
 
    checkCoordinates(type, coordinates);
 
    switch (type) {
      case 'Point':
        pointFeatures.push(feature);
        break;
      case 'MultiPoint':
        // TODO - split multipoints
        coordinates.forEach(function (point) {
          pointFeatures.push({ geometry: { coordinates: point }, properties: properties, feature: feature });
        });
        break;
      case 'LineString':
        lineFeatures.push(feature);
        break;
      case 'MultiLineString':
        // Break multilinestrings into multiple lines with same properties
        coordinates.forEach(function (path) {
          lineFeatures.push({ geometry: { coordinates: path }, properties: properties, feature: feature });
        });
        break;
      case 'Polygon':
        polygonFeatures.push(feature);
        // Break polygon into multiple lines with same properties
        coordinates.forEach(function (path) {
          polygonOutlineFeatures.push({ geometry: { coordinates: path }, properties: properties, feature: feature });
        });
        break;
      case 'MultiPolygon':
        // Break multipolygons into multiple polygons with same properties
        coordinates.forEach(function (polygon) {
          polygonFeatures.push({ geometry: { coordinates: polygon }, properties: properties, feature: feature });
          // Break polygon into multiple lines with same properties
          polygon.forEach(function (path) {
            polygonOutlineFeatures.push({ geometry: { coordinates: path }, properties: properties, feature: feature });
          });
        });
        break;
      default:
    }
  });
 
  return {
    pointFeatures: pointFeatures,
    lineFeatures: lineFeatures,
    polygonFeatures: polygonFeatures,
    polygonOutlineFeatures: polygonOutlineFeatures
  };
}
 
/**
 * Simple GeoJSON validation util. For perf reasons we do not validate against the full spec,
 * only the following:
   - geometry.type is supported
   - geometry.coordinate has correct nesting level
 */
var COORDINATE_NEST_LEVEL = {
  Point: 1,
  MultiPoint: 2,
  LineString: 2,
  MultiLineString: 3,
  Polygon: 3,
  MultiPolygon: 4
};
 
function checkCoordinates(type, coordinates) {
  var nestLevel = COORDINATE_NEST_LEVEL[type];
 
  (0, _assert2.default)(nestLevel, 'Unknown GeoJSON type ' + type);
 
  while (coordinates && --nestLevel > 0) {
    coordinates = coordinates[0];
  }
  (0, _assert2.default)(coordinates && Number.isFinite(coordinates[0]), type + ' coordinates are malformed');
}
 
/***/ }),
/* 295 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
// Copyright (c) 2015 - 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
 
exports.default = "#define SHADER_NAME grid-cell-layer-fragment-shader\n\n#ifdef GL_ES\nprecision highp float;\n#endif\n\nvarying vec4 vColor;\n\nvoid main(void) {\n  gl_FragColor = vColor;\n\n  // use highlight color if this fragment belongs to the selected object.\n  gl_FragColor = picking_filterHighlightColor(gl_FragColor);\n\n  // use picking color if rendering to picking FBO.\n  gl_FragColor = picking_filterPickingColor(gl_FragColor);\n}\n";
 
/***/ }),
/* 296 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
// Copyright (c) 2015 - 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
 
// Inspired by screen-grid-layer vertex shader in deck.gl
 
exports.default = "#define SHADER_NAME grid-cell-layer-vertex-shader-64\n\nattribute vec3 positions;\nattribute vec3 normals;\n\nattribute vec4 instancePositions;\nattribute vec2 instancePositions64xyLow;\nattribute vec4 instanceColors;\nattribute vec3 instancePickingColors;\n\n// Custom uniforms\nuniform float extruded;\nuniform float cellSize;\nuniform float coverage;\nuniform float opacity;\nuniform float elevationScale;\n\n// A magic number to scale elevation so that 1 unit approximate to 1 meter\n#define ELEVATION_SCALE 0.8\n\n// Result\nvarying vec4 vColor;\n\nvoid main(void) {\n  vec4 instancePositions64xy = vec4(\n    instancePositions.x,\n    instancePositions64xyLow.x,\n    instancePositions.y,\n    instancePositions64xyLow.y);\n\n  vec2 projected_coord_xy[2];\n  project_position_fp64(instancePositions64xy, projected_coord_xy);\n\n  // if ahpha == 0.0 or z < 0.0, do not render element\n  float noRender = float(instanceColors.a == 0.0 || instancePositions.w < 0.0);\n  float finalCellSize = cellSize * mix(1.0, 0.0, noRender);\n\n  projected_coord_xy[0] = sum_fp64(projected_coord_xy[0],\n    vec2((positions.x * coverage + 1.0) * finalCellSize / 2.0, 0.0));\n  projected_coord_xy[1] = sum_fp64(projected_coord_xy[1],\n    vec2((positions.y * coverage - 1.0) * finalCellSize / 2.0, 0.0));\n\n  float elevation = 0.0;\n\n  if (extruded > 0.5) {\n    elevation = project_scale(instancePositions.w  * (positions.z + 1.0) *\n      ELEVATION_SCALE * elevationScale) + 1.0;\n  }\n\n  vec2 vertex_pos_modelspace[4];\n  vertex_pos_modelspace[0] = projected_coord_xy[0];\n  vertex_pos_modelspace[1] = projected_coord_xy[1];\n  vertex_pos_modelspace[2] = vec2(elevation, 0.0);\n  vertex_pos_modelspace[3] = vec2(1.0, 0.0);\n\n  vec4 position_worldspace = vec4(\n    vertex_pos_modelspace[0].x, vertex_pos_modelspace[1].x,\n    vertex_pos_modelspace[2].x, vertex_pos_modelspace[3].x);\n\n  gl_Position = project_to_clipspace_fp64(vertex_pos_modelspace);\n\n  float lightWeight = 1.0;\n\n  if (extruded > 0.5) {\n    lightWeight = getLightWeight(\n      position_worldspace.xyz, // the w component is always 1.0\n      normals\n    );\n  }\n\n  vec3 lightWeightedColor = lightWeight * instanceColors.rgb;\n  vec4 color = vec4(lightWeightedColor, instanceColors.a * opacity) / 255.0;\n  vColor = color;\n\n  // Set color to be rendered to picking fbo (also used to check for selection highlight).\n  picking_setPickingColor(instancePickingColors);\n}\n";
 
/***/ }),
/* 297 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
// Copyright (c) 2015 - 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
 
// Inspired by screen-grid-layer vertex shader in deck.gl
 
exports.default = "#define SHADER_NAME grid-cell-layer-vertex-shader\n\nattribute vec3 positions;\nattribute vec3 normals;\n\nattribute vec4 instancePositions;\nattribute vec4 instanceColors;\nattribute vec3 instancePickingColors;\n\n// Custom uniforms\nuniform float extruded;\nuniform float cellSize;\nuniform float coverage;\nuniform float opacity;\nuniform float elevationScale;\n\n// A magic number to scale elevation so that 1 unit approximate to 1 meter\n#define ELEVATION_SCALE 0.8\n\n// Result\nvarying vec4 vColor;\n\nvoid main(void) {\n\n  vec2 topLeftPos = project_position(instancePositions.xy);\n\n  // if ahpha == 0.0 or z < 0.0, do not render element\n  float noRender = float(instanceColors.a == 0.0 || instancePositions.w < 0.0);\n  float finalCellSize = cellSize * mix(1.0, 0.0, noRender);\n\n  // cube gemoetry vertics are between -1 to 1, scale and transform it to between 0, 1\n  vec2 pos = topLeftPos + vec2(\n  (positions.x * coverage + 1.0) / 2.0 * finalCellSize,\n  (positions.y * coverage - 1.0) / 2.0 * finalCellSize);\n\n  float elevation = 0.0;\n\n  if (extruded > 0.5) {\n    elevation = project_scale(instancePositions.w  * (positions.z + 1.0) *\n      ELEVATION_SCALE * elevationScale);\n  }\n\n  // extrude positions\n  vec3 extrudedPosition = vec3(pos.xy, elevation + 1.0);\n  vec4 position_worldspace = vec4(extrudedPosition, 1.0);\n  gl_Position = project_to_clipspace(position_worldspace);\n\n  float lightWeight = 1.0;\n\n  if (extruded > 0.5) {\n    lightWeight = getLightWeight(\n      position_worldspace.xyz, // the w component is always 1.0\n      normals\n    );\n  }\n\n  vec3 lightWeightedColor = lightWeight * instanceColors.rgb;\n  vec4 color = vec4(lightWeightedColor, instanceColors.a * opacity) / 255.0;\n  vColor = color;\n\n  // Set color to be rendered to picking fbo (also used to check for selection highlight).\n  picking_setPickingColor(instancePickingColors);\n}\n";
 
/***/ }),
/* 298 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.pointToDensityGridData = pointToDensityGridData;
// Copyright (c) 2015 - 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
var R_EARTH = 6378000;
 
/**
 * Calculate density grid from an array of points
 * @param {array} points
 * @param {number} cellSize - cell size in meters
 * @param {function} getPosition - position accessor
 * @returns {object} - grid data, cell dimension
 */
function pointToDensityGridData(points, cellSize, getPosition) {
  var _pointsToGridHashing2 = _pointsToGridHashing(points, cellSize, getPosition),
      gridHash = _pointsToGridHashing2.gridHash,
      gridOffset = _pointsToGridHashing2.gridOffset;
 
  var layerData = _getGridLayerDataFromGridHash(gridHash, gridOffset);
 
  return {
    gridOffset: gridOffset,
    layerData: layerData
  };
}
 
/**
 * Project points into each cell, return a hash table of cells
 * @param {array} points
 * @param {number} cellSize - unit size in meters
 * @param {function} getPosition - position accessor
 * @returns {object} - grid hash and cell dimension
 */
function _pointsToGridHashing() {
  var points = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
  var cellSize = arguments[1];
  var getPosition = arguments[2];
 
  // find the geometric center of sample points
  var latMin = Infinity;
  var latMax = -Infinity;
  var pLat = void 0;
 
  for (var p = 0; p < points.length; p++) {
    pLat = getPosition(points[p])[1];
    if (Number.isFinite(pLat)) {
      latMin = pLat < latMin ? pLat : latMin;
      latMax = pLat > latMax ? pLat : latMax;
    }
  }
 
  var centerLat = (latMin + latMax) / 2;
 
  var gridOffset = _calculateGridLatLonOffset(cellSize, centerLat);
 
  if (gridOffset.xOffset <= 0 || gridOffset.yOffset <= 0) {
    return { gridHash: {}, gridOffset: gridOffset };
  }
  // calculate count per cell
  var gridHash = points.reduce(function (accu, pt) {
    var lat = getPosition(pt)[1];
    var lng = getPosition(pt)[0];
 
    if (!Number.isFinite(lat) || !Number.isFinite(lng)) {
      return accu;
    }
 
    var latIdx = Math.floor((lat + 90) / gridOffset.yOffset);
    var lonIdx = Math.floor((lng + 180) / gridOffset.xOffset);
    var key = latIdx + '-' + lonIdx;
 
    accu[key] = accu[key] || { count: 0, points: [] };
    accu[key].count += 1;
    accu[key].points.push(pt);
 
    return accu;
  }, {});
 
  return { gridHash: gridHash, gridOffset: gridOffset };
}
 
function _getGridLayerDataFromGridHash(gridHash, gridOffset) {
  return Object.keys(gridHash).reduce(function (accu, key, i) {
    var idxs = key.split('-');
    var latIdx = parseInt(idxs[0], 10);
    var lonIdx = parseInt(idxs[1], 10);
 
    accu.push(Object.assign({
      index: i,
      position: [-180 + gridOffset.xOffset * lonIdx, -90 + gridOffset.yOffset * latIdx]
    }, gridHash[key]));
 
    return accu;
  }, []);
}
 
/**
 * calculate grid layer cell size in lat lon based on world unit size
 * and current latitude
 * @param {number} cellSize
 * @param {number} latitude
 * @returns {object} - lat delta and lon delta
 */
function _calculateGridLatLonOffset(cellSize, latitude) {
  var yOffset = _calculateLatOffset(cellSize);
  var xOffset = _calculateLonOffset(latitude, cellSize);
  return { yOffset: yOffset, xOffset: xOffset };
}
 
/**
 * with a given x-km change, calculate the increment of latitude
 * based on stackoverflow http://stackoverflow.com/questions/7477003
 * @param {number} dy - change in km
 * @return {number} - increment in latitude
 */
function _calculateLatOffset(dy) {
  return dy / R_EARTH * (180 / Math.PI);
}
 
/**
 * with a given x-km change, and current latitude
 * calculate the increment of longitude
 * based on stackoverflow http://stackoverflow.com/questions/7477003
 * @param {number} lat - latitude of current location (based on city)
 * @param {number} dx - change in km
 * @return {number} - increment in longitude
 */
function _calculateLonOffset(lat, dx) {
  return dx / R_EARTH * (180 / Math.PI) / Math.cos(lat * Math.PI / 180);
}
 
/***/ }),
/* 299 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
 
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
 
var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
 
var _core = __webpack_require__(13);
 
var _gridCellLayer = __webpack_require__(174);
 
var _gridCellLayer2 = _interopRequireDefault(_gridCellLayer);
 
var _gridAggregator = __webpack_require__(298);
 
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
 
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
 
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
 
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // Copyright (c) 2015 - 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
 
var BinSorter = _core.experimental.BinSorter,
    defaultColorRange = _core.experimental.defaultColorRange,
    getQuantizeScale = _core.experimental.getQuantizeScale,
    getLinearScale = _core.experimental.getLinearScale;
 
 
function nop() {}
 
var defaultProps = {
  // color
  colorDomain: null,
  colorRange: defaultColorRange,
  getColorValue: function getColorValue(points) {
    return points.length;
  },
  lowerPercentile: 0,
  upperPercentile: 100,
  onSetColorDomain: nop,
 
  // elevation
  elevationDomain: null,
  elevationRange: [0, 1000],
  getElevationValue: function getElevationValue(points) {
    return points.length;
  },
  elevationLowerPercentile: 0,
  elevationUpperPercentile: 100,
  elevationScale: 1,
  onSetElevationDomain: nop,
 
  // grid
  cellSize: 1000,
  coverage: 1,
  getPosition: function getPosition(x) {
    return x.position;
  },
  extruded: false,
  fp64: false,
  // Optional settings for 'lighting' shader module
  lightSettings: {
    lightsPosition: [-122.45, 37.75, 8000, -122.0, 38.0, 5000],
    ambientRatio: 0.05,
    diffuseRatio: 0.6,
    specularRatio: 0.8,
    lightsStrength: [2.0, 0.0, 0.0, 0.0],
    numberOfLights: 2
  }
};
 
var GridLayer = function (_CompositeLayer) {
  _inherits(GridLayer, _CompositeLayer);
 
  function GridLayer() {
    _classCallCheck(this, GridLayer);
 
    return _possibleConstructorReturn(this, (GridLayer.__proto__ || Object.getPrototypeOf(GridLayer)).apply(this, arguments));
  }
 
  _createClass(GridLayer, [{
    key: 'initializeState',
    value: function initializeState() {
      this.state = {
        layerData: [],
        sortedColorBins: null,
        sortedElevationBins: null,
        colorValueDomain: null,
        elevationValueDomain: null,
        colorScaleFunc: nop,
        elevationScaleFunc: nop,
        dimensionUpdaters: this.getDimensionUpdaters()
      };
    }
  }, {
    key: 'updateState',
    value: function updateState(_ref) {
      var _this2 = this;
 
      var oldProps = _ref.oldProps,
          props = _ref.props,
          changeFlags = _ref.changeFlags;
 
      var dimensionChanges = this.getDimensionChanges(oldProps, props);
 
      if (changeFlags.dataChanged || this.needsReProjectPoints(oldProps, props)) {
        // project data into hexagons, and get sortedBins
        this.getLayerData();
      } else if (dimensionChanges) {
        dimensionChanges.forEach(function (f) {
          return typeof f === 'function' && f.apply(_this2);
        });
      }
    }
  }, {
    key: 'needsReProjectPoints',
    value: function needsReProjectPoints(oldProps, props) {
      return oldProps.cellSize !== props.cellSize;
    }
  }, {
    key: 'getDimensionUpdaters',
    value: function getDimensionUpdaters() {
      // dimension updaters are sequential,
      // if the first one needs to be called, the 2nd and 3rd one will automatically
      // be called. e.g. if ColorValue needs to be updated, getColorValueDomain and getColorScale
      // will automatically be called
      return {
        getColor: [{
          id: 'value',
          triggers: ['getColorValue'],
          updater: this.getSortedColorBins
        }, {
          id: 'domain',
          triggers: ['lowerPercentile', 'upperPercentile'],
          updater: this.getColorValueDomain
        }, {
          id: 'scaleFunc',
          triggers: ['colorDomain', 'colorRange'],
          updater: this.getColorScale
        }],
        getElevation: [{
          id: 'value',
          triggers: ['getElevationValue'],
          updater: this.getSortedElevationBins
        }, {
          id: 'domain',
          triggers: ['elevationLowerPercentile', 'elevationUpperPercentile'],
          updater: this.getElevationValueDomain
        }, {
          id: 'scaleFunc',
          triggers: ['elevationDomain', 'elevationRange'],
          updater: this.getElevationScale
        }]
      };
    }
  }, {
    key: 'getDimensionChanges',
    value: function getDimensionChanges(oldProps, props) {
      var dimensionUpdaters = this.state.dimensionUpdaters;
 
      var updaters = [];
 
      // get dimension to be updated
      for (var dimensionKey in dimensionUpdaters) {
        // return the first triggered updater for each dimension
        var needUpdate = dimensionUpdaters[dimensionKey].find(function (item) {
          return item.triggers.some(function (t) {
            return oldProps[t] !== props[t];
          });
        });
 
        if (needUpdate) {
          updaters.push(needUpdate.updater);
        }
      }
 
      return updaters.length ? updaters : null;
    }
  }, {
    key: 'getPickingInfo',
    value: function getPickingInfo(_ref2) {
      var info = _ref2.info;
      var _state = this.state,
          sortedColorBins = _state.sortedColorBins,
          sortedElevationBins = _state.sortedElevationBins;
 
 
      var isPicked = info.picked && info.index > -1;
      var object = null;
 
      if (isPicked) {
        var cell = this.state.layerData[info.index];
 
        var colorValue = sortedColorBins.binMap[cell.index] && sortedColorBins.binMap[cell.index].value;
        var elevationValue = sortedElevationBins.binMap[cell.index] && sortedElevationBins.binMap[cell.index].value;
 
        object = Object.assign({
          colorValue: colorValue,
          elevationValue: elevationValue
        }, cell);
      }
 
      // add bin colorValue and elevationValue to info
      return Object.assign(info, {
        picked: Boolean(object),
        // override object with picked cell
        object: object
      });
    }
  }, {
    key: 'getUpdateTriggers',
    value: function getUpdateTriggers() {
      var _this3 = this;
 
      var dimensionUpdaters = this.state.dimensionUpdaters;
 
      // merge all dimension triggers
 
      var updateTriggers = {};
 
      var _loop = function _loop(dimensionKey) {
        updateTriggers[dimensionKey] = {};
 
        var _iteratorNormalCompletion = true;
        var _didIteratorError = false;
        var _iteratorError = undefined;
 
        try {
          for (var _iterator = dimensionUpdaters[dimensionKey][Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
            var step = _step.value;
 
            step.triggers.forEach(function (prop) {
              updateTriggers[dimensionKey][prop] = _this3.props[prop];
            });
          }
        } catch (err) {
          _didIteratorError = true;
          _iteratorError = err;
        } finally {
          try {
            if (!_iteratorNormalCompletion && _iterator.return) {
              _iterator.return();
            }
          } finally {
            if (_didIteratorError) {
              throw _iteratorError;
            }
          }
        }
      };
 
      for (var dimensionKey in dimensionUpdaters) {
        _loop(dimensionKey);
      }
 
      return updateTriggers;
    }
  }, {
    key: 'getLayerData',
    value: function getLayerData() {
      var _props = this.props,
          data = _props.data,
          cellSize = _props.cellSize,
          getPosition = _props.getPosition;
 
      var _pointToDensityGridDa = (0, _gridAggregator.pointToDensityGridData)(data, cellSize, getPosition),
          layerData = _pointToDensityGridDa.layerData;
 
      this.setState({ layerData: layerData });
      this.getSortedBins();
    }
  }, {
    key: 'getValueDomain',
    value: function getValueDomain() {
      this.getColorValueDomain();
      this.getElevationValueDomain();
    }
  }, {
    key: 'getSortedBins',
    value: function getSortedBins() {
      this.getSortedColorBins();
      this.getSortedElevationBins();
    }
  }, {
    key: 'getSortedColorBins',
    value: function getSortedColorBins() {
      var getColorValue = this.props.getColorValue;
 
      var sortedColorBins = new BinSorter(this.state.layerData || [], getColorValue);
 
      this.setState({ sortedColorBins: sortedColorBins });
      this.getColorValueDomain();
    }
  }, {
    key: 'getSortedElevationBins',
    value: function getSortedElevationBins() {
      var getElevationValue = this.props.getElevationValue;
 
      var sortedElevationBins = new BinSorter(this.state.layerData || [], getElevationValue);
      this.setState({ sortedElevationBins: sortedElevationBins });
      this.getElevationValueDomain();
    }
  }, {
    key: 'getColorValueDomain',
    value: function getColorValueDomain() {
      var _props2 = this.props,
          lowerPercentile = _props2.lowerPercentile,
          upperPercentile = _props2.upperPercentile,
          onSetColorDomain = _props2.onSetColorDomain;
 
 
      this.state.colorValueDomain = this.state.sortedColorBins.getValueRange([lowerPercentile, upperPercentile]);
 
      if (typeof onSetColorDomain === 'function') {
        onSetColorDomain(this.state.colorValueDomain);
      }
 
      this.getColorScale();
    }
  }, {
    key: 'getElevationValueDomain',
    value: function getElevationValueDomain() {
      var _props3 = this.props,
          elevationLowerPercentile = _props3.elevationLowerPercentile,
          elevationUpperPercentile = _props3.elevationUpperPercentile,
          onSetElevationDomain = _props3.onSetElevationDomain;
 
 
      this.state.elevationValueDomain = this.state.sortedElevationBins.getValueRange([elevationLowerPercentile, elevationUpperPercentile]);
 
      if (typeof onSetElevationDomain === 'function') {
        onSetElevationDomain(this.state.elevationValueDomain);
      }
 
      this.getElevationScale();
    }
  }, {
    key: 'getColorScale',
    value: function getColorScale() {
      var colorRange = this.props.colorRange;
 
      var colorDomain = this.props.colorDomain || this.state.colorValueDomain;
 
      this.state.colorScaleFunc = getQuantizeScale(colorDomain, colorRange);
    }
  }, {
    key: 'getElevationScale',
    value: function getElevationScale() {
      var elevationRange = this.props.elevationRange;
 
      var elevationDomain = this.props.elevationDomain || this.state.elevationValueDomain;
 
      this.state.elevationScaleFunc = getLinearScale(elevationDomain, elevationRange);
    }
  }, {
    key: '_onGetSublayerColor',
    value: function _onGetSublayerColor(cell) {
      var _state2 = this.state,
          sortedColorBins = _state2.sortedColorBins,
          colorScaleFunc = _state2.colorScaleFunc,
          colorValueDomain = _state2.colorValueDomain;
 
 
      var cv = sortedColorBins.binMap[cell.index] && sortedColorBins.binMap[cell.index].value;
      var colorDomain = this.props.colorDomain || colorValueDomain;
 
      var isColorValueInDomain = cv >= colorDomain[0] && cv <= colorDomain[colorDomain.length - 1];
 
      // if cell value is outside domain, set alpha to 0
      var color = isColorValueInDomain ? colorScaleFunc(cv) : [0, 0, 0, 0];
 
      // add alpha to color if not defined in colorRange
      color[3] = Number.isFinite(color[3]) ? color[3] : 255;
 
      return color;
    }
  }, {
    key: '_onGetSublayerElevation',
    value: function _onGetSublayerElevation(cell) {
      var _state3 = this.state,
          sortedElevationBins = _state3.sortedElevationBins,
          elevationScaleFunc = _state3.elevationScaleFunc,
          elevationValueDomain = _state3.elevationValueDomain;
 
      var ev = sortedElevationBins.binMap[cell.index] && sortedElevationBins.binMap[cell.index].value;
 
      var elevationDomain = this.props.elevationDomain || elevationValueDomain;
 
      var isElevationValueInDomain = ev >= elevationDomain[0] && ev <= elevationDomain[elevationDomain.length - 1];
 
      // if cell value is outside domain, set elevation to -1
      return isElevationValueInDomain ? elevationScaleFunc(ev) : -1;
    }
 
    // for subclassing, override this method to return
    // customized sub layer props
 
  }, {
    key: 'getSubLayerProps',
    value: function getSubLayerProps() {
      var _props4 = this.props,
          elevationScale = _props4.elevationScale,
          fp64 = _props4.fp64,
          extruded = _props4.extruded,
          cellSize = _props4.cellSize,
          coverage = _props4.coverage,
          lightSettings = _props4.lightSettings;
 
      // return props to the sublayer constructor
 
      return _get(GridLayer.prototype.__proto__ || Object.getPrototypeOf(GridLayer.prototype), 'getSubLayerProps', this).call(this, {
        id: 'grid-cell',
        data: this.state.layerData,
 
        fp64: fp64,
        cellSize: cellSize,
        coverage: coverage,
        lightSettings: lightSettings,
        elevationScale: elevationScale,
        extruded: extruded,
 
        getColor: this._onGetSublayerColor.bind(this),
        getElevation: this._onGetSublayerElevation.bind(this),
        updateTriggers: this.getUpdateTriggers()
      });
    }
 
    // for subclassing, override this method to return
    // customized sub layer class
 
  }, {
    key: 'getSubLayerClass',
    value: function getSubLayerClass() {
      return _gridCellLayer2.default;
    }
  }, {
    key: 'renderLayers',
    value: function renderLayers() {
      var SubLayerClass = this.getSubLayerClass();
 
      return new SubLayerClass(this.getSubLayerProps());
    }
  }]);
 
  return GridLayer;
}(_core.CompositeLayer);
 
exports.default = GridLayer;
 
 
GridLayer.layerName = 'GridLayer';
GridLayer.defaultProps = defaultProps;
 
/***/ }),
/* 300 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
// Copyright (c) 2015 - 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
 
exports.default = "#define SHADER_NAME hexagon-cell-layer-fragment-shader\n\n#ifdef GL_ES\nprecision highp float;\n#endif\n\nvarying vec4 vColor;\n\nvoid main(void) {\n  gl_FragColor = vColor;\n\n  // use highlight color if this fragment belongs to the selected object.\n  gl_FragColor = picking_filterHighlightColor(gl_FragColor);\n\n  // use picking color if rendering to picking FBO.\n  gl_FragColor = picking_filterPickingColor(gl_FragColor);\n}\n";
 
/***/ }),
/* 301 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
// Copyright (c) 2015 - 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
 
exports.default = "#define SHADER_NAME hexagon-cell-layer-vertex-shader-64\n\nattribute vec3 positions;\nattribute vec3 normals;\n\nattribute vec3 instancePositions;\nattribute vec2 instancePositions64xyLow;\nattribute vec4 instanceColors;\nattribute vec3 instancePickingColors;\n\n// Custom uniforms\nuniform float opacity;\nuniform float radius;\nuniform float angle;\nuniform float extruded;\nuniform float coverage;\nuniform float elevationScale;\n\n// Result\nvarying vec4 vColor;\n\n// A magic number to scale elevation so that 1 unit approximate to 1 meter.\n#define ELEVATION_SCALE 0.8\n\nvoid main(void) {\n\n  // rotate primitive position and normal\n  mat2 rotationMatrix = mat2(cos(angle), -sin(angle), sin(angle), cos(angle));\n\n  vec2 rPos = rotationMatrix * positions.xz;\n  vec2 rNorm = rotationMatrix * normals.xz; // the hexagon cells has y axis as the vertical axis\n\n  vec3 rotatedPositions = vec3(rPos.x, positions.y, rPos.y);\n  vec3 rotatedNormals = vec3(rNorm.x, rNorm.y, normals.y);\n\n  // calculate elevation, if 3d not enabled set to 0\n  // cylindar gemoetry height are between -0.5 to 0.5, transform it to between 0, 1\n  float elevation = 0.0;\n\n  if (extruded > 0.5) {\n    elevation = project_scale(instancePositions.z * (positions.y + 0.5) *\n      ELEVATION_SCALE * elevationScale);\n  }\n\n  // if alpha == 0.0 or z < 0.0, do not render element\n  float noRender = float(instanceColors.a == 0.0 || instancePositions.z < 0.0);\n  float dotRadius = radius * mix(coverage, 0.0, noRender);\n\n  // project center of hexagon\n\n  vec4 instancePositions64xy = vec4(\n    instancePositions.x, instancePositions64xyLow.x,\n    instancePositions.y, instancePositions64xyLow.y);\n\n  vec2 projected_coord_xy[2];\n  project_position_fp64(instancePositions64xy, projected_coord_xy);\n\n  vec2 vertex_pos_localspace[4];\n  vec4_fp64(vec4(rotatedPositions.xz * dotRadius, 0.0, 1.0), vertex_pos_localspace);\n\n  vec2 vertex_pos_modelspace[4];\n  vertex_pos_modelspace[0] = sum_fp64(vertex_pos_localspace[0], projected_coord_xy[0]);\n  vertex_pos_modelspace[1] = sum_fp64(vertex_pos_localspace[1], projected_coord_xy[1]);\n  vertex_pos_modelspace[2] = sum_fp64(vertex_pos_localspace[2], vec2(elevation, 0.0));\n  vertex_pos_modelspace[3] = vec2(1.0, 0.0);\n\n  vec4 position_worldspace = vec4(\n    vertex_pos_modelspace[0].x, vertex_pos_modelspace[1].x,\n    vertex_pos_modelspace[2].x, vertex_pos_modelspace[3].x);\n\n  gl_Position = project_to_clipspace_fp64(vertex_pos_modelspace);\n\n  // Light calculations\n  // Worldspace is the linear space after Mercator projection\n\n  vec3 normals_worldspace = rotatedNormals;\n\n  float lightWeight = 1.0;\n\n  if (extruded > 0.5) {\n    lightWeight = getLightWeight(\n      position_worldspace.xyz, // the w component is always 1.0\n      normals_worldspace\n    );\n  }\n\n  vec3 lightWeightedColor = lightWeight * instanceColors.rgb;\n\n  // Color: Either opacity-multiplied instance color, or picking color\n  vColor = vec4(lightWeightedColor, opacity * instanceColors.a) / 255.0;\n\n  // Set color to be rendered to picking fbo (also used to check for selection highlight).\n  picking_setPickingColor(instancePickingColors);\n}\n";
 
/***/ }),
/* 302 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
// Copyright (c) 2015 - 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
 
exports.default = "\n#define SHADER_NAME hexagon-cell-layer-vertex-shader\n\nattribute vec3 positions;\nattribute vec3 normals;\n\nattribute vec3 instancePositions;\nattribute vec4 instanceColors;\nattribute vec3 instancePickingColors;\n\n// Custom uniforms\nuniform float opacity;\nuniform float radius;\nuniform float angle;\nuniform float extruded;\nuniform float coverage;\nuniform float elevationScale;\n\n// Result\nvarying vec4 vColor;\n\n// A magic number to scale elevation so that 1 unit approximate to 1 meter.\n#define ELEVATION_SCALE 0.8\n\nvoid main(void) {\n\n  // rotate primitive position and normal\n  mat2 rotationMatrix = mat2(cos(angle), -sin(angle), sin(angle), cos(angle));\n\n  vec2 rPos = rotationMatrix * positions.xz;\n  vec2 rNorm = rotationMatrix * normals.xz; // the hexagon cells has y axis as the vertical axis\n\n  vec3 rotatedPositions = vec3(rPos.x, positions.y, rPos.y);\n  vec3 rotatedNormals = vec3(rNorm.x, rNorm.y, normals.y);\n\n  // calculate elevation, if 3d not enabled set to 0\n  // cylindar gemoetry height are between -0.5 to 0.5, transform it to between 0, 1\n  float elevation = 0.0;\n\n  if (extruded > 0.5) {\n    elevation = project_scale(instancePositions.z * (positions.y + 0.5) *\n      ELEVATION_SCALE * elevationScale);\n  }\n\n  // if ahpha == 0.0 or z < 0.0, do not render element\n  float noRender = float(instanceColors.a == 0.0 || instancePositions.z < 0.0);\n  float dotRadius = radius * mix(coverage, 0.0, noRender);\n\n  // project center of hexagon\n  vec4 centroidPosition = vec4(project_position(instancePositions.xy), elevation, 0.0);\n\n  vec4 position_worldspace = centroidPosition + vec4(vec2(rotatedPositions.xz * dotRadius), 0., 1.);\n\n  gl_Position = project_to_clipspace(position_worldspace);\n\n  // Light calculations\n  // Worldspace is the linear space after Mercator projection\n\n  vec3 normals_worldspace = rotatedNormals;\n\n  float lightWeight = 1.0;\n\n  if (extruded > 0.5) {\n    lightWeight = getLightWeight(\n      position_worldspace.xyz, // the w component is always 1.0\n      normals_worldspace\n    );\n  }\n\n  vec3 lightWeightedColor = lightWeight * instanceColors.rgb;\n\n  // opacity-multiplied instance color\n  vColor = vec4(lightWeightedColor, opacity * instanceColors.a) / 255.0;\n\n  // Set color to be rendered to picking fbo (also used to check for selection highlight).\n  picking_setPickingColor(instancePickingColors);\n}\n";
 
/***/ }),
/* 303 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.pointToHexbin = pointToHexbin;
exports.getRadiusInPixel = getRadiusInPixel;
 
var _d3Hexbin = __webpack_require__(567);
 
/**
 * Use d3-hexbin to performs hexagonal binning from geo points to hexagons
 * @param {Array} data - array of points
 * @param {Number} radius - hexagon radius in meter
 * @param {function} getPosition - get points lon lat
 * @param {Object} viewport - current viewport object
 
 * @return {Object} - hexagons and countRange
 */
function pointToHexbin(_ref, viewport) {
  var data = _ref.data,
      radius = _ref.radius,
      getPosition = _ref.getPosition;
 
  // get hexagon radius in mercator world unit
  var radiusInPixel = getRadiusInPixel(radius, viewport);
 
  // add world space coordinates to points
  var screenPoints = data.map(function (pt) {
    return Object.assign({
      screenCoord: viewport.projectFlat(getPosition(pt))
    }, pt);
  });
 
  var newHexbin = (0, _d3Hexbin.hexbin)().radius(radiusInPixel).x(function (d) {
    return d.screenCoord[0];
  }).y(function (d) {
    return d.screenCoord[1];
  });
 
  var hexagonBins = newHexbin(screenPoints);
 
  return {
    hexagons: hexagonBins.map(function (hex, index) {
      return {
        centroid: viewport.unprojectFlat([hex.x, hex.y]),
        points: hex,
        index: index
      };
    })
  };
}
 
/**
 * Get radius in mercator world space coordinates from meter
 * @param {Number} radius - in meter
 * @param {Object} viewport - current viewport object
 
 * @return {Number} radius in mercator world spcae coordinates
 */
// Copyright (c) 2015 - 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
 
function getRadiusInPixel(radius, viewport) {
  var _viewport$getDistance = viewport.getDistanceScales(),
      pixelsPerMeter = _viewport$getDistance.pixelsPerMeter;
 
  // x, y distance should be the same
 
 
  return radius * pixelsPerMeter[0];
}
 
/***/ }),
/* 304 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
 
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
 
var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
 
var _core = __webpack_require__(13);
 
var _hexagonCellLayer = __webpack_require__(175);
 
var _hexagonCellLayer2 = _interopRequireDefault(_hexagonCellLayer);
 
var _hexagonAggregator2 = __webpack_require__(303);
 
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
 
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
 
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
 
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // Copyright (c) 2015 - 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
 
var log = _core.experimental.log,
    BinSorter = _core.experimental.BinSorter,
    getQuantizeScale = _core.experimental.getQuantizeScale,
    getLinearScale = _core.experimental.getLinearScale,
    defaultColorRange = _core.experimental.defaultColorRange;
 
 
function nop() {}
 
var defaultProps = {
  // color
  colorDomain: null,
  colorRange: defaultColorRange,
  getColorValue: function getColorValue(points) {
    return points.length;
  },
  lowerPercentile: 0,
  upperPercentile: 100,
  onSetColorDomain: nop,
 
  // elevation
  elevationDomain: null,
  elevationRange: [0, 1000],
  getElevationValue: function getElevationValue(points) {
    return points.length;
  },
  elevationLowerPercentile: 0,
  elevationUpperPercentile: 100,
  elevationScale: 1,
  onSetElevationDomain: nop,
 
  radius: 1000,
  coverage: 1,
  extruded: false,
  hexagonAggregator: _hexagonAggregator2.pointToHexbin,
  getPosition: function getPosition(x) {
    return x.position;
  },
  fp64: false,
  // Optional settings for 'lighting' shader module
  lightSettings: {
    lightsPosition: [-122.45, 37.75, 8000, -122.0, 38.0, 5000],
    ambientRatio: 0.05,
    diffuseRatio: 0.6,
    specularRatio: 0.8,
    lightsStrength: [2.0, 0.0, 0.0, 0.0],
    numberOfLights: 2
  }
};
 
var HexagonLayer = function (_CompositeLayer) {
  _inherits(HexagonLayer, _CompositeLayer);
 
  function HexagonLayer(props) {
    _classCallCheck(this, HexagonLayer);
 
    if (!props.hexagonAggregator && !props.radius) {
      log.once(0, 'HexagonLayer: Default hexagonAggregator requires radius prop to be set, ' + 'Now using 1000 meter as default');
 
      props.radius = defaultProps.radius;
    }
 
    if (Number.isFinite(props.upperPercentile) && (props.upperPercentile > 100 || props.upperPercentile < 0)) {
      log.once(0, 'HexagonLayer: upperPercentile should be between 0 and 100. ' + 'Assign to 100 by default');
 
      props.upperPercentile = defaultProps.upperPercentile;
    }
 
    if (Number.isFinite(props.lowerPercentile) && (props.lowerPercentile > 100 || props.lowerPercentile < 0)) {
      log.once(0, 'HexagonLayer: lowerPercentile should be between 0 and 100. ' + 'Assign to 0 by default');
 
      props.lowerPercentile = defaultProps.upperPercentile;
    }
 
    if (props.lowerPercentile >= props.upperPercentile) {
      log.once(0, 'HexagonLayer: lowerPercentile should not be bigger than ' + 'upperPercentile. Assign to 0 by default');
 
      props.lowerPercentile = defaultProps.lowerPercentile;
    }
 
    return _possibleConstructorReturn(this, (HexagonLayer.__proto__ || Object.getPrototypeOf(HexagonLayer)).call(this, props));
  }
 
  _createClass(HexagonLayer, [{
    key: 'initializeState',
    value: function initializeState() {
      this.state = {
        hexagons: [],
        hexagonVertices: null,
        sortedColorBins: null,
        sortedElevationBins: null,
        colorValueDomain: null,
        elevationValueDomain: null,
        colorScaleFunc: nop,
        elevationScaleFunc: nop,
        dimensionUpdaters: this.getDimensionUpdaters()
      };
    }
  }, {
    key: 'updateState',
    value: function updateState(_ref) {
      var _this2 = this;
 
      var oldProps = _ref.oldProps,
          props = _ref.props,
          changeFlags = _ref.changeFlags;
 
      var dimensionChanges = this.getDimensionChanges(oldProps, props);
 
      if (changeFlags.dataChanged || this.needsReProjectPoints(oldProps, props)) {
        // project data into hexagons, and get sortedColorBins
        this.getHexagons();
      } else if (dimensionChanges) {
        dimensionChanges.forEach(function (f) {
          return typeof f === 'function' && f.apply(_this2);
        });
      }
    }
  }, {
    key: 'needsReProjectPoints',
    value: function needsReProjectPoints(oldProps, props) {
      return oldProps.radius !== props.radius || oldProps.hexagonAggregator !== props.hexagonAggregator;
    }
  }, {
    key: 'getDimensionUpdaters',
    value: function getDimensionUpdaters() {
      // dimension updaters are sequential,
      // if the first one needs to be called, the 2nd and 3rd one will automatically
      // be called. e.g. if ColorValue needs to be updated, getColorValueDomain and getColorScale
      // will automatically be called
      return {
        getColor: [{
          id: 'value',
          triggers: ['getColorValue'],
          updater: this.getSortedColorBins
        }, {
          id: 'domain',
          triggers: ['lowerPercentile', 'upperPercentile'],
          updater: this.getColorValueDomain
        }, {
          id: 'scaleFunc',
          triggers: ['colorDomain', 'colorRange'],
          updater: this.getColorScale
        }],
        getElevation: [{
          id: 'value',
          triggers: ['getElevationValue'],
          updater: this.getSortedElevationBins
        }, {
          id: 'domain',
          triggers: ['elevationLowerPercentile', 'elevationUpperPercentile'],
          updater: this.getElevationValueDomain
        }, {
          id: 'scaleFunc',
          triggers: ['elevationDomain', 'elevationRange'],
          updater: this.getElevationScale
        }]
      };
    }
  }, {
    key: 'getDimensionChanges',
    value: function getDimensionChanges(oldProps, props) {
      var dimensionUpdaters = this.state.dimensionUpdaters;
 
      var updaters = [];
 
      // get dimension to be updated
      for (var dimensionKey in dimensionUpdaters) {
        // return the first triggered updater for each dimension
        var needUpdate = dimensionUpdaters[dimensionKey].find(function (item) {
          return item.triggers.some(function (t) {
            return oldProps[t] !== props[t];
          });
        });
 
        if (needUpdate) {
          updaters.push(needUpdate.updater);
        }
      }
 
      return updaters.length ? updaters : null;
    }
  }, {
    key: 'getHexagons',
    value: function getHexagons() {
      var hexagonAggregator = this.props.hexagonAggregator;
      var viewport = this.context.viewport;
 
      var _hexagonAggregator = hexagonAggregator(this.props, viewport),
          hexagons = _hexagonAggregator.hexagons,
          hexagonVertices = _hexagonAggregator.hexagonVertices;
 
      this.setState({ hexagons: hexagons, hexagonVertices: hexagonVertices });
      this.getSortedBins();
    }
  }, {
    key: 'getPickingInfo',
    value: function getPickingInfo(_ref2) {
      var info = _ref2.info;
      var _state = this.state,
          sortedColorBins = _state.sortedColorBins,
          sortedElevationBins = _state.sortedElevationBins;
 
      var isPicked = info.picked && info.index > -1;
 
      var object = null;
      if (isPicked) {
        var cell = this.state.hexagons[info.index];
 
        var colorValue = sortedColorBins.binMap[cell.index] && sortedColorBins.binMap[cell.index].value;
        var elevationValue = sortedElevationBins.binMap[cell.index] && sortedElevationBins.binMap[cell.index].value;
 
        object = Object.assign({
          colorValue: colorValue,
          elevationValue: elevationValue
        }, cell);
      }
 
      // add bin colorValue and elevationValue to info
      return Object.assign(info, {
        picked: Boolean(object),
        // override object with picked cell
        object: object
      });
    }
  }, {
    key: 'getUpdateTriggers',
    value: function getUpdateTriggers() {
      var _this3 = this;
 
      var dimensionUpdaters = this.state.dimensionUpdaters;
 
      // merge all dimension triggers
 
      var updateTriggers = {};
 
      var _loop = function _loop(dimensionKey) {
        updateTriggers[dimensionKey] = {};
 
        var _iteratorNormalCompletion = true;
        var _didIteratorError = false;
        var _iteratorError = undefined;
 
        try {
          for (var _iterator = dimensionUpdaters[dimensionKey][Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
            var step = _step.value;
 
            step.triggers.forEach(function (prop) {
              updateTriggers[dimensionKey][prop] = _this3.props[prop];
            });
          }
        } catch (err) {
          _didIteratorError = true;
          _iteratorError = err;
        } finally {
          try {
            if (!_iteratorNormalCompletion && _iterator.return) {
              _iterator.return();
            }
          } finally {
            if (_didIteratorError) {
              throw _iteratorError;
            }
          }
        }
      };
 
      for (var dimensionKey in dimensionUpdaters) {
        _loop(dimensionKey);
      }
 
      return updateTriggers;
    }
  }, {
    key: 'getValueDomain',
    value: function getValueDomain() {
      this.getColorValueDomain();
      this.getElevationValueDomain();
    }
  }, {
    key: 'getSortedBins',
    value: function getSortedBins() {
      this.getSortedColorBins();
      this.getSortedElevationBins();
    }
  }, {
    key: 'getSortedColorBins',
    value: function getSortedColorBins() {
      var getColorValue = this.props.getColorValue;
 
      var sortedColorBins = new BinSorter(this.state.hexagons || [], getColorValue);
 
      this.setState({ sortedColorBins: sortedColorBins });
      this.getColorValueDomain();
    }
  }, {
    key: 'getSortedElevationBins',
    value: function getSortedElevationBins() {
      var getElevationValue = this.props.getElevationValue;
 
      var sortedElevationBins = new BinSorter(this.state.hexagons || [], getElevationValue);
      this.setState({ sortedElevationBins: sortedElevationBins });
      this.getElevationValueDomain();
    }
  }, {
    key: 'getColorValueDomain',
    value: function getColorValueDomain() {
      var _props = this.props,
          lowerPercentile = _props.lowerPercentile,
          upperPercentile = _props.upperPercentile,
          onSetColorDomain = _props.onSetColorDomain;
 
 
      this.state.colorValueDomain = this.state.sortedColorBins.getValueRange([lowerPercentile, upperPercentile]);
 
      if (typeof onSetColorDomain === 'function') {
        onSetColorDomain(this.state.colorValueDomain);
      }
 
      this.getColorScale();
    }
  }, {
    key: 'getElevationValueDomain',
    value: function getElevationValueDomain() {
      var _props2 = this.props,
          elevationLowerPercentile = _props2.elevationLowerPercentile,
          elevationUpperPercentile = _props2.elevationUpperPercentile,
          onSetElevationDomain = _props2.onSetElevationDomain;
 
 
      this.state.elevationValueDomain = this.state.sortedElevationBins.getValueRange([elevationLowerPercentile, elevationUpperPercentile]);
 
      if (typeof onSetElevationDomain === 'function') {
        onSetElevationDomain(this.state.elevationValueDomain);
      }
 
      this.getElevationScale();
    }
  }, {
    key: 'getColorScale',
    value: function getColorScale() {
      var colorRange = this.props.colorRange;
 
      var colorDomain = this.props.colorDomain || this.state.colorValueDomain;
 
      this.state.colorScaleFunc = getQuantizeScale(colorDomain, colorRange);
    }
  }, {
    key: 'getElevationScale',
    value: function getElevationScale() {
      var elevationRange = this.props.elevationRange;
 
      var elevationDomain = this.props.elevationDomain || this.state.elevationValueDomain;
 
      this.state.elevationScaleFunc = getLinearScale(elevationDomain, elevationRange);
    }
  }, {
    key: '_onGetSublayerColor',
    value: function _onGetSublayerColor(cell) {
      var _state2 = this.state,
          sortedColorBins = _state2.sortedColorBins,
          colorScaleFunc = _state2.colorScaleFunc,
          colorValueDomain = _state2.colorValueDomain;
 
 
      var cv = sortedColorBins.binMap[cell.index] && sortedColorBins.binMap[cell.index].value;
      var colorDomain = this.props.colorDomain || colorValueDomain;
 
      var isColorValueInDomain = cv >= colorDomain[0] && cv <= colorDomain[colorDomain.length - 1];
 
      // if cell value is outside domain, set alpha to 0
      var color = isColorValueInDomain ? colorScaleFunc(cv) : [0, 0, 0, 0];
 
      // add alpha to color if not defined in colorRange
      color[3] = Number.isFinite(color[3]) ? color[3] : 255;
 
      return color;
    }
  }, {
    key: '_onGetSublayerElevation',
    value: function _onGetSublayerElevation(cell) {
      var _state3 = this.state,
          sortedElevationBins = _state3.sortedElevationBins,
          elevationScaleFunc = _state3.elevationScaleFunc,
          elevationValueDomain = _state3.elevationValueDomain;
 
      var ev = sortedElevationBins.binMap[cell.index] && sortedElevationBins.binMap[cell.index].value;
 
      var elevationDomain = this.props.elevationDomain || elevationValueDomain;
 
      var isElevationValueInDomain = ev >= elevationDomain[0] && ev <= elevationDomain[elevationDomain.length - 1];
 
      // if cell value is outside domain, set elevation to -1
      return isElevationValueInDomain ? elevationScaleFunc(ev) : -1;
    }
 
    // for subclassing, override this method to return
    // customized sub layer props
 
  }, {
    key: 'getSubLayerProps',
    value: function getSubLayerProps() {
      var _props3 = this.props,
          radius = _props3.radius,
          elevationScale = _props3.elevationScale,
          extruded = _props3.extruded,
          coverage = _props3.coverage,
          lightSettings = _props3.lightSettings,
          fp64 = _props3.fp64;
 
      // return props to the sublayer constructor
 
      return _get(HexagonLayer.prototype.__proto__ || Object.getPrototypeOf(HexagonLayer.prototype), 'getSubLayerProps', this).call(this, {
        id: 'hexagon-cell',
        data: this.state.hexagons,
 
        fp64: fp64,
        hexagonVertices: this.state.hexagonVertices,
        radius: radius,
        elevationScale: elevationScale,
        angle: Math.PI,
        extruded: extruded,
        coverage: coverage,
        lightSettings: lightSettings,
 
        getColor: this._onGetSublayerColor.bind(this),
        getElevation: this._onGetSublayerElevation.bind(this),
        updateTriggers: this.getUpdateTriggers()
      });
    }
 
    // for subclassing, override this method to return
    // customized sub layer class
 
  }, {
    key: 'getSubLayerClass',
    value: function getSubLayerClass() {
      return _hexagonCellLayer2.default;
    }
  }, {
    key: 'renderLayers',
    value: function renderLayers() {
      var SubLayerClass = this.getSubLayerClass();
 
      return new SubLayerClass(this.getSubLayerProps());
    }
  }]);
 
  return HexagonLayer;
}(_core.CompositeLayer);
 
exports.default = HexagonLayer;
 
 
HexagonLayer.layerName = 'HexagonLayer';
HexagonLayer.defaultProps = defaultProps;
 
/***/ }),
/* 305 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
// Copyright (c) 2015 - 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
 
exports.default = "#define SHADER_NAME icon-layer-fragment-shader\n\n#ifdef GL_ES\nprecision highp float;\n#endif\n\nuniform float opacity;\nuniform sampler2D iconsTexture;\n\nvarying float vColorMode;\nvarying vec4 vColor;\nvarying vec2 vTextureCoords;\n\nconst float MIN_ALPHA = 0.05;\n\nvoid main(void) {\n  vec4 texColor = texture2D(iconsTexture, vTextureCoords);\n\n  // if colorMode == 0, use pixel color from the texture\n  // if colorMode == 1 or rendering picking buffer, use texture as transparency mask\n  vec3 color = mix(texColor.rgb, vColor.rgb, vColorMode);\n  float a = texColor.a * opacity * mix(1.0, vColor.a, vColorMode);\n\n  if (a < MIN_ALPHA) {\n    discard;\n  }\n\n  gl_FragColor = vec4(color, a);\n\n  // use highlight color if this fragment belongs to the selected object.\n  gl_FragColor = picking_filterHighlightColor(gl_FragColor);\n\n  // use picking color if rendering to picking FBO.\n  gl_FragColor = picking_filterPickingColor(gl_FragColor);\n}\n";
 
/***/ }),
/* 306 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
// Copyright (c) 2015 - 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
 
exports.default = "#define SHADER_NAME icon-layer-vertex-shader-64\n\nattribute vec2 positions;\n\nattribute vec3 instancePositions;\nattribute vec2 instancePositions64xyLow;\nattribute float instanceSizes;\nattribute float instanceAngles;\nattribute vec4 instanceColors;\nattribute vec3 instancePickingColors;\nattribute vec4 instanceIconFrames;\nattribute float instanceColorModes;\nattribute vec2 instanceOffsets;\n\nuniform float sizeScale;\nuniform vec2 iconsTextureDim;\n\nvarying float vColorMode;\nvarying vec4 vColor;\nvarying vec2 vTextureCoords;\n\nvec2 rotate_by_angle(vec2 vertex, float angle) {\n  float angle_radian = angle * PI / 180.0;\n  float cos_angle = cos(angle_radian);\n  float sin_angle = sin(angle_radian);\n  mat2 rotationMatrix = mat2(cos_angle, -sin_angle, sin_angle, cos_angle);\n  return rotationMatrix * vertex;\n}\n\nvoid main(void) {\n  vec2 iconSize = instanceIconFrames.zw;\n  // scale icon height to match instanceSize\n  float instanceScale = iconSize.y == 0.0 ? 0.0 : instanceSizes / iconSize.y;\n\n  // scale and rotate vertex in \"pixel\" value and convert back to fraction in clipspace\n  vec2 pixelOffset = positions / 2.0 * iconSize + instanceOffsets;\n  pixelOffset = rotate_by_angle(pixelOffset, instanceAngles) * sizeScale * instanceScale;\n  pixelOffset.y *= -1.0;\n\n  vec4 instancePositions64xy = vec4(\n    instancePositions.x, instancePositions64xyLow.x,\n    instancePositions.y, instancePositions64xyLow.y);\n\n  vec2 projected_coord_xy[2];\n  project_position_fp64(instancePositions64xy, projected_coord_xy);\n\n  vec2 vertex_pos_modelspace[4];\n  vertex_pos_modelspace[0] = projected_coord_xy[0];\n  vertex_pos_modelspace[1] = projected_coord_xy[1];\n  vertex_pos_modelspace[2] = vec2(project_scale(instancePositions.z), 0.0);\n  vertex_pos_modelspace[3] = vec2(1.0, 0.0);\n\n  gl_Position = project_to_clipspace_fp64(vertex_pos_modelspace);\n  gl_Position += project_pixel_to_clipspace(pixelOffset);\n\n  vTextureCoords = mix(\n    instanceIconFrames.xy,\n    instanceIconFrames.xy + iconSize,\n    (positions.xy + 1.0) / 2.0\n  ) / iconsTextureDim;\n\n  vTextureCoords.y = 1.0 - vTextureCoords.y;\n\n  vColor = instanceColors / 255.;\n\n  vColorMode = instanceColorModes;\n\n  // Set color to be rendered to picking fbo (also used to check for selection highlight).\n  picking_setPickingColor(instancePickingColors);\n}\n";
 
/***/ }),
/* 307 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
// Copyright (c) 2015 - 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
 
exports.default = "#define SHADER_NAME icon-layer-vertex-shader\n\nattribute vec2 positions;\n\nattribute vec3 instancePositions;\nattribute float instanceSizes;\nattribute float instanceAngles;\nattribute vec4 instanceColors;\nattribute vec3 instancePickingColors;\nattribute vec4 instanceIconFrames;\nattribute float instanceColorModes;\nattribute vec2 instanceOffsets;\n\nuniform float sizeScale;\nuniform vec2 iconsTextureDim;\n\nvarying float vColorMode;\nvarying vec4 vColor;\nvarying vec2 vTextureCoords;\n\nvec2 rotate_by_angle(vec2 vertex, float angle) {\n  float angle_radian = angle * PI / 180.0;\n  float cos_angle = cos(angle_radian);\n  float sin_angle = sin(angle_radian);\n  mat2 rotationMatrix = mat2(cos_angle, -sin_angle, sin_angle, cos_angle);\n  return rotationMatrix * vertex;\n}\n\nvoid main(void) {\n  vec2 iconSize = instanceIconFrames.zw;\n  // scale icon height to match instanceSize\n  float instanceScale = iconSize.y == 0.0 ? 0.0 : instanceSizes / iconSize.y;\n\n  // scale and rotate vertex in \"pixel\" value and convert back to fraction in clipspace\n  vec2 pixelOffset = positions / 2.0 * iconSize + instanceOffsets;\n  pixelOffset = rotate_by_angle(pixelOffset, instanceAngles) * sizeScale * instanceScale;\n  pixelOffset.y *= -1.0;\n\n  vec3 center = project_position(instancePositions);\n  gl_Position = project_to_clipspace(vec4(center, 1.0));\n  gl_Position += project_pixel_to_clipspace(pixelOffset);\n\n  vTextureCoords = mix(\n    instanceIconFrames.xy,\n    instanceIconFrames.xy + iconSize,\n    (positions.xy + 1.0) / 2.0\n  ) / iconsTextureDim;\n\n  vTextureCoords.y = 1.0 - vTextureCoords.y;\n\n  vColor = instanceColors / 255.;\n\n  vColorMode = instanceColorModes;\n\n  // Set color to be rendered to picking fbo (also used to check for selection highlight).\n  picking_setPickingColor(instancePickingColors);\n}\n";
 
/***/ }),
/* 308 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
 
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
 
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
 
var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
 
var _core = __webpack_require__(13);
 
var _luma = __webpack_require__(12);
 
var _iconLayerVertex = __webpack_require__(307);
 
var _iconLayerVertex2 = _interopRequireDefault(_iconLayerVertex);
 
var _iconLayerVertex3 = __webpack_require__(306);
 
var _iconLayerVertex4 = _interopRequireDefault(_iconLayerVertex3);
 
var _iconLayerFragment = __webpack_require__(305);
 
var _iconLayerFragment2 = _interopRequireDefault(_iconLayerFragment);
 
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
 
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
 
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
 
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
 
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // Copyright (c) 2015 - 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
 
 
var fp64LowPart = _core.experimental.fp64LowPart,
    enable64bitSupport = _core.experimental.enable64bitSupport;
 
 
var DEFAULT_COLOR = [0, 0, 0, 255];
var DEFAULT_TEXTURE_MIN_FILTER = _luma.GL.LINEAR_MIPMAP_LINEAR;
// GL.LINEAR is the default value but explicitly set it here
var DEFAULT_TEXTURE_MAG_FILTER = _luma.GL.LINEAR;
 
/*
 * @param {object} props
 * @param {Texture2D | string} props.iconAtlas - atlas image url or texture
 * @param {object} props.iconMapping - icon names mapped to icon definitions
 * @param {object} props.iconMapping[icon_name].x - x position of icon on the atlas image
 * @param {object} props.iconMapping[icon_name].y - y position of icon on the atlas image
 * @param {object} props.iconMapping[icon_name].width - width of icon on the atlas image
 * @param {object} props.iconMapping[icon_name].height - height of icon on the atlas image
 * @param {object} props.iconMapping[icon_name].anchorX - x anchor of icon on the atlas image,
 *   default to width / 2
 * @param {object} props.iconMapping[icon_name].anchorY - y anchor of icon on the atlas image,
 *   default to height / 2
 * @param {object} props.iconMapping[icon_name].mask - whether icon is treated as a transparency
 *   mask. If true, user defined color is applied. If false, original color from the image is
 *   applied. Default to false.
 * @param {number} props.size - icon size in pixels
 * @param {func} props.getPosition - returns anchor position of the icon, in [lng, lat, z]
 * @param {func} props.getIcon - returns icon name as a string
 * @param {func} props.getSize - returns icon size multiplier as a number
 * @param {func} props.getColor - returns color of the icon in [r, g, b, a]. Only works on icons
 *   with mask: true.
 * @param {func} props.getAngle - returns rotating angle (in degree) of the icon.
 */
var defaultProps = {
  iconAtlas: null,
  iconMapping: {},
  sizeScale: 1,
  fp64: false,
 
  getPosition: function getPosition(x) {
    return x.position;
  },
  getIcon: function getIcon(x) {
    return x.icon;
  },
  getColor: function getColor(x) {
    return x.color || DEFAULT_COLOR;
  },
  getSize: function getSize(x) {
    return x.size || 1;
  },
  getAngle: function getAngle(x) {
    return x.angle || 0;
  }
};
 
var IconLayer = function (_Layer) {
  _inherits(IconLayer, _Layer);
 
  function IconLayer() {
    _classCallCheck(this, IconLayer);
 
    return _possibleConstructorReturn(this, (IconLayer.__proto__ || Object.getPrototypeOf(IconLayer)).apply(this, arguments));
  }
 
  _createClass(IconLayer, [{
    key: 'getShaders',
    value: function getShaders() {
      return enable64bitSupport(this.props) ? { vs: _iconLayerVertex4.default, fs: _iconLayerFragment2.default, modules: ['project64', 'picking'] } : { vs: _iconLayerVertex2.default, fs: _iconLayerFragment2.default, modules: ['picking'] }; // 'project' module added by default.
    }
  }, {
    key: 'initializeState',
    value: function initializeState() {
      var attributeManager = this.getAttributeManager();
 
      /* eslint-disable max-len */
      attributeManager.addInstanced({
        instancePositions: {
          size: 3,
          transition: true,
          accessor: 'getPosition',
          update: this.calculateInstancePositions
        },
        instanceSizes: {
          size: 1,
          transition: true,
          accessor: 'getSize',
          update: this.calculateInstanceSizes
        },
        instanceOffsets: { size: 2, accessor: 'getIcon', update: this.calculateInstanceOffsets },
        instanceIconFrames: { size: 4, accessor: 'getIcon', update: this.calculateInstanceIconFrames },
        instanceColorModes: {
          size: 1,
          type: _luma.GL.UNSIGNED_BYTE,
          accessor: 'getIcon',
          update: this.calculateInstanceColorMode
        },
        instanceColors: {
          size: 4,
          type: _luma.GL.UNSIGNED_BYTE,
          transition: true,
          accessor: 'getColor',
          update: this.calculateInstanceColors
        },
        instanceAngles: {
          size: 1,
          transition: true,
          accessor: 'getAngle',
          update: this.calculateInstanceAngles
        }
      });
      /* eslint-enable max-len */
    }
  }, {
    key: 'updateAttribute',
    value: function updateAttribute(_ref) {
      var props = _ref.props,
          oldProps = _ref.oldProps,
          changeFlags = _ref.changeFlags;
 
      if (props.fp64 !== oldProps.fp64) {
        var attributeManager = this.getAttributeManager();
        attributeManager.invalidateAll();
 
        if (props.fp64 && props.coordinateSystem === _core.COORDINATE_SYSTEM.LNGLAT) {
          attributeManager.addInstanced({
            instancePositions64xyLow: {
              size: 2,
              accessor: 'getPosition',
              update: this.calculateInstancePositions64xyLow
            }
          });
        } else {
          attributeManager.remove(['instancePositions64xyLow']);
        }
      }
    }
  }, {
    key: 'updateState',
    value: function updateState(_ref2) {
      var _this2 = this;
 
      var oldProps = _ref2.oldProps,
          props = _ref2.props,
          changeFlags = _ref2.changeFlags;
 
      _get(IconLayer.prototype.__proto__ || Object.getPrototypeOf(IconLayer.prototype), 'updateState', this).call(this, { props: props, oldProps: oldProps, changeFlags: changeFlags });
 
      var iconAtlas = props.iconAtlas,
          iconMapping = props.iconMapping;
 
 
      if (oldProps.iconMapping !== iconMapping) {
        var attributeManager = this.getAttributeManager();
        attributeManager.invalidate('instanceOffsets');
        attributeManager.invalidate('instanceIconFrames');
        attributeManager.invalidate('instanceColorModes');
      }
 
      if (oldProps.iconAtlas !== iconAtlas) {
        if (iconAtlas instanceof _luma.Texture2D) {
          var _iconAtlas$setParamet;
 
          iconAtlas.setParameters((_iconAtlas$setParamet = {}, _defineProperty(_iconAtlas$setParamet, _luma.GL.TEXTURE_MIN_FILTER, DEFAULT_TEXTURE_MIN_FILTER), _defineProperty(_iconAtlas$setParamet, _luma.GL.TEXTURE_MAG_FILTER, DEFAULT_TEXTURE_MAG_FILTER), _iconAtlas$setParamet));
          this.setState({ iconsTexture: iconAtlas });
        } else if (typeof iconAtlas === 'string') {
          (0, _luma.loadTextures)(this.context.gl, {
            urls: [iconAtlas]
          }).then(function (_ref3) {
            var _texture$setParameter;
 
            var _ref4 = _slicedToArray(_ref3, 1),
                texture = _ref4[0];
 
            texture.setParameters((_texture$setParameter = {}, _defineProperty(_texture$setParameter, _luma.GL.TEXTURE_MIN_FILTER, DEFAULT_TEXTURE_MIN_FILTER), _defineProperty(_texture$setParameter, _luma.GL.TEXTURE_MAG_FILTER, DEFAULT_TEXTURE_MAG_FILTER), _texture$setParameter));
            _this2.setState({ iconsTexture: texture });
          });
        }
      }
 
      if (props.fp64 !== oldProps.fp64) {
        var gl = this.context.gl;
 
        this.setState({ model: this._getModel(gl) });
      }
      this.updateAttribute({ props: props, oldProps: oldProps, changeFlags: changeFlags });
    }
  }, {
    key: 'draw',
    value: function draw(_ref5) {
      var uniforms = _ref5.uniforms;
      var sizeScale = this.props.sizeScale;
      var iconsTexture = this.state.iconsTexture;
 
 
      if (iconsTexture) {
        this.state.model.render(Object.assign({}, uniforms, {
          iconsTexture: iconsTexture,
          iconsTextureDim: [iconsTexture.width, iconsTexture.height],
          sizeScale: sizeScale
        }));
      }
    }
  }, {
    key: '_getModel',
    value: function _getModel(gl) {
      var positions = [-1, -1, 0, -1, 1, 0, 1, 1, 0, 1, -1, 0];
 
      return new _luma.Model(gl, Object.assign({}, this.getShaders(), {
        id: this.props.id,
        geometry: new _luma.Geometry({
          drawMode: _luma.GL.TRIANGLE_FAN,
          attributes: {
            positions: new Float32Array(positions)
          }
        }),
        isInstanced: true,
        shaderCache: this.context.shaderCache
      }));
    }
  }, {
    key: 'calculateInstancePositions',
    value: function calculateInstancePositions(attribute) {
      var _props = this.props,
          data = _props.data,
          getPosition = _props.getPosition;
      var value = attribute.value;
 
      var i = 0;
      var _iteratorNormalCompletion = true;
      var _didIteratorError = false;
      var _iteratorError = undefined;
 
      try {
        for (var _iterator = data[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
          var object = _step.value;
 
          var position = getPosition(object);
          value[i++] = position[0];
          value[i++] = position[1];
          value[i++] = position[2] || 0;
        }
      } catch (err) {
        _didIteratorError = true;
        _iteratorError = err;
      } finally {
        try {
          if (!_iteratorNormalCompletion && _iterator.return) {
            _iterator.return();
          }
        } finally {
          if (_didIteratorError) {
            throw _iteratorError;
          }
        }
      }
    }
  }, {
    key: 'calculateInstancePositions64xyLow',
    value: function calculateInstancePositions64xyLow(attribute) {
      var _props2 = this.props,
          data = _props2.data,
          getPosition = _props2.getPosition;
      var value = attribute.value;
 
      var i = 0;
      var _iteratorNormalCompletion2 = true;
      var _didIteratorError2 = false;
      var _iteratorError2 = undefined;
 
      try {
        for (var _iterator2 = data[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
          var point = _step2.value;
 
          var position = getPosition(point);
          value[i++] = fp64LowPart(position[0]);
          value[i++] = fp64LowPart(position[1]);
        }
      } catch (err) {
        _didIteratorError2 = true;
        _iteratorError2 = err;
      } finally {
        try {
          if (!_iteratorNormalCompletion2 && _iterator2.return) {
            _iterator2.return();
          }
        } finally {
          if (_didIteratorError2) {
            throw _iteratorError2;
          }
        }
      }
    }
  }, {
    key: 'calculateInstanceSizes',
    value: function calculateInstanceSizes(attribute) {
      var _props3 = this.props,
          data = _props3.data,
          getSize = _props3.getSize;
      var value = attribute.value;
 
      var i = 0;
      var _iteratorNormalCompletion3 = true;
      var _didIteratorError3 = false;
      var _iteratorError3 = undefined;
 
      try {
        for (var _iterator3 = data[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {
          var object = _step3.value;
 
          value[i++] = getSize(object);
        }
      } catch (err) {
        _didIteratorError3 = true;
        _iteratorError3 = err;
      } finally {
        try {
          if (!_iteratorNormalCompletion3 && _iterator3.return) {
            _iterator3.return();
          }
        } finally {
          if (_didIteratorError3) {
            throw _iteratorError3;
          }
        }
      }
    }
  }, {
    key: 'calculateInstanceAngles',
    value: function calculateInstanceAngles(attribute) {
      var _props4 = this.props,
          data = _props4.data,
          getAngle = _props4.getAngle;
      var value = attribute.value;
 
      var i = 0;
      var _iteratorNormalCompletion4 = true;
      var _didIteratorError4 = false;
      var _iteratorError4 = undefined;
 
      try {
        for (var _iterator4 = data[Symbol.iterator](), _step4; !(_iteratorNormalCompletion4 = (_step4 = _iterator4.next()).done); _iteratorNormalCompletion4 = true) {
          var object = _step4.value;
 
          value[i++] = getAngle(object);
        }
      } catch (err) {
        _didIteratorError4 = true;
        _iteratorError4 = err;
      } finally {
        try {
          if (!_iteratorNormalCompletion4 && _iterator4.return) {
            _iterator4.return();
          }
        } finally {
          if (_didIteratorError4) {
            throw _iteratorError4;
          }
        }
      }
    }
  }, {
    key: 'calculateInstanceColors',
    value: function calculateInstanceColors(attribute) {
      var _props5 = this.props,
          data = _props5.data,
          getColor = _props5.getColor;
      var value = attribute.value;
 
      var i = 0;
      var _iteratorNormalCompletion5 = true;
      var _didIteratorError5 = false;
      var _iteratorError5 = undefined;
 
      try {
        for (var _iterator5 = data[Symbol.iterator](), _step5; !(_iteratorNormalCompletion5 = (_step5 = _iterator5.next()).done); _iteratorNormalCompletion5 = true) {
          var object = _step5.value;
 
          var color = getColor(object);
 
          value[i++] = color[0];
          value[i++] = color[1];
          value[i++] = color[2];
          value[i++] = isNaN(color[3]) ? 255 : color[3];
        }
      } catch (err) {
        _didIteratorError5 = true;
        _iteratorError5 = err;
      } finally {
        try {
          if (!_iteratorNormalCompletion5 && _iterator5.return) {
            _iterator5.return();
          }
        } finally {
          if (_didIteratorError5) {
            throw _iteratorError5;
          }
        }
      }
    }
  }, {
    key: 'calculateInstanceOffsets',
    value: function calculateInstanceOffsets(attribute) {
      var _props6 = this.props,
          data = _props6.data,
          iconMapping = _props6.iconMapping,
          getIcon = _props6.getIcon;
      var value = attribute.value;
 
      var i = 0;
      var _iteratorNormalCompletion6 = true;
      var _didIteratorError6 = false;
      var _iteratorError6 = undefined;
 
      try {
        for (var _iterator6 = data[Symbol.iterator](), _step6; !(_iteratorNormalCompletion6 = (_step6 = _iterator6.next()).done); _iteratorNormalCompletion6 = true) {
          var object = _step6.value;
 
          var icon = getIcon(object);
          var rect = iconMapping[icon] || {};
          value[i++] = rect.width / 2 - rect.anchorX || 0;
          value[i++] = rect.height / 2 - rect.anchorY || 0;
        }
      } catch (err) {
        _didIteratorError6 = true;
        _iteratorError6 = err;
      } finally {
        try {
          if (!_iteratorNormalCompletion6 && _iterator6.return) {
            _iterator6.return();
          }
        } finally {
          if (_didIteratorError6) {
            throw _iteratorError6;
          }
        }
      }
    }
  }, {
    key: 'calculateInstanceColorMode',
    value: function calculateInstanceColorMode(attribute) {
      var _props7 = this.props,
          data = _props7.data,
          iconMapping = _props7.iconMapping,
          getIcon = _props7.getIcon;
      var value = attribute.value;
 
      var i = 0;
      var _iteratorNormalCompletion7 = true;
      var _didIteratorError7 = false;
      var _iteratorError7 = undefined;
 
      try {
        for (var _iterator7 = data[Symbol.iterator](), _step7; !(_iteratorNormalCompletion7 = (_step7 = _iterator7.next()).done); _iteratorNormalCompletion7 = true) {
          var object = _step7.value;
 
          var icon = getIcon(object);
          var colorMode = iconMapping[icon] && iconMapping[icon].mask;
          value[i++] = colorMode ? 1 : 0;
        }
      } catch (err) {
        _didIteratorError7 = true;
        _iteratorError7 = err;
      } finally {
        try {
          if (!_iteratorNormalCompletion7 && _iterator7.return) {
            _iterator7.return();
          }
        } finally {
          if (_didIteratorError7) {
            throw _iteratorError7;
          }
        }
      }
    }
  }, {
    key: 'calculateInstanceIconFrames',
    value: function calculateInstanceIconFrames(attribute) {
      var _props8 = this.props,
          data = _props8.data,
          iconMapping = _props8.iconMapping,
          getIcon = _props8.getIcon;
      var value = attribute.value;
 
      var i = 0;
      var _iteratorNormalCompletion8 = true;
      var _didIteratorError8 = false;
      var _iteratorError8 = undefined;
 
      try {
        for (var _iterator8 = data[Symbol.iterator](), _step8; !(_iteratorNormalCompletion8 = (_step8 = _iterator8.next()).done); _iteratorNormalCompletion8 = true) {
          var object = _step8.value;
 
          var icon = getIcon(object);
          var rect = iconMapping[icon] || {};
          value[i++] = rect.x || 0;
          value[i++] = rect.y || 0;
          value[i++] = rect.width || 0;
          value[i++] = rect.height || 0;
        }
      } catch (err) {
        _didIteratorError8 = true;
        _iteratorError8 = err;
      } finally {
        try {
          if (!_iteratorNormalCompletion8 && _iterator8.return) {
            _iterator8.return();
          }
        } finally {
          if (_didIteratorError8) {
            throw _iteratorError8;
          }
        }
      }
    }
  }]);
 
  return IconLayer;
}(_core.Layer);
 
exports.default = IconLayer;
 
 
IconLayer.layerName = 'IconLayer';
IconLayer.defaultProps = defaultProps;
 
/***/ }),
/* 309 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
 
var _arcLayer = __webpack_require__(292);
 
Object.defineProperty(exports, 'ArcLayer', {
  enumerable: true,
  get: function get() {
    return _interopRequireDefault(_arcLayer).default;
  }
});
 
var _iconLayer = __webpack_require__(308);
 
Object.defineProperty(exports, 'IconLayer', {
  enumerable: true,
  get: function get() {
    return _interopRequireDefault(_iconLayer).default;
  }
});
 
var _lineLayer = __webpack_require__(313);
 
Object.defineProperty(exports, 'LineLayer', {
  enumerable: true,
  get: function get() {
    return _interopRequireDefault(_lineLayer).default;
  }
});
 
var _pointCloudLayer = __webpack_require__(320);
 
Object.defineProperty(exports, 'PointCloudLayer', {
  enumerable: true,
  get: function get() {
    return _interopRequireDefault(_pointCloudLayer).default;
  }
});
 
var _scatterplotLayer = __webpack_require__(176);
 
Object.defineProperty(exports, 'ScatterplotLayer', {
  enumerable: true,
  get: function get() {
    return _interopRequireDefault(_scatterplotLayer).default;
  }
});
 
var _screenGridLayer = __webpack_require__(327);
 
Object.defineProperty(exports, 'ScreenGridLayer', {
  enumerable: true,
  get: function get() {
    return _interopRequireDefault(_screenGridLayer).default;
  }
});
 
var _gridLayer = __webpack_require__(299);
 
Object.defineProperty(exports, 'GridLayer', {
  enumerable: true,
  get: function get() {
    return _interopRequireDefault(_gridLayer).default;
  }
});
 
var _gridCellLayer = __webpack_require__(174);
 
Object.defineProperty(exports, 'GridCellLayer', {
  enumerable: true,
  get: function get() {
    return _interopRequireDefault(_gridCellLayer).default;
  }
});
 
var _hexagonLayer = __webpack_require__(304);
 
Object.defineProperty(exports, 'HexagonLayer', {
  enumerable: true,
  get: function get() {
    return _interopRequireDefault(_hexagonLayer).default;
  }
});
 
var _hexagonCellLayer = __webpack_require__(175);
 
Object.defineProperty(exports, 'HexagonCellLayer', {
  enumerable: true,
  get: function get() {
    return _interopRequireDefault(_hexagonCellLayer).default;
  }
});
 
var _pathLayer = __webpack_require__(119);
 
Object.defineProperty(exports, 'PathLayer', {
  enumerable: true,
  get: function get() {
    return _interopRequireDefault(_pathLayer).default;
  }
});
 
var _polygonLayer = __webpack_require__(321);
 
Object.defineProperty(exports, 'PolygonLayer', {
  enumerable: true,
  get: function get() {
    return _interopRequireDefault(_polygonLayer).default;
  }
});
 
var _geojsonLayer = __webpack_require__(293);
 
Object.defineProperty(exports, 'GeoJsonLayer', {
  enumerable: true,
  get: function get() {
    return _interopRequireDefault(_geojsonLayer).default;
  }
});
 
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
 
/***/ }),
/* 310 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
// Copyright (c) 2015 - 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
 
exports.default = "#define SHADER_NAME line-layer-fragment-shader\n\n#ifdef GL_ES\nprecision highp float;\n#endif\n\nvarying vec4 vColor;\n\nvoid main(void) {\n  gl_FragColor = vColor;\n\n  // use highlight color if this fragment belongs to the selected object.\n  gl_FragColor = picking_filterHighlightColor(gl_FragColor);\n\n  // use picking color if rendering to picking FBO.\n  gl_FragColor = picking_filterPickingColor(gl_FragColor);\n}\n";
 
/***/ }),
/* 311 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
// Copyright (c) 2015 - 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
 
exports.default = "#define SHADER_NAME line-layer-vertex-shader-64\n\nattribute vec3 positions;\nattribute vec3 instanceSourcePositions;\nattribute vec3 instanceTargetPositions;\nattribute vec4 instanceSourceTargetPositions64xyLow;\nattribute vec4 instanceColors;\nattribute vec3 instancePickingColors;\n\nuniform float strokeWidth;\nuniform float opacity;\n\nvarying vec4 vColor;\n\n// offset vector by strokeWidth pixels\n// offset_direction is -1 (left) or 1 (right)\nvec2 getExtrusionOffset(vec2 line_clipspace, float offset_direction) {\n  // normalized direction of the line\n  vec2 dir_screenspace = normalize(line_clipspace * project_uViewportSize);\n  // rotate by 90 degrees\n  dir_screenspace = vec2(-dir_screenspace.y, dir_screenspace.x);\n\n  vec2 offset_screenspace = dir_screenspace * offset_direction * strokeWidth / 2.0;\n  vec2 offset_clipspace = project_pixel_to_clipspace(offset_screenspace).xy;\n\n  return offset_clipspace;\n}\n\nvoid main(void) {\n  // Position\n  vec4 instanceSourcePositions64 = vec4(\n    instanceSourcePositions.x, instanceSourceTargetPositions64xyLow.x,\n    instanceSourcePositions.y, instanceSourceTargetPositions64xyLow.y);\n\n  vec4 instanceTargetPositions64 = vec4(\n    instanceTargetPositions.x, instanceSourceTargetPositions64xyLow.z,\n    instanceTargetPositions.y, instanceSourceTargetPositions64xyLow.w);\n\n  vec2 projected_source_coord[2];\n  vec2 projected_target_coord[2];\n\n  project_position_fp64(instanceSourcePositions64, projected_source_coord);\n  project_position_fp64(instanceTargetPositions64, projected_target_coord);\n\n  vec2 source_pos_modelspace[4];\n  source_pos_modelspace[0] =  projected_source_coord[0];\n  source_pos_modelspace[1] =  projected_source_coord[1];\n  source_pos_modelspace[2] = vec2(project_scale(instanceSourcePositions.z), 0.0);\n  source_pos_modelspace[3] = vec2(1.0, 0.0);\n\n  vec4 source_pos_clipspace = project_to_clipspace_fp64(source_pos_modelspace);\n\n  vec2 target_pos_modelspace[4];\n  target_pos_modelspace[0] =  projected_target_coord[0];\n  target_pos_modelspace[1] =  projected_target_coord[1];\n  target_pos_modelspace[2] = vec2(project_scale(instanceTargetPositions.z), 0.0);\n  target_pos_modelspace[3] = vec2(1.0, 0.0);\n\n  vec4 target_pos_clipspace = project_to_clipspace_fp64(target_pos_modelspace);\n\n  float segmentIndex = positions.x;\n  vec4 p = mix(source_pos_clipspace, target_pos_clipspace, segmentIndex);\n\n  vec2 offset = getExtrusionOffset(target_pos_clipspace.xy - source_pos_clipspace.xy, positions.y);\n\n  gl_Position = p + vec4(offset, 0.0, 0.0);\n\n  // Color\n  vColor = vec4(instanceColors.rgb, instanceColors.a * opacity) / 255.;\n\n  // Set color to be rendered to picking fbo (also used to check for selection highlight).\n  picking_setPickingColor(instancePickingColors);\n}\n";
 
/***/ }),
/* 312 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
// Copyright (c) 2015 - 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
 
exports.default = "#define SHADER_NAME line-layer-vertex-shader\n\nattribute vec3 positions;\nattribute vec3 instanceSourcePositions;\nattribute vec3 instanceTargetPositions;\nattribute vec4 instanceColors;\nattribute vec3 instancePickingColors;\n\nuniform float strokeWidth;\nuniform float opacity;\n\nvarying vec4 vColor;\n\n// offset vector by strokeWidth pixels\n// offset_direction is -1 (left) or 1 (right)\nvec2 getExtrusionOffset(vec2 line_clipspace, float offset_direction) {\n  // normalized direction of the line\n  vec2 dir_screenspace = normalize(line_clipspace * project_uViewportSize);\n  // rotate by 90 degrees\n  dir_screenspace = vec2(-dir_screenspace.y, dir_screenspace.x);\n\n  vec2 offset_screenspace = dir_screenspace * offset_direction * strokeWidth / 2.0;\n  vec2 offset_clipspace = project_pixel_to_clipspace(offset_screenspace).xy;\n\n  return offset_clipspace;\n}\n\nvoid main(void) {\n  // Position\n  vec3 sourcePos = project_position(instanceSourcePositions);\n  vec3 targetPos = project_position(instanceTargetPositions);\n  vec4 source = project_to_clipspace(vec4(sourcePos, 1.0));\n  vec4 target = project_to_clipspace(vec4(targetPos, 1.0));\n\n  // linear interpolation of source & target to pick right coord\n  float segmentIndex = positions.x;\n  vec4 p = mix(source, target, segmentIndex);\n\n  // extrude\n  vec2 offset = getExtrusionOffset(target.xy - source.xy, positions.y);\n  gl_Position = p + vec4(offset, 0.0, 0.0);\n\n  // Color\n  vColor = vec4(instanceColors.rgb, instanceColors.a * opacity) / 255.;\n\n  // Set color to be rendered to picking fbo (also used to check for selection highlight).\n  picking_setPickingColor(instancePickingColors);\n}\n";
 
/***/ }),
/* 313 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
 
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
 
var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
 
var _core = __webpack_require__(13);
 
var _luma = __webpack_require__(12);
 
var _lineLayerVertex = __webpack_require__(312);
 
var _lineLayerVertex2 = _interopRequireDefault(_lineLayerVertex);
 
var _lineLayerVertex3 = __webpack_require__(311);
 
var _lineLayerVertex4 = _interopRequireDefault(_lineLayerVertex3);
 
var _lineLayerFragment = __webpack_require__(310);
 
var _lineLayerFragment2 = _interopRequireDefault(_lineLayerFragment);
 
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
 
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
 
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
 
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // Copyright (c) 2015 - 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
 
var fp64LowPart = _core.experimental.fp64LowPart,
    enable64bitSupport = _core.experimental.enable64bitSupport;
 
 
var DEFAULT_COLOR = [0, 0, 0, 255];
 
var defaultProps = {
  strokeWidth: 1,
  fp64: false,
 
  getSourcePosition: function getSourcePosition(x) {
    return x.sourcePosition;
  },
  getTargetPosition: function getTargetPosition(x) {
    return x.targetPosition;
  },
  getColor: function getColor(x) {
    return x.color || DEFAULT_COLOR;
  }
};
 
var LineLayer = function (_Layer) {
  _inherits(LineLayer, _Layer);
 
  function LineLayer() {
    _classCallCheck(this, LineLayer);
 
    return _possibleConstructorReturn(this, (LineLayer.__proto__ || Object.getPrototypeOf(LineLayer)).apply(this, arguments));
  }
 
  _createClass(LineLayer, [{
    key: 'getShaders',
    value: function getShaders() {
      return enable64bitSupport(this.props) ? { vs: _lineLayerVertex4.default, fs: _lineLayerFragment2.default, modules: ['project64', 'picking'] } : { vs: _lineLayerVertex2.default, fs: _lineLayerFragment2.default, modules: ['picking'] }; // 'project' module added by default.
    }
  }, {
    key: 'initializeState',
    value: function initializeState() {
      var attributeManager = this.getAttributeManager();
 
      /* eslint-disable max-len */
      attributeManager.addInstanced({
        instanceSourcePositions: {
          size: 3,
          transition: true,
          accessor: 'getSourcePosition',
          update: this.calculateInstanceSourcePositions
        },
        instanceTargetPositions: {
          size: 3,
          transition: true,
          accessor: 'getTargetPosition',
          update: this.calculateInstanceTargetPositions
        },
        instanceColors: {
          size: 4,
          type: _luma.GL.UNSIGNED_BYTE,
          transition: true,
          accessor: 'getColor',
          update: this.calculateInstanceColors
        }
      });
      /* eslint-enable max-len */
    }
  }, {
    key: 'updateAttribute',
    value: function updateAttribute(_ref) {
      var props = _ref.props,
          oldProps = _ref.oldProps,
          changeFlags = _ref.changeFlags;
 
      if (props.fp64 !== oldProps.fp64) {
        var attributeManager = this.getAttributeManager();
        attributeManager.invalidateAll();
 
        if (props.fp64 && props.coordinateSystem === _core.COORDINATE_SYSTEM.LNGLAT) {
          attributeManager.addInstanced({
            instanceSourceTargetPositions64xyLow: {
              size: 4,
              accessor: ['getSourcePosition', 'getTargetPosition'],
              update: this.calculateInstanceSourceTargetPositions64xyLow
            }
          });
        } else {
          attributeManager.remove(['instanceSourceTargetPositions64xyLow']);
        }
      }
    }
  }, {
    key: 'updateState',
    value: function updateState(_ref2) {
      var props = _ref2.props,
          oldProps = _ref2.oldProps,
          changeFlags = _ref2.changeFlags;
 
      _get(LineLayer.prototype.__proto__ || Object.getPrototypeOf(LineLayer.prototype), 'updateState', this).call(this, { props: props, oldProps: oldProps, changeFlags: changeFlags });
 
      if (props.fp64 !== oldProps.fp64) {
        var gl = this.context.gl;
 
        this.setState({ model: this._getModel(gl) });
      }
      this.updateAttribute({ props: props, oldProps: oldProps, changeFlags: changeFlags });
    }
  }, {
    key: 'draw',
    value: function draw(_ref3) {
      var uniforms = _ref3.uniforms;
      var strokeWidth = this.props.strokeWidth;
 
 
      this.state.model.render(Object.assign({}, uniforms, {
        strokeWidth: strokeWidth
      }));
    }
  }, {
    key: '_getModel',
    value: function _getModel(gl) {
      /*
       *  (0, -1)-------------_(1, -1)
       *       |          _,-"  |
       *       o      _,-"      o
       *       |  _,-"          |
       *   (0, 1)"-------------(1, 1)
       */
      var positions = [0, -1, 0, 0, 1, 0, 1, -1, 0, 1, 1, 0];
 
      return new _luma.Model(gl, Object.assign({}, this.getShaders(), {
        id: this.props.id,
        geometry: new _luma.Geometry({
          drawMode: _luma.GL.TRIANGLE_STRIP,
          attributes: {
            positions: new Float32Array(positions)
          }
        }),
        isInstanced: true,
        shaderCache: this.context.shaderCache
      }));
    }
  }, {
    key: 'calculateInstanceSourcePositions',
    value: function calculateInstanceSourcePositions(attribute) {
      var _props = this.props,
          data = _props.data,
          getSourcePosition = _props.getSourcePosition;
      var value = attribute.value,
          size = attribute.size;
 
      var i = 0;
      var _iteratorNormalCompletion = true;
      var _didIteratorError = false;
      var _iteratorError = undefined;
 
      try {
        for (var _iterator = data[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
          var object = _step.value;
 
          var sourcePosition = getSourcePosition(object);
          value[i + 0] = sourcePosition[0];
          value[i + 1] = sourcePosition[1];
          value[i + 2] = isNaN(sourcePosition[2]) ? 0 : sourcePosition[2];
          i += size;
        }
      } catch (err) {
        _didIteratorError = true;
        _iteratorError = err;
      } finally {
        try {
          if (!_iteratorNormalCompletion && _iterator.return) {
            _iterator.return();
          }
        } finally {
          if (_didIteratorError) {
            throw _iteratorError;
          }
        }
      }
    }
  }, {
    key: 'calculateInstanceTargetPositions',
    value: function calculateInstanceTargetPositions(attribute) {
      var _props2 = this.props,
          data = _props2.data,
          getTargetPosition = _props2.getTargetPosition;
      var value = attribute.value,
          size = attribute.size;
 
      var i = 0;
      var _iteratorNormalCompletion2 = true;
      var _didIteratorError2 = false;
      var _iteratorError2 = undefined;
 
      try {
        for (var _iterator2 = data[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
          var object = _step2.value;
 
          var targetPosition = getTargetPosition(object);
          value[i + 0] = targetPosition[0];
          value[i + 1] = targetPosition[1];
          value[i + 2] = isNaN(targetPosition[2]) ? 0 : targetPosition[2];
          i += size;
        }
      } catch (err) {
        _didIteratorError2 = true;
        _iteratorError2 = err;
      } finally {
        try {
          if (!_iteratorNormalCompletion2 && _iterator2.return) {
            _iterator2.return();
          }
        } finally {
          if (_didIteratorError2) {
            throw _iteratorError2;
          }
        }
      }
    }
  }, {
    key: 'calculateInstanceSourceTargetPositions64xyLow',
    value: function calculateInstanceSourceTargetPositions64xyLow(attribute) {
      var _props3 = this.props,
          data = _props3.data,
          getSourcePosition = _props3.getSourcePosition,
          getTargetPosition = _props3.getTargetPosition;
      var value = attribute.value,
          size = attribute.size;
 
      var i = 0;
      var _iteratorNormalCompletion3 = true;
      var _didIteratorError3 = false;
      var _iteratorError3 = undefined;
 
      try {
        for (var _iterator3 = data[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {
          var object = _step3.value;
 
          var sourcePosition = getSourcePosition(object);
          var targetPosition = getTargetPosition(object);
          value[i + 0] = fp64LowPart(sourcePosition[0]);
          value[i + 1] = fp64LowPart(sourcePosition[1]);
          value[i + 2] = fp64LowPart(targetPosition[0]);
          value[i + 3] = fp64LowPart(targetPosition[1]);
          i += size;
        }
      } catch (err) {
        _didIteratorError3 = true;
        _iteratorError3 = err;
      } finally {
        try {
          if (!_iteratorNormalCompletion3 && _iterator3.return) {
            _iterator3.return();
          }
        } finally {
          if (_didIteratorError3) {
            throw _iteratorError3;
          }
        }
      }
    }
  }, {
    key: 'calculateInstanceColors',
    value: function calculateInstanceColors(attribute) {
      var _props4 = this.props,
          data = _props4.data,
          getColor = _props4.getColor;
      var value = attribute.value,
          size = attribute.size;
 
      var i = 0;
      var _iteratorNormalCompletion4 = true;
      var _didIteratorError4 = false;
      var _iteratorError4 = undefined;
 
      try {
        for (var _iterator4 = data[Symbol.iterator](), _step4; !(_iteratorNormalCompletion4 = (_step4 = _iterator4.next()).done); _iteratorNormalCompletion4 = true) {
          var object = _step4.value;
 
          var color = getColor(object);
          value[i + 0] = color[0];
          value[i + 1] = color[1];
          value[i + 2] = color[2];
          value[i + 3] = isNaN(color[3]) ? 255 : color[3];
          i += size;
        }
      } catch (err) {
        _didIteratorError4 = true;
        _iteratorError4 = err;
      } finally {
        try {
          if (!_iteratorNormalCompletion4 && _iterator4.return) {
            _iterator4.return();
          }
        } finally {
          if (_didIteratorError4) {
            throw _iteratorError4;
          }
        }
      }
    }
  }]);
 
  return LineLayer;
}(_core.Layer);
 
exports.default = LineLayer;
 
 
LineLayer.layerName = 'LineLayer';
LineLayer.defaultProps = defaultProps;
 
/***/ }),
/* 314 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
// Copyright (c) 2015 - 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
 
exports.default = "#define SHADER_NAME path-layer-fragment-shader\n\n#ifdef GL_ES\nprecision highp float;\n#endif\n\nuniform float jointType;\nuniform float miterLimit;\nuniform float alignMode;\n\nvarying vec4 vColor;\nvarying vec2 vCornerOffset;\nvarying float vMiterLength;\nvarying vec2 vDashArray;\nvarying float vPathPosition;\nvarying float vPathLength;\n\n// mod doesn't work correctly for negative numbers\nfloat mod2(float a, float b) {\n  return a - floor(a / b) * b;\n}\n\nfloat round(float x) {\n  return floor(x + 0.5);\n}\n\n// if given position is in the gap part of the dashed line\n// dashArray.x: solid stroke length, relative to width\n// dashArray.y: gap length, relative to width\n// alignMode:\n// 0 - no adjustment\n// o----     ----     ----     ---- o----     -o----     ----     o\n// 1 - stretch to fit, draw half dash at each end for nicer joints\n// o--    ----    ----    ----    --o--      --o--     ----     --o\nbool dash_isFragInGap() {\n  float solidLength = vDashArray.x;\n  float gapLength = vDashArray.y;\n\n  float unitLength = solidLength + gapLength;\n\n  if (unitLength == 0.0) {\n    return false;\n  }\n\n  unitLength = mix(\n    unitLength,\n    vPathLength / round(vPathLength / unitLength),\n    alignMode\n  );\n\n  float offset = alignMode * solidLength / 2.0;\n\n  return gapLength > 0.0 &&\n    vPathPosition >= 0.0 &&\n    vPathPosition <= vPathLength &&\n    mod2(vPathPosition + offset, unitLength) > solidLength;\n}\n\nvoid main(void) {\n  // if joint is rounded, test distance from the corner\n  if (jointType > 0.0 && vMiterLength > 0.0 && length(vCornerOffset) > 1.0) {\n    // Enable to debug joints\n    // gl_FragColor = vec4(0., 1., 0., 1.);\n    // return;\n    discard;\n  }\n  if (jointType == 0.0 && vMiterLength > miterLimit) {\n    // Enable to debug joints\n    // gl_FragColor = vec4(0., 0., 1., 1.);\n    // return;\n    discard;\n  }\n  if (vColor.a == 0.0 || dash_isFragInGap()) {\n    // Enable to debug joints\n    // gl_FragColor = vec4(0., 1., 1., 1.);\n    // return;\n    discard;\n  }\n  gl_FragColor = vColor;\n\n  // use highlight color if this fragment belongs to the selected object.\n  gl_FragColor = picking_filterHighlightColor(gl_FragColor);\n\n  // use picking color if rendering to picking FBO.\n  gl_FragColor = picking_filterPickingColor(gl_FragColor);\n}\n";
 
/***/ }),
/* 315 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
// Copyright (c) 2015 - 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
 
exports.default = "\n#define SHADER_NAME path-layer-vertex-shader\n\nattribute vec3 positions;\n\nattribute vec3 instanceStartPositions;\nattribute vec3 instanceEndPositions;\nattribute vec4 instanceStartEndPositions64xyLow;\nattribute vec3 instanceLeftDeltas;\nattribute vec3 instanceRightDeltas;\nattribute float instanceStrokeWidths;\nattribute vec4 instanceColors;\nattribute vec3 instancePickingColors;\nattribute vec2 instanceDashArrays;\n\nuniform float widthScale;\nuniform float widthMinPixels;\nuniform float widthMaxPixels;\nuniform float jointType;\nuniform float miterLimit;\n\nuniform float opacity;\n\nvarying vec4 vColor;\nvarying vec2 vCornerOffset;\nvarying float vMiterLength;\nvarying vec2 vDashArray;\nvarying float vPathPosition;\nvarying float vPathLength;\n\nconst float EPSILON = 0.001;\nconst float PIXEL_EPSILON = 0.1;\n\nfloat flipIfTrue(bool flag) {\n  return -(float(flag) * 2. - 1.);\n}\n\nvec3 lineJoin(vec2 prevPoint64[2], vec2 currPoint64[2], vec2 nextPoint64[2]) {\n\n  float width = clamp(project_scale(instanceStrokeWidths * widthScale),\n    widthMinPixels, widthMaxPixels) / 2.0;\n\n  vec2 deltaA64[2];\n  vec2 deltaB64[2];\n\n  vec2_sub_fp64(currPoint64, prevPoint64, deltaA64);\n  vec2_sub_fp64(nextPoint64, currPoint64, deltaB64);\n\n  vec2 lengthA64 = vec2_length_fp64(deltaA64);\n  vec2 lengthB64 = vec2_length_fp64(deltaB64);\n\n  vec2 deltaA = vec2(deltaA64[0].x, deltaA64[1].x);\n  vec2 deltaB = vec2(deltaB64[0].x, deltaB64[1].x);\n\n  float lenA = lengthA64.x;\n  float lenB = lengthB64.x;\n\n  vec2 offsetVec;\n  float offsetScale;\n  float offsetDirection;\n\n  // when two points are closer than PIXEL_EPSILON in pixels,\n  // assume they are the same point to avoid precision issue\n  lenA = lenA > PIXEL_EPSILON ? lenA : 0.0;\n  lenB = lenB > PIXEL_EPSILON ? lenB : 0.0;\n  vec2 dirA = lenA > 0. ? deltaA / lenA : vec2(0.0, 0.0);\n  vec2 dirB = lenB > 0. ? deltaB / lenB : vec2(0.0, 0.0);\n\n  vec2 perpA = vec2(-dirA.y, dirA.x);\n  vec2 perpB = vec2(-dirB.y, dirB.x);\n\n  // tangent of the corner\n  vec2 tangent = vec2(dirA + dirB);\n  tangent = length(tangent) > 0. ? normalize(tangent) : perpA;\n  // direction of the corner\n  vec2 miterVec = vec2(-tangent.y, tangent.x);\n  // width offset from current position\n  vec2 perp = mix(perpB, perpA, positions.x);\n  float L = mix(lenB, lenA, positions.x);\n\n  // cap super sharp angles\n  float sinHalfA = abs(dot(miterVec, perp));\n  float cosHalfA = abs(dot(dirA, miterVec));\n  bool turnsRight = dirA.x * dirB.y > dirA.y * dirB.x;\n\n  // relative position to the corner:\n  // -1: inside (smaller side of the angle)\n  // 0: center\n  // 1: outside (bigger side of the angle)\n  float cornerPosition = mix(\n    flipIfTrue(turnsRight == (positions.y > 0.0)),\n    0.0,\n    positions.z\n  );\n\n  offsetScale = 1.0 / max(sinHalfA, EPSILON);\n\n  // do not bevel if line segment is too short\n  cornerPosition *= float(cornerPosition <= 0.0 || sinHalfA < min(lenA, lenB) / width * cosHalfA);\n  // trim if inside corner extends further than the line segment\n  offsetScale = mix(\n    offsetScale,\n    min(offsetScale, L / width / max(cosHalfA, EPSILON)),\n    float(cornerPosition < 0.0)\n  );\n\n  vMiterLength = mix(\n    offsetScale * cornerPosition,\n    mix(offsetScale, 0.0, cornerPosition),\n    step(0.0, cornerPosition)\n  ) - sinHalfA * jointType;\n  offsetDirection = mix(\n    positions.y,\n    mix(\n      flipIfTrue(turnsRight),\n      positions.y * flipIfTrue(turnsRight == (positions.x == 1.)),\n      cornerPosition\n    ),\n    step(0.0, cornerPosition)\n  );\n  offsetVec = mix(miterVec, -tangent, step(0.5, cornerPosition));\n  offsetScale = mix(offsetScale, 1.0 / max(cosHalfA, 0.001), step(0.5, cornerPosition));\n\n  // special treatment for start cap and end cap\n  // using a small number as the limit for determining if the lenA or lenB is 0\n  float isStartCap = step(lenA, 1.0e-5);\n  float isEndCap = step(lenB, 1.0e-5);\n  float isCap = max(isStartCap, isEndCap);\n\n  // 0: center, 1: side\n  cornerPosition = isCap * (1.0 - positions.z);\n\n  // start of path: use next - curr\n  offsetVec = mix(offsetVec, mix(dirB, perpB, cornerPosition), isStartCap);\n  // end of path: use curr - prev\n  offsetVec = mix(offsetVec, mix(dirA, perpA, cornerPosition), isEndCap);\n\n  // extend out a triangle to envelope the round cap\n  offsetScale = mix(\n    offsetScale,\n    mix(4.0 * jointType, 1.0, cornerPosition),\n    isCap\n  );\n  vMiterLength = mix(vMiterLength, 1.0 - cornerPosition, isCap);\n\n  offsetDirection = mix(\n    offsetDirection,\n    mix(flipIfTrue(isStartCap > 0.), positions.y, cornerPosition),\n    isCap\n  );\n\n  vCornerOffset = offsetVec * offsetDirection * offsetScale;\n\n  // Generate variables for dash calculation\n  vDashArray = instanceDashArrays;\n  vPathLength = L / width;\n  float isEnd = positions.x;\n  vec2 offsetFromStartOfPath = mix(vCornerOffset, vCornerOffset + deltaA / width, isEnd);\n  vec2 dir = mix(dirB, dirA, isEnd);\n  vPathPosition = dot(offsetFromStartOfPath, dir);\n\n  return vec3(vCornerOffset * width, 0.0);\n}\n\nvoid main() {\n  vColor = vec4(instanceColors.rgb, instanceColors.a * opacity) / 255.;\n\n  // Set color to be rendered to picking fbo (also used to check for selection highlight).\n  picking_setPickingColor(instancePickingColors);\n\n  float isEnd = positions.x;\n\n  // Calculate current position\n  vec3 currPosition = mix(instanceStartPositions, instanceEndPositions, isEnd);\n  currPosition = project_position(currPosition);\n\n  // Calculate current position 64bit\n\n  vec2 instanceStartPositions64[2];\n  instanceStartPositions64[0] = vec2(instanceStartPositions.x, instanceStartEndPositions64xyLow.x);\n  instanceStartPositions64[1] = vec2(instanceStartPositions.y, instanceStartEndPositions64xyLow.y);\n\n  vec2 instanceEndPositions64[2];\n  instanceEndPositions64[0] = vec2(instanceEndPositions.x, instanceStartEndPositions64xyLow.z);\n  instanceEndPositions64[1] = vec2(instanceEndPositions.y, instanceStartEndPositions64xyLow.w);\n\n  vec2 tempCurrPosition64[2];\n  vec2_mix_fp64(instanceStartPositions64, instanceEndPositions64, isEnd, tempCurrPosition64);\n\n  vec4 currPosition64 = vec4(tempCurrPosition64[0].xy, tempCurrPosition64[1].xy);\n\n  vec2 projected_curr_position[2];\n  project_position_fp64(currPosition64, projected_curr_position);\n  float projected_curr_position_z = project_scale(currPosition.z);\n\n  // Calculate previous position\n\n  vec3 prevPosition = mix(-instanceLeftDeltas, vec3(0.0), isEnd);\n\n  // Calculate prev position 64bit\n\n  vec2 tempPrevPosition64[2];\n  tempPrevPosition64[0] = sum_fp64(vec2(prevPosition.x, 0.0), instanceStartPositions64[0]);\n  tempPrevPosition64[1] = sum_fp64(vec2(prevPosition.y, 0.0), instanceStartPositions64[1]);\n\n  vec4 prevPosition64 = vec4(tempPrevPosition64[0].xy, tempPrevPosition64[1].xy);\n\n  vec2 projected_prev_position[2];\n  project_position_fp64(prevPosition64, projected_prev_position);\n\n  // Calculate next positions\n  vec3 nextPosition = mix(vec3(0.0), instanceRightDeltas, isEnd);\n\n  // Calculate next position 64bit\n\n  vec2 tempNextPosition64[2];\n  tempNextPosition64[0] = sum_fp64(vec2(nextPosition.x, 0.0), instanceEndPositions64[0]);\n  tempNextPosition64[1] = sum_fp64(vec2(nextPosition.y, 0.0), instanceEndPositions64[1]);\n\n  vec4 nextPosition64 = vec4(tempNextPosition64[0].xy, tempNextPosition64[1].xy);\n\n  vec2 projected_next_position[2];\n  project_position_fp64(nextPosition64, projected_next_position);\n\n  vec3 pos = lineJoin(projected_prev_position, projected_curr_position, projected_next_position);\n  vec2 vertex_pos_modelspace[4];\n\n  vertex_pos_modelspace[0] = sum_fp64(vec2(pos.x, 0.0), projected_curr_position[0]);\n  vertex_pos_modelspace[1] = sum_fp64(vec2(pos.y, 0.0), projected_curr_position[1]);\n  vertex_pos_modelspace[2] = vec2(pos.z + projected_curr_position_z, 0.0);\n  vertex_pos_modelspace[3] = vec2(1.0, 0.0);\n\n  gl_Position = project_to_clipspace_fp64(vertex_pos_modelspace);\n}\n";
 
/***/ }),
/* 316 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
// Copyright (c) 2015 - 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
 
exports.default = "#define SHADER_NAME path-layer-vertex-shader-64\n\nattribute vec3 positions;\n\nattribute vec3 instanceStartPositions;\nattribute vec3 instanceEndPositions;\nattribute vec3 instanceLeftDeltas;\nattribute vec3 instanceRightDeltas;\nattribute float instanceStrokeWidths;\nattribute vec4 instanceColors;\nattribute vec3 instancePickingColors;\nattribute vec2 instanceDashArrays;\n\nuniform float widthScale;\nuniform float widthMinPixels;\nuniform float widthMaxPixels;\nuniform float jointType;\nuniform float miterLimit;\n\nuniform float opacity;\n\nvarying vec4 vColor;\nvarying vec2 vCornerOffset;\nvarying float vMiterLength;\nvarying vec2 vDashArray;\nvarying float vPathPosition;\nvarying float vPathLength;\n\nconst float EPSILON = 0.001;\nconst float PIXEL_EPSILON = 0.1;\n\nfloat flipIfTrue(bool flag) {\n  return -(float(flag) * 2. - 1.);\n}\n\n// calculate line join positions\nvec3 lineJoin(\n  vec3 prevPoint, vec3 currPoint, vec3 nextPoint,\n  float relativePosition, bool isEnd, bool isJoint,\n  float width\n) {\n  vec2 deltaA = currPoint.xy - prevPoint.xy;\n  vec2 deltaB = nextPoint.xy - currPoint.xy;\n\n  float lenA = length(deltaA);\n  float lenB = length(deltaB);\n\n  // when two points are closer than PIXEL_EPSILON in pixels,\n  // assume they are the same point to avoid precision issue\n  lenA = lenA > PIXEL_EPSILON ? lenA : 0.0;\n  lenB = lenB > PIXEL_EPSILON ? lenB : 0.0;\n\n  vec2 dirA = lenA > 0. ? normalize(deltaA) : vec2(0.0, 0.0);\n  vec2 dirB = lenB > 0. ? normalize(deltaB) : vec2(0.0, 0.0);\n\n  vec2 perpA = vec2(-dirA.y, dirA.x);\n  vec2 perpB = vec2(-dirB.y, dirB.x);\n\n  // tangent of the corner\n  vec2 tangent = vec2(dirA + dirB);\n  tangent = length(tangent) > 0. ? normalize(tangent) : perpA;\n  // direction of the corner\n  vec2 miterVec = vec2(-tangent.y, tangent.x);\n  // width offset from current position\n  vec2 perp = isEnd ? perpA : perpB;\n  float L = isEnd ? lenA : lenB;\n\n  // cap super sharp angles\n  float sinHalfA = abs(dot(miterVec, perp));\n  float cosHalfA = abs(dot(dirA, miterVec));\n\n  bool turnsRight = dirA.x * dirB.y > dirA.y * dirB.x;\n\n  float offsetScale = 1.0 / max(sinHalfA, EPSILON);\n\n  float cornerPosition = isJoint ?\n    0.0 :\n    flipIfTrue(turnsRight == (relativePosition > 0.0));\n\n  // do not bevel if line segment is too short\n  cornerPosition *=\n    float(cornerPosition <= 0.0 || sinHalfA < min(lenA, lenB) / width * cosHalfA);\n\n  // trim if inside corner extends further than the line segment\n  if (cornerPosition < 0.0) {\n    offsetScale = min(offsetScale, L / width / max(cosHalfA, EPSILON));\n  }\n\n  vMiterLength = cornerPosition >= 0.0 ?\n    mix(offsetScale, 0.0, cornerPosition) :\n    offsetScale * cornerPosition;\n  vMiterLength -= sinHalfA * jointType;\n\n  float offsetDirection = mix(\n    positions.y,\n    mix(\n      flipIfTrue(turnsRight),\n      positions.y * flipIfTrue(turnsRight == (positions.x == 1.)),\n      cornerPosition\n    ),\n    step(0.0, cornerPosition)\n  );\n\n  vec2 offsetVec = mix(miterVec, -tangent, step(0.5, cornerPosition));\n  offsetScale = mix(offsetScale, 1.0 / max(cosHalfA, 0.001), step(0.5, cornerPosition));\n\n  // special treatment for start cap and end cap\n  // TODO - This has an issue. len is always positive because it is length.\n  // Step returns zero if -lenA<0, so practically this is a comparison of\n  // lenA with zero, with lots of problems because of the -lenA. Can we use EPSILON?\n  bool isStartCap = step(0.0, -lenA) > 0.5;\n  bool isEndCap = step(0.0, -lenB) > 0.5;\n  bool isCap = isStartCap || isEndCap;\n\n  // 0: center, 1: side\n  cornerPosition = isCap ? (1.0 - positions.z) : 0.;\n\n  // start of path: use next - curr\n  if (isStartCap) {\n    offsetVec = mix(dirB, perpB, cornerPosition);\n  }\n\n  // end of path: use curr - prev\n  if (isEndCap) {\n    offsetVec = mix(dirA, perpA, cornerPosition);\n  }\n\n  // extend out a triangle to envelope the round cap\n  if (isCap) {\n    offsetScale = mix(4.0 * jointType, 1.0, cornerPosition);\n    vMiterLength = 1.0 - cornerPosition;\n    offsetDirection = mix(flipIfTrue(isStartCap), positions.y, cornerPosition);\n  }\n\n  vCornerOffset = offsetVec * offsetDirection * offsetScale;\n\n  // Generate variables for dash calculation\n  vDashArray = instanceDashArrays;\n  vPathLength = L / width;\n  // vec2 offsetFromStartOfPath = isEnd ? vCornerOffset + deltaA / width : vCornerOffset;\n  vec2 offsetFromStartOfPath = vCornerOffset;\n  if (isEnd) {\n    offsetFromStartOfPath += deltaA / width;\n  }\n  vec2 dir = isEnd ? dirA : dirB;\n  vPathPosition = dot(offsetFromStartOfPath, dir);\n\n  return currPoint + vec3(vCornerOffset * width, 0.0);\n}\n\n// calculate line join positions\n// extract params from attributes and uniforms\nvec3 lineJoin(vec3 prevPoint, vec3 currPoint, vec3 nextPoint) {\n\n  // relative position to the corner:\n  // -1: inside (smaller side of the angle)\n  // 0: center\n  // 1: outside (bigger side of the angle)\n\n  float relativePosition = positions.y;\n  bool isEnd = positions.x > EPSILON;\n  bool isJoint = positions.z > EPSILON;\n\n  float width = clamp(project_scale(instanceStrokeWidths * widthScale),\n    widthMinPixels, widthMaxPixels) / 2.0;\n\n  return lineJoin(\n    prevPoint, currPoint, nextPoint,\n    relativePosition, isEnd, isJoint,\n    width\n  );\n}\n\nvoid main() {\n  vColor = vec4(instanceColors.rgb, instanceColors.a * opacity) / 255.;\n\n  // Set color to be rendered to picking fbo (also used to check for selection highlight).\n  picking_setPickingColor(instancePickingColors);\n\n  float isEnd = positions.x;\n\n  vec3 prevPosition = mix(-instanceLeftDeltas, vec3(0.0), isEnd) + instanceStartPositions;\n  prevPosition = project_position(prevPosition);\n\n  vec3 currPosition = mix(instanceStartPositions, instanceEndPositions, isEnd);\n  currPosition = project_position(currPosition);\n\n  vec3 nextPosition = mix(vec3(0.0), instanceRightDeltas, isEnd) + instanceEndPositions;\n  nextPosition = project_position(nextPosition);\n\n  vec3 pos = lineJoin(prevPosition, currPosition, nextPosition);\n\n  gl_Position = project_to_clipspace(vec4(pos, 1.0));\n}\n";
 
/***/ }),
/* 317 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
// Copyright (c) 2015 - 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
 
exports.default = "#define SHADER_NAME point-cloud-layer-fragment-shader\n\n#ifdef GL_ES\nprecision highp float;\n#endif\n\nvarying vec4 vColor;\nvarying vec2 unitPosition;\n\nvoid main(void) {\n\n  float distToCenter = length(unitPosition);\n\n  if (distToCenter > 1.0) {\n    discard;\n  }\n\n  gl_FragColor = vColor;\n\n  // use highlight color if this fragment belongs to the selected object.\n  gl_FragColor = picking_filterHighlightColor(gl_FragColor);\n\n  // use picking color if rendering to picking FBO.\n  gl_FragColor = picking_filterPickingColor(gl_FragColor);\n}\n";
 
/***/ }),
/* 318 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
// Copyright (c) 2015 - 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
 
exports.default = "#define SHADER_NAME point-cloud-layer-vertex-shader-64\n\nattribute vec3 positions;\n\nattribute vec3 instancePositions;\nattribute vec2 instancePositions64xyLow;\nattribute vec3 instanceNormals;\nattribute vec4 instanceColors;\nattribute vec3 instancePickingColors;\n\nuniform float opacity;\nuniform float radiusPixels;\n\nvarying vec4 vColor;\nvarying vec2 unitPosition;\n\nvoid main(void) {\n  // position on the containing square in [-1, 1] space\n  unitPosition = positions.xy;\n\n  vec4 instancePositions64xy = vec4(\n    instancePositions.x, instancePositions64xyLow.x,\n    instancePositions.y, instancePositions64xyLow.y);\n\n  vec2 projected_coord_xy[2];\n  project_position_fp64(instancePositions64xy, projected_coord_xy);\n\n  vec2 vertex_pos_modelspace[4];\n  vertex_pos_modelspace[0] = projected_coord_xy[0];\n  vertex_pos_modelspace[1] = projected_coord_xy[1];\n  vertex_pos_modelspace[2] = vec2(project_scale(instancePositions.z), 0.0);\n  vertex_pos_modelspace[3] = vec2(1.0, 0.0);\n\n  gl_Position = project_to_clipspace_fp64(vertex_pos_modelspace);\n  gl_Position += project_pixel_to_clipspace(positions.xy * radiusPixels);\n\n  vec4 position_worldspace = vec4(\n    projected_coord_xy[0].x, projected_coord_xy[1].x,\n    project_scale(instancePositions.z), 1.0);\n\n  // Apply lighting\n  float lightWeight = getLightWeight(position_worldspace.xyz, // the w component is always 1.0\n    instanceNormals);\n\n  // Apply opacity to instance color, or return instance picking color\n  vColor = vec4(lightWeight * instanceColors.rgb, instanceColors.a * opacity) / 255.;\n\n  // Set color to be rendered to picking fbo (also used to check for selection highlight).\n  picking_setPickingColor(instancePickingColors);\n}\n";
 
/***/ }),
/* 319 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
// Copyright (c) 2015 - 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
 
exports.default = "#define SHADER_NAME point-cloud-layer-vertex-shader\n\nattribute vec3 positions;\n\nattribute vec3 instancePositions;\nattribute vec3 instanceNormals;\nattribute vec4 instanceColors;\nattribute vec3 instancePickingColors;\n\nuniform float opacity;\nuniform float radiusPixels;\n\nvarying vec4 vColor;\nvarying vec2 unitPosition;\n\nvoid main(void) {\n  // position on the containing square in [-1, 1] space\n  unitPosition = positions.xy;\n\n  // Find the center of the point and add the current vertex\n  vec4 position_worldspace = vec4(project_position(instancePositions), 1.0);\n  gl_Position = project_to_clipspace(position_worldspace) ;\n  gl_Position += project_pixel_to_clipspace(positions.xy * radiusPixels);\n\n  // Apply lighting\n  float lightWeight = getLightWeight(position_worldspace.xyz, // the w component is always 1.0\n    instanceNormals);\n\n  // Apply opacity to instance color, or return instance picking color\n  vColor = vec4(lightWeight * instanceColors.rgb, instanceColors.a * opacity) / 255.;\n\n  // Set color to be rendered to picking fbo (also used to check for selection highlight).\n  picking_setPickingColor(instancePickingColors);\n}\n";
 
/***/ }),
/* 320 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
 
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
 
var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
 
var _core = __webpack_require__(13);
 
var _luma = __webpack_require__(12);
 
var _pointCloudLayerVertex = __webpack_require__(319);
 
var _pointCloudLayerVertex2 = _interopRequireDefault(_pointCloudLayerVertex);
 
var _pointCloudLayerVertex3 = __webpack_require__(318);
 
var _pointCloudLayerVertex4 = _interopRequireDefault(_pointCloudLayerVertex3);
 
var _pointCloudLayerFragment = __webpack_require__(317);
 
var _pointCloudLayerFragment2 = _interopRequireDefault(_pointCloudLayerFragment);
 
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
 
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
 
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
 
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // Copyright (c) 2015 - 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
 
var fp64LowPart = _core.experimental.fp64LowPart,
    enable64bitSupport = _core.experimental.enable64bitSupport;
 
 
var DEFAULT_COLOR = [0, 0, 0, 255];
 
var defaultProps = {
  radiusPixels: 10, //  point radius in pixels
  fp64: false,
 
  getPosition: function getPosition(x) {
    return x.position;
  },
  getNormal: function getNormal(x) {
    return x.normal;
  },
  getColor: function getColor(x) {
    return x.color || DEFAULT_COLOR;
  },
 
  lightSettings: {
    lightsPosition: [0, 0, 5000, -1000, 1000, 8000, 5000, -5000, 1000],
    ambientRatio: 0.2,
    diffuseRatio: 0.6,
    specularRatio: 0.8,
    lightsStrength: [1.0, 0.0, 0.8, 0.0, 0.4, 0.0],
    numberOfLights: 3
  }
};
 
var PointCloudLayer = function (_Layer) {
  _inherits(PointCloudLayer, _Layer);
 
  function PointCloudLayer() {
    _classCallCheck(this, PointCloudLayer);
 
    return _possibleConstructorReturn(this, (PointCloudLayer.__proto__ || Object.getPrototypeOf(PointCloudLayer)).apply(this, arguments));
  }
 
  _createClass(PointCloudLayer, [{
    key: 'getShaders',
    value: function getShaders(id) {
      var shaderCache = this.context.shaderCache;
 
      return enable64bitSupport(this.props) ? { vs: _pointCloudLayerVertex4.default, fs: _pointCloudLayerFragment2.default, modules: ['project64', 'lighting', 'picking'], shaderCache: shaderCache } : { vs: _pointCloudLayerVertex2.default, fs: _pointCloudLayerFragment2.default, modules: ['lighting', 'picking'], shaderCache: shaderCache }; // 'project' module added by default.
    }
  }, {
    key: 'initializeState',
    value: function initializeState() {
      /* eslint-disable max-len */
      this.state.attributeManager.addInstanced({
        instancePositions: {
          size: 3,
          transition: true,
          accessor: 'getPosition',
          update: this.calculateInstancePositions
        },
        instanceNormals: {
          size: 3,
          transition: true,
          accessor: 'getNormal',
          defaultValue: 1,
          update: this.calculateInstanceNormals
        },
        instanceColors: {
          size: 4,
          type: _luma.GL.UNSIGNED_BYTE,
          transition: true,
          accessor: 'getColor',
          update: this.calculateInstanceColors
        }
      });
      /* eslint-enable max-len */
    }
  }, {
    key: 'updateAttribute',
    value: function updateAttribute(_ref) {
      var props = _ref.props,
          oldProps = _ref.oldProps,
          changeFlags = _ref.changeFlags;
 
      if (props.fp64 !== oldProps.fp64) {
        var attributeManager = this.getAttributeManager();
        attributeManager.invalidateAll();
 
        if (props.fp64 && props.coordinateSystem === _core.COORDINATE_SYSTEM.LNGLAT) {
          attributeManager.addInstanced({
            instancePositions64xyLow: {
              size: 2,
              accessor: 'getPosition',
              update: this.calculateInstancePositions64xyLow
            }
          });
        } else {
          attributeManager.remove(['instancePositions64xyLow']);
        }
      }
    }
  }, {
    key: 'updateState',
    value: function updateState(_ref2) {
      var props = _ref2.props,
          oldProps = _ref2.oldProps,
          changeFlags = _ref2.changeFlags;
 
      _get(PointCloudLayer.prototype.__proto__ || Object.getPrototypeOf(PointCloudLayer.prototype), 'updateState', this).call(this, { props: props, oldProps: oldProps, changeFlags: changeFlags });
      if (props.fp64 !== oldProps.fp64) {
        var gl = this.context.gl;
 
        this.setState({ model: this._getModel(gl) });
      }
      this.updateAttribute({ props: props, oldProps: oldProps, changeFlags: changeFlags });
    }
  }, {
    key: 'draw',
    value: function draw(_ref3) {
      var uniforms = _ref3.uniforms;
      var _props = this.props,
          radiusPixels = _props.radiusPixels,
          lightSettings = _props.lightSettings;
 
      this.state.model.render(Object.assign({}, uniforms, {
        radiusPixels: radiusPixels
      }, lightSettings));
    }
  }, {
    key: '_getModel',
    value: function _getModel(gl) {
      // a triangle that minimally cover the unit circle
      var positions = [];
      for (var i = 0; i < 3; i++) {
        var angle = i / 3 * Math.PI * 2;
        positions.push(Math.cos(angle) * 2, Math.sin(angle) * 2, 0);
      }
 
      return new _luma.Model(gl, Object.assign({}, this.getShaders(), {
        id: this.props.id,
        geometry: new _luma.Geometry({
          drawMode: _luma.GL.TRIANGLES,
          attributes: {
            positions: new Float32Array(positions)
          }
        }),
        isInstanced: true,
        shaderCache: this.context.shaderCache
      }));
    }
  }, {
    key: 'calculateInstancePositions',
    value: function calculateInstancePositions(attribute) {
      var _props2 = this.props,
          data = _props2.data,
          getPosition = _props2.getPosition;
      var value = attribute.value;
 
      var i = 0;
      var _iteratorNormalCompletion = true;
      var _didIteratorError = false;
      var _iteratorError = undefined;
 
      try {
        for (var _iterator = data[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
          var point = _step.value;
 
          var position = getPosition(point);
          value[i++] = position[0];
          value[i++] = position[1];
          value[i++] = position[2] || 0;
        }
      } catch (err) {
        _didIteratorError = true;
        _iteratorError = err;
      } finally {
        try {
          if (!_iteratorNormalCompletion && _iterator.return) {
            _iterator.return();
          }
        } finally {
          if (_didIteratorError) {
            throw _iteratorError;
          }
        }
      }
    }
  }, {
    key: 'calculateInstancePositions64xyLow',
    value: function calculateInstancePositions64xyLow(attribute) {
      var _props3 = this.props,
          data = _props3.data,
          getPosition = _props3.getPosition;
      var value = attribute.value;
 
      var i = 0;
      var _iteratorNormalCompletion2 = true;
      var _didIteratorError2 = false;
      var _iteratorError2 = undefined;
 
      try {
        for (var _iterator2 = data[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
          var point = _step2.value;
 
          var position = getPosition(point);
          value[i++] = fp64LowPart(position[0]);
          value[i++] = fp64LowPart(position[1]);
        }
      } catch (err) {
        _didIteratorError2 = true;
        _iteratorError2 = err;
      } finally {
        try {
          if (!_iteratorNormalCompletion2 && _iterator2.return) {
            _iterator2.return();
          }
        } finally {
          if (_didIteratorError2) {
            throw _iteratorError2;
          }
        }
      }
    }
  }, {
    key: 'calculateInstanceNormals',
    value: function calculateInstanceNormals(attribute) {
      var _props4 = this.props,
          data = _props4.data,
          getNormal = _props4.getNormal;
      var value = attribute.value;
 
      var i = 0;
      var _iteratorNormalCompletion3 = true;
      var _didIteratorError3 = false;
      var _iteratorError3 = undefined;
 
      try {
        for (var _iterator3 = data[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {
          var point = _step3.value;
 
          var normal = getNormal(point);
          value[i++] = normal[0];
          value[i++] = normal[1];
          value[i++] = normal[2];
        }
      } catch (err) {
        _didIteratorError3 = true;
        _iteratorError3 = err;
      } finally {
        try {
          if (!_iteratorNormalCompletion3 && _iterator3.return) {
            _iterator3.return();
          }
        } finally {
          if (_didIteratorError3) {
            throw _iteratorError3;
          }
        }
      }
    }
  }, {
    key: 'calculateInstanceColors',
    value: function calculateInstanceColors(attribute) {
      var _props5 = this.props,
          data = _props5.data,
          getColor = _props5.getColor;
      var value = attribute.value;
 
      var i = 0;
      var _iteratorNormalCompletion4 = true;
      var _didIteratorError4 = false;
      var _iteratorError4 = undefined;
 
      try {
        for (var _iterator4 = data[Symbol.iterator](), _step4; !(_iteratorNormalCompletion4 = (_step4 = _iterator4.next()).done); _iteratorNormalCompletion4 = true) {
          var point = _step4.value;
 
          var color = getColor(point);
          value[i++] = color[0];
          value[i++] = color[1];
          value[i++] = color[2];
          value[i++] = isNaN(color[3]) ? 255 : color[3];
        }
      } catch (err) {
        _didIteratorError4 = true;
        _iteratorError4 = err;
      } finally {
        try {
          if (!_iteratorNormalCompletion4 && _iterator4.return) {
            _iterator4.return();
          }
        } finally {
          if (_didIteratorError4) {
            throw _iteratorError4;
          }
        }
      }
    }
  }]);
 
  return PointCloudLayer;
}(_core.Layer);
 
exports.default = PointCloudLayer;
 
 
PointCloudLayer.layerName = 'PointCloudLayer';
PointCloudLayer.defaultProps = defaultProps;
 
/***/ }),
/* 321 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
 
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
 
var _core = __webpack_require__(13);
 
var _solidPolygonLayer = __webpack_require__(177);
 
var _solidPolygonLayer2 = _interopRequireDefault(_solidPolygonLayer);
 
var _pathLayer = __webpack_require__(119);
 
var _pathLayer2 = _interopRequireDefault(_pathLayer);
 
var _polygon = __webpack_require__(120);
 
var Polygon = _interopRequireWildcard(_polygon);
 
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
 
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
 
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
 
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
 
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // Copyright (c) 2015 - 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
 
var get = _core.experimental.get;
 
 
var defaultLineColor = [0x0, 0x0, 0x0, 0xff];
var defaultFillColor = [0x0, 0x0, 0x0, 0xff];
 
var defaultProps = {
  stroked: true,
  filled: true,
  extruded: false,
  elevationScale: 1,
  wireframe: false,
 
  lineWidthScale: 1,
  lineWidthMinPixels: 0,
  lineWidthMaxPixels: Number.MAX_SAFE_INTEGER,
  lineJointRounded: false,
  lineMiterLimit: 4,
  lineDashJustified: false,
  fp64: false,
 
  getPolygon: function getPolygon(f) {
    return get(f, 'polygon');
  },
  // Polygon fill color
  getFillColor: function getFillColor(f) {
    return get(f, 'fillColor') || defaultFillColor;
  },
  // Point, line and polygon outline color
  getLineColor: function getLineColor(f) {
    return get(f, 'lineColor') || defaultLineColor;
  },
  // Line and polygon outline accessors
  getLineWidth: function getLineWidth(f) {
    return get(f, 'lineWidth') || 1;
  },
  // Line dash array accessor
  getLineDashArray: null,
  // Polygon extrusion accessor
  getElevation: function getElevation(f) {
    return get(f, 'elevation') || 1000;
  },
 
  // Optional settings for 'lighting' shader module
  lightSettings: {
    lightsPosition: [-122.45, 37.75, 8000, -122.0, 38.0, 5000],
    ambientRatio: 0.05,
    diffuseRatio: 0.6,
    specularRatio: 0.8,
    lightsStrength: [2.0, 0.0, 0.0, 0.0],
    numberOfLights: 2
  }
};
 
var PolygonLayer = function (_CompositeLayer) {
  _inherits(PolygonLayer, _CompositeLayer);
 
  function PolygonLayer() {
    _classCallCheck(this, PolygonLayer);
 
    return _possibleConstructorReturn(this, (PolygonLayer.__proto__ || Object.getPrototypeOf(PolygonLayer)).apply(this, arguments));
  }
 
  _createClass(PolygonLayer, [{
    key: 'initializeState',
    value: function initializeState() {
      this.state = {
        paths: []
      };
    }
  }, {
    key: 'updateState',
    value: function updateState(_ref) {
      var _this2 = this;
 
      var oldProps = _ref.oldProps,
          props = _ref.props,
          changeFlags = _ref.changeFlags;
 
      var geometryChanged = changeFlags.dataChanged || changeFlags.updateTriggersChanged && (changeFlags.updateTriggersChanged.all || changeFlags.updateTriggersChanged.getPolygon);
 
      if (geometryChanged) {
        var _props = this.props,
            data = _props.data,
            getPolygon = _props.getPolygon;
 
        this.state.paths = [];
        data.forEach(function (object) {
          var complexPolygon = Polygon.normalize(getPolygon(object));
          complexPolygon.forEach(function (polygon) {
            return _this2.state.paths.push({
              path: polygon,
              object: object
            });
          });
        });
      }
    }
  }, {
    key: 'getPickingInfo',
    value: function getPickingInfo(_ref2) {
      var info = _ref2.info;
 
      return Object.assign(info, {
        // override object with picked data
        object: info.object && info.object.object || info.object
      });
    }
 
    /* eslint-disable complexity */
 
  }, {
    key: 'renderLayers',
    value: function renderLayers() {
      // Layer composition props
      var _props2 = this.props,
          data = _props2.data,
          stroked = _props2.stroked,
          filled = _props2.filled,
          extruded = _props2.extruded,
          wireframe = _props2.wireframe,
          elevationScale = _props2.elevationScale;
 
      // Rendering props underlying layer
 
      var _props3 = this.props,
          lineWidthScale = _props3.lineWidthScale,
          lineWidthMinPixels = _props3.lineWidthMinPixels,
          lineWidthMaxPixels = _props3.lineWidthMaxPixels,
          lineJointRounded = _props3.lineJointRounded,
          lineMiterLimit = _props3.lineMiterLimit,
          lineDashJustified = _props3.lineDashJustified,
          fp64 = _props3.fp64;
 
      // Accessor props for underlying layers
 
      var _props4 = this.props,
          getFillColor = _props4.getFillColor,
          getLineColor = _props4.getLineColor,
          getLineWidth = _props4.getLineWidth,
          getLineDashArray = _props4.getLineDashArray,
          getElevation = _props4.getElevation,
          getPolygon = _props4.getPolygon,
          updateTriggers = _props4.updateTriggers,
          lightSettings = _props4.lightSettings;
      var paths = this.state.paths;
 
 
      var hasData = data && data.length > 0;
 
      // Filled Polygon Layer
      var polygonLayer = filled && hasData && new _solidPolygonLayer2.default(this.getSubLayerProps({
        id: 'fill',
        updateTriggers: {
          getElevation: updateTriggers.getElevation,
          getColor: updateTriggers.getFillColor
        }
      }), {
        data: data,
        extruded: extruded,
        elevationScale: elevationScale,
 
        fp64: fp64,
        wireframe: false,
 
        getPolygon: getPolygon,
        getElevation: getElevation,
        getColor: getFillColor,
 
        lightSettings: lightSettings
      });
 
      var polygonWireframeLayer = extruded && wireframe && hasData && new _solidPolygonLayer2.default(this.getSubLayerProps({
        id: 'wireframe',
        updateTriggers: {
          getElevation: updateTriggers.getElevation,
          getColor: updateTriggers.getLineColor
        }
      }), {
        data: data,
 
        fp64: fp64,
        extruded: true,
        elevationScale: elevationScale,
        wireframe: true,
 
        getPolygon: getPolygon,
        getElevation: getElevation,
        getColor: getLineColor
      });
 
      // Polygon line layer
      var polygonLineLayer = !extruded && stroked && hasData && new _pathLayer2.default(this.getSubLayerProps({
        id: 'stroke',
        updateTriggers: {
          getWidth: updateTriggers.getLineWidth,
          getColor: updateTriggers.getLineColor,
          getDashArray: updateTriggers.getLineDashArray
        }
      }), {
        data: paths,
 
        fp64: fp64,
        widthScale: lineWidthScale,
        widthMinPixels: lineWidthMinPixels,
        widthMaxPixels: lineWidthMaxPixels,
        rounded: lineJointRounded,
        miterLimit: lineMiterLimit,
        dashJustified: lineDashJustified,
 
        getPath: function getPath(x) {
          return x.path;
        },
        getColor: function getColor(x) {
          return getLineColor(x.object);
        },
        getWidth: function getWidth(x) {
          return getLineWidth(x.object);
        },
        getDashArray: getLineDashArray && function (x) {
          return getLineDashArray(x.object);
        }
      });
 
      return [
      // If not extruded: flat fill layer is drawn below outlines
      !extruded && polygonLayer, polygonWireframeLayer, polygonLineLayer,
      // If extruded: draw fill layer last for correct blending behavior
      extruded && polygonLayer];
    }
    /* eslint-enable complexity */
 
  }]);
 
  return PolygonLayer;
}(_core.CompositeLayer);
 
exports.default = PolygonLayer;
 
 
PolygonLayer.layerName = 'PolygonLayer';
PolygonLayer.defaultProps = defaultProps;
 
/***/ }),
/* 322 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
// Copyright (c) 2015 - 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
 
exports.default = "#define SHADER_NAME scatterplot-layer-fragment-shader\n\n#ifdef GL_ES\nprecision highp float;\n#endif\n\nvarying vec4 vColor;\nvarying vec2 unitPosition;\nvarying float innerUnitRadius;\n\nvoid main(void) {\n\n  float distToCenter = length(unitPosition);\n\n  if (distToCenter > 1.0 || distToCenter < innerUnitRadius) {\n    discard;\n  }\n  gl_FragColor = vColor;\n\n  // use highlight color if this fragment belongs to the selected object.\n  gl_FragColor = picking_filterHighlightColor(gl_FragColor);\n\n  // use picking color if rendering to picking FBO.\n  gl_FragColor = picking_filterPickingColor(gl_FragColor);\n}\n";
 
/***/ }),
/* 323 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
// Copyright (c) 2015 - 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
 
exports.default = "#define SHADER_NAME scatterplot-layer-vertex-shader-64\n\nattribute vec3 positions;\n\nattribute vec3 instancePositions;\nattribute vec2 instancePositions64xyLow;\nattribute float instanceRadius;\nattribute vec4 instanceColors;\nattribute vec3 instancePickingColors;\n\n// Only one-dimensional arrays may be declared in GLSL ES 1.0. specs p.24\nuniform float opacity;\nuniform float radiusScale;\nuniform float radiusMinPixels;\nuniform float radiusMaxPixels;\nuniform float outline;\nuniform float strokeWidth;\n\nvarying vec4 vColor;\nvarying vec2 unitPosition;\nvarying float innerUnitRadius;\n\nvoid main(void) {\n  // Multiply out radius and clamp to limits\n  float outerRadiusPixels = clamp(\n    project_scale(radiusScale * instanceRadius),\n    radiusMinPixels, radiusMaxPixels\n  );\n\n  // outline is centered at the radius\n  // outer radius needs to offset by half stroke width\n  outerRadiusPixels += outline * strokeWidth / 2.0;\n\n  // position on the containing square in [-1, 1] space\n  unitPosition = positions.xy;\n  // 0 - solid circle, 1 - stroke with lineWidth=0\n  innerUnitRadius = outline * (1.0 - strokeWidth / outerRadiusPixels);\n\n  vec4 instancePositions64xy = vec4(\n    instancePositions.x, instancePositions64xyLow.x,\n    instancePositions.y, instancePositions64xyLow.y);\n\n  vec2 projected_coord_xy[2];\n  project_position_fp64(instancePositions64xy, projected_coord_xy);\n\n  vec2 vertex_pos_localspace[4];\n  vec4_fp64(vec4(positions * outerRadiusPixels, 0.0), vertex_pos_localspace);\n\n  vec2 vertex_pos_modelspace[4];\n  vertex_pos_modelspace[0] = sum_fp64(vertex_pos_localspace[0], projected_coord_xy[0]);\n  vertex_pos_modelspace[1] = sum_fp64(vertex_pos_localspace[1], projected_coord_xy[1]);\n  vertex_pos_modelspace[2] = sum_fp64(vertex_pos_localspace[2],\n    vec2(project_scale(instancePositions.z), 0.0));\n  vertex_pos_modelspace[3] = vec2(1.0, 0.0);\n\n  gl_Position = project_to_clipspace_fp64(vertex_pos_modelspace);\n\n  vColor = vec4(instanceColors.rgb, instanceColors.a * opacity) / 255.;\n\n  // Set color to be rendered to picking fbo (also used to check for selection highlight).\n  picking_setPickingColor(instancePickingColors);\n}\n";
 
/***/ }),
/* 324 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
// Copyright (c) 2015 - 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
 
exports.default = "#define SHADER_NAME scatterplot-layer-vertex-shader\n\nattribute vec3 positions;\n\nattribute vec3 instancePositions;\nattribute float instanceRadius;\nattribute vec4 instanceColors;\nattribute vec3 instancePickingColors;\n\nuniform float opacity;\nuniform float radiusScale;\nuniform float radiusMinPixels;\nuniform float radiusMaxPixels;\nuniform float outline;\nuniform float strokeWidth;\n\nvarying vec4 vColor;\nvarying vec2 unitPosition;\nvarying float innerUnitRadius;\n\nvoid main(void) {\n  // Multiply out radius and clamp to limits\n  float outerRadiusPixels = clamp(\n    project_scale(radiusScale * instanceRadius),\n    radiusMinPixels, radiusMaxPixels\n  );\n  // outline is centered at the radius\n  // outer radius needs to offset by half stroke width\n  outerRadiusPixels += outline * strokeWidth / 2.0;\n\n  // position on the containing square in [-1, 1] space\n  unitPosition = positions.xy;\n  // 0 - solid circle, 1 - stroke with lineWidth=0\n  innerUnitRadius = outline * (1.0 - strokeWidth / outerRadiusPixels);\n\n  // Find the center of the point and add the current vertex\n  vec3 center = project_position(instancePositions);\n  vec3 vertex = positions * outerRadiusPixels;\n  gl_Position = project_to_clipspace(vec4(center + vertex, 1.0));\n\n  // Apply opacity to instance color, or return instance picking color\n  vColor = vec4(instanceColors.rgb, instanceColors.a * opacity) / 255.;\n\n  // Set color to be rendered to picking fbo (also used to check for selection highlight).\n  picking_setPickingColor(instancePickingColors);\n}\n";
 
/***/ }),
/* 325 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
// Copyright (c) 2015 - 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
 
/* fragment shader for the grid-layer */
exports.default = "#define SHADER_NAME screen-grid-layer-fragment-shader\n\n#ifdef GL_ES\nprecision highp float;\n#endif\n\nvarying vec4 vColor;\n\nvoid main(void) {\n  gl_FragColor = vColor;\n\n  // use highlight color if this fragment belongs to the selected object.\n  gl_FragColor = picking_filterHighlightColor(gl_FragColor);\n\n  // use picking color if rendering to picking FBO.\n  gl_FragColor = picking_filterPickingColor(gl_FragColor);\n}\n";
 
/***/ }),
/* 326 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
// Copyright (c) 2015 - 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
 
exports.default = "#define SHADER_NAME screen-grid-layer-vertex-shader\n\nattribute vec3 vertices;\nattribute vec3 instancePositions;\nattribute float instanceCount;\nattribute vec3 instancePickingColors;\n\nuniform float maxCount;\nuniform float opacity;\nuniform vec4 minColor;\nuniform vec4 maxColor;\nuniform vec3 cellScale;\n\nvarying vec4 vColor;\n\nvoid main(void) {\n  vec4 color = mix(minColor, maxColor, instanceCount / maxCount) / 255.;\n\n  vColor = vec4(color.rgb, color.a * opacity);\n\n  // Set color to be rendered to picking fbo (also used to check for selection highlight).\n  picking_setPickingColor(instancePickingColors);\n\n  gl_Position = vec4(instancePositions + vertices * cellScale, 1.);\n}\n";
 
/***/ }),
/* 327 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
 
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
 
var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
 
var _core = __webpack_require__(13);
 
var _luma = __webpack_require__(12);
 
var _screenGridLayerVertex = __webpack_require__(326);
 
var _screenGridLayerVertex2 = _interopRequireDefault(_screenGridLayerVertex);
 
var _screenGridLayerFragment = __webpack_require__(325);
 
var _screenGridLayerFragment2 = _interopRequireDefault(_screenGridLayerFragment);
 
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
 
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
 
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
 
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // Copyright (c) 2015 - 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
 
var defaultProps = {
  cellSizePixels: 100,
 
  // Color range?
  minColor: [0, 0, 0, 255],
  maxColor: [0, 255, 0, 255],
 
  getPosition: function getPosition(d) {
    return d.position;
  },
  getWeight: function getWeight(d) {
    return 1;
  }
};
 
var ScreenGridLayer = function (_Layer) {
  _inherits(ScreenGridLayer, _Layer);
 
  function ScreenGridLayer() {
    _classCallCheck(this, ScreenGridLayer);
 
    return _possibleConstructorReturn(this, (ScreenGridLayer.__proto__ || Object.getPrototypeOf(ScreenGridLayer)).apply(this, arguments));
  }
 
  _createClass(ScreenGridLayer, [{
    key: 'getShaders',
    value: function getShaders() {
      return { vs: _screenGridLayerVertex2.default, fs: _screenGridLayerFragment2.default, modules: ['picking'] }; // 'project' module added by default.
    }
  }, {
    key: 'initializeState',
    value: function initializeState() {
      var attributeManager = this.getAttributeManager();
      var gl = this.context.gl;
 
      /* eslint-disable max-len */
 
      attributeManager.addInstanced({
        instancePositions: { size: 3, update: this.calculateInstancePositions },
        instanceCount: {
          size: 1,
          accessor: ['getPosition', 'getWeight'],
          update: this.calculateInstanceCount
        }
      });
      /* eslint-disable max-len */
 
      this.setState({ model: this._getModel(gl) });
    }
  }, {
    key: 'shouldUpdateState',
    value: function shouldUpdateState(_ref) {
      var changeFlags = _ref.changeFlags;
 
      return changeFlags.somethingChanged;
    }
  }, {
    key: 'updateState',
    value: function updateState(_ref2) {
      var oldProps = _ref2.oldProps,
          props = _ref2.props,
          changeFlags = _ref2.changeFlags;
 
      _get(ScreenGridLayer.prototype.__proto__ || Object.getPrototypeOf(ScreenGridLayer.prototype), 'updateState', this).call(this, { props: props, oldProps: oldProps, changeFlags: changeFlags });
      var cellSizeChanged = props.cellSizePixels !== oldProps.cellSizePixels;
 
      if (cellSizeChanged || changeFlags.viewportChanged) {
        this.updateCell();
      }
    }
  }, {
    key: 'draw',
    value: function draw(_ref3) {
      var uniforms = _ref3.uniforms;
      var _props = this.props,
          minColor = _props.minColor,
          maxColor = _props.maxColor,
          _props$parameters = _props.parameters,
          parameters = _props$parameters === undefined ? {} : _props$parameters;
      var _state = this.state,
          model = _state.model,
          cellScale = _state.cellScale,
          maxCount = _state.maxCount;
 
      uniforms = Object.assign({}, uniforms, { minColor: minColor, maxColor: maxColor, cellScale: cellScale, maxCount: maxCount });
      model.draw({
        uniforms: uniforms,
        parameters: Object.assign({
          depthTest: false,
          depthMask: false
        }, parameters)
      });
    }
  }, {
    key: '_getModel',
    value: function _getModel(gl) {
      return new _luma.Model(gl, Object.assign({}, this.getShaders(), {
        id: this.props.id,
        geometry: new _luma.Geometry({
          drawMode: _luma.GL.TRIANGLE_FAN,
          attributes: {
            vertices: new Float32Array([0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0])
          }
        }),
        isInstanced: true,
        shaderCache: this.context.shaderCache
      }));
    }
  }, {
    key: 'updateCell',
    value: function updateCell() {
      var _context$viewport = this.context.viewport,
          width = _context$viewport.width,
          height = _context$viewport.height;
      var cellSizePixels = this.props.cellSizePixels;
 
 
      var MARGIN = 2;
      var cellScale = new Float32Array([(cellSizePixels - MARGIN) / width * 2, -(cellSizePixels - MARGIN) / height * 2, 1]);
      var numCol = Math.ceil(width / cellSizePixels);
      var numRow = Math.ceil(height / cellSizePixels);
 
      this.setState({
        cellScale: cellScale,
        numCol: numCol,
        numRow: numRow,
        numInstances: numCol * numRow
      });
 
      var attributeManager = this.getAttributeManager();
      attributeManager.invalidateAll();
    }
  }, {
    key: 'calculateInstancePositions',
    value: function calculateInstancePositions(attribute, _ref4) {
      var numInstances = _ref4.numInstances;
      var _context$viewport2 = this.context.viewport,
          width = _context$viewport2.width,
          height = _context$viewport2.height;
      var cellSizePixels = this.props.cellSizePixels;
      var numCol = this.state.numCol;
      var value = attribute.value,
          size = attribute.size;
 
 
      for (var i = 0; i < numInstances; i++) {
        var x = i % numCol;
        var y = Math.floor(i / numCol);
        value[i * size + 0] = x * cellSizePixels / width * 2 - 1;
        value[i * size + 1] = 1 - y * cellSizePixels / height * 2;
        value[i * size + 2] = 0;
      }
    }
  }, {
    key: 'calculateInstanceCount',
    value: function calculateInstanceCount(attribute) {
      var _props2 = this.props,
          data = _props2.data,
          cellSizePixels = _props2.cellSizePixels,
          getPosition = _props2.getPosition,
          getWeight = _props2.getWeight;
      var _state2 = this.state,
          numCol = _state2.numCol,
          numRow = _state2.numRow;
      var value = attribute.value;
 
      var maxCount = 0;
 
      value.fill(0.0);
 
      var _iteratorNormalCompletion = true;
      var _didIteratorError = false;
      var _iteratorError = undefined;
 
      try {
        for (var _iterator = data[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
          var point = _step.value;
 
          var pixel = this.project(getPosition(point));
          var colId = Math.floor(pixel[0] / cellSizePixels);
          var rowId = Math.floor(pixel[1] / cellSizePixels);
          if (colId >= 0 && colId < numCol && rowId >= 0 && rowId < numRow) {
            var i = colId + rowId * numCol;
            value[i] += getWeight(point);
            if (value[i] > maxCount) {
              maxCount = value[i];
            }
          }
        }
      } catch (err) {
        _didIteratorError = true;
        _iteratorError = err;
      } finally {
        try {
          if (!_iteratorNormalCompletion && _iterator.return) {
            _iterator.return();
          }
        } finally {
          if (_didIteratorError) {
            throw _iteratorError;
          }
        }
      }
 
      this.setState({ maxCount: maxCount });
    }
  }]);
 
  return ScreenGridLayer;
}(_core.Layer);
 
exports.default = ScreenGridLayer;
 
 
ScreenGridLayer.layerName = 'ScreenGridLayer';
ScreenGridLayer.defaultProps = defaultProps;
 
/***/ }),
/* 328 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.PolygonTesselatorExtruded = undefined;
 
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); // Copyright (c) 2015 - 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
 
var _polygon = __webpack_require__(120);
 
var Polygon = _interopRequireWildcard(_polygon);
 
var _core = __webpack_require__(13);
 
var _earcut = __webpack_require__(232);
 
var _earcut2 = _interopRequireDefault(_earcut);
 
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
 
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
 
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
 
var fp64LowPart = _core.experimental.fp64LowPart,
    fillArray = _core.experimental.fillArray;
 
 
function getPickingColor(index) {
  return [index + 1 & 255, index + 1 >> 8 & 255, index + 1 >> 8 >> 8 & 255];
}
 
function arrayPush(array, values) {
  var length = values.length;
  var offset = array.length;
 
  for (var index = 0; index < length; index++) {
    array[offset++] = values[index];
  }
  return array;
}
 
function flatten(values, level) {
  var result = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
 
  if (level > 1) {
    values.forEach(function (v) {
      return flatten(v, level - 1, result);
    });
  } else {
    arrayPush(result, values);
  }
  return result;
}
 
var DEFAULT_COLOR = [0, 0, 0, 255]; // Black
 
var PolygonTesselatorExtruded = exports.PolygonTesselatorExtruded = function () {
  function PolygonTesselatorExtruded(_ref) {
    var polygons = _ref.polygons,
        _ref$getHeight = _ref.getHeight,
        getHeight = _ref$getHeight === undefined ? function (x) {
      return 1000;
    } : _ref$getHeight,
        _ref$getColor = _ref.getColor,
        getColor = _ref$getColor === undefined ? function (x) {
      return DEFAULT_COLOR;
    } : _ref$getColor,
        _ref$wireframe = _ref.wireframe,
        wireframe = _ref$wireframe === undefined ? false : _ref$wireframe,
        _ref$fp = _ref.fp64,
        fp64 = _ref$fp === undefined ? false : _ref$fp;
 
    _classCallCheck(this, PolygonTesselatorExtruded);
 
    this.fp64 = fp64;
 
    // Expensive operation, convert all polygons to arrays
    polygons = polygons.map(function (complexPolygon, polygonIndex) {
      var height = getHeight(polygonIndex) || 0;
      return Polygon.normalize(complexPolygon).map(function (polygon) {
        return polygon.map(function (coord) {
          return [coord[0], coord[1], height];
        });
      });
    });
 
    var groupedVertices = polygons;
    this.groupedVertices = polygons;
    var pointCount = getPointCount(polygons);
    this.pointCount = pointCount;
    this.wireframe = wireframe;
 
    this.attributes = {};
 
    var positionsJS = calculatePositionsJS({ groupedVertices: groupedVertices, pointCount: pointCount, wireframe: wireframe });
    Object.assign(this.attributes, {
      positions: calculatePositions(positionsJS, this.fp64),
      indices: calculateIndices({ groupedVertices: groupedVertices, wireframe: wireframe }),
      normals: calculateNormals({ groupedVertices: groupedVertices, pointCount: pointCount, wireframe: wireframe }),
      // colors: calculateColors({groupedVertices, wireframe, getColor}),
      pickingColors: calculatePickingColors({ groupedVertices: groupedVertices, pointCount: pointCount, wireframe: wireframe })
    });
  }
 
  _createClass(PolygonTesselatorExtruded, [{
    key: 'indices',
    value: function indices() {
      return this.attributes.indices;
    }
  }, {
    key: 'positions',
    value: function positions() {
      return this.attributes.positions;
    }
  }, {
    key: 'normals',
    value: function normals() {
      return this.attributes.normals;
    }
  }, {
    key: 'colors',
    value: function colors() {
      var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
          _ref2$getColor = _ref2.getColor,
          getColor = _ref2$getColor === undefined ? function (x) {
        return DEFAULT_COLOR;
      } : _ref2$getColor;
 
      var groupedVertices = this.groupedVertices,
          pointCount = this.pointCount,
          wireframe = this.wireframe;
 
      return calculateColors({ groupedVertices: groupedVertices, pointCount: pointCount, wireframe: wireframe, getColor: getColor });
    }
  }, {
    key: 'pickingColors',
    value: function pickingColors() {
      return this.attributes.pickingColors;
    }
 
    // updateTriggers: {
    //   positions: ['getHeight'],
    //   colors: ['getColors']
    //   pickingColors: 'none'
    // }
 
  }]);
 
  return PolygonTesselatorExtruded;
}();
 
// Count number of points in a list of complex polygons
 
 
function getPointCount(polygons) {
  return polygons.reduce(function (points, polygon) {
    return points + Polygon.getVertexCount(polygon);
  }, 0);
}
 
function calculateIndices(_ref3) {
  var groupedVertices = _ref3.groupedVertices,
      _ref3$wireframe = _ref3.wireframe,
      wireframe = _ref3$wireframe === undefined ? false : _ref3$wireframe;
 
  // adjust index offset for multiple polygons
  var multiplier = wireframe ? 2 : 5;
  var offsets = [];
  groupedVertices.reduce(function (vertexIndex, vertices) {
    offsets.push(vertexIndex);
    return vertexIndex + Polygon.getVertexCount(vertices) * multiplier;
  }, 0);
 
  var indices = groupedVertices.map(function (vertices, polygonIndex) {
    return wireframe ? // 1. get sequentially ordered indices of each polygons wireframe
    // 2. offset them by the number of indices in previous polygons
    calculateContourIndices(vertices, offsets[polygonIndex]) : // 1. get triangulated indices for the internal areas
    // 2. offset them by the number of indices in previous polygons
    calculateSurfaceIndices(vertices, offsets[polygonIndex]);
  });
 
  return new Uint32Array(flatten(indices, 2));
}
 
// Calculate a flat position array in JS - can be mapped to 32 or 64 bit typed arrays
// Remarks:
// * each top vertex is on 3 surfaces
// * each bottom vertex is on 2 surfaces
function calculatePositionsJS(_ref4) {
  var groupedVertices = _ref4.groupedVertices,
      pointCount = _ref4.pointCount,
      _ref4$wireframe = _ref4.wireframe,
      wireframe = _ref4$wireframe === undefined ? false : _ref4$wireframe;
 
  var multiplier = wireframe ? 2 : 5;
  var positions = new Float32Array(pointCount * 3 * multiplier);
  var vertexIndex = 0;
 
  groupedVertices.forEach(function (vertices) {
    var topVertices = flatten(vertices, 3);
 
    var baseVertices = topVertices.slice(0);
    var i = topVertices.length - 1;
    while (i > 0) {
      baseVertices[i] = 0;
      i -= 3;
    }
    var len = topVertices.length;
 
    if (wireframe) {
      fillArray({ target: positions, source: topVertices, start: vertexIndex });
      fillArray({ target: positions, source: baseVertices, start: vertexIndex + len });
    } else {
      fillArray({ target: positions, source: topVertices, start: vertexIndex, count: 3 });
      fillArray({
        target: positions,
        source: baseVertices,
        start: vertexIndex + len * 3,
        count: 2
      });
    }
    vertexIndex += len * multiplier;
  });
 
  return positions;
}
 
function calculatePositions(positionsJS, fp64) {
  var positionLow = void 0;
  if (fp64) {
    // We only need x, y component
    var vertexCount = positionsJS.length / 3;
    positionLow = new Float32Array(vertexCount * 2);
    for (var i = 0; i < vertexCount; i++) {
      positionLow[i * 2 + 0] = fp64LowPart(positionsJS[i * 3 + 0]);
      positionLow[i * 2 + 1] = fp64LowPart(positionsJS[i * 3 + 1]);
    }
  }
  return { positions: positionsJS, positions64xyLow: positionLow };
}
 
function calculateNormals(_ref5) {
  var groupedVertices = _ref5.groupedVertices,
      pointCount = _ref5.pointCount,
      wireframe = _ref5.wireframe;
 
  var up = [0, 0, 1];
  var multiplier = wireframe ? 2 : 5;
 
  var normals = new Float32Array(pointCount * 3 * multiplier);
  var vertexIndex = 0;
 
  if (wireframe) {
    return fillArray({ target: normals, source: up, count: pointCount * multiplier });
  }
 
  groupedVertices.map(function (vertices, polygonIndex) {
    var vertexCount = Polygon.getVertexCount(vertices);
 
    fillArray({ target: normals, source: up, start: vertexIndex, count: vertexCount });
    vertexIndex += vertexCount * 3;
 
    var sideNormalsForward = [];
    var sideNormalsBackward = [];
 
    vertices.forEach(function (polygon) {
      var sideNormals = calculateSideNormals(polygon);
      var firstNormal = sideNormals.slice(0, 3);
 
      arrayPush(sideNormalsForward, sideNormals);
      arrayPush(sideNormalsForward, firstNormal);
 
      arrayPush(sideNormalsBackward, firstNormal);
      arrayPush(sideNormalsBackward, sideNormals);
    });
 
    fillArray({
      target: normals,
      start: vertexIndex,
      count: 2,
      source: sideNormalsForward.concat(sideNormalsBackward)
    });
    vertexIndex += vertexCount * 3 * 4;
  });
 
  return normals;
}
 
function calculateSideNormals(vertices) {
  var normals = [];
 
  var lastVertice = null;
  var _iteratorNormalCompletion = true;
  var _didIteratorError = false;
  var _iteratorError = undefined;
 
  try {
    for (var _iterator = vertices[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
      var vertice = _step.value;
 
      if (lastVertice) {
        // vertex[i-1], vertex[i]
        var n = getNormal(lastVertice, vertice);
        arrayPush(normals, n);
      }
      lastVertice = vertice;
    }
  } catch (err) {
    _didIteratorError = true;
    _iteratorError = err;
  } finally {
    try {
      if (!_iteratorNormalCompletion && _iterator.return) {
        _iterator.return();
      }
    } finally {
      if (_didIteratorError) {
        throw _iteratorError;
      }
    }
  }
 
  return normals;
}
 
function calculateColors(_ref6) {
  var groupedVertices = _ref6.groupedVertices,
      pointCount = _ref6.pointCount,
      getColor = _ref6.getColor,
      _ref6$wireframe = _ref6.wireframe,
      wireframe = _ref6$wireframe === undefined ? false : _ref6$wireframe;
 
  var multiplier = wireframe ? 2 : 5;
  var colors = new Uint8ClampedArray(pointCount * 4 * multiplier);
  var vertexIndex = 0;
 
  groupedVertices.forEach(function (complexPolygon, polygonIndex) {
    var color = getColor(polygonIndex);
    color[3] = Number.isFinite(color[3]) ? color[3] : 255;
 
    var numVertices = Polygon.getVertexCount(complexPolygon);
 
    fillArray({ target: colors, source: color, start: vertexIndex, count: numVertices * multiplier });
    vertexIndex += color.length * numVertices * multiplier;
  });
 
  return colors;
}
 
function calculatePickingColors(_ref7) {
  var groupedVertices = _ref7.groupedVertices,
      pointCount = _ref7.pointCount,
      _ref7$wireframe = _ref7.wireframe,
      wireframe = _ref7$wireframe === undefined ? false : _ref7$wireframe;
 
  var multiplier = wireframe ? 2 : 5;
  var colors = new Uint8ClampedArray(pointCount * 3 * multiplier);
  var vertexIndex = 0;
 
  groupedVertices.forEach(function (vertices, polygonIndex) {
    var numVertices = Polygon.getVertexCount(vertices);
    var color = getPickingColor(polygonIndex);
 
    fillArray({ target: colors, source: color, start: vertexIndex, count: numVertices * multiplier });
    vertexIndex += color.length * numVertices * multiplier;
  });
  return colors;
}
 
function calculateContourIndices(vertices, offset) {
  var stride = Polygon.getVertexCount(vertices);
  var indices = [];
 
  vertices.forEach(function (polygon) {
    indices.push(offset);
    var numVertices = polygon.length;
 
    // polygon top
    // use vertex pairs for GL.LINES => [0, 1, 1, 2, 2, ..., n-1, n-1, 0]
    for (var i = 1; i < numVertices - 1; i++) {
      indices.push(i + offset, i + offset);
    }
    indices.push(offset);
 
    // polygon sides
    for (var _i = 0; _i < numVertices - 1; _i++) {
      indices.push(_i + offset, _i + stride + offset);
    }
 
    offset += numVertices;
  });
 
  return indices;
}
 
function drawSurfaceRectangle(targetArray, offset, stride) {
  targetArray.push(offset + stride, offset + stride * 3, offset + stride * 2 + 1, offset + stride * 2 + 1, offset + stride * 3, offset + stride * 4 + 1);
}
 
function calculateSurfaceIndices(vertices, offset) {
  var stride = Polygon.getVertexCount(vertices);
 
  var holes = null;
  var holeCount = vertices.length - 1;
 
  if (holeCount) {
    holes = [];
    var vertexIndex = 0;
    for (var i = 0; i < holeCount; i++) {
      vertexIndex += vertices[i].length;
      holes[i] = vertexIndex;
    }
  }
 
  var indices = (0, _earcut2.default)(flatten(vertices, 3), holes, 3).map(function (index) {
    return index + offset;
  });
 
  vertices.forEach(function (polygon) {
    var numVertices = polygon.length;
 
    // polygon sides
    for (var _i2 = 0; _i2 < numVertices - 1; _i2++) {
      drawSurfaceRectangle(indices, offset + _i2, stride);
    }
 
    offset += numVertices;
  });
 
  return indices;
}
 
// helpers
 
// get normal vector of line segment
function getNormal(p1, p2) {
  return [p1[1] - p2[1], p2[0] - p1[0], 0];
}
 
/***/ }),
/* 329 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.PolygonTesselator = undefined;
 
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); // Copyright (c) 2015 - 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
 
// Handles tesselation of polygons with holes
// - 2D surfaces
// - 2D outlines
// - 3D surfaces (top and sides only)
// - 3D wireframes (not yet)
 
 
var _polygon = __webpack_require__(120);
 
var Polygon = _interopRequireWildcard(_polygon);
 
var _earcut = __webpack_require__(232);
 
var _earcut2 = _interopRequireDefault(_earcut);
 
var _core = __webpack_require__(13);
 
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
 
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
 
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
 
var fp64LowPart = _core.experimental.fp64LowPart,
    flattenVertices = _core.experimental.flattenVertices,
    fillArray = _core.experimental.fillArray;
 
// Maybe deck.gl or luma.gl needs to export this
 
function getPickingColor(index) {
  return [(index + 1) % 256, Math.floor((index + 1) / 256) % 256, Math.floor((index + 1) / 256 / 256) % 256];
}
 
var DEFAULT_COLOR = [0, 0, 0, 255]; // Black
 
// This class is set up to allow querying one attribute at a time
// the way the AttributeManager expects it
 
var PolygonTesselator = exports.PolygonTesselator = function () {
  function PolygonTesselator(_ref) {
    var polygons = _ref.polygons,
        _ref$fp = _ref.fp64,
        fp64 = _ref$fp === undefined ? false : _ref$fp;
 
    _classCallCheck(this, PolygonTesselator);
 
    // Normalize all polygons
    this.polygons = polygons.map(function (polygon) {
      return Polygon.normalize(polygon);
    });
    // Count all polygon vertices
    this.pointCount = getPointCount(this.polygons);
    this.fp64 = fp64;
  }
 
  _createClass(PolygonTesselator, [{
    key: 'indices',
    value: function indices() {
      var polygons = this.polygons,
          indexCount = this.indexCount;
 
      return calculateIndices({ polygons: polygons, indexCount: indexCount });
    }
  }, {
    key: 'positions',
    value: function positions() {
      var polygons = this.polygons,
          pointCount = this.pointCount;
 
      return calculatePositions({ polygons: polygons, pointCount: pointCount, fp64: this.fp64 });
    }
  }, {
    key: 'normals',
    value: function normals() {
      var polygons = this.polygons,
          pointCount = this.pointCount;
 
      return calculateNormals({ polygons: polygons, pointCount: pointCount });
    }
  }, {
    key: 'colors',
    value: function colors() {
      var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
          _ref2$getColor = _ref2.getColor,
          getColor = _ref2$getColor === undefined ? function (x) {
        return DEFAULT_COLOR;
      } : _ref2$getColor;
 
      var polygons = this.polygons,
          pointCount = this.pointCount;
 
      return calculateColors({ polygons: polygons, pointCount: pointCount, getColor: getColor });
    }
  }, {
    key: 'pickingColors',
    value: function pickingColors() {
      var polygons = this.polygons,
          pointCount = this.pointCount;
 
      return calculatePickingColors({ polygons: polygons, pointCount: pointCount });
    }
 
    // getAttribute({size, accessor}) {
    //   const {polygons, pointCount} = this;
    //   return calculateAttribute({polygons, pointCount, size, accessor});
    // }
 
  }]);
 
  return PolygonTesselator;
}();
 
// Count number of points in a list of complex polygons
 
 
function getPointCount(polygons) {
  return polygons.reduce(function (points, polygon) {
    return points + Polygon.getVertexCount(polygon);
  }, 0);
}
 
// COunt number of triangles in a list of complex polygons
function getTriangleCount(polygons) {
  return polygons.reduce(function (triangles, polygon) {
    return triangles + Polygon.getTriangleCount(polygon);
  }, 0);
}
 
// Returns the offsets of each complex polygon in the combined array of all polygons
function getPolygonOffsets(polygons) {
  var offsets = new Array(polygons.length + 1);
  offsets[0] = 0;
  var offset = 0;
  polygons.forEach(function (polygon, i) {
    offset += Polygon.getVertexCount(polygon);
    offsets[i + 1] = offset;
  });
  return offsets;
}
 
// Returns the offset of each hole polygon in the flattened array for that polygon
function getHoleIndices(complexPolygon) {
  var holeIndices = null;
  if (complexPolygon.length > 1) {
    var polygonStartIndex = 0;
    holeIndices = [];
    complexPolygon.forEach(function (polygon) {
      polygonStartIndex += polygon.length;
      holeIndices.push(polygonStartIndex);
    });
    // Last element points to end of the flat array, remove it
    holeIndices.pop();
  }
  return holeIndices;
}
 
function calculateIndices(_ref3) {
  var polygons = _ref3.polygons,
      _ref3$IndexType = _ref3.IndexType,
      IndexType = _ref3$IndexType === undefined ? Uint32Array : _ref3$IndexType;
 
  // Calculate length of index array (3 * number of triangles)
  var indexCount = 3 * getTriangleCount(polygons);
  var offsets = getPolygonOffsets(polygons);
 
  // Allocate the attribute
  // TODO it's not the index count but the vertex count that must be checked
  if (IndexType === Uint16Array && indexCount > 65535) {
    throw new Error("Vertex count exceeds browser's limit");
  }
  var attribute = new IndexType(indexCount);
 
  // 1. get triangulated indices for the internal areas
  // 2. offset them by the number of indices in previous polygons
  var i = 0;
  polygons.forEach(function (polygon, polygonIndex) {
    var _iteratorNormalCompletion = true;
    var _didIteratorError = false;
    var _iteratorError = undefined;
 
    try {
      for (var _iterator = calculateSurfaceIndices(polygon)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
        var index = _step.value;
 
        attribute[i++] = index + offsets[polygonIndex];
      }
    } catch (err) {
      _didIteratorError = true;
      _iteratorError = err;
    } finally {
      try {
        if (!_iteratorNormalCompletion && _iterator.return) {
          _iterator.return();
        }
      } finally {
        if (_didIteratorError) {
          throw _iteratorError;
        }
      }
    }
  });
 
  return attribute;
}
 
/*
 * Get vertex indices for drawing complexPolygon mesh
 * @private
 * @param {[Number,Number,Number][][]} complexPolygon
 * @returns {[Number]} indices
 */
function calculateSurfaceIndices(complexPolygon) {
  // Prepare an array of hole indices as expected by earcut
  var holeIndices = getHoleIndices(complexPolygon);
  // Flatten the polygon as expected by earcut
  var verts = flattenVertices(complexPolygon);
  // Let earcut triangulate the polygon
  return (0, _earcut2.default)(verts, holeIndices, 3);
}
 
function calculatePositions(_ref4) {
  var polygons = _ref4.polygons,
      pointCount = _ref4.pointCount,
      fp64 = _ref4.fp64;
 
  // Flatten out all the vertices of all the sub subPolygons
  var attribute = new Float32Array(pointCount * 3);
  var attributeLow = void 0;
  if (fp64) {
    // We only need x, y component
    attributeLow = new Float32Array(pointCount * 2);
  }
  var i = 0;
  var j = 0;
  var _iteratorNormalCompletion2 = true;
  var _didIteratorError2 = false;
  var _iteratorError2 = undefined;
 
  try {
    for (var _iterator2 = polygons[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
      var polygon = _step2.value;
 
      // eslint-disable-next-line
      Polygon.forEachVertex(polygon, function (vertex) {
        var x = vertex[0];
        var y = vertex[1];
        var z = vertex[2] || 0;
        attribute[i++] = x;
        attribute[i++] = y;
        attribute[i++] = z;
        if (fp64) {
          attributeLow[j++] = fp64LowPart(x);
          attributeLow[j++] = fp64LowPart(y);
        }
      });
    }
  } catch (err) {
    _didIteratorError2 = true;
    _iteratorError2 = err;
  } finally {
    try {
      if (!_iteratorNormalCompletion2 && _iterator2.return) {
        _iterator2.return();
      }
    } finally {
      if (_didIteratorError2) {
        throw _iteratorError2;
      }
    }
  }
 
  return { positions: attribute, positions64xyLow: attributeLow };
}
 
function calculateNormals(_ref5) {
  var polygons = _ref5.polygons,
      pointCount = _ref5.pointCount;
 
  // TODO - use generic vertex attribute?
  var attribute = new Float32Array(pointCount * 3);
  // normals is not used in flat polygon shader
  // fillArray({target: attribute, source: [0, 0, 1], start: 0, count: pointCount});
  return attribute;
}
 
function calculateColors(_ref6) {
  var polygons = _ref6.polygons,
      pointCount = _ref6.pointCount,
      getColor = _ref6.getColor;
 
  var attribute = new Uint8ClampedArray(pointCount * 4);
  var i = 0;
  polygons.forEach(function (complexPolygon, polygonIndex) {
    // Calculate polygon color
    var color = getColor(polygonIndex);
    color[3] = Number.isFinite(color[3]) ? color[3] : 255;
 
    var vertexCount = Polygon.getVertexCount(complexPolygon);
    fillArray({ target: attribute, source: color, start: i, count: vertexCount });
    i += color.length * vertexCount;
  });
  return attribute;
}
 
function calculatePickingColors(_ref7) {
  var polygons = _ref7.polygons,
      pointCount = _ref7.pointCount;
 
  var attribute = new Uint8ClampedArray(pointCount * 3);
  var i = 0;
  polygons.forEach(function (complexPolygon, polygonIndex) {
    var color = getPickingColor(polygonIndex);
    var vertexCount = Polygon.getVertexCount(complexPolygon);
    fillArray({ target: attribute, source: color, start: i, count: vertexCount });
    i += color.length * vertexCount;
  });
  return attribute;
}
 
/***/ }),
/* 330 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
// Copyright (c) 2015 - 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
 
exports.default = "#define SHADER_NAME solid-polygon-layer-fragment-shader\n\n#ifdef GL_ES\nprecision highp float;\n#endif\n\nvarying vec4 vColor;\n\nvoid main(void) {\n  gl_FragColor = vColor;\n\n  // use highlight color if this fragment belongs to the selected object.\n  gl_FragColor = picking_filterHighlightColor(gl_FragColor);\n\n  // use picking color if rendering to picking FBO.\n  gl_FragColor = picking_filterPickingColor(gl_FragColor);\n}\n";
 
/***/ }),
/* 331 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
// Copyright (c) 2015 - 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
 
exports.default = "#define SHADER_NAME solid-polygon-layer-vertex-shader-64\n\nattribute vec3 positions;\nattribute vec2 positions64xyLow;\nattribute vec3 normals;\nattribute vec4 colors;\nattribute vec3 pickingColors;\n\nuniform float extruded;\nuniform float elevationScale;\nuniform float opacity;\n\nvarying vec4 vColor;\n\nvoid main(void) {\n  vec4 positions64xy = vec4(positions.x, positions64xyLow.x, positions.y, positions64xyLow.y);\n\n  vec2 projected_coord_xy[2];\n  project_position_fp64(positions64xy, projected_coord_xy);\n\n  vec2 vertex_pos_modelspace[4];\n  vertex_pos_modelspace[0] = projected_coord_xy[0];\n  vertex_pos_modelspace[1] = projected_coord_xy[1];\n  vertex_pos_modelspace[2] = vec2(project_scale(positions.z * elevationScale), 0.0);\n  vertex_pos_modelspace[3] = vec2(1.0, 0.0);\n\n  gl_Position = project_to_clipspace_fp64(vertex_pos_modelspace);\n\n  vec4 position_worldspace = vec4(\n    vertex_pos_modelspace[0].x, vertex_pos_modelspace[1].x,\n    vertex_pos_modelspace[2].x, vertex_pos_modelspace[3].x);\n\n  float lightWeight = 1.0;\n\n  if (extruded > 0.5) {\n    lightWeight = getLightWeight(\n      position_worldspace.xyz, // the w component is always 1.0\n      project_normal(normals)\n    );\n  }\n\n  vec3 lightWeightedColor = lightWeight * colors.rgb;\n  vColor = vec4(lightWeightedColor, colors.a * opacity) / 255.0;\n\n  // Set color to be rendered to picking fbo (also used to check for selection highlight).\n  picking_setPickingColor(pickingColors);\n}\n";
 
/***/ }),
/* 332 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
// Copyright (c) 2015 - 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
 
exports.default = "#define SHADER_NAME solid-polygon-layer-vertex-shader\n\nattribute vec3 positions;\nattribute vec3 normals;\nattribute vec4 colors;\nattribute vec3 pickingColors;\n\nuniform float extruded;\nuniform float elevationScale;\nuniform float opacity;\n\nvarying vec4 vColor;\n\nvoid main(void) {\n  \n  vec4 position_worldspace = vec4(project_position(\n    vec3(positions.x, positions.y, positions.z * elevationScale)),\n    1.0\n  );\n  gl_Position = project_to_clipspace(position_worldspace);\n\n  float lightWeight = 1.0;\n  \n  if (extruded > 0.5) {\n    // Here, the input parameters should be\n    // position_worldspace.xyz / position_worldspace.w.\n    // However, this calculation generates all zeros on\n    // MacBook Pro with Intel Iris Pro GPUs for unclear reasons.\n    // (see https://github.com/uber/deck.gl/issues/559)\n    // Since the w component is always 1.0 in our shaders,\n    // we decided to just provide xyz component of position_worldspace\n    // to the getLightWeight() function\n    lightWeight = getLightWeight(\n      position_worldspace.xyz,\n      project_normal(normals)\n    );\n  }\n\n  vec3 lightWeightedColor = lightWeight * colors.rgb;\n  vColor = vec4(lightWeightedColor, colors.a * opacity) / 255.0;\n\n  // Set color to be rendered to picking fbo (also used to check for selection highlight).\n  picking_setPickingColor(pickingColors);\n}\n";
 
/***/ }),
/* 333 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
 
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
 
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
 
var _viewState = __webpack_require__(180);
 
var _viewState2 = _interopRequireDefault(_viewState);
 
var _math = __webpack_require__(16);
 
var _assert = __webpack_require__(1);
 
var _assert2 = _interopRequireDefault(_assert);
 
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
 
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
 
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
 
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
 
var MOVEMENT_SPEED = 1; // 1 meter per keyboard click
var ROTATION_STEP_DEGREES = 2;
 
/* Helpers */
 
// Constrain number between bounds
function clamp(x, min, max) {
  return x < min ? min : x > max ? max : x;
}
 
function ensureFinite(value, fallbackValue) {
  return Number.isFinite(value) ? value : fallbackValue;
}
 
var FirstPersonState = function (_ViewState) {
  _inherits(FirstPersonState, _ViewState);
 
  function FirstPersonState(_ref) {
    var width = _ref.width,
        height = _ref.height,
        position = _ref.position,
        bearing = _ref.bearing,
        pitch = _ref.pitch,
        longitude = _ref.longitude,
        latitude = _ref.latitude,
        zoom = _ref.zoom,
        _ref$syncBearing = _ref.syncBearing,
        syncBearing = _ref$syncBearing === undefined ? true : _ref$syncBearing,
        bounds = _ref.bounds,
        startPanEventPosition = _ref.startPanEventPosition,
        startPanPosition = _ref.startPanPosition,
        startRotateCenter = _ref.startRotateCenter,
        startRotateViewport = _ref.startRotateViewport,
        startZoomPos = _ref.startZoomPos,
        startZoom = _ref.startZoom;
 
    _classCallCheck(this, FirstPersonState);
 
    var _this = _possibleConstructorReturn(this, (FirstPersonState.__proto__ || Object.getPrototypeOf(FirstPersonState)).call(this, {
      width: width,
      height: height,
      position: position,
      bearing: bearing,
      pitch: pitch,
      longitude: longitude,
      latitude: latitude,
      zoom: zoom
    }));
 
    _this._interactiveState = {
      startPanEventPosition: startPanEventPosition,
      startPanPosition: startPanPosition,
      startRotateCenter: startRotateCenter,
      startRotateViewport: startRotateViewport,
      startZoomPos: startZoomPos,
      startZoom: startZoom
    };
    return _this;
  }
 
  /* Public API */
 
  _createClass(FirstPersonState, [{
    key: 'getInteractiveState',
    value: function getInteractiveState() {
      return this._interactiveState;
    }
 
    /**
     * Start panning
     * @param {[Number, Number]} pos - position on screen where the pointer grabs
     */
 
  }, {
    key: 'panStart',
    value: function panStart(_ref2) {
      var pos = _ref2.pos;
      var _viewportProps = this._viewportProps,
          translationX = _viewportProps.translationX,
          translationY = _viewportProps.translationY;
 
 
      return this._getUpdatedState({
        startPanPosition: [translationX, translationY],
        startPanEventPosition: pos
      });
    }
 
    /**
     * Pan
     * @param {[Number, Number]} pos - position on screen where the pointer is
     */
 
  }, {
    key: 'pan',
    value: function pan(_ref3) {
      var pos = _ref3.pos,
          startPos = _ref3.startPos;
 
      var startPanEventPosition = this._interactiveState.startPanEventPosition || startPos;
      (0, _assert2.default)(startPanEventPosition, '`startPanEventPosition` props is required');
 
      var _ref4 = this._interactiveState.startPanPosition || [],
          _ref5 = _slicedToArray(_ref4, 2),
          translationX = _ref5[0],
          translationY = _ref5[1];
 
      translationX = ensureFinite(translationX, this._viewportProps.translationX);
      translationY = ensureFinite(translationY, this._viewportProps.translationY);
 
      var deltaX = pos[0] - startPanEventPosition[0];
      var deltaY = pos[1] - startPanEventPosition[1];
 
      return this._getUpdatedState({
        translationX: translationX + deltaX,
        translationY: translationY - deltaY
      });
    }
 
    /**
     * End panning
     * Must call if `panStart()` was called
     */
 
  }, {
    key: 'panEnd',
    value: function panEnd() {
      return this._getUpdatedState({
        startPanPosition: null,
        startPanPos: null
      });
    }
 
    /**
     * Start rotating
     * @param {[Number, Number]} pos - position on screen where the pointer grabs
     */
 
  }, {
    key: 'rotateStart',
    value: function rotateStart(_ref6) {
      var pos = _ref6.pos;
 
      return this._getUpdatedState({
        startRotateCenter: this._viewportProps.position,
        startRotateViewport: this._viewportProps
      });
    }
 
    /**
     * Rotate
     * @param {[Number, Number]} pos - position on screen where the pointer is
     */
 
  }, {
    key: 'rotate',
    value: function rotate(_ref7) {
      var deltaScaleX = _ref7.deltaScaleX,
          deltaScaleY = _ref7.deltaScaleY;
      var _viewportProps2 = this._viewportProps,
          bearing = _viewportProps2.bearing,
          pitch = _viewportProps2.pitch;
 
 
      return this._getUpdatedState({
        bearing: bearing + deltaScaleX * 10,
        pitch: pitch - deltaScaleY * 10
      });
    }
 
    /**
     * End rotating
     * Must call if `rotateStart()` was called
     */
 
  }, {
    key: 'rotateEnd',
    value: function rotateEnd() {
      return this._getUpdatedState({
        startRotateCenter: null,
        startRotateViewport: null
      });
    }
 
    /**
     * Start zooming
     * @param {[Number, Number]} pos - position on screen where the pointer grabs
     */
 
  }, {
    key: 'zoomStart',
    value: function zoomStart(_ref8) {
      var pos = _ref8.pos;
 
      return this._getUpdatedState({
        startZoomPos: pos,
        startZoom: this._viewportProps.zoom
      });
    }
 
    /**
     * Zoom
     * @param {[Number, Number]} pos - position on screen where the current center is
     * @param {[Number, Number]} startPos - the center position at
     *   the start of the operation. Must be supplied of `zoomStart()` was not called
     * @param {Number} scale - a number between [0, 1] specifying the accumulated
     *   relative scale.
     */
 
  }, {
    key: 'zoom',
    value: function zoom(_ref9) {
      var pos = _ref9.pos,
          startPos = _ref9.startPos,
          scale = _ref9.scale;
      var _viewportProps3 = this._viewportProps,
          zoom = _viewportProps3.zoom,
          minZoom = _viewportProps3.minZoom,
          maxZoom = _viewportProps3.maxZoom,
          width = _viewportProps3.width,
          height = _viewportProps3.height,
          translationX = _viewportProps3.translationX,
          translationY = _viewportProps3.translationY;
 
 
      var startZoomPos = this._interactiveState.startZoomPos || startPos || pos;
 
      var newZoom = clamp(zoom * scale, minZoom, maxZoom);
      var deltaX = pos[0] - startZoomPos[0];
      var deltaY = pos[1] - startZoomPos[1];
 
      // Zoom around the center position
      var cx = startZoomPos[0] - width / 2;
      var cy = height / 2 - startZoomPos[1];
      /* eslint-disable no-unused-vars */
      var newTranslationX = cx - (cx - translationX) * newZoom / zoom + deltaX;
      var newTranslationY = cy - (cy - translationY) * newZoom / zoom - deltaY;
      /* eslint-enable no-unused-vars */
 
      // return this._getUpdatedState({
      //   position
      //   translationX: newTranslationX,
      //   translationY: newTranslationY
      // });
 
      // TODO HACK
      return newZoom / zoom < 1 ? this.moveBackward() : this.moveForward();
    }
 
    /**
     * End zooming
     * Must call if `zoomStart()` was called
     */
 
  }, {
    key: 'zoomEnd',
    value: function zoomEnd() {
      return this._getUpdatedState({
        startZoomPos: null,
        startZoom: null
      });
    }
  }, {
    key: 'moveLeft',
    value: function moveLeft() {
      var bearing = this._viewportProps.bearing;
 
      var newBearing = bearing - ROTATION_STEP_DEGREES;
      return this._getUpdatedState({
        bearing: newBearing
      });
    }
  }, {
    key: 'moveRight',
    value: function moveRight() {
      var bearing = this._viewportProps.bearing;
 
      var newBearing = bearing + ROTATION_STEP_DEGREES;
      return this._getUpdatedState({
        bearing: newBearing
      });
    }
  }, {
    key: 'moveForward',
    value: function moveForward() {
      var position = this._viewportProps.position;
 
      var direction = this.getDirection();
      var delta = new _math.Vector3(direction).normalize().scale(MOVEMENT_SPEED);
      return this._getUpdatedState({
        position: new _math.Vector3(position).add(delta)
      });
    }
  }, {
    key: 'moveBackward',
    value: function moveBackward() {
      var position = this._viewportProps.position;
 
      var direction = this.getDirection();
      var delta = new _math.Vector3(direction).normalize().scale(-MOVEMENT_SPEED);
      return this._getUpdatedState({
        position: new _math.Vector3(position).add(delta)
      });
    }
  }, {
    key: 'moveUp',
    value: function moveUp() {
      var position = this._viewportProps.position;
 
      var delta = [0, 0, 1];
      return this._getUpdatedState({
        position: new _math.Vector3(position).add(delta)
      });
    }
  }, {
    key: 'moveDown',
    value: function moveDown() {
      var position = this._viewportProps.position;
 
      var delta = position[2] >= 1 ? [0, 0, -1] : [0, 0, 0];
      return this._getUpdatedState({
        position: new _math.Vector3(position).add(delta)
      });
    }
  }, {
    key: 'zoomIn',
    value: function zoomIn() {
      return this._getUpdatedState({
        zoom: this._viewportProps.zoom + 0.2
      });
    }
  }, {
    key: 'zoomOut',
    value: function zoomOut() {
      return this._getUpdatedState({
        zoom: this._viewportProps.zoom - 0.2
      });
    }
 
    /* Private methods */
 
  }, {
    key: '_getUpdatedState',
    value: function _getUpdatedState(newProps) {
      // Update _viewportProps
      return new FirstPersonState(Object.assign({}, this._viewportProps, this._interactiveState, newProps));
    }
  }]);
 
  return FirstPersonState;
}(_viewState2.default);
 
exports.default = FirstPersonState;
 
/***/ }),
/* 334 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
// Copyright (c) 2015 - 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
 
exports.default = "float scale(float position) {\n  return project_scale(position);\n}\n\nvec2 scale(vec2 position) {\n  return project_scale(position);\n}\n\nvec3 scale(vec3 position) {\n  return project_scale(position);\n}\n\nvec4 scale(vec4 position) {\n  return project_scale(position);\n}\n\nvec2 preproject(vec2 position) {\n  return project_position(position);\n}\n\nvec3 preproject(vec3 position) {\n  return project_position(position);\n}\n\nvec4 preproject(vec4 position) {\n  return project_position(position);\n}\n\nvec4 project(vec4 position) {\n  return project_to_clipspace(position);\n}\n";
 
/***/ }),
/* 335 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
 
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
 
var _luma = __webpack_require__(12);
 
var _attributeTransitionModel = __webpack_require__(336);
 
var _attributeTransitionModel2 = _interopRequireDefault(_attributeTransitionModel);
 
var _log = __webpack_require__(17);
 
var _log2 = _interopRequireDefault(_log);
 
var _assert = __webpack_require__(1);
 
var _assert2 = _interopRequireDefault(_assert);
 
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
 
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
 
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
 
var TRANSITION_STATE = {
  NONE: 0,
  PENDING: 1,
  STARTED: 2,
  ENDED: 3
};
 
var noop = function noop() {};
 
var AttributeTransitionManager = function () {
  function AttributeTransitionManager(gl, _ref) {
    var id = _ref.id;
 
    _classCallCheck(this, AttributeTransitionManager);
 
    this.id = id;
    this.gl = gl;
 
    this.isSupported = _luma.TransformFeedback.isSupported(gl);
 
    this.attributeTransitions = {};
    this.needsRedraw = false;
    this.model = null;
 
    if (this.isSupported) {
      this.transformFeedback = new _luma.TransformFeedback(gl);
    } else {
      _log2.default.warn(0, 'WebGL2 not supported by this browser. Transition animation is disabled.');
    }
  }
 
  /* Public methods */
 
  // Called when attribute manager updates
  // Check the latest attributes for updates.
 
 
  _createClass(AttributeTransitionManager, [{
    key: 'update',
    value: function update(attributes) {
      var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
 
      this.opts = opts;
 
      if (!this.isSupported) {
        return;
      }
 
      var needsNewModel = false;
      var attributeTransitions = this.attributeTransitions;
 
      var changedTransitions = {};
 
      for (var attributeName in attributes) {
        var transition = this._updateAttribute(attributeName, attributes[attributeName]);
 
        if (transition) {
          if (!attributeTransitions[attributeName]) {
            // New animated attribute is added
            attributeTransitions[attributeName] = transition;
            needsNewModel = true;
          }
          changedTransitions[attributeName] = transition;
        }
      }
 
      for (var _attributeName in attributeTransitions) {
        var attribute = attributes[_attributeName];
 
        if (!attribute || !attribute.transition) {
          // Animated attribute has been removed
          delete attributeTransitions[_attributeName];
          needsNewModel = true;
        }
      }
 
      if (needsNewModel) {
        this._createModel();
      } else if (this.model) {
        this.model.setTransitions(changedTransitions);
      }
    }
 
    // Returns `true` if attribute is transition-enabled
 
  }, {
    key: 'hasAttribute',
    value: function hasAttribute(attributeName) {
      return attributeName in this.attributeTransitions;
    }
 
    // Get all the animated attributes
 
  }, {
    key: 'getAttributes',
    value: function getAttributes() {
      var animatedAttributes = {};
 
      for (var attributeName in this.attributeTransitions) {
        var transition = this.attributeTransitions[attributeName];
 
        if (transition.buffer) {
          animatedAttributes[attributeName] = transition.buffer;
        }
      }
 
      return animatedAttributes;
    }
 
    /* eslint-disable max-statements */
    // Called every render cycle, run transform feedback
    // Returns `true` if anything changes
 
  }, {
    key: 'setCurrentTime',
    value: function setCurrentTime(currentTime) {
      if (!this.model) {
        return false;
      }
 
      var uniforms = {};
      var buffers = {};
 
      var needsRedraw = this.needsRedraw;
      this.needsRedraw = false;
 
      for (var attributeName in this.attributeTransitions) {
        var transition = this.attributeTransitions[attributeName];
 
        buffers[transition.bufferIndex] = transition.buffer;
 
        var time = 1;
        if (transition.state === TRANSITION_STATE.PENDING) {
          transition.startTime = currentTime;
          transition.state = TRANSITION_STATE.STARTED;
          transition.onStart(transition);
        }
 
        if (transition.state === TRANSITION_STATE.STARTED) {
          time = (currentTime - transition.startTime) / transition.duration;
          if (time >= 1) {
            time = 1;
            transition.state = TRANSITION_STATE.ENDED;
            transition.onEnd(transition);
          }
          needsRedraw = true;
        }
 
        uniforms[transition.name + 'Time'] = transition.easing(time);
      }
 
      if (needsRedraw) {
        this._runTransformFeedback({ uniforms: uniforms, buffers: buffers });
      }
 
      return needsRedraw;
    }
    /* eslint-enable max-statements */
 
    /* Private methods */
 
    // Check an attributes for updates
    // Returns a transition object if a new transition is triggered.
 
  }, {
    key: '_updateAttribute',
    value: function _updateAttribute(attributeName, attribute) {
      var settings = this._getTransitionSettings(attribute);
 
      if (settings) {
        var hasChanged = void 0;
        var transition = this.attributeTransitions[attributeName];
        if (transition) {
          hasChanged = attribute.changed;
        } else {
          // New animated attributes have been added
          transition = { name: attributeName, attribute: attribute };
          hasChanged = true;
        }
 
        if (hasChanged) {
          this._triggerTransition(transition, settings);
          return transition;
        }
      }
 
      return null;
    }
 
    // Redraw the transform feedback
 
  }, {
    key: '_runTransformFeedback',
    value: function _runTransformFeedback(_ref2) {
      var uniforms = _ref2.uniforms,
          buffers = _ref2.buffers;
      var model = this.model,
          transformFeedback = this.transformFeedback;
 
 
      transformFeedback.bindBuffers(buffers, {});
 
      model.draw({
        uniforms: uniforms,
        transformFeedback: transformFeedback,
        parameters: _defineProperty({}, _luma.GL.RASTERIZER_DISCARD, true)
      });
    }
 
    // Create a model for the transform feedback
 
  }, {
    key: '_createModel',
    value: function _createModel() {
      if (this.model) {
        this.model.destroy();
      }
 
      this.model = new _attributeTransitionModel2.default(this.gl, {
        id: this.id,
        transitions: this.attributeTransitions
      });
    }
 
    // get current values of an attribute, clipped/padded to the size of the new buffer
 
  }, {
    key: '_getCurrentAttributeState',
    value: function _getCurrentAttributeState(transition) {
      var attribute = transition.attribute,
          buffer = transition.buffer;
      var value = attribute.value,
          type = attribute.type,
          size = attribute.size;
 
 
      if (buffer) {
        // If new buffer is bigger than old buffer, back fill with destination values
        var oldBufferData = new Float32Array(value);
        buffer.getData({ dstData: oldBufferData });
        // Hack/Xiaoji: WebGL2 throws error if TransformFeedback does not render to
        // a buffer of type Float32Array.
        // Therefore we need to read data as a Float32Array then re-cast to attribute type
        if (!(value instanceof Float32Array)) {
          oldBufferData = new value.constructor(oldBufferData);
        }
        return { size: size, type: type, value: oldBufferData };
      }
      return { size: size, type: type, value: value };
    }
 
    // Returns transition settings object if transition is enabled, otherwise `null`
 
  }, {
    key: '_getTransitionSettings',
    value: function _getTransitionSettings(attribute) {
      var opts = this.opts;
      var transition = attribute.transition,
          accessor = attribute.accessor;
 
 
      if (!transition) {
        return null;
      }
 
      return Array.isArray(accessor) ? accessor.map(function (a) {
        return opts[a];
      }).find(Boolean) : opts[accessor];
    }
 
    // Normalizes transition settings object, merge with default settings
 
  }, {
    key: '_normalizeTransitionSettings',
    value: function _normalizeTransitionSettings(settings) {
      // Shorthand: use duration instead of parameter object
      if (Number.isFinite(settings)) {
        settings = { duration: settings };
      }
 
      // Check if settings is valid
      (0, _assert2.default)(settings && settings.duration > 0);
 
      return {
        duration: settings.duration,
        easing: settings.easing || function (t) {
          return t;
        },
        onStart: settings.onStart || noop,
        onEnd: settings.onEnd || noop,
        onInterrupt: settings.onInterrupt || noop
      };
    }
 
    // Start a new transition using the current settings
    // Updates transition state and from/to buffer
 
  }, {
    key: '_triggerTransition',
    value: function _triggerTransition(transition, settings) {
      this.needsRedraw = true;
 
      var attribute = transition.attribute,
          buffer = transition.buffer;
      var value = attribute.value,
          size = attribute.size;
 
 
      var transitionSettings = this._normalizeTransitionSettings(settings);
 
      var needsNewBuffer = !buffer || transition.bufferSize < value.length;
 
      // Attribute descriptor to transition from
      // _getCurrentAttributeState must be called before the current buffer is deleted
      var fromState = this._getCurrentAttributeState(transition);
 
      // Attribute descriptor to transition to
      // Pre-converting to buffer to reuse in the case where no transition is needed
      var toState = new _luma.Buffer(this.gl, { size: size, data: value });
 
      if (needsNewBuffer) {
        if (buffer) {
          buffer.delete();
        }
 
        transition.buffer = new _luma.Buffer(this.gl, {
          size: size,
          instanced: attribute.instanced,
          // WebGL2 throws error if `value` is not cast to Float32Array:
          // `transformfeedback buffers : buffer or buffer range not large enough`
          data: new Float32Array(value.length),
          usage: _luma.GL.DYNAMIC_COPY
        });
        transition.bufferSize = value.length;
      }
 
      Object.assign(transition, transitionSettings);
      transition.fromState = fromState;
      transition.toState = toState;
 
      // Reset transition state
      if (transition.state === TRANSITION_STATE.STARTED) {
        transition.onInterrupt(transition);
      }
      transition.state = TRANSITION_STATE.PENDING;
    }
  }]);
 
  return AttributeTransitionManager;
}();
 
exports.default = AttributeTransitionManager;
 
/***/ }),
/* 336 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
 
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
 
var _luma = __webpack_require__(12);
 
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
 
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
 
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
 
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
 
var ATTRIBUTE_MAPPING = {
  1: 'float',
  2: 'vec2',
  3: 'vec3',
  4: 'vec4'
};
 
function getShaders(transitions) {
  // Build shaders
  var varyings = [];
  var attributeDeclarations = [];
  var uniformsDeclarations = [];
  var varyingDeclarations = [];
  var calculations = [];
 
  for (var attributeName in transitions) {
    var transition = transitions[attributeName];
    var attributeType = ATTRIBUTE_MAPPING[transition.attribute.size];
 
    if (attributeType) {
      transition.bufferIndex = varyings.length;
      varyings.push(attributeName);
 
      attributeDeclarations.push('attribute ' + attributeType + ' ' + attributeName + 'From;');
      attributeDeclarations.push('attribute ' + attributeType + ' ' + attributeName + 'To;');
      uniformsDeclarations.push('uniform float ' + attributeName + 'Time;');
      varyingDeclarations.push('varying ' + attributeType + ' ' + attributeName + ';');
      calculations.push(attributeName + ' = mix(' + attributeName + 'From, ' + attributeName + 'To,\n        ' + attributeName + 'Time);');
    }
  }
 
  var vs = '\n#define SHADER_NAME feedback-vertex-shader\n' + attributeDeclarations.join('\n') + '\n' + uniformsDeclarations.join('\n') + '\n' + varyingDeclarations.join('\n') + '\n\nvoid main(void) {\n  ' + calculations.join('\n') + '\n  gl_Position = vec4(0.0);\n}\n';
 
  var fs = '#define SHADER_NAME feedback-fragment-shader\n\n#ifdef GL_ES\nprecision highp float;\n#endif\n\n' + varyingDeclarations.join('\n') + '\n\nvoid main(void) {\n  gl_FragColor = vec4(0.0);\n}\n';
  return { vs: vs, fs: fs, varyings: varyings };
}
 
var AttributeTransitionModel = function (_Model) {
  _inherits(AttributeTransitionModel, _Model);
 
  function AttributeTransitionModel(gl, _ref) {
    var id = _ref.id,
        transitions = _ref.transitions;
 
    _classCallCheck(this, AttributeTransitionModel);
 
    var _this = _possibleConstructorReturn(this, (AttributeTransitionModel.__proto__ || Object.getPrototypeOf(AttributeTransitionModel)).call(this, gl, Object.assign({
      id: id,
      geometry: new _luma.Geometry({
        id: id,
        drawMode: _luma.GL.POINTS
      }),
      vertexCount: 0,
      isIndexed: true
    }, getShaders(transitions))));
 
    _this.setTransitions(transitions);
    return _this;
  }
 
  // Update attributes and vertex count
 
 
  _createClass(AttributeTransitionModel, [{
    key: 'setTransitions',
    value: function setTransitions(transitions) {
      for (var attributeName in transitions) {
        var _setAttributes;
 
        var _transitions$attribut = transitions[attributeName],
            fromState = _transitions$attribut.fromState,
            toState = _transitions$attribut.toState,
            attribute = _transitions$attribut.attribute;
 
 
        this.setAttributes((_setAttributes = {}, _defineProperty(_setAttributes, attributeName + 'From', fromState), _defineProperty(_setAttributes, attributeName + 'To', toState), _setAttributes));
 
        this.setVertexCount(attribute.value.length / attribute.size);
      }
    }
  }]);
 
  return AttributeTransitionModel;
}(_luma.Model);
 
exports.default = AttributeTransitionModel;
 
/***/ }),
/* 337 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
 
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
 
var _layer = __webpack_require__(123);
 
var _layer2 = _interopRequireDefault(_layer);
 
var _log = __webpack_require__(17);
 
var _log2 = _interopRequireDefault(_log);
 
var _flatten = __webpack_require__(126);
 
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
 
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
 
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
 
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // Copyright (c) 2015 - 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
 
 
var CompositeLayer = function (_Layer) {
  _inherits(CompositeLayer, _Layer);
 
  function CompositeLayer(props) {
    _classCallCheck(this, CompositeLayer);
 
    return _possibleConstructorReturn(this, (CompositeLayer.__proto__ || Object.getPrototypeOf(CompositeLayer)).call(this, props));
  }
 
  _createClass(CompositeLayer, [{
    key: 'getSubLayers',
    value: function getSubLayers() {
      return this.internalState.subLayers || [];
    }
 
    // initializeState is usually not needed for composite layers
    // Provide empty definition to disable check for missing definition
 
  }, {
    key: 'initializeState',
    value: function initializeState() {}
 
    // called to augment the info object that is bubbled up from a sublayer
    // override Layer.getPickingInfo() because decoding / setting uniform do
    // not apply to a composite layer.
    // @return null to cancel event
 
  }, {
    key: 'getPickingInfo',
    value: function getPickingInfo(_ref) {
      var info = _ref.info;
 
      return info;
    }
 
    // Implement to generate subLayers
 
  }, {
    key: 'renderLayers',
    value: function renderLayers() {
      return null;
    }
 
    // Returns sub layer props for a specific sublayer
 
  }, {
    key: 'getSubLayerProps',
    value: function getSubLayerProps(sublayerProps) {
      var _props = this.props,
          opacity = _props.opacity,
          pickable = _props.pickable,
          visible = _props.visible,
          parameters = _props.parameters,
          getPolygonOffset = _props.getPolygonOffset,
          highlightedObjectIndex = _props.highlightedObjectIndex,
          autoHighlight = _props.autoHighlight,
          highlightColor = _props.highlightColor,
          coordinateSystem = _props.coordinateSystem,
          coordinateOrigin = _props.coordinateOrigin,
          modelMatrix = _props.modelMatrix;
 
      var newProps = {
        opacity: opacity,
        pickable: pickable,
        visible: visible,
        parameters: parameters,
        getPolygonOffset: getPolygonOffset,
        highlightedObjectIndex: highlightedObjectIndex,
        autoHighlight: autoHighlight,
        highlightColor: highlightColor,
        coordinateSystem: coordinateSystem,
        coordinateOrigin: coordinateOrigin,
        modelMatrix: modelMatrix
      };
 
      if (sublayerProps) {
        Object.assign(newProps, sublayerProps, {
          id: this.props.id + '-' + sublayerProps.id,
          updateTriggers: Object.assign({
            all: this.props.updateTriggers.all
          }, sublayerProps.updateTriggers)
        });
      }
 
      return newProps;
    }
 
    // Called by layer manager to render subLayers
 
  }, {
    key: '_renderLayers',
    value: function _renderLayers() {
      var subLayers = this.internalState.subLayers;
 
      if (subLayers && !this.needsUpdate()) {
        _log2.default.log(3, 'Composite layer reused subLayers ' + this, this.internalState.subLayers);
      } else {
        subLayers = this.renderLayers();
        // Flatten the returned array, removing any null, undefined or false
        // this allows layers to render sublayers conditionally
        // (see CompositeLayer.renderLayers docs)
        subLayers = (0, _flatten.flatten)(subLayers, { filter: Boolean });
        this.internalState.subLayers = subLayers;
        _log2.default.log(2, 'Composite layer rendered new subLayers ' + this, subLayers);
      }
 
      // populate reference to parent layer (this layer)
      // NOTE: needs to be done even when reusing layers as the parent may have changed
      var _iteratorNormalCompletion = true;
      var _didIteratorError = false;
      var _iteratorError = undefined;
 
      try {
        for (var _iterator = subLayers[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
          var layer = _step.value;
 
          layer.parentLayer = this;
        }
      } catch (err) {
        _didIteratorError = true;
        _iteratorError = err;
      } finally {
        try {
          if (!_iteratorNormalCompletion && _iterator.return) {
            _iterator.return();
          }
        } finally {
          if (_didIteratorError) {
            throw _iteratorError;
          }
        }
      }
    }
  }, {
    key: 'isComposite',
    get: function get() {
      return true;
    }
  }]);
 
  return CompositeLayer;
}(_layer2.default);
 
exports.default = CompositeLayer;
 
 
CompositeLayer.layerName = 'CompositeLayer';
 
/***/ }),
/* 338 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
var _globals = __webpack_require__(350);
 
var _log = __webpack_require__(17);
 
var _log2 = _interopRequireDefault(_log);
 
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
 
// Version detection using babel plugin
// Fallback for tests and SSR since global variable is defined by Webpack.
/* global __VERSION__ */
// Copyright (c) 2015 - 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
 
var version =  true ? '5.1.3' : _globals.global.DECK_VERSION || 'untranspiled source';
 
var STARTUP_MESSAGE = 'set deck.log.priority=1 (or higher) to trace attribute updates';
 
if (_globals.global.deck && _globals.global.deck.VERSION !== version) {
  throw new Error('deck.gl - multiple versions detected: ' + _globals.global.deck.VERSION + ' vs ' + version);
}
 
if (!_globals.global.deck) {
  /* global console */
  /* eslint-disable no-console */
  console.log('deck.gl ' + version + ' - ' + STARTUP_MESSAGE);
 
  _globals.global.deck = _globals.global.deck || {
    VERSION: version,
    version: version,
    log: _log2.default
  };
}
 
// TODO - Hack, remove when luma.gl 4.1.0-alpha.5 is published
if (!console.table) {
  console.table = function () {};
}
 
// Make sure we register shader modules
__webpack_require__(190);
 
/***/ }),
/* 339 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.pickObject = pickObject;
exports.pickVisibleObjects = pickVisibleObjects;
exports.getClosestFromPickingBuffer = getClosestFromPickingBuffer;
 
var _drawLayers = __webpack_require__(183);
 
var _log = __webpack_require__(17);
 
var _log2 = _interopRequireDefault(_log);
 
var _assert = __webpack_require__(1);
 
var _assert2 = _interopRequireDefault(_assert);
 
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
 
var NO_PICKED_OBJECT = {
  pickedColor: null,
  pickedLayer: null,
  pickedObjectIndex: -1
};
 
/* eslint-disable max-depth, max-statements */
// Pick the closest object at the given (x,y) coordinate
// Copyright (c) 2015 - 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
 
function pickObject(gl, _ref) {
  var layers = _ref.layers,
      viewports = _ref.viewports,
      x = _ref.x,
      y = _ref.y,
      radius = _ref.radius,
      layerFilter = _ref.layerFilter,
      mode = _ref.mode,
      onViewportActive = _ref.onViewportActive,
      pickingFBO = _ref.pickingFBO,
      lastPickedInfo = _ref.lastPickedInfo,
      useDevicePixels = _ref.useDevicePixels;
 
  // Convert from canvas top-left to WebGL bottom-left coordinates
  // And compensate for pixelRatio
  var pixelRatio = (0, _drawLayers.getPixelRatio)({ useDevicePixels: useDevicePixels });
  var deviceX = Math.round(x * pixelRatio);
  var deviceY = Math.round(gl.canvas.height - y * pixelRatio);
  var deviceRadius = Math.round(radius * pixelRatio);
 
  var deviceRect = getPickingRect({
    deviceX: deviceX,
    deviceY: deviceY,
    deviceRadius: deviceRadius,
    deviceWidth: pickingFBO.width,
    deviceHeight: pickingFBO.height
  });
 
  var pickedColors = deviceRect && drawAndSamplePickingBuffer(gl, {
    layers: layers,
    viewports: viewports,
    onViewportActive: onViewportActive,
    useDevicePixels: useDevicePixels,
    pickingFBO: pickingFBO,
    deviceRect: deviceRect,
    layerFilter: layerFilter,
    redrawReason: mode
  });
 
  var pickInfo = pickedColors && getClosestFromPickingBuffer(gl, {
    pickedColors: pickedColors,
    layers: layers,
    deviceX: deviceX,
    deviceY: deviceY,
    deviceRadius: deviceRadius,
    deviceRect: deviceRect
  }) || NO_PICKED_OBJECT;
 
  return processPickInfo({
    pickInfo: pickInfo,
    lastPickedInfo: lastPickedInfo,
    mode: mode,
    layers: layers,
    viewports: viewports,
    x: x,
    y: y,
    deviceX: deviceX,
    deviceY: deviceY,
    pixelRatio: pixelRatio
  });
}
 
// Pick all objects within the given bounding box
function pickVisibleObjects(gl, _ref2) {
  var layers = _ref2.layers,
      viewports = _ref2.viewports,
      x = _ref2.x,
      y = _ref2.y,
      width = _ref2.width,
      height = _ref2.height,
      mode = _ref2.mode,
      layerFilter = _ref2.layerFilter,
      onViewportActive = _ref2.onViewportActive,
      pickingFBO = _ref2.pickingFBO,
      useDevicePixels = _ref2.useDevicePixels;
 
  // Convert from canvas top-left to WebGL bottom-left coordinates
  // And compensate for pixelRatio
  var pixelRatio = (0, _drawLayers.getPixelRatio)({ useDevicePixels: useDevicePixels });
 
  var deviceLeft = Math.round(x * pixelRatio);
  var deviceBottom = Math.round(gl.canvas.height - y * pixelRatio);
  var deviceRight = Math.round((x + width) * pixelRatio);
  var deviceTop = Math.round(gl.canvas.height - (y + height) * pixelRatio);
 
  var deviceRect = {
    x: deviceLeft,
    y: deviceTop,
    width: deviceRight - deviceLeft,
    height: deviceBottom - deviceTop
  };
 
  var pickedColors = drawAndSamplePickingBuffer(gl, {
    layers: layers,
    viewports: viewports,
    onViewportActive: onViewportActive,
    pickingFBO: pickingFBO,
    useDevicePixels: useDevicePixels,
    deviceRect: deviceRect,
    layerFilter: layerFilter,
    redrawReason: mode
  });
 
  var pickInfos = getUniquesFromPickingBuffer(gl, { pickedColors: pickedColors, layers: layers });
 
  // Only return unique infos, identified by info.object
  var uniqueInfos = new Map();
 
  pickInfos.forEach(function (pickInfo) {
    var info = {
      color: pickInfo.pickedColor,
      layer: null,
      index: pickInfo.pickedObjectIndex,
      picked: true,
      x: x,
      y: y,
      width: width,
      height: height,
      pixelRatio: pixelRatio
    };
 
    info = getLayerPickingInfo({ layer: pickInfo.pickedLayer, info: info, mode: mode });
    if (!uniqueInfos.has(info.object)) {
      uniqueInfos.set(info.object, info);
    }
  });
 
  return Array.from(uniqueInfos.values());
}
 
// HELPER METHODS
 
// returns pickedColor or null if no pickable layers found.
function drawAndSamplePickingBuffer(gl, _ref3) {
  var layers = _ref3.layers,
      viewports = _ref3.viewports,
      onViewportActive = _ref3.onViewportActive,
      useDevicePixels = _ref3.useDevicePixels,
      pickingFBO = _ref3.pickingFBO,
      deviceRect = _ref3.deviceRect,
      layerFilter = _ref3.layerFilter,
      redrawReason = _ref3.redrawReason;
 
  (0, _assert2.default)(deviceRect);
  (0, _assert2.default)(Number.isFinite(deviceRect.width) && deviceRect.width > 0, '`width` must be > 0');
  (0, _assert2.default)(Number.isFinite(deviceRect.height) && deviceRect.height > 0, '`height` must be > 0');
 
  var pickableLayers = layers.filter(function (layer) {
    return layer.isPickable();
  });
  if (pickableLayers.length < 1) {
    return null;
  }
 
  (0, _drawLayers.drawPickingBuffer)(gl, {
    layers: layers,
    viewports: viewports,
    onViewportActive: onViewportActive,
    useDevicePixels: useDevicePixels,
    pickingFBO: pickingFBO,
    deviceRect: deviceRect,
    layerFilter: layerFilter,
    redrawReason: redrawReason
  });
 
  // Read from an already rendered picking buffer
  // Returns an Uint8ClampedArray of picked pixels
  var x = deviceRect.x,
      y = deviceRect.y,
      width = deviceRect.width,
      height = deviceRect.height;
 
  var pickedColors = new Uint8Array(width * height * 4);
  pickingFBO.readPixels({ x: x, y: y, width: width, height: height, pixelArray: pickedColors });
  return pickedColors;
}
 
// Indentifies which viewport, if any corresponds to x and y
// Returns first viewport if no match
// TODO - need to determine which viewport we are in
// TODO - document concept of "primary viewport" that matches all coords?
// TODO - static method on Viewport class?
function getViewportFromCoordinates(_ref4) {
  var viewports = _ref4.viewports;
 
  var viewport = viewports[0];
  return viewport;
}
 
// Calculate a picking rect centered on deviceX and deviceY and clipped to device
// Returns null if pixel is outside of device
function getPickingRect(_ref5) {
  var deviceX = _ref5.deviceX,
      deviceY = _ref5.deviceY,
      deviceRadius = _ref5.deviceRadius,
      deviceWidth = _ref5.deviceWidth,
      deviceHeight = _ref5.deviceHeight;
 
  var valid = deviceX >= 0 && deviceY >= 0 && deviceX < deviceWidth && deviceY < deviceHeight;
 
  // x, y out of bounds.
  if (!valid) {
    return null;
  }
 
  // Create a box of size `radius * 2 + 1` centered at [deviceX, deviceY]
  var x = Math.max(0, deviceX - deviceRadius);
  var y = Math.max(0, deviceY - deviceRadius);
  var width = Math.min(deviceWidth, deviceX + deviceRadius) - x + 1;
  var height = Math.min(deviceHeight, deviceY + deviceRadius) - y + 1;
 
  return { x: x, y: y, width: width, height: height };
}
 
// TODO - break this monster function into 3+ parts
function processPickInfo(_ref6) {
  var pickInfo = _ref6.pickInfo,
      lastPickedInfo = _ref6.lastPickedInfo,
      mode = _ref6.mode,
      layers = _ref6.layers,
      viewports = _ref6.viewports,
      x = _ref6.x,
      y = _ref6.y,
      deviceX = _ref6.deviceX,
      deviceY = _ref6.deviceY,
      pixelRatio = _ref6.pixelRatio;
  var pickedColor = pickInfo.pickedColor,
      pickedLayer = pickInfo.pickedLayer,
      pickedObjectIndex = pickInfo.pickedObjectIndex;
 
 
  var affectedLayers = pickedLayer ? [pickedLayer] : [];
 
  if (mode === 'hover') {
    // only invoke onHover events if picked object has changed
    var lastPickedObjectIndex = lastPickedInfo.index;
    var lastPickedLayerId = lastPickedInfo.layerId;
    var pickedLayerId = pickedLayer && pickedLayer.props.id;
 
    // proceed only if picked object changed
    if (pickedLayerId !== lastPickedLayerId || pickedObjectIndex !== lastPickedObjectIndex) {
      if (pickedLayerId !== lastPickedLayerId) {
        // We cannot store a ref to lastPickedLayer in the context because
        // the state of an outdated layer is no longer valid
        // and the props may have changed
        var lastPickedLayer = layers.find(function (layer) {
          return layer.props.id === lastPickedLayerId;
        });
        if (lastPickedLayer) {
          // Let leave event fire before enter event
          affectedLayers.unshift(lastPickedLayer);
        }
      }
 
      // Update layer manager context
      lastPickedInfo.layerId = pickedLayerId;
      lastPickedInfo.index = pickedObjectIndex;
    }
  }
 
  var viewport = getViewportFromCoordinates({ viewports: viewports }); // TODO - add coords
 
  var baseInfo = {
    color: null,
    layer: null,
    index: -1,
    picked: false,
    x: x,
    y: y,
    pixel: [x, y],
    lngLat: viewport.unproject([x, y]),
    devicePixel: [deviceX, deviceY],
    pixelRatio: pixelRatio
  };
 
  // Use a Map to store all picking infos.
  // The following two forEach loops are the result of
  // https://github.com/uber/deck.gl/issues/443
  // Please be very careful when changing this pattern
  var infos = new Map();
 
  affectedLayers.forEach(function (layer) {
    var info = Object.assign({}, baseInfo);
 
    if (layer === pickedLayer) {
      info.color = pickedColor;
      info.index = pickedObjectIndex;
      info.picked = true;
    }
 
    info = getLayerPickingInfo({ layer: layer, info: info, mode: mode });
 
    // This guarantees that there will be only one copy of info for
    // one composite layer
    if (info) {
      infos.set(info.layer.id, info);
    }
 
    var pickingSelectedColor = layer.props.autoHighlight && pickedLayer === layer ? pickedColor : null;
 
    var pickingParameters = {
      pickingSelectedColor: pickingSelectedColor
    };
 
    var _iteratorNormalCompletion = true;
    var _didIteratorError = false;
    var _iteratorError = undefined;
 
    try {
      for (var _iterator = layer.getModels()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
        var model = _step.value;
 
        model.updateModuleSettings(pickingParameters);
      }
    } catch (err) {
      _didIteratorError = true;
      _iteratorError = err;
    } finally {
      try {
        if (!_iteratorNormalCompletion && _iterator.return) {
          _iterator.return();
        }
      } finally {
        if (_didIteratorError) {
          throw _iteratorError;
        }
      }
    }
  });
 
  var unhandledPickInfos = callLayerPickingCallbacks(infos, mode);
 
  return unhandledPickInfos;
}
 
// Per-layer event handlers (e.g. onClick, onHover) are provided by the
// user and out of deck.gl's control. It's very much possible that
// the user calls React lifecycle methods in these function, such as
// ReactComponent.setState(). React lifecycle methods sometimes induce
// a re-render and re-generation of props of deck.gl and its layers,
// which invalidates all layers currently passed to this very function.
 
// Therefore, per-layer event handlers must be invoked at the end
// of the picking operation. NO operation that relies on the states of current
// layers should be called after this code.
function callLayerPickingCallbacks(infos, mode) {
  var unhandledPickInfos = [];
 
  infos.forEach(function (info) {
    var handled = false;
    switch (mode) {
      case 'click':
        handled = info.layer.props.onClick(info);
        break;
      case 'hover':
        handled = info.layer.props.onHover(info);
        break;
      case 'query':
        break;
      default:
        throw new Error('unknown pick type');
    }
 
    if (!handled) {
      unhandledPickInfos.push(info);
    }
  });
 
  return unhandledPickInfos;
}
 
/**
 * Pick at a specified pixel with a tolerance radius
 * Returns the closest object to the pixel in shape `{pickedColor, pickedLayer, pickedObjectIndex}`
 */
function getClosestFromPickingBuffer(gl, _ref7) {
  var pickedColors = _ref7.pickedColors,
      layers = _ref7.layers,
      deviceX = _ref7.deviceX,
      deviceY = _ref7.deviceY,
      deviceRadius = _ref7.deviceRadius,
      deviceRect = _ref7.deviceRect;
 
  (0, _assert2.default)(pickedColors);
 
  // Traverse all pixels in picking results and find the one closest to the supplied
  // [deviceX, deviceY]
  var x = deviceRect.x,
      y = deviceRect.y,
      width = deviceRect.width,
      height = deviceRect.height;
 
  var minSquareDistanceToCenter = deviceRadius * deviceRadius;
  var closestPixelIndex = -1;
  var i = 0;
 
  for (var row = 0; row < height; row++) {
    var dy = row + y - deviceY;
    var dy2 = dy * dy;
 
    if (dy2 > minSquareDistanceToCenter) {
      // skip this row
      i += 4 * width;
    } else {
      for (var col = 0; col < width; col++) {
        // Decode picked layer from color
        var pickedLayerIndex = pickedColors[i + 3] - 1;
 
        if (pickedLayerIndex >= 0) {
          var dx = col + x - deviceX;
          var d2 = dx * dx + dy2;
 
          if (d2 <= minSquareDistanceToCenter) {
            minSquareDistanceToCenter = d2;
            closestPixelIndex = i;
          }
        }
        i += 4;
      }
    }
  }
 
  if (closestPixelIndex >= 0) {
    // Decode picked object index from color
    var _pickedLayerIndex = pickedColors[closestPixelIndex + 3] - 1;
    var pickedColor = pickedColors.slice(closestPixelIndex, closestPixelIndex + 4);
    var pickedLayer = layers[_pickedLayerIndex];
    if (pickedLayer) {
      var pickedObjectIndex = pickedLayer.decodePickingColor(pickedColor);
      return { pickedColor: pickedColor, pickedLayer: pickedLayer, pickedObjectIndex: pickedObjectIndex };
    }
    _log2.default.error('Picked non-existent layer. Is picking buffer corrupt?');
  }
 
  return NO_PICKED_OBJECT;
}
/* eslint-enable max-depth, max-statements */
 
/**
 * Examines a picking buffer for unique colors
 * Returns array of unique objects in shape `{x, y, pickedColor, pickedLayer, pickedObjectIndex}`
 */
function getUniquesFromPickingBuffer(gl, _ref8) {
  var pickedColors = _ref8.pickedColors,
      layers = _ref8.layers;
 
  var uniqueColors = new Map();
 
  // Traverse all pixels in picking results and get unique colors
  if (pickedColors) {
    for (var i = 0; i < pickedColors.length; i += 4) {
      // Decode picked layer from color
      var pickedLayerIndex = pickedColors[i + 3] - 1;
 
      if (pickedLayerIndex >= 0) {
        var pickedColor = pickedColors.slice(i, i + 4);
        var colorKey = pickedColor.join(',');
        // eslint-disable-next-line
        if (!uniqueColors.has(colorKey)) {
          var pickedLayer = layers[pickedLayerIndex];
          // eslint-disable-next-line
          if (pickedLayer) {
            uniqueColors.set(colorKey, {
              pickedColor: pickedColor,
              pickedLayer: pickedLayer,
              pickedObjectIndex: pickedLayer.decodePickingColor(pickedColor)
            });
          } else {
            _log2.default.error('Picked non-existent layer. Is picking buffer corrupt?');
          }
        }
      }
    }
  }
 
  return Array.from(uniqueColors.values());
}
 
// Walk up the layer composite chain to populate the info object
function getLayerPickingInfo(_ref9) {
  var layer = _ref9.layer,
      info = _ref9.info,
      mode = _ref9.mode;
 
  while (layer && info) {
    // For a composite layer, sourceLayer will point to the sublayer
    // where the event originates from.
    // It provides additional context for the composite layer's
    // getPickingInfo() method to populate the info object
    var sourceLayer = info.layer || layer;
    info.layer = layer;
    // layer.pickLayer() function requires a non-null ```layer.state```
    // object to funtion properly. So the layer refereced here
    // must be the "current" layer, not an "out-dated" / "invalidated" layer
    info = layer.pickLayer({ info: info, mode: mode, sourceLayer: sourceLayer });
    layer = layer.parentLayer;
  }
  return info;
}
 
/***/ }),
/* 340 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.EMPTY_ARRAY = undefined;
exports.createProps = createProps;
 
var _seerIntegration = __webpack_require__(124);
 
var _log = __webpack_require__(17);
 
var _log2 = _interopRequireDefault(_log);
 
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
 
var EMPTY_ARRAY = exports.EMPTY_ARRAY = Object.freeze([]);
 
// Create a property object
function createProps() {
  var propObjects = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
 
  var layer = this; // eslint-disable-line
 
  // Get default prop object (a prototype chain for now)
 
  var _getDefaultProps = getDefaultProps(layer.constructor),
      defaultProps = _getDefaultProps.defaultProps;
 
  // Create a new prop object with the default props as prototype
 
 
  var newProps = Object.create(defaultProps, {
    _layer: {
      enumerable: false,
      value: layer
    },
    _asyncProps: {
      enumerable: false,
      value: {}
    }
  });
 
  // "Copy" all sync props
  for (var i = 0; i < arguments.length; ++i) {
    Object.assign(newProps, arguments[i]);
  }
  newProps.data = newProps.data || EMPTY_ARRAY;
 
  // SEER: Apply any overrides from the seer debug extension if it is active
  (0, _seerIntegration.applyPropOverrides)(newProps);
 
  // Props must be immutable
  Object.freeze(newProps);
 
  return newProps;
}
 
// Helper methods
 
// Constructors have their super class constructors as prototypes
function getOwnProperty(object, prop) {
  return Object.prototype.hasOwnProperty.call(object, prop) && object[prop];
}
 
function getLayerName(layerClass) {
  var layerName = getOwnProperty(layerClass, 'layerName');
  if (!layerName) {
    _log2.default.once(0, layerClass.name + '.layerName not specified');
  }
  return layerName || layerClass.name;
}
 
// ALT 1: Layer Prop Object Implementation
 
// Create a new Prop object if needed
function getDefaultProps(layerClass) {
  var props = getOwnProperty(layerClass, '_props');
  if (props) {
    return props;
  }
 
  var parent = layerClass.prototype;
  if (!parent) {
    return {
      defaultProps: {}
    };
  }
 
  var parentClass = Object.getPrototypeOf(layerClass);
  var parentProps = parent && getDefaultProps(parentClass) || null;
 
  // Parse propTypes from Layer.defaultProps
  var defaultProps = getOwnProperty(layerClass, 'defaultProps') || {};
 
  // Create any necessary property descriptors and create the default prop object
  // Assign merged default props
  var myDefaultProps = Object.create(null);
  Object.assign(myDefaultProps, parentProps && parentProps.defaultProps, defaultProps);
 
  createPropDescriptors(myDefaultProps, layerClass);
 
  // Store the props
  layerClass._props = {
    defaultProps: myDefaultProps
  };
 
  return layerClass._props;
}
 
function createPropDescriptors(props, layerClass) {
  var descriptors = {};
 
  delete props.id;
  Object.assign(descriptors, {
    id: {
      configurable: false,
      writable: true,
      value: getLayerName(layerClass)
    }
  });
  Object.defineProperties(props, descriptors);
}
 
/***/ }),
/* 341 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
 
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); // Copyright (c) 2015 - 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
 
var _layerManager = __webpack_require__(184);
 
var _layerManager2 = _interopRequireDefault(_layerManager);
 
var _effectManager = __webpack_require__(181);
 
var _effectManager2 = _interopRequireDefault(_effectManager);
 
var _effect = __webpack_require__(122);
 
var _effect2 = _interopRequireDefault(_effect);
 
var _webMercatorViewport = __webpack_require__(86);
 
var _webMercatorViewport2 = _interopRequireDefault(_webMercatorViewport);
 
var _mjolnir = __webpack_require__(115);
 
var _luma = __webpack_require__(12);
 
var _propTypes = __webpack_require__(116);
 
var _propTypes2 = _interopRequireDefault(_propTypes);
 
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
 
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
 
/* global document */
 
function noop() {}
 
var propTypes = {
  id: _propTypes2.default.string,
  width: _propTypes2.default.number.isRequired,
  height: _propTypes2.default.number.isRequired,
  layers: _propTypes2.default.array, // Array can contain falsy values
  viewports: _propTypes2.default.array, // Array can contain falsy values
  effects: _propTypes2.default.arrayOf(_propTypes2.default.instanceOf(_effect2.default)),
  layerFilter: _propTypes2.default.func,
  glOptions: _propTypes2.default.object,
  gl: _propTypes2.default.object,
  pickingRadius: _propTypes2.default.number,
  onWebGLInitialized: _propTypes2.default.func,
  onBeforeRender: _propTypes2.default.func,
  onAfterRender: _propTypes2.default.func,
  onLayerClick: _propTypes2.default.func,
  onLayerHover: _propTypes2.default.func,
  useDevicePixels: _propTypes2.default.bool,
 
  // Debug settings
  debug: _propTypes2.default.bool,
  drawPickingColors: _propTypes2.default.bool
};
 
var defaultProps = {
  id: 'deckgl-overlay',
  pickingRadius: 0,
  layerFilter: null,
  glOptions: {},
  gl: null,
  layers: [],
  effects: [],
  onWebGLInitialized: noop,
  onBeforeRender: noop,
  onAfterRender: noop,
  onLayerClick: null,
  onLayerHover: null,
  useDevicePixels: true,
 
  debug: false,
  drawPickingColors: false
};
 
// TODO - should this class be joined with `LayerManager`?
 
var DeckGLJS = function () {
  function DeckGLJS(props) {
    var _this = this;
 
    _classCallCheck(this, DeckGLJS);
 
    props = Object.assign({}, defaultProps, props);
 
    this.state = {};
    this.needsRedraw = true;
    this.layerManager = null;
    this.effectManager = null;
    this.viewports = [];
 
    // Bind methods
    this._onRendererInitialized = this._onRendererInitialized.bind(this);
    this._onRenderFrame = this._onRenderFrame.bind(this);
 
    this.canvas = this._createCanvas(props);
 
    var _props = props,
        width = _props.width,
        height = _props.height,
        gl = _props.gl,
        glOptions = _props.glOptions,
        debug = _props.debug,
        //iclient
        isGeographicCoordinateSystem =_props.isGeographicCoordinateSystem,
        useDevicePixels = _props.useDevicePixels;
 
 
    this.animationLoop = new _luma.AnimationLoop({
      width: width,
      height: height,
      useDevicePixels: useDevicePixels,
      //iclient
      isGeographicCoordinateSystem : isGeographicCoordinateSystem,
      onCreateContext: function onCreateContext(opts) {
        return gl || (0, _luma.createGLContext)(Object.assign({}, glOptions, { canvas: _this.canvas, debug: debug }));
      },
      onInitialize: this._onRendererInitialized,
      onRender: this._onRenderFrame,
      onBeforeRender: props.onBeforeRender,
      onAfterRender: props.onAfterRender
    });
 
    this.animationLoop.start();
 
    this.setProps(props);
  }
 
  _createClass(DeckGLJS, [{
    key: 'setProps',
    value: function setProps(props) {
      props = Object.assign({}, this.props, props);
      this.props = props;
 
      if (!this.layerManager) {
        return;
      }
 
      var _props2 = props,
          layers = _props2.layers,
          pickingRadius = _props2.pickingRadius,
          onLayerClick = _props2.onLayerClick,
          onLayerHover = _props2.onLayerHover,
          useDevicePixels = _props2.useDevicePixels,
          drawPickingColors = _props2.drawPickingColors,
          layerFilter = _props2.layerFilter;
 
      // Update viewports (creating one if not supplied)
 
      var viewports = props.viewports || props.viewport;
      if (!viewports) {
        var _props3 = props,
            width = _props3.width,
            height = _props3.height,
            latitude = _props3.latitude,
            longitude = _props3.longitude,
            zoom = _props3.zoom,
            pitch = _props3.pitch,
            bearing = _props3.bearing;
        viewports = [new _webMercatorViewport2.default({ width: width, height: height, latitude: latitude, longitude: longitude, zoom: zoom, pitch: pitch, bearing: bearing ,isGeographicCoordinateSystem:props.isGeographicCoordinateSystem})];
      }
 
      // If more parameters need to be updated on layerManager add them to this method.
      this.layerManager.setParameters({
        layers: layers,
        viewports: viewports,
        useDevicePixels: useDevicePixels,
        drawPickingColors: drawPickingColors,
        layerFilter: layerFilter,
        pickingRadius: pickingRadius,
        onLayerClick: onLayerClick,
        onLayerHover: onLayerHover
      });
 
      // TODO - unify setParameters/setOptions/setProps etc naming.
      this.animationLoop.setViewParameters({ useDevicePixels: useDevicePixels });
    }
  }, {
    key: 'finalize',
    value: function finalize() {
      this.animationLoop.stop();
      this.animationLoop = null;
 
      if (this.layerManager) {
        this.layerManager.finalize();
        this.layerManager = null;
      }
    }
 
    // Public API
 
  }, {
    key: 'pickObject',
    value: function pickObject(_ref) {
      var x = _ref.x,
          y = _ref.y,
          _ref$radius = _ref.radius,
          radius = _ref$radius === undefined ? 0 : _ref$radius,
          _ref$layerIds = _ref.layerIds,
          layerIds = _ref$layerIds === undefined ? null : _ref$layerIds;
 
      var selectedInfos = this.layerManager.pickObject({ x: x, y: y, radius: radius, layerIds: layerIds, mode: 'query' });
      return selectedInfos.length ? selectedInfos[0] : null;
    }
  }, {
    key: 'pickObjects',
    value: function pickObjects(_ref2) {
      var x = _ref2.x,
          y = _ref2.y,
          _ref2$width = _ref2.width,
          width = _ref2$width === undefined ? 1 : _ref2$width,
          _ref2$height = _ref2.height,
          height = _ref2$height === undefined ? 1 : _ref2$height,
          _ref2$layerIds = _ref2.layerIds,
          layerIds = _ref2$layerIds === undefined ? null : _ref2$layerIds;
 
      return this.layerManager.pickObjects({ x: x, y: y, width: width, height: height, layerIds: layerIds });
    }
  }, {
    key: 'getViewports',
    value: function getViewports() {
      return this.layerManager ? this.layerManager.getViewports() : [];
    }
 
    // Private Methods
 
  }, {
    key: '_createCanvas',
    value: function _createCanvas(props) {
      if (props.canvas) {
        return props.canvas;
      }
 
      var id = props.id,
          width = props.width,
          height = props.height,
          style = props.style;
 
      var canvas = document.createElement('canvas');
      canvas.id = id;
      canvas.width = width;
      canvas.height = height;
      canvas.style = style;
 
      var parent = props.parent || document.body;
      parent.appendChild(canvas);
 
      return canvas;
    }
 
    // Callbacks
 
  }, {
    key: '_onRendererInitialized',
    value: function _onRendererInitialized(_ref3) {
      var gl = _ref3.gl,
          canvas = _ref3.canvas;
 
      (0, _luma.setParameters)(gl, {
        blend: true,
        blendFunc: [_luma.GL.SRC_ALPHA, _luma.GL.ONE_MINUS_SRC_ALPHA, _luma.GL.ONE, _luma.GL.ONE_MINUS_SRC_ALPHA],
        polygonOffsetFill: true,
        depthTest: true,
        depthFunc: _luma.GL.LEQUAL
      });
 
      this.props.onWebGLInitialized(gl);
 
      // Note: avoid React setState due GL animation loop / setState timing issue
      this.layerManager = new _layerManager2.default(gl, {
        eventManager: new _mjolnir.EventManager(canvas),
        isGeographicCoordinateSystem:_ref3.isGeographicCoordinateSystem
      });
 
      this.effectManager = new _effectManager2.default({ gl: gl, layerManager: this.layerManager });
 
      var _iteratorNormalCompletion = true;
      var _didIteratorError = false;
      var _iteratorError = undefined;
 
      try {
        for (var _iterator = this.props.effects[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
          var effect = _step.value;
 
          this.effectManager.addEffect(effect);
        }
      } catch (err) {
        _didIteratorError = true;
        _iteratorError = err;
      } finally {
        try {
          if (!_iteratorNormalCompletion && _iterator.return) {
            _iterator.return();
          }
        } finally {
          if (_didIteratorError) {
            throw _iteratorError;
          }
        }
      }
 
      this.setProps(this.props);
    }
  }, {
    key: '_onRenderFrame',
    value: function _onRenderFrame(_ref4) {
      var gl = _ref4.gl;
 
      var redrawReason = this.layerManager.needsRedraw({ clearRedrawFlags: true });
      if (!redrawReason) {
        return;
      }
 
      this.props.onBeforeRender({ gl: gl }); // TODO - should be called by AnimationLoop
      this.layerManager.drawLayers({
        pass: 'screen',
        redrawReason: redrawReason,
        // Helps debug layer picking, especially in framebuffer powered layers
        drawPickingColors: this.props.drawPickingColors
      });
      this.props.onAfterRender({ gl: gl }); // TODO - should be called by AnimationLoop
    }
  }]);
 
  return DeckGLJS;
}();
 
exports.default = DeckGLJS;
 
 
DeckGLJS.propTypes = propTypes;
DeckGLJS.defaultProps = defaultProps;
 
/***/ }),
/* 342 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
// Copyright (c) 2015 - 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
 
// lighting
 
exports.default = "#define NUM_OF_LIGHTS 2\n\n// TODO these should be using lighting_ prefix\nuniform vec3 lightsPosition[16];\nuniform vec2 lightsStrength[16];\nuniform float ambientRatio;\nuniform float diffuseRatio;\nuniform float specularRatio;\n\nfloat lighting_getLightWeight(vec3 position_worldspace_vec3, vec3 normals_worldspace) {\n  float lightWeight = 0.0;\n\n  vec3 normals_worldspace_vec3 = normals_worldspace.xyz;\n\n  vec3 camera_pos_worldspace = project_uCameraPosition;\n  vec3 view_direction = normalize(camera_pos_worldspace - position_worldspace_vec3);\n\n  for (int i = 0; i < NUM_OF_LIGHTS; i++) {\n    vec3 light_position_worldspace = project_position(lightsPosition[i]);\n    vec3 light_direction = normalize(light_position_worldspace - position_worldspace_vec3);\n\n    vec3 halfway_direction = normalize(light_direction + view_direction);\n    float lambertian = dot(light_direction, normals_worldspace_vec3);\n    float specular = 0.0;\n    if (lambertian > 0.0) {\n      float specular_angle = max(dot(normals_worldspace_vec3, halfway_direction), 0.0);\n      specular = pow(specular_angle, 32.0);\n    }\n    lambertian = max(lambertian, 0.0);\n    lightWeight += (ambientRatio + lambertian * diffuseRatio + specular * specularRatio) *\n      lightsStrength[i].x;\n\n  }\n\n  return lightWeight;\n}\n\n// DEPRECATED - Backwards compatibility\n\nfloat getLightWeight(vec3 position_worldspace_vec3, vec3 normals_worldspace) {\n  return lighting_getLightWeight(position_worldspace_vec3, normals_worldspace);\n}\n";
 
/***/ }),
/* 343 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
// Copyright (c) 2015 - 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
 
exports.default = "\nconst vec2 WORLD_SCALE_FP64 = vec2(81.4873275756836, 0.0000032873668232014097);\n\nuniform vec2 project64_uScale;\nuniform vec2 project_uViewProjectionMatrixFP64[16];\n\n// longitude: lnglat_fp64.xy; latitude: lnglat_fp64.zw\nvoid mercatorProject_fp64(vec4 lnglat_fp64, out vec2 out_val[2]) {\n\n#if defined(NVIDIA_FP64_WORKAROUND)\n  out_val[0] = sum_fp64(radians_fp64(lnglat_fp64.xy), PI_FP64 * ONE);\n#else\n  out_val[0] = sum_fp64(radians_fp64(lnglat_fp64.xy), PI_FP64);\n#endif\n  out_val[1] = sub_fp64(PI_FP64,\n    log_fp64(tan_fp64(sum_fp64(PI_4_FP64, radians_fp64(lnglat_fp64.zw) / 2.0))));\n  return;\n}\n\nvoid project_position_fp64(vec4 position_fp64, out vec2 out_val[2]) {\n  vec2 pos_fp64[2];\n  mercatorProject_fp64(position_fp64, pos_fp64);\n  vec2 x_fp64 = mul_fp64(pos_fp64[0], project64_uScale);\n  vec2 y_fp64 = mul_fp64(pos_fp64[1], project64_uScale);\n  out_val[0] = mul_fp64(x_fp64, WORLD_SCALE_FP64);\n  out_val[1] = mul_fp64(y_fp64, WORLD_SCALE_FP64);\n\n  return;\n}\n\nvec4 project_to_clipspace_fp64(vec2 vertex_pos_modelspace[4]) {\n  vec2 vertex_pos_clipspace[4];\n  mat4_vec4_mul_fp64(project_uViewProjectionMatrixFP64, vertex_pos_modelspace,\n    vertex_pos_clipspace);\n  return vec4(\n    vertex_pos_clipspace[0].x,\n    vertex_pos_clipspace[1].x,\n    vertex_pos_clipspace[2].x,\n    vertex_pos_clipspace[3].x\n    );\n}\n";
 
/***/ }),
/* 344 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
// Copyright (c) 2015 - 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
 
exports.default = "// EXTERNAL CONSTANTS: these must match JavaScript constants in \"src/core/lib/constants.js\"\nconst float COORDINATE_SYSTEM_IDENTITY = 0.;\nconst float COORDINATE_SYSTEM_LNG_LAT = 1.;\nconst float COORDINATE_SYSTEM_METER_OFFSETS = 2.;\nconst float COORDINATE_SYSTEM_LNGLAT_OFFSETS = 3.;\n\nuniform float project_uCoordinateSystem;\nuniform float project_uScale;\nuniform vec3 project_uPixelsPerMeter;\nuniform vec3 project_uPixelsPerDegree;\nuniform vec3 project_uPixelsPerUnit;\nuniform vec3 project_uPixelsPerUnit2;\nuniform vec4 project_uCenter;\nuniform mat4 project_uModelMatrix;\nuniform mat4 project_uViewProjectionMatrix;\nuniform vec2 project_uViewportSize;\nuniform float project_uDevicePixelRatio;\nuniform float project_uFocalDistance;\nuniform vec3 project_uCameraPosition;\n\nconst float TILE_SIZE = 512.0;\nconst float PI = 3.1415926536;\nconst float WORLD_SCALE = TILE_SIZE / (PI * 2.0);\n\n//\n// Scaling offsets - scales meters to \"pixels\"\n// Note the scalar version of project_scale is for scaling the z component only\n//\nfloat project_scale(float meters) {\n  return meters * project_uPixelsPerMeter.z;\n}\n\nvec2 project_scale(vec2 meters) {\n  return meters * project_uPixelsPerMeter.xy;\n}\n\nvec3 project_scale(vec3 meters) {\n  return meters * project_uPixelsPerMeter;\n}\n\nvec4 project_scale(vec4 meters) {\n  return vec4(meters.xyz * project_uPixelsPerMeter, meters.w);\n}\n\n//\n// Projecting normal - transform deltas from current coordinate system to\n// normals in the worldspace\n//\nvec3 project_normal(vec3 vector) {\n  if (project_uCoordinateSystem == COORDINATE_SYSTEM_LNG_LAT ||\n    project_uCoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSETS) {\n    return normalize(vector * project_uPixelsPerDegree);\n  }\n  return normalize(vector * project_uPixelsPerMeter);\n}\n\nvec4 project_offset_(vec4 offset) {\n  vec3 pixelsPerUnit = project_uPixelsPerUnit + project_uPixelsPerUnit2 * offset.y;\n  return vec4(offset.xyz * pixelsPerUnit, offset.w);\n}\n\n//\n// Projecting positions - non-linear projection: lnglats => unit tile [0-1, 0-1]\n//\nvec2 project_mercator_(vec2 lnglat) {\n  return vec2(\n    radians(lnglat.x) + PI,\n    PI - log(tan_fp32(PI * 0.25 + radians(lnglat.y) * 0.5))\n  );\n}\n\n//\n// Projects lnglats (or meter offsets, depending on mode) to pixels\n//\nvec4 project_position(vec4 position) {\n  // TODO - why not simply subtract center and fall through?\n  if (project_uCoordinateSystem == COORDINATE_SYSTEM_LNG_LAT) {\n    return project_uModelMatrix * vec4(\n      project_mercator_(position.xy) * WORLD_SCALE * project_uScale,\n      project_scale(position.z),\n      position.w\n    );\n  }\n\n  if (project_uCoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSETS) {\n    return project_offset_(position);\n  }\n\n  // METER_OFFSETS or IDENTITY\n  // Apply model matrix\n  vec4 position_modelspace = project_uModelMatrix * position;\n  return project_offset_(position_modelspace);\n}\n\nvec3 project_position(vec3 position) {\n  vec4 projected_position = project_position(vec4(position, 1.0));\n  return projected_position.xyz;\n}\n\nvec2 project_position(vec2 position) {\n  vec4 projected_position = project_position(vec4(position, 0.0, 1.0));\n  return projected_position.xy;\n}\n\n//\n// Projects from \"world\" coordinates to clip space.\n// Uses project_uViewProjectionMatrix\n//\nvec4 project_to_clipspace(vec4 position) {\n  if (project_uCoordinateSystem == COORDINATE_SYSTEM_METER_OFFSETS ||\n    project_uCoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSETS) {\n    // Needs to be divided with project_uPixelsPerMeter\n    position.w *= project_uPixelsPerMeter.z;\n  }\n  return project_uViewProjectionMatrix * position + project_uCenter;\n}\n\n// Returns a clip space offset that corresponds to a given number of **non-device** pixels\nvec4 project_pixel_to_clipspace(vec2 pixels) {\n  vec2 offset = pixels / project_uViewportSize * project_uDevicePixelRatio;\n  return vec4(offset * project_uFocalDistance, 0.0, 0.0);\n}\n";
 
/***/ }),
/* 345 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.getUniformsFromViewport = getUniformsFromViewport;
 
var _multiply = __webpack_require__(75);
 
var _multiply2 = _interopRequireDefault(_multiply);
 
var _transformMat = __webpack_require__(103);
 
var _transformMat2 = _interopRequireDefault(_transformMat);
 
var _log = __webpack_require__(17);
 
var _log2 = _interopRequireDefault(_log);
 
var _assert = __webpack_require__(1);
 
var _assert2 = _interopRequireDefault(_assert);
 
var _constants = __webpack_require__(70);
 
var _memoize = __webpack_require__(196);
 
var _memoize2 = _interopRequireDefault(_memoize);
 
var _viewportMercatorProject = __webpack_require__(79);
 
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
 
// To quickly set a vector to zero
var ZERO_VECTOR = [0, 0, 0, 0];
// 4x4 matrix that drops 4th component of vector
// Copyright (c) 2015 - 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
 
/* global window */
var VECTOR_TO_POINT_MATRIX = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0];
var IDENTITY_MATRIX = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];
var DEFAULT_PIXELS_PER_UNIT2 = [0, 0, 0];
var DEFAULT_COORDINATE_ORIGIN = [0, 0, 0];
 
var getMemoizedViewportUniforms = (0, _memoize2.default)(calculateViewportUniforms);
 
// The code that utilizes Matrix4 does the same calculation as their mat4 counterparts,
// has lower performance but provides error checking.
// Uncomment when debugging
function calculateMatrixAndOffset(_ref) {
  var viewport = _ref.viewport,
      coordinateSystem = _ref.coordinateSystem,
      coordinateOrigin = _ref.coordinateOrigin,
      coordinateZoom = _ref.coordinateZoom;
  var viewMatrixUncentered = viewport.viewMatrixUncentered;
  var viewMatrix = viewport.viewMatrix;
  var projectionMatrix = viewport.projectionMatrix;
  var viewProjectionMatrix = viewport.viewProjectionMatrix;
 
 
  var projectionCenter = void 0;
 
  switch (coordinateSystem) {
    case _constants.COORDINATE_SYSTEM.IDENTITY:
    case _constants.COORDINATE_SYSTEM.LNGLAT:
      projectionCenter = ZERO_VECTOR;
      break;
 
    // TODO: make lighting work for meter offset mode
    case _constants.COORDINATE_SYSTEM.LNGLAT_OFFSETS:
    case _constants.COORDINATE_SYSTEM.METER_OFFSETS:
      // Calculate transformed projectionCenter (using 64 bit precision JS)
      // This is the key to offset mode precision
      // (avoids doing this addition in 32 bit precision in GLSL)
      var positionPixels = (0, _viewportMercatorProject.lngLatToWorld)(coordinateOrigin, Math.pow(2, coordinateZoom));
      // projectionCenter = new Matrix4(viewProjectionMatrix)
      //   .transformVector([positionPixels[0], positionPixels[1], 0.0, 1.0]);
      projectionCenter = (0, _transformMat2.default)([], [positionPixels[0], positionPixels[1], 0.0, 1.0], viewProjectionMatrix);
 
      // Always apply uncentered projection matrix if available (shader adds center)
      viewMatrix = viewMatrixUncentered || viewMatrix;
 
      // Zero out 4th coordinate ("after" model matrix) - avoids further translations
      // viewMatrix = new Matrix4(viewMatrixUncentered || viewMatrix)
      //   .multiplyRight(VECTOR_TO_POINT_MATRIX);
      viewProjectionMatrix = (0, _multiply2.default)([], projectionMatrix, viewMatrix);
      viewProjectionMatrix = (0, _multiply2.default)([], viewProjectionMatrix, VECTOR_TO_POINT_MATRIX);
      break;
 
    default:
      throw new Error('Unknown projection mode');
  }
 
  return {
    viewMatrix: viewMatrix,
    viewProjectionMatrix: viewProjectionMatrix,
    projectionCenter: projectionCenter,
    cameraPos: viewport.cameraPosition
  };
}
 
/**
 * Returns uniforms for shaders based on current projection
 * includes: projection matrix suitable for shaders
 *
 * TODO - Ensure this works with any viewport, not just WebMercatorViewports
 *
 * @param {WebMercatorViewport} viewport -
 * @return {Float32Array} - 4x4 projection matrix that can be used in shaders
 */
function getUniformsFromViewport() {
  var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
      viewport = _ref2.viewport,
      _ref2$modelMatrix = _ref2.modelMatrix,
      modelMatrix = _ref2$modelMatrix === undefined ? null : _ref2$modelMatrix,
      _ref2$coordinateSyste = _ref2.coordinateSystem,
      coordinateSystem = _ref2$coordinateSyste === undefined ? _constants.COORDINATE_SYSTEM.LNGLAT : _ref2$coordinateSyste,
      _ref2$coordinateOrigi = _ref2.coordinateOrigin,
      coordinateOrigin = _ref2$coordinateOrigi === undefined ? DEFAULT_COORDINATE_ORIGIN : _ref2$coordinateOrigi,
      projectionMode = _ref2.projectionMode,
      positionOrigin = _ref2.positionOrigin;
 
  (0, _assert2.default)(viewport);
 
  if (projectionMode !== undefined) {
    _log2.default.removed('projectionMode', 'coordinateSystem');
  }
  if (positionOrigin !== undefined) {
    _log2.default.removed('positionOrigin', 'coordinateOrigin');
  }
 
  return Object.assign({
    project_uModelMatrix: modelMatrix || IDENTITY_MATRIX
  }, getMemoizedViewportUniforms({ viewport: viewport, coordinateSystem: coordinateSystem, coordinateOrigin: coordinateOrigin }));
}
 
function calculateViewportUniforms(_ref3) {
  var viewport = _ref3.viewport,
      coordinateSystem = _ref3.coordinateSystem,
      coordinateOrigin = _ref3.coordinateOrigin;
 
  var coordinateZoom = viewport.zoom;
 
  var _calculateMatrixAndOf = calculateMatrixAndOffset({
    coordinateSystem: coordinateSystem,
    coordinateOrigin: coordinateOrigin,
    coordinateZoom: coordinateZoom,
    viewport: viewport
  }),
      projectionCenter = _calculateMatrixAndOf.projectionCenter,
      viewProjectionMatrix = _calculateMatrixAndOf.viewProjectionMatrix,
      cameraPos = _calculateMatrixAndOf.cameraPos;
 
  (0, _assert2.default)(viewProjectionMatrix, 'Viewport missing modelViewProjectionMatrix');
 
  // Calculate projection pixels per unit
  var distanceScales = viewport.getDistanceScales();
 
  // TODO - does this depend on useDevicePixels?
  var devicePixelRatio = typeof window !== 'undefined' && window.devicePixelRatio || 1;
  var viewportSize = [viewport.width * devicePixelRatio, viewport.height * devicePixelRatio];
  var uniforms = {
    // Projection mode values
    project_uCoordinateSystem: coordinateSystem,
    project_uCenter: projectionCenter,
 
    // Screen size
    project_uViewportSize: viewportSize,
    project_uDevicePixelRatio: devicePixelRatio,
 
    // Distance at which screen pixels are projected
    project_uFocalDistance: viewport.focalDistance || 1,
    project_uPixelsPerMeter: distanceScales.pixelsPerMeter,
    project_uPixelsPerDegree: distanceScales.pixelsPerDegree,
    project_uPixelsPerUnit: distanceScales.pixelsPerMeter,
    project_uPixelsPerUnit2: DEFAULT_PIXELS_PER_UNIT2,
    project_uScale: viewport.scale, // This is the mercator scale (2 ** zoom)
 
    project_uViewProjectionMatrix: viewProjectionMatrix,
 
    // This is for lighting calculations
    project_uCameraPosition: cameraPos
  };
 
  if (coordinateSystem === _constants.COORDINATE_SYSTEM.METER_OFFSETS) {
    var distanceScalesAtOrigin = viewport.getDistanceScales(coordinateOrigin);
    uniforms.project_uPixelsPerUnit = distanceScalesAtOrigin.pixelsPerMeter;
    uniforms.project_uPixelsPerUnit2 = distanceScalesAtOrigin.pixelsPerMeter2;
  }
  if (coordinateSystem === _constants.COORDINATE_SYSTEM.LNGLAT_OFFSETS) {
    var _distanceScalesAtOrigin = viewport.getDistanceScales(coordinateOrigin);
    uniforms.project_uPixelsPerUnit = _distanceScalesAtOrigin.pixelsPerDegree;
    uniforms.project_uPixelsPerUnit2 = _distanceScalesAtOrigin.pixelsPerDegree2;
  }
 
  return uniforms;
}
 
/***/ }),
/* 346 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
 
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
 
var _transitionInterpolator = __webpack_require__(193);
 
var _transitionInterpolator2 = _interopRequireDefault(_transitionInterpolator);
 
var _transitionUtils = __webpack_require__(84);
 
var _viewportMercatorProject = __webpack_require__(79);
 
var _assert = __webpack_require__(1);
 
var _assert2 = _interopRequireDefault(_assert);
 
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
 
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
 
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
 
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
 
var VIEWPORT_TRANSITION_PROPS = ['longitude', 'latitude', 'zoom', 'bearing', 'pitch'];
var REQUIRED_PROPS = ['latitude', 'longitude', 'zoom', 'width', 'height'];
var LINEARLY_INTERPOLATED_PROPS = ['bearing', 'pitch'];
 
/**
 * This class adapts mapbox-gl-js Map#flyTo animation so it can be used in
 * react/redux architecture.
 * mapbox-gl-js flyTo : https://www.mapbox.com/mapbox-gl-js/api/#map#flyto.
 * It implements “Smooth and efficient zooming and panning.” algorithm by
 * "Jarke J. van Wijk and Wim A.A. Nuij"
 */
 
var ViewportFlyToInterpolator = function (_TransitionInterpolat) {
  _inherits(ViewportFlyToInterpolator, _TransitionInterpolat);
 
  function ViewportFlyToInterpolator() {
    _classCallCheck(this, ViewportFlyToInterpolator);
 
    var _this = _possibleConstructorReturn(this, (ViewportFlyToInterpolator.__proto__ || Object.getPrototypeOf(ViewportFlyToInterpolator)).call(this));
 
    _this.propNames = VIEWPORT_TRANSITION_PROPS;
    return _this;
  }
 
  _createClass(ViewportFlyToInterpolator, [{
    key: 'initializeProps',
    value: function initializeProps(startProps, endProps) {
      var startViewportProps = {};
      var endViewportProps = {};
 
      // Check minimum required props
      var _iteratorNormalCompletion = true;
      var _didIteratorError = false;
      var _iteratorError = undefined;
 
      try {
        for (var _iterator = REQUIRED_PROPS[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
          var key = _step.value;
 
          var startValue = startProps[key];
          var endValue = endProps[key];
          (0, _assert2.default)((0, _transitionUtils.isValid)(startValue) && (0, _transitionUtils.isValid)(endValue), key + ' must be supplied for transition');
          startViewportProps[key] = startValue;
          endViewportProps[key] = (0, _transitionUtils.getEndValueByShortestPath)(key, startValue, endValue);
        }
      } catch (err) {
        _didIteratorError = true;
        _iteratorError = err;
      } finally {
        try {
          if (!_iteratorNormalCompletion && _iterator.return) {
            _iterator.return();
          }
        } finally {
          if (_didIteratorError) {
            throw _iteratorError;
          }
        }
      }
 
      var _iteratorNormalCompletion2 = true;
      var _didIteratorError2 = false;
      var _iteratorError2 = undefined;
 
      try {
        for (var _iterator2 = LINEARLY_INTERPOLATED_PROPS[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
          var _key = _step2.value;
 
          var _startValue = startProps[_key] || 0;
          var _endValue = endProps[_key] || 0;
          startViewportProps[_key] = _startValue;
          endViewportProps[_key] = (0, _transitionUtils.getEndValueByShortestPath)(_key, _startValue, _endValue);
        }
      } catch (err) {
        _didIteratorError2 = true;
        _iteratorError2 = err;
      } finally {
        try {
          if (!_iteratorNormalCompletion2 && _iterator2.return) {
            _iterator2.return();
          }
        } finally {
          if (_didIteratorError2) {
            throw _iteratorError2;
          }
        }
      }
 
      return {
        start: startViewportProps,
        end: endViewportProps
      };
    }
  }, {
    key: 'interpolateProps',
    value: function interpolateProps(startProps, endProps, t) {
      var viewport = (0, _viewportMercatorProject.flyToViewport)(startProps, endProps, t);
 
      // Linearly interpolate 'bearing' and 'pitch' if exist.
      var _iteratorNormalCompletion3 = true;
      var _didIteratorError3 = false;
      var _iteratorError3 = undefined;
 
      try {
        for (var _iterator3 = LINEARLY_INTERPOLATED_PROPS[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {
          var key = _step3.value;
 
          viewport[key] = (0, _transitionUtils.lerp)(startProps[key], endProps[key], t);
        }
      } catch (err) {
        _didIteratorError3 = true;
        _iteratorError3 = err;
      } finally {
        try {
          if (!_iteratorNormalCompletion3 && _iterator3.return) {
            _iterator3.return();
          }
        } finally {
          if (_didIteratorError3) {
            throw _iteratorError3;
          }
        }
      }
 
      return viewport;
    }
  }]);
 
  return ViewportFlyToInterpolator;
}(_transitionInterpolator2.default);
 
exports.default = ViewportFlyToInterpolator;
 
/***/ }),
/* 347 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
 
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
 
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
 
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
 
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
 
// Copyright (c) 2015 - 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
 
// getValue takes an array of points returns a value to sort the bins on.
// by default it returns the number of points
// this is where to pass in a function to color the bins by
// avg/mean/max of specific value of the point
var defaultGetValue = function defaultGetValue(points) {
  return points.length;
};
 
var BinSorter = function () {
  function BinSorter() {
    var bins = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
    var getValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : defaultGetValue;
 
    _classCallCheck(this, BinSorter);
 
    this.sortedBins = this.getSortedBins(bins, getValue);
    this.maxCount = this.getMaxCount();
    this.binMap = this.getBinMap();
  }
 
  /**
   * Get an array of object with sorted values and index of bins
   * @param {Array} bins
   * @param {Function} getValue
   * @return {Array} array of values and index lookup
   */
 
 
  _createClass(BinSorter, [{
    key: "getSortedBins",
    value: function getSortedBins(bins, getValue) {
      return bins.reduce(function (accu, h, i) {
        var value = getValue(h.points);
 
        if (value !== null && value !== undefined) {
          // filter bins if value is null or undefined
          accu.push({
            i: Number.isFinite(h.index) ? h.index : i,
            value: value,
            counts: h.points.length
          });
        }
 
        return accu;
      }, []).sort(function (a, b) {
        return a.value - b.value;
      });
    }
 
    /**
     * Get range of values of all bins
     * @param {Number[]} range
     * @param {Number} range[0] - lower bound
     * @param {Number} range[1] - upper bound
     * @return {Array} array of new value range
     */
 
  }, {
    key: "getValueRange",
    value: function getValueRange(_ref) {
      var _ref2 = _slicedToArray(_ref, 2),
          lower = _ref2[0],
          upper = _ref2[1];
 
      var len = this.sortedBins.length;
      if (!len) {
        return [0, 0];
      }
      var lowerIdx = Math.ceil(lower / 100 * (len - 1));
      var upperIdx = Math.floor(upper / 100 * (len - 1));
 
      return [this.sortedBins[lowerIdx].value, this.sortedBins[upperIdx].value];
    }
 
    /**
     * Get ths max count of all bins
     * @return {Number | Boolean} max count
     */
 
  }, {
    key: "getMaxCount",
    value: function getMaxCount() {
      var maxCount = 0;
      this.sortedBins.forEach(function (x) {
        return maxCount = maxCount > x.counts ? maxCount : x.counts;
      });
      return maxCount;
    }
 
    /**
     * Get a mapping from cell/hexagon index to sorted bin
     * This is used to retrieve bin value for color calculation
     * @return {Object} bin index to sortedBins
     */
 
  }, {
    key: "getBinMap",
    value: function getBinMap() {
      return this.sortedBins.reduce(function (mapper, curr) {
        return Object.assign(mapper, _defineProperty({}, curr.i, curr));
      }, {});
    }
  }]);
 
  return BinSorter;
}();
 
exports.default = BinSorter;
 
/***/ }),
/* 348 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
// Copyright (c) 2015 - 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
 
var defaultColorRange = exports.defaultColorRange = [[255, 255, 178], [254, 217, 118], [254, 178, 76], [253, 141, 60], [240, 59, 32], [189, 0, 38]];
 
/***/ }),
/* 349 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
 
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
 
exports.get = get;
// Copyright (c) 2015 - 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
 
/**
 * Access properties of nested containers using dot-path notation
 * - Supports plain objects and arrays, as well as classes with `get` methods
 *   such as ES6 Maps, Immutable.js objects etc
 * - Returns undefined if any container is not valid, instead of throwing
 *
 * @param {Object} container - container that supports get
 * @param {String|*} compositeKey - key to access, can be '.'-separated string
 * @return {*} - value in the final key of the nested container
 */
function get(container, compositeKey) {
  // Split the key into subkeys
  var keyList = getKeys(compositeKey);
  // Recursively get the value of each key;
  var value = container;
  var _iteratorNormalCompletion = true;
  var _didIteratorError = false;
  var _iteratorError = undefined;
 
  try {
    for (var _iterator = keyList[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
      var key = _step.value;
 
      // If any intermediate subfield is not a container, return undefined
      if (!isObject(value)) {
        return undefined;
      }
      // Get the `getter` for this container
      var getter = getGetter(value);
      // Use the getter to get the value for the key
      value = getter(value, key);
    }
  } catch (err) {
    _didIteratorError = true;
    _iteratorError = err;
  } finally {
    try {
      if (!_iteratorNormalCompletion && _iterator.return) {
        _iterator.return();
      }
    } finally {
      if (_didIteratorError) {
        throw _iteratorError;
      }
    }
  }
 
  return value;
}
 
/**
 * Checks if argument is an indexable object (not a primitive value, nor null)
 * @param {*} value - JavaScript value to be tested
 * @return {Boolean} - true if argument is a JavaScript object
 */
function isObject(value) {
  return value !== null && (typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object';
}
 
// Default getter is container indexing
var squareBracketGetter = function squareBracketGetter(container, key) {
  return container[key];
};
var getMethodGetter = function getMethodGetter(obj, key) {
  return obj.get(key);
};
// Cache key to key arrays for speed
var keyMap = {};
 
// Looks for a `get` function on the prototype
// TODO - follow prototype chain?
// @private
// @return {Function} - get function: (container, key) => value
function getGetter(container) {
  // Check if container has a special get method
  var prototype = Object.getPrototypeOf(container);
  return prototype.get ? getMethodGetter : squareBracketGetter;
}
 
// Takes a string of '.' separated keys and returns an array of keys
// E.g. 'feature.geometry.type' => 'feature', 'geometry', 'type'
// @private
function getKeys(compositeKey) {
  if (typeof compositeKey === 'string') {
    // else assume string and split around dots
    var keyList = keyMap[compositeKey];
    if (!keyList) {
      keyList = compositeKey.split('.');
      keyMap[compositeKey] = keyList;
    }
    return keyList;
  }
  // Wrap in array if needed
  return Array.isArray(compositeKey) ? compositeKey : [compositeKey];
}
 
/***/ }),
/* 350 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
/* WEBPACK VAR INJECTION */(function(process, global) {
 
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
 
// Copyright (c) 2015 - 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
 
// Purpose: include this in your module to avoids adding dependencies on
// micro modules like 'global' and 'is-browser';
 
/* global process, window, global, document */
var isBrowser = (typeof process === 'undefined' ? 'undefined' : _typeof(process)) !== 'object' || String(process) !== '[object process]' || process.browser;
 
module.exports = {
  window: typeof window !== 'undefined' ? window : global,
  global: typeof global !== 'undefined' ? global : window,
  document: typeof document !== 'undefined' ? document : {},
  isBrowser: isBrowser
};
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(26), __webpack_require__(47)))
 
/***/ }),
/* 351 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.inheritsFrom = inheritsFrom;
// Check if one JavaScript class inherits from another
function inheritsFrom(Type, ParentType) {
  while (Type) {
    if (Type === ParentType) {
      return true;
    }
    Type = Object.getPrototypeOf(Type);
  }
  return false;
}
 
/***/ }),
/* 352 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
 
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
 
exports.linearScale = linearScale;
exports.quantizeScale = quantizeScale;
exports.getQuantizeScale = getQuantizeScale;
exports.getLinearScale = getLinearScale;
exports.clamp = clamp;
// Copyright (c) 2015 - 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
 
// Linear scale maps continuous domain to continuous range
function linearScale(domain, range, value) {
  return (value - domain[0]) / (domain[1] - domain[0]) * (range[1] - range[0]) + range[0];
}
 
// Quantize scale is similar to linear scales,
// except it uses a discrete rather than continuous range
function quantizeScale(domain, range, value) {
  var step = (domain[1] - domain[0]) / range.length;
  var idx = Math.floor((value - domain[0]) / step);
  var clampIdx = Math.max(Math.min(idx, range.length - 1), 0);
 
  return range[clampIdx];
}
 
// return a quantize scale function
function getQuantizeScale(domain, range) {
  return function (value) {
    var step = (domain[1] - domain[0]) / range.length;
    var idx = Math.floor((value - domain[0]) / step);
    var clampIdx = Math.max(Math.min(idx, range.length - 1), 0);
 
    return range[clampIdx];
  };
}
 
// return a linear scale funciton
function getLinearScale(domain, range) {
  return function (value) {
    return (value - domain[0]) / (domain[1] - domain[0]) * (range[1] - range[0]) + range[0];
  };
}
 
function clamp(_ref, value) {
  var _ref2 = _slicedToArray(_ref, 2),
      min = _ref2[0],
      max = _ref2[1];
 
  return Math.min(max, Math.max(min, value));
}
 
/***/ }),
/* 353 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
 
var _viewport = __webpack_require__(42);
 
var _viewport2 = _interopRequireDefault(_viewport);
 
var _math = __webpack_require__(16);
 
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
 
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
 
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
 
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // Copyright (c) 2015 - 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
 
var SphericalCoordinates = _math.experimental.SphericalCoordinates;
 
 
function getDirectionFromBearingAndPitch(_ref) {
  var bearing = _ref.bearing,
      pitch = _ref.pitch;
 
  var spherical = new SphericalCoordinates({ bearing: bearing, pitch: pitch });
  var direction = spherical.toVector3().normalize();
  return direction;
}
 
var FirstPersonViewport = function (_Viewport) {
  _inherits(FirstPersonViewport, _Viewport);
 
  function FirstPersonViewport() {
    var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
 
    _classCallCheck(this, FirstPersonViewport);
 
    // TODO - push direction handling into Matrix4.lookAt
    var _opts$modelMatrix = opts.modelMatrix,
        modelMatrix = _opts$modelMatrix === undefined ? null : _opts$modelMatrix,
        bearing = opts.bearing,
        _opts$up = opts.up,
        up = _opts$up === undefined ? [0, 0, 1] : _opts$up;
 
    // Always calculate direction from bearing and pitch
 
    var dir = getDirectionFromBearingAndPitch({
      bearing: bearing,
      pitch: 89
    });
 
    // Direction is relative to model coordinates, of course
    var center = modelMatrix ? modelMatrix.transformDirection(dir) : dir;
 
    // Just the direction. All the positioning is done in viewport.js
    var viewMatrix = new _math.Matrix4().lookAt({ eye: [0, 0, 0], center: center, up: up });
 
    return _possibleConstructorReturn(this, (FirstPersonViewport.__proto__ || Object.getPrototypeOf(FirstPersonViewport)).call(this, Object.assign({}, opts, {
      zoom: null, // triggers meter level zoom
      viewMatrix: viewMatrix
    })));
  }
 
  return FirstPersonViewport;
}(_viewport2.default);
 
exports.default = FirstPersonViewport;
 
 
FirstPersonViewport.displayName = 'FirstPersonViewport';
 
/***/ }),
/* 354 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
 
var _viewport = __webpack_require__(42);
 
var _viewport2 = _interopRequireDefault(_viewport);
 
var _lookAt = __webpack_require__(102);
 
var _lookAt2 = _interopRequireDefault(_lookAt);
 
var _ortho = __webpack_require__(234);
 
var _ortho2 = _interopRequireDefault(_ortho);
 
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
 
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
 
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
 
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // Copyright (c) 2015 - 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
 
var OrthographicViewport = function (_Viewport) {
  _inherits(OrthographicViewport, _Viewport);
 
  function OrthographicViewport(_ref) {
    var width = _ref.width,
        height = _ref.height,
        _ref$eye = _ref.eye,
        eye = _ref$eye === undefined ? [0, 0, 1] : _ref$eye,
        _ref$lookAt = _ref.lookAt,
        lookAt = _ref$lookAt === undefined ? [0, 0, 0] : _ref$lookAt,
        _ref$up = _ref.up,
        up = _ref$up === undefined ? [0, 1, 0] : _ref$up,
        _ref$near = _ref.near,
        near = _ref$near === undefined ? 1 : _ref$near,
        _ref$far = _ref.far,
        far = _ref$far === undefined ? 100 : _ref$far,
        left = _ref.left,
        top = _ref.top,
        _ref$right = _ref.right,
        right = _ref$right === undefined ? null : _ref$right,
        _ref$bottom = _ref.bottom,
        bottom = _ref$bottom === undefined ? null : _ref$bottom;
 
    _classCallCheck(this, OrthographicViewport);
 
    right = Number.isFinite(right) ? right : left + width;
    bottom = Number.isFinite(bottom) ? bottom : top + height;
    return _possibleConstructorReturn(this, (OrthographicViewport.__proto__ || Object.getPrototypeOf(OrthographicViewport)).call(this, {
      viewMatrix: (0, _lookAt2.default)([], eye, lookAt, up),
      projectionMatrix: (0, _ortho2.default)([], left, right, bottom, top, near, far),
      width: width,
      height: height
    }));
  }
 
  return OrthographicViewport;
}(_viewport2.default);
 
exports.default = OrthographicViewport;
 
/***/ }),
/* 355 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
 
var _viewport = __webpack_require__(42);
 
var _viewport2 = _interopRequireDefault(_viewport);
 
var _lookAt = __webpack_require__(102);
 
var _lookAt2 = _interopRequireDefault(_lookAt);
 
var _perspective = __webpack_require__(76);
 
var _perspective2 = _interopRequireDefault(_perspective);
 
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
 
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
 
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
 
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // Copyright (c) 2015 - 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
 
var DEGREES_TO_RADIANS = Math.PI / 180;
 
var PerspectiveViewport = function (_Viewport) {
  _inherits(PerspectiveViewport, _Viewport);
 
  function PerspectiveViewport(_ref) {
    var width = _ref.width,
        height = _ref.height,
        eye = _ref.eye,
        _ref$lookAt = _ref.lookAt,
        lookAt = _ref$lookAt === undefined ? [0, 0, 0] : _ref$lookAt,
        _ref$up = _ref.up,
        up = _ref$up === undefined ? [0, 1, 0] : _ref$up,
        _ref$fovy = _ref.fovy,
        fovy = _ref$fovy === undefined ? 75 : _ref$fovy,
        _ref$near = _ref.near,
        near = _ref$near === undefined ? 1 : _ref$near,
        _ref$far = _ref.far,
        far = _ref$far === undefined ? 100 : _ref$far,
        _ref$aspect = _ref.aspect,
        aspect = _ref$aspect === undefined ? null : _ref$aspect;
 
    _classCallCheck(this, PerspectiveViewport);
 
    var fovyRadians = fovy * DEGREES_TO_RADIANS;
    aspect = Number.isFinite(aspect) ? aspect : width / height;
    return _possibleConstructorReturn(this, (PerspectiveViewport.__proto__ || Object.getPrototypeOf(PerspectiveViewport)).call(this, {
      viewMatrix: (0, _lookAt2.default)([], eye, lookAt, up),
      projectionMatrix: (0, _perspective2.default)([], fovyRadians, aspect, near, far),
      width: width,
      height: height
    }));
  }
 
  return PerspectiveViewport;
}(_viewport2.default);
 
exports.default = PerspectiveViewport;
 
/***/ }),
/* 356 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
 
var _viewport = __webpack_require__(42);
 
var _viewport2 = _interopRequireDefault(_viewport);
 
var _math = __webpack_require__(16);
 
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
 
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
 
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
 
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // Copyright (c) 2015 - 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
 
var SphericalCoordinates = _math.experimental.SphericalCoordinates;
 
 
function getDirectionFromBearingAndPitch(_ref) {
  var bearing = _ref.bearing,
      pitch = _ref.pitch;
 
  var spherical = new SphericalCoordinates({ bearing: bearing, pitch: pitch });
  return spherical.toVector3().normalize();
}
 
var ThirdPersonViewport = function (_Viewport) {
  _inherits(ThirdPersonViewport, _Viewport);
 
  function ThirdPersonViewport(opts) {
    _classCallCheck(this, ThirdPersonViewport);
 
    var bearing = opts.bearing,
        pitch = opts.pitch,
        position = opts.position,
        up = opts.up,
        zoom = opts.zoom;
 
 
    var direction = getDirectionFromBearingAndPitch({
      bearing: bearing,
      pitch: pitch
    });
 
    var distance = zoom * 50;
 
    // TODO somehow need to flip z to make it work
    // check if the position offset is done in the base viewport
    var eye = direction.scale(-distance).multiply(new _math.Vector3(1, 1, -1));
 
    var viewMatrix = new _math.Matrix4().multiplyRight(new _math.Matrix4().lookAt({ eye: eye, center: position, up: up }));
 
    return _possibleConstructorReturn(this, (ThirdPersonViewport.__proto__ || Object.getPrototypeOf(ThirdPersonViewport)).call(this, Object.assign({}, opts, {
      // use meter level
      zoom: null,
      viewMatrix: viewMatrix
    })));
  }
 
  return ThirdPersonViewport;
}(_viewport2.default);
 
exports.default = ThirdPersonViewport;
 
 
ThirdPersonViewport.displayName = 'ThirdPersonViewport';
 
/***/ }),
/* 357 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
// Copyright (c) 2015 - 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
 
exports.default = "#define SHADER_NAME reflection-effect-fs\n\n#ifdef GL_ES\nprecision highp float;\n#endif\n\nuniform sampler2D reflectionTexture;\nuniform int reflectionTextureWidth;\nuniform int reflectionTextureHeight;\n\nuniform float reflectivity;\nuniform float blur;\n\n\nvarying vec2 uv;\n\n#define KERNEL_SIZE 7\n\n/*\n * Samples from tex with a gaussian-shaped patch, centered at uv and\n * with standard deviation sigma.  The size of the texture in\n * pixels must be specified by dim\n */\nvec4 sample_gaussian(sampler2D tex, vec2 dim, vec2 uv, float sigma) {\n  if (sigma == 0.0) {\n    return texture2D(tex, uv);\n  }\n\n  vec2 delta = 1.0 / dim;\n  vec2 top_left = uv - delta * float(KERNEL_SIZE+1) / 2.0;\n\n  vec4 color = vec4(0);\n  float sum = 0.0;\n  for (int i = 0; i <  KERNEL_SIZE; ++i) {\n    for (int j = 0; j < KERNEL_SIZE; ++j) {\n      vec2 uv2 = top_left + vec2(i, j) * delta;\n      float d = length((uv2 - uv) * dim);\n      float f = exp(-(d*d) / (2.0*sigma * sigma));\n      color += f * texture2D(tex, uv2);\n      sum += f;\n    }\n  }\n  return color / sum;\n}\n\nvoid main(void) {\n  //map blur in [0, 1] to sigma in [0, inf]\n  //alpha will determine the \"steepness\" of our curve.\n  //this was picked just to make the scale feel \"natural\"\n  //if our image is 1000 pixels wide, a blur of 0.5 should correspond\n  //to a sigma of 1 pixels\n  float alpha = 1000.0;\n  float sigma = blur / (alpha * (1.0 - blur));\n  //let this be our standard deviation in terms of screen-widths.\n  //rewrite this in terms of pixels.\n  sigma *= float(reflectionTextureWidth);\n\n\n  gl_FragColor = sample_gaussian(reflectionTexture, vec2(reflectionTextureWidth,\n    reflectionTextureHeight), vec2(uv.x, 1. - uv.y), sigma);\n  //because our canvas expects alphas to be pre-multiplied, we multiply by whole\n  //color vector by reflectivity, not just the alpha channel\n  gl_FragColor *= reflectivity;\n}\n";
 
/***/ }),
/* 358 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
// Copyright (c) 2015 - 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
 
exports.default = "#define SHADER_NAME reflection-effect-vs\n\nattribute vec3 vertices;\n\nvarying vec2 uv;\n\nvoid main(void) {\n  uv = vertices.xy;\n  gl_Position = vec4(2. * vertices.xy - vec2(1., 1.), 1., 1.);\n}\n";
 
/***/ }),
/* 359 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
 
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
 
var _luma = __webpack_require__(12);
 
var _effect = __webpack_require__(122);
 
var _effect2 = _interopRequireDefault(_effect);
 
var _webMercatorViewport = __webpack_require__(86);
 
var _webMercatorViewport2 = _interopRequireDefault(_webMercatorViewport);
 
var _reflectionEffectVertex = __webpack_require__(358);
 
var _reflectionEffectVertex2 = _interopRequireDefault(_reflectionEffectVertex);
 
var _reflectionEffectFragment = __webpack_require__(357);
 
var _reflectionEffectFragment2 = _interopRequireDefault(_reflectionEffectFragment);
 
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
 
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
 
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
 
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // Copyright (c) 2015 - 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
 
/* global window */
 
 
var ReflectionEffect = function (_Effect) {
  _inherits(ReflectionEffect, _Effect);
 
  /**
   * @classdesc
   * ReflectionEffect
   *
   * @class
   * @param reflectivity How visible reflections should be over the map, between 0 and 1
   * @param blur how blurry the reflection should be, between 0 and 1
   */
 
  function ReflectionEffect() {
    var reflectivity = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0.5;
    var blur = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0.5;
 
    _classCallCheck(this, ReflectionEffect);
 
    var _this = _possibleConstructorReturn(this, (ReflectionEffect.__proto__ || Object.getPrototypeOf(ReflectionEffect)).call(this));
 
    _this.reflectivity = reflectivity;
    _this.blur = blur;
    _this.framebuffer = null;
    _this.setNeedsRedraw();
    return _this;
  }
 
  _createClass(ReflectionEffect, [{
    key: 'getShaders',
    value: function getShaders() {
      return {
        vs: _reflectionEffectVertex2.default,
        fs: _reflectionEffectFragment2.default,
        modules: [],
        shaderCache: this.context.shaderCache
      };
    }
  }, {
    key: 'initialize',
    value: function initialize(_ref) {
      var gl = _ref.gl,
          layerManager = _ref.layerManager;
 
      this.unitQuad = new _luma.Model(gl, Object.assign({}, this.getShaders(), {
        id: 'reflection-effect',
        geometry: new _luma.Geometry({
          drawMode: _luma.GL.TRIANGLE_FAN,
          vertices: new Float32Array([0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0])
        })
      }));
      this.framebuffer = new _luma.Framebuffer(gl, { depth: true });
    }
  }, {
    key: 'preDraw',
    value: function preDraw(_ref2) {
      var gl = _ref2.gl,
          layerManager = _ref2.layerManager;
      var viewport = layerManager.context.viewport;
      /*
       * the renderer already has a reference to this, but we don't have a reference to the renderer.
       * when we refactor the camera code, we should make sure we get a reference to the renderer so
       * that we can keep this in one place.
       */
 
      var dpi = typeof window !== 'undefined' && window.devicePixelRatio || 1;
      this.framebuffer.resize({ width: dpi * viewport.width, height: dpi * viewport.height });
      var pitch = viewport.pitch;
      this.framebuffer.bind();
      /* this is a huge hack around the existing viewport class.
       * TODO in the future, once we implement bona-fide cameras, we really need to fix this.
       */
      layerManager.setViewport(new _webMercatorViewport2.default(Object.assign({}, viewport, { pitch: -180 - pitch })));
      gl.clear(_luma.GL.COLOR_BUFFER_BIT | _luma.GL.DEPTH_BUFFER_BIT);
 
      layerManager.drawLayers({ pass: 'reflection' });
      layerManager.setViewport(viewport);
      this.framebuffer.unbind();
    }
  }, {
    key: 'draw',
    value: function draw(_ref3) {
      var gl = _ref3.gl,
          layerManager = _ref3.layerManager;
 
      /*
       * Render our unit quad.
       * This will cover the entire screen, but will lie behind all other geometry.
       * This quad will sample the previously generated reflection texture
       * in order to create the reflection effect
       */
      this.unitQuad.render({
        reflectionTexture: this.framebuffer.texture,
        reflectionTextureWidth: this.framebuffer.width,
        reflectionTextureHeight: this.framebuffer.height,
        reflectivity: this.reflectivity,
        blur: this.blur
      });
    }
  }, {
    key: 'finalize',
    value: function finalize(_ref4) {
      /* TODO: Free resources? */
 
      var gl = _ref4.gl,
          layerManager = _ref4.layerManager;
    }
  }]);
 
  return ReflectionEffect;
}(_effect2.default);
 
exports.default = ReflectionEffect;
 
/***/ }),
/* 360 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
 
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
 
var _react = __webpack_require__(117);
 
var _react2 = _interopRequireDefault(_react);
 
var _autobind = __webpack_require__(197);
 
var _autobind2 = _interopRequireDefault(_autobind);
 
var _inheritsFrom = __webpack_require__(351);
 
var _core = __webpack_require__(13);
 
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
 
function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
 
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
 
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
 
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // Copyright (c) 2015 - 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
 
var DeckGLJS = _core.experimental.DeckGLJS,
    log = _core.experimental.log;
 
var DeckGL = function (_React$Component) {
  _inherits(DeckGL, _React$Component);
 
  function DeckGL(props) {
    _classCallCheck(this, DeckGL);
 
    var _this = _possibleConstructorReturn(this, (DeckGL.__proto__ || Object.getPrototypeOf(DeckGL)).call(this, props));
 
    _this.state = {};
    _this.children = [];
    (0, _autobind2.default)(_this);
    return _this;
  }
 
  _createClass(DeckGL, [{
    key: 'componentDidMount',
    value: function componentDidMount() {
      this.deck = new DeckGLJS(Object.assign({}, this.props, { canvas: this.overlay }));
      this._updateFromProps(this.props);
    }
  }, {
    key: 'componentWillReceiveProps',
    value: function componentWillReceiveProps(nextProps) {
      this._updateFromProps(nextProps);
    }
  }, {
    key: 'componentWillUnmount',
    value: function componentWillUnmount() {
      this.deck.finalize();
    }
 
    // Public API
 
  }, {
    key: 'queryObject',
    value: function queryObject(opts) {
      log.deprecated('queryObject', 'pickObject');
      return this.deck.pickObject(opts);
    }
  }, {
    key: 'pickObject',
    value: function pickObject(_ref) {
      var x = _ref.x,
          y = _ref.y,
          _ref$radius = _ref.radius,
          radius = _ref$radius === undefined ? 0 : _ref$radius,
          _ref$layerIds = _ref.layerIds,
          layerIds = _ref$layerIds === undefined ? null : _ref$layerIds;
 
      return this.deck.pickObject({ x: x, y: y, radius: radius, layerIds: layerIds });
    }
  }, {
    key: 'queryVisibleObjects',
    value: function queryVisibleObjects(opts) {
      log.deprecated('queryVisibleObjects', 'pickObjects');
      return this.pickObjects(opts);
    }
  }, {
    key: 'pickObjects',
    value: function pickObjects(_ref2) {
      var x = _ref2.x,
          y = _ref2.y,
          _ref2$width = _ref2.width,
          width = _ref2$width === undefined ? 1 : _ref2$width,
          _ref2$height = _ref2.height,
          height = _ref2$height === undefined ? 1 : _ref2$height,
          _ref2$layerIds = _ref2.layerIds,
          layerIds = _ref2$layerIds === undefined ? null : _ref2$layerIds;
 
      return this.deck.pickObjects({ x: x, y: y, width: width, height: height, layerIds: layerIds });
    }
 
    // Private Helpers
 
    // Extract any JSX layers from the react children
    // Needs to be called both from initial mount, and when new props arrive
 
  }, {
    key: '_updateFromProps',
    value: function _updateFromProps(nextProps) {
      // extract any deck.gl layers masquerading as react elements from props.children
      var _extractJSXLayers2 = this._extractJSXLayers(nextProps.children),
          layers = _extractJSXLayers2.layers,
          children = _extractJSXLayers2.children;
 
      if (this.deck) {
        this.deck.setProps(Object.assign({}, nextProps, {
          // Avoid modifying layers array if no JSX layers were found
          layers: layers ? [].concat(_toConsumableArray(layers), _toConsumableArray(nextProps.layers)) : nextProps.layers
        }));
      }
 
      this.children = children;
    }
 
    // extracts any deck.gl layers masquerading as react elements from props.children
 
  }, {
    key: '_extractJSXLayers',
    value: function _extractJSXLayers(children) {
      var reactChildren = []; // extract real react elements (i.e. not deck.gl layers)
      var layers = null; // extracted layer from react children, will add to deck.gl layer array
 
      _react2.default.Children.forEach(children, function (reactElement) {
        if (reactElement) {
          // For some reason Children.forEach doesn't filter out `null`s
          var LayerType = reactElement.type;
          if ((0, _inheritsFrom.inheritsFrom)(LayerType, _core.Layer)) {
            var layer = new LayerType(reactElement.props);
            layers = layers || [];
            layers.push(layer);
          } else {
            reactChildren.push(reactElement);
          }
        }
      });
 
      return { layers: layers, children: reactChildren };
    }
 
    // Iterate over viewport descriptors and render children associate with viewports
    // at the specified positions
    // TODO - Can we supply a similar function for the non-React case?
 
  }, {
    key: '_renderChildrenUnderViewports',
    value: function _renderChildrenUnderViewports(children) {
      var _this2 = this;
 
      // Flatten out nested viewports array
      var viewports = this.deck ? this.deck.getViewports() : [];
 
      // Build a viewport id to viewport index
      var viewportMap = {};
      viewports.forEach(function (viewport) {
        if (viewport.id) {
          viewportMap[viewport.id] = viewport;
        }
      });
 
      return children.map(
      // If child specifies props.viewportId, position under viewport, otherwise render as normal
      function (child, i) {
        return child.props.viewportId ? _this2._positionChild({ child: child, viewportMap: viewportMap, i: i }) : child;
      });
    }
  }, {
    key: '_positionChild',
    value: function _positionChild(_ref3) {
      var child = _ref3.child,
          viewportMap = _ref3.viewportMap,
          i = _ref3.i;
      var viewportId = child.props.viewportId;
 
      var viewport = viewportId && viewportMap[viewportId];
 
      // Drop (aut-hide) elements with viewportId that are not matched by any current viewport
      if (!viewport) {
        return null;
      }
 
      // Resolve potentially relative dimensions using the deck.gl container size
      var x = viewport.x,
          y = viewport.y,
          width = viewport.width,
          height = viewport.height;
 
      // Clone the element with width and height set per viewport
 
      var newProps = Object.assign({}, child.props, { width: width, height: height });
 
      // Inject map properties
      // TODO - this is too react-map-gl specific
      Object.assign(newProps, viewport.getMercatorParams(), {
        visible: viewport.isMapSynched()
      });
 
      var clone = (0, _react.cloneElement)(child, newProps);
 
      // Wrap it in an absolutely positioning div
      var style = { position: 'absolute', left: x, top: y, width: width, height: height };
      var key = 'viewport-child-' + viewportId + '-' + i;
      return (0, _react.createElement)('div', { key: key, id: key, style: style }, clone);
    }
  }, {
    key: 'render',
    value: function render() {
      var _this3 = this;
 
      // Render the background elements (typically react-map-gl instances)
      // using the viewport descriptors
      var children = this._renderChildrenUnderViewports(this.children);
 
      // Render deck.gl as last child
      var _props = this.props,
          id = _props.id,
          width = _props.width,
          height = _props.height,
          style = _props.style;
 
      var deck = (0, _react.createElement)('canvas', {
        ref: function ref(c) {
          return _this3.overlay = c;
        },
        key: 'overlay',
        id: id,
        style: Object.assign({}, { position: 'absolute', left: 0, top: 0, width: width, height: height }, style)
      });
      children.push(deck);
 
      return (0, _react.createElement)('div', { id: 'deckgl-wrapper' }, children);
    }
  }]);
 
  return DeckGL;
}(_react2.default.Component);
 
exports.default = DeckGL;
 
 
DeckGL.propTypes = DeckGLJS.propTypes;
DeckGL.defaultProps = DeckGLJS.defaultProps;
 
/***/ }),
/* 361 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
 
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
 
var _react = __webpack_require__(117);
 
var _orbitControllerJs = __webpack_require__(189);
 
var _orbitControllerJs2 = _interopRequireDefault(_orbitControllerJs);
 
var _orbitViewport = __webpack_require__(85);
 
var _orbitViewport2 = _interopRequireDefault(_orbitViewport);
 
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
 
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
 
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
 
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
 
var OrbitController = function (_PureComponent) {
  _inherits(OrbitController, _PureComponent);
 
  _createClass(OrbitController, null, [{
    key: 'getViewport',
 
    // Returns a deck.gl Viewport instance, to be used with the DeckGL component
    value: function getViewport(viewport) {
      return new _orbitViewport2.default(viewport);
    }
  }]);
 
  function OrbitController(props) {
    _classCallCheck(this, OrbitController);
 
    var _this = _possibleConstructorReturn(this, (OrbitController.__proto__ || Object.getPrototypeOf(OrbitController)).call(this, props));
 
    _this.controller = null;
    return _this;
  }
 
  _createClass(OrbitController, [{
    key: 'componentDidMount',
    value: function componentDidMount() {
      this.controller = new _orbitControllerJs2.default(Object.assign({}, this.props, { canvas: this.eventCanvas }));
    }
  }, {
    key: 'componentWillUpdate',
    value: function componentWillUpdate(nextProps) {
      this.controller.setProps(nextProps);
    }
  }, {
    key: 'componentWillUnmount',
    value: function componentWillUnmount() {
      this.controller.finalize();
    }
  }, {
    key: 'render',
    value: function render() {
      var _this2 = this;
 
      var _props = this.props,
          width = _props.width,
          height = _props.height;
 
 
      var eventCanvasStyle = {
        width: width,
        height: height,
        position: 'relative'
      };
 
      return (0, _react.createElement)('div', {
        key: 'map-controls',
        ref: function ref(c) {
          return _this2.eventCanvas = c;
        },
        style: eventCanvasStyle
      }, this.props.children);
    }
  }]);
 
  return OrbitController;
}(_react.PureComponent);
 
exports.default = OrbitController;
 
 
OrbitController.displayName = 'OrbitController';
OrbitController.propTypes = _orbitControllerJs2.default.propTypes;
OrbitController.defaultProps = _orbitControllerJs2.default.defaultProps;
 
/***/ }),
/* 362 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
 
var _deckgl = __webpack_require__(360);
 
Object.defineProperty(exports, 'DeckGL', {
  enumerable: true,
  get: function get() {
    return _interopRequireDefault(_deckgl).default;
  }
});
Object.defineProperty(exports, 'default', {
  enumerable: true,
  get: function get() {
    return _interopRequireDefault(_deckgl).default;
  }
});
 
var _viewportController = __webpack_require__(365);
 
Object.defineProperty(exports, 'ViewportController', {
  enumerable: true,
  get: function get() {
    return _interopRequireDefault(_viewportController).default;
  }
});
 
var _mapController = __webpack_require__(363);
 
Object.defineProperty(exports, 'MapController', {
  enumerable: true,
  get: function get() {
    return _interopRequireDefault(_mapController).default;
  }
});
 
var _orbitController = __webpack_require__(361);
 
Object.defineProperty(exports, 'OrbitController', {
  enumerable: true,
  get: function get() {
    return _interopRequireDefault(_orbitController).default;
  }
});
 
var _autobind = __webpack_require__(197);
 
Object.defineProperty(exports, 'autobind', {
  enumerable: true,
  get: function get() {
    return _interopRequireDefault(_autobind).default;
  }
});
 
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
 
/***/ }),
/* 363 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
 
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
 
var _react = __webpack_require__(117);
 
var _mapControllerJs = __webpack_require__(188);
 
var _mapControllerJs2 = _interopRequireDefault(_mapControllerJs);
 
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
 
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
 
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
 
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
 
var MapController = function (_PureComponent) {
  _inherits(MapController, _PureComponent);
 
  function MapController(props) {
    _classCallCheck(this, MapController);
 
    var _this = _possibleConstructorReturn(this, (MapController.__proto__ || Object.getPrototypeOf(MapController)).call(this, props));
 
    _this.controller = null;
    return _this;
  }
 
  _createClass(MapController, [{
    key: 'componentDidMount',
    value: function componentDidMount() {
      this.controller = new _mapControllerJs2.default(Object.assign({}, this.props, { canvas: this.eventCanvas }));
    }
  }, {
    key: 'componentWillUpdate',
    value: function componentWillUpdate(nextProps) {
      this.controller.setProps(nextProps);
    }
  }, {
    key: 'componentWillUnmount',
    value: function componentWillUnmount() {
      this.controller.finalize();
    }
  }, {
    key: 'render',
    value: function render() {
      var _this2 = this;
 
      var _props = this.props,
          width = _props.width,
          height = _props.height;
 
 
      var eventCanvasStyle = {
        width: width,
        height: height,
        position: 'relative'
      };
 
      return (0, _react.createElement)('div', {
        key: 'map-controls',
        ref: function ref(c) {
          return _this2.eventCanvas = c;
        },
        style: eventCanvasStyle
      }, this.props.children);
    }
  }]);
 
  return MapController;
}(_react.PureComponent);
 
exports.default = MapController;
 
 
MapController.displayName = 'MapController';
MapController.propTypes = _mapControllerJs2.default.propTypes;
MapController.defaultProps = _mapControllerJs2.default.defaultProps;
 
/***/ }),
/* 364 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
// Copyright (c) 2015 Uber Technologies, Inc.
 
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
 
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
 
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
 
// import browser from 'bowser';
 
var PREFIX = '-webkit-';
// browser.webkit || browser.blink ? '-webkit-' :
// browser.gecko ? '-moz-' :
// '';
 
exports.default = {
  GRABBING: PREFIX + 'grabbing',
  GRAB: PREFIX + 'grab',
  POINTER: 'pointer'
};
 
/***/ }),
/* 365 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
 
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
 
var _react = __webpack_require__(117);
 
var _propTypes = __webpack_require__(116);
 
var _propTypes2 = _interopRequireDefault(_propTypes);
 
var _mjolnir = __webpack_require__(115);
 
var _core = __webpack_require__(13);
 
var _cursors = __webpack_require__(364);
 
var _cursors2 = _interopRequireDefault(_cursors);
 
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
 
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
 
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
 
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
 
var ViewportControls = _core.experimental.ViewportControls,
    TransitionManager = _core.experimental.TransitionManager;
 
 
var propTypes = {
  viewportState: _propTypes2.default.func,
  state: _propTypes2.default.object,
 
  /** Viewport props */
  /** The width of the map. */
  width: _propTypes2.default.number.isRequired,
  /** The height of the map. */
  height: _propTypes2.default.number.isRequired,
  /** The longitude of the center of the map. */
  longitude: _propTypes2.default.number.isRequired,
  /** The latitude of the center of the map. */
  latitude: _propTypes2.default.number.isRequired,
  /** The tile zoom level of the map. */
  zoom: _propTypes2.default.number.isRequired,
  /** Specify the bearing of the viewport */
  bearing: _propTypes2.default.number,
  /** Specify the pitch of the viewport */
  pitch: _propTypes2.default.number,
  /** Altitude of the viewport camera. Default 1.5 "screen heights" */
  // Note: Non-public API, see https://github.com/mapbox/mapbox-gl-js/issues/1137
  altitude: _propTypes2.default.number,
  // Camera position for FirstPersonViewport
  position: _propTypes2.default.array,
 
  /** Viewport constraints */
  // Max zoom level
  maxZoom: _propTypes2.default.number,
  // Min zoom level
  minZoom: _propTypes2.default.number,
  // Max pitch in degrees
  maxPitch: _propTypes2.default.number,
  // Min pitch in degrees
  minPitch: _propTypes2.default.number,
 
  /**
   * `onViewportChange` callback is fired when the user interacted with the
   * map. The object passed to the callback contains viewport properties
   * such as `longitude`, `latitude`, `zoom` etc.
   */
  onViewportChange: _propTypes2.default.func,
 
  /** Viewport transition **/
  // transition duration for viewport change
  transitionDuration: _propTypes2.default.number,
  // an instance of ViewportTransitionInterpolator, can be used to perform custom transitions.
  transitionInterpolator: _propTypes2.default.object,
  // type of interruption of current transition on update.
  transitionInterruption: _propTypes2.default.number,
  // easing function
  transitionEasing: _propTypes2.default.func,
  // transition status update functions
  onTransitionStart: _propTypes2.default.func,
  onTransitionInterrupt: _propTypes2.default.func,
  onTransitionEnd: _propTypes2.default.func,
 
  /** Enables control event handling */
  // Scroll to zoom
  scrollZoom: _propTypes2.default.bool,
  // Drag to pan
  dragPan: _propTypes2.default.bool,
  // Drag to rotate
  dragRotate: _propTypes2.default.bool,
  // Double click to zoom
  doubleClickZoom: _propTypes2.default.bool,
  // Pinch to zoom / rotate
  touchZoomRotate: _propTypes2.default.bool,
 
  /** Accessor that returns a cursor style to show interactive state */
  getCursor: _propTypes2.default.func,
 
  // A map control instance to replace the default map controls
  // The object must expose one property: `events` as an array of subscribed
  // event names; and two methods: `setState(state)` and `handle(event)`
  controls: _propTypes2.default.shape({
    events: _propTypes2.default.arrayOf(_propTypes2.default.string),
    handleEvent: _propTypes2.default.func
  })
};
 
var getDefaultCursor = function getDefaultCursor(_ref) {
  var isDragging = _ref.isDragging;
  return isDragging ? _cursors2.default.GRABBING : _cursors2.default.GRAB;
};
 
var defaultProps = Object.assign({}, TransitionManager.defaultProps, {
  onViewportChange: null,
 
  scrollZoom: true,
  dragPan: true,
  dragRotate: true,
  doubleClickZoom: true,
  touchZoomRotate: true,
 
  getCursor: getDefaultCursor
});
 
var ViewportController = function (_Component) {
  _inherits(ViewportController, _Component);
 
  function ViewportController(props) {
    _classCallCheck(this, ViewportController);
 
    var _this = _possibleConstructorReturn(this, (ViewportController.__proto__ || Object.getPrototypeOf(ViewportController)).call(this, props));
 
    _this.state = {
      isDragging: false // Whether the cursor is down
    };
    return _this;
  }
 
  _createClass(ViewportController, [{
    key: 'componentDidMount',
    value: function componentDidMount() {
      this._eventManager = new _mjolnir.EventManager(this.eventCanvas);
 
      // If props.controls is not provided, fallback to default MapControls instance
      // Cannot use defaultProps here because it needs to be per map instance
      this._controls = this.props.controls || new ViewportControls(this.props.viewportState);
 
      this._controls.setOptions(Object.assign({}, this.props, {
        onStateChange: this._onInteractiveStateChange.bind(this),
        eventManager: this._eventManager
      }));
 
      this._transitionManger = new TransitionManager(this.props);
    }
  }, {
    key: 'shouldComponentUpdate',
    value: function shouldComponentUpdate(nextProps, nextState) {
      if (this._transitionManger) {
        var transitionTriggered = this._transitionManger.processViewportChange(nextProps);
        // Skip this render to avoid jump during viewport transitions.
        return !transitionTriggered;
      }
      return true;
    }
  }, {
    key: 'componentWillUpdate',
    value: function componentWillUpdate(nextProps) {
      if (this._controls) {
        this._controls.setOptions(nextProps);
      }
    }
  }, {
    key: 'componentWillUnmount',
    value: function componentWillUnmount() {
      this._eventManager.destroy();
    }
  }, {
    key: '_onInteractiveStateChange',
    value: function _onInteractiveStateChange(_ref2) {
      var _ref2$isDragging = _ref2.isDragging,
          isDragging = _ref2$isDragging === undefined ? false : _ref2$isDragging;
 
      if (isDragging !== this.state.isDragging) {
        this.setState({ isDragging: isDragging });
      }
    }
  }, {
    key: 'render',
    value: function render() {
      var _this2 = this;
 
      var _props = this.props,
          width = _props.width,
          height = _props.height,
          getCursor = _props.getCursor;
 
 
      var eventCanvasStyle = {
        width: width,
        height: height,
        position: 'relative',
        cursor: getCursor(this.state)
      };
 
      return (0, _react.createElement)('div', {
        key: 'map-controls',
        ref: function ref(c) {
          return _this2.eventCanvas = c;
        },
        style: eventCanvasStyle
      }, this.props.children);
    }
  }]);
 
  return ViewportController;
}(_react.Component);
 
exports.default = ViewportController;
 
 
ViewportController.displayName = 'ViewportController';
ViewportController.propTypes = propTypes;
ViewportController.defaultProps = defaultProps;
 
/***/ }),
/* 366 */
/***/ (function(module, exports, __webpack_require__) {
 
/* WEBPACK VAR INJECTION */(function(global) {/**
 * Copyright (c) 2014, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * https://raw.github.com/facebook/regenerator/master/LICENSE file. An
 * additional grant of patent rights can be found in the PATENTS file in
 * the same directory.
 */
 
!(function(global) {
  "use strict";
 
  var Op = Object.prototype;
  var hasOwn = Op.hasOwnProperty;
  var undefined; // More compressible than void 0.
  var $Symbol = typeof Symbol === "function" ? Symbol : {};
  var iteratorSymbol = $Symbol.iterator || "@@iterator";
  var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
  var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
 
  var inModule = typeof module === "object";
  var runtime = global.regeneratorRuntime;
  if (runtime) {
    if (inModule) {
      // If regeneratorRuntime is defined globally and we're in a module,
      // make the exports object identical to regeneratorRuntime.
      module.exports = runtime;
    }
    // Don't bother evaluating the rest of this file if the runtime was
    // already defined globally.
    return;
  }
 
  // Define the runtime globally (as expected by generated code) as either
  // module.exports (if we're in a module) or a new, empty object.
  runtime = global.regeneratorRuntime = inModule ? module.exports : {};
 
  function wrap(innerFn, outerFn, self, tryLocsList) {
    // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
    var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
    var generator = Object.create(protoGenerator.prototype);
    var context = new Context(tryLocsList || []);
 
    // The ._invoke method unifies the implementations of the .next,
    // .throw, and .return methods.
    generator._invoke = makeInvokeMethod(innerFn, self, context);
 
    return generator;
  }
  runtime.wrap = wrap;
 
  // Try/catch helper to minimize deoptimizations. Returns a completion
  // record like context.tryEntries[i].completion. This interface could
  // have been (and was previously) designed to take a closure to be
  // invoked without arguments, but in all the cases we care about we
  // already have an existing method we want to call, so there's no need
  // to create a new function object. We can even get away with assuming
  // the method takes exactly one argument, since that happens to be true
  // in every case, so we don't have to touch the arguments object. The
  // only additional allocation required is the completion record, which
  // has a stable shape and so hopefully should be cheap to allocate.
  function tryCatch(fn, obj, arg) {
    try {
      return { type: "normal", arg: fn.call(obj, arg) };
    } catch (err) {
      return { type: "throw", arg: err };
    }
  }
 
  var GenStateSuspendedStart = "suspendedStart";
  var GenStateSuspendedYield = "suspendedYield";
  var GenStateExecuting = "executing";
  var GenStateCompleted = "completed";
 
  // Returning this object from the innerFn has the same effect as
  // breaking out of the dispatch switch statement.
  var ContinueSentinel = {};
 
  // Dummy constructor functions that we use as the .constructor and
  // .constructor.prototype properties for functions that return Generator
  // objects. For full spec compliance, you may wish to configure your
  // minifier not to mangle the names of these two functions.
  function Generator() {}
  function GeneratorFunction() {}
  function GeneratorFunctionPrototype() {}
 
  // This is a polyfill for %IteratorPrototype% for environments that
  // don't natively support it.
  var IteratorPrototype = {};
  IteratorPrototype[iteratorSymbol] = function () {
    return this;
  };
 
  var getProto = Object.getPrototypeOf;
  var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
  if (NativeIteratorPrototype &&
      NativeIteratorPrototype !== Op &&
      hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
    // This environment has a native %IteratorPrototype%; use it instead
    // of the polyfill.
    IteratorPrototype = NativeIteratorPrototype;
  }
 
  var Gp = GeneratorFunctionPrototype.prototype =
    Generator.prototype = Object.create(IteratorPrototype);
  GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;
  GeneratorFunctionPrototype.constructor = GeneratorFunction;
  GeneratorFunctionPrototype[toStringTagSymbol] =
    GeneratorFunction.displayName = "GeneratorFunction";
 
  // Helper for defining the .next, .throw, and .return methods of the
  // Iterator interface in terms of a single ._invoke method.
  function defineIteratorMethods(prototype) {
    ["next", "throw", "return"].forEach(function(method) {
      prototype[method] = function(arg) {
        return this._invoke(method, arg);
      };
    });
  }
 
  runtime.isGeneratorFunction = function(genFun) {
    var ctor = typeof genFun === "function" && genFun.constructor;
    return ctor
      ? ctor === GeneratorFunction ||
        // For the native GeneratorFunction constructor, the best we can
        // do is to check its .name property.
        (ctor.displayName || ctor.name) === "GeneratorFunction"
      : false;
  };
 
  runtime.mark = function(genFun) {
    if (Object.setPrototypeOf) {
      Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
    } else {
      genFun.__proto__ = GeneratorFunctionPrototype;
      if (!(toStringTagSymbol in genFun)) {
        genFun[toStringTagSymbol] = "GeneratorFunction";
      }
    }
    genFun.prototype = Object.create(Gp);
    return genFun;
  };
 
  // Within the body of any async function, `await x` is transformed to
  // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
  // `hasOwn.call(value, "__await")` to determine if the yielded value is
  // meant to be awaited.
  runtime.awrap = function(arg) {
    return { __await: arg };
  };
 
  function AsyncIterator(generator) {
    function invoke(method, arg, resolve, reject) {
      var record = tryCatch(generator[method], generator, arg);
      if (record.type === "throw") {
        reject(record.arg);
      } else {
        var result = record.arg;
        var value = result.value;
        if (value &&
            typeof value === "object" &&
            hasOwn.call(value, "__await")) {
          return Promise.resolve(value.__await).then(function(value) {
            invoke("next", value, resolve, reject);
          }, function(err) {
            invoke("throw", err, resolve, reject);
          });
        }
 
        return Promise.resolve(value).then(function(unwrapped) {
          // When a yielded Promise is resolved, its final value becomes
          // the .value of the Promise<{value,done}> result for the
          // current iteration. If the Promise is rejected, however, the
          // result for this iteration will be rejected with the same
          // reason. Note that rejections of yielded Promises are not
          // thrown back into the generator function, as is the case
          // when an awaited Promise is rejected. This difference in
          // behavior between yield and await is important, because it
          // allows the consumer to decide what to do with the yielded
          // rejection (swallow it and continue, manually .throw it back
          // into the generator, abandon iteration, whatever). With
          // await, by contrast, there is no opportunity to examine the
          // rejection reason outside the generator function, so the
          // only option is to throw it from the await expression, and
          // let the generator function handle the exception.
          result.value = unwrapped;
          resolve(result);
        }, reject);
      }
    }
 
    if (typeof global.process === "object" && global.process.domain) {
      invoke = global.process.domain.bind(invoke);
    }
 
    var previousPromise;
 
    function enqueue(method, arg) {
      function callInvokeWithMethodAndArg() {
        return new Promise(function(resolve, reject) {
          invoke(method, arg, resolve, reject);
        });
      }
 
      return previousPromise =
        // If enqueue has been called before, then we want to wait until
        // all previous Promises have been resolved before calling invoke,
        // so that results are always delivered in the correct order. If
        // enqueue has not been called before, then it is important to
        // call invoke immediately, without waiting on a callback to fire,
        // so that the async generator function has the opportunity to do
        // any necessary setup in a predictable way. This predictability
        // is why the Promise constructor synchronously invokes its
        // executor callback, and why async functions synchronously
        // execute code before the first await. Since we implement simple
        // async functions in terms of async generators, it is especially
        // important to get this right, even though it requires care.
        previousPromise ? previousPromise.then(
          callInvokeWithMethodAndArg,
          // Avoid propagating failures to Promises returned by later
          // invocations of the iterator.
          callInvokeWithMethodAndArg
        ) : callInvokeWithMethodAndArg();
    }
 
    // Define the unified helper method that is used to implement .next,
    // .throw, and .return (see defineIteratorMethods).
    this._invoke = enqueue;
  }
 
  defineIteratorMethods(AsyncIterator.prototype);
  AsyncIterator.prototype[asyncIteratorSymbol] = function () {
    return this;
  };
  runtime.AsyncIterator = AsyncIterator;
 
  // Note that simple async functions are implemented on top of
  // AsyncIterator objects; they just return a Promise for the value of
  // the final result produced by the iterator.
  runtime.async = function(innerFn, outerFn, self, tryLocsList) {
    var iter = new AsyncIterator(
      wrap(innerFn, outerFn, self, tryLocsList)
    );
 
    return runtime.isGeneratorFunction(outerFn)
      ? iter // If outerFn is a generator, return the full iterator.
      : iter.next().then(function(result) {
          return result.done ? result.value : iter.next();
        });
  };
 
  function makeInvokeMethod(innerFn, self, context) {
    var state = GenStateSuspendedStart;
 
    return function invoke(method, arg) {
      if (state === GenStateExecuting) {
        throw new Error("Generator is already running");
      }
 
      if (state === GenStateCompleted) {
        if (method === "throw") {
          throw arg;
        }
 
        // Be forgiving, per 25.3.3.3.3 of the spec:
        // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
        return doneResult();
      }
 
      context.method = method;
      context.arg = arg;
 
      while (true) {
        var delegate = context.delegate;
        if (delegate) {
          var delegateResult = maybeInvokeDelegate(delegate, context);
          if (delegateResult) {
            if (delegateResult === ContinueSentinel) continue;
            return delegateResult;
          }
        }
 
        if (context.method === "next") {
          // Setting context._sent for legacy support of Babel's
          // function.sent implementation.
          context.sent = context._sent = context.arg;
 
        } else if (context.method === "throw") {
          if (state === GenStateSuspendedStart) {
            state = GenStateCompleted;
            throw context.arg;
          }
 
          context.dispatchException(context.arg);
 
        } else if (context.method === "return") {
          context.abrupt("return", context.arg);
        }
 
        state = GenStateExecuting;
 
        var record = tryCatch(innerFn, self, context);
        if (record.type === "normal") {
          // If an exception is thrown from innerFn, we leave state ===
          // GenStateExecuting and loop back for another invocation.
          state = context.done
            ? GenStateCompleted
            : GenStateSuspendedYield;
 
          if (record.arg === ContinueSentinel) {
            continue;
          }
 
          return {
            value: record.arg,
            done: context.done
          };
 
        } else if (record.type === "throw") {
          state = GenStateCompleted;
          // Dispatch the exception by looping back around to the
          // context.dispatchException(context.arg) call above.
          context.method = "throw";
          context.arg = record.arg;
        }
      }
    };
  }
 
  // Call delegate.iterator[context.method](context.arg) and handle the
  // result, either by returning a { value, done } result from the
  // delegate iterator, or by modifying context.method and context.arg,
  // setting context.delegate to null, and returning the ContinueSentinel.
  function maybeInvokeDelegate(delegate, context) {
    var method = delegate.iterator[context.method];
    if (method === undefined) {
      // A .throw or .return when the delegate iterator has no .throw
      // method always terminates the yield* loop.
      context.delegate = null;
 
      if (context.method === "throw") {
        if (delegate.iterator.return) {
          // If the delegate iterator has a return method, give it a
          // chance to clean up.
          context.method = "return";
          context.arg = undefined;
          maybeInvokeDelegate(delegate, context);
 
          if (context.method === "throw") {
            // If maybeInvokeDelegate(context) changed context.method from
            // "return" to "throw", let that override the TypeError below.
            return ContinueSentinel;
          }
        }
 
        context.method = "throw";
        context.arg = new TypeError(
          "The iterator does not provide a 'throw' method");
      }
 
      return ContinueSentinel;
    }
 
    var record = tryCatch(method, delegate.iterator, context.arg);
 
    if (record.type === "throw") {
      context.method = "throw";
      context.arg = record.arg;
      context.delegate = null;
      return ContinueSentinel;
    }
 
    var info = record.arg;
 
    if (! info) {
      context.method = "throw";
      context.arg = new TypeError("iterator result is not an object");
      context.delegate = null;
      return ContinueSentinel;
    }
 
    if (info.done) {
      // Assign the result of the finished delegate to the temporary
      // variable specified by delegate.resultName (see delegateYield).
      context[delegate.resultName] = info.value;
 
      // Resume execution at the desired location (see delegateYield).
      context.next = delegate.nextLoc;
 
      // If context.method was "throw" but the delegate handled the
      // exception, let the outer generator proceed normally. If
      // context.method was "next", forget context.arg since it has been
      // "consumed" by the delegate iterator. If context.method was
      // "return", allow the original .return call to continue in the
      // outer generator.
      if (context.method !== "return") {
        context.method = "next";
        context.arg = undefined;
      }
 
    } else {
      // Re-yield the result returned by the delegate method.
      return info;
    }
 
    // The delegate iterator is finished, so forget it and continue with
    // the outer generator.
    context.delegate = null;
    return ContinueSentinel;
  }
 
  // Define Generator.prototype.{next,throw,return} in terms of the
  // unified ._invoke helper method.
  defineIteratorMethods(Gp);
 
  Gp[toStringTagSymbol] = "Generator";
 
  // A Generator should always return itself as the iterator object when the
  // @@iterator function is called on it. Some browsers' implementations of the
  // iterator prototype chain incorrectly implement this, causing the Generator
  // object to not be returned from this call. This ensures that doesn't happen.
  // See https://github.com/facebook/regenerator/issues/274 for more details.
  Gp[iteratorSymbol] = function() {
    return this;
  };
 
  Gp.toString = function() {
    return "[object Generator]";
  };
 
  function pushTryEntry(locs) {
    var entry = { tryLoc: locs[0] };
 
    if (1 in locs) {
      entry.catchLoc = locs[1];
    }
 
    if (2 in locs) {
      entry.finallyLoc = locs[2];
      entry.afterLoc = locs[3];
    }
 
    this.tryEntries.push(entry);
  }
 
  function resetTryEntry(entry) {
    var record = entry.completion || {};
    record.type = "normal";
    delete record.arg;
    entry.completion = record;
  }
 
  function Context(tryLocsList) {
    // The root entry object (effectively a try statement without a catch
    // or a finally block) gives us a place to store values thrown from
    // locations where there is no enclosing try statement.
    this.tryEntries = [{ tryLoc: "root" }];
    tryLocsList.forEach(pushTryEntry, this);
    this.reset(true);
  }
 
  runtime.keys = function(object) {
    var keys = [];
    for (var key in object) {
      keys.push(key);
    }
    keys.reverse();
 
    // Rather than returning an object with a next method, we keep
    // things simple and return the next function itself.
    return function next() {
      while (keys.length) {
        var key = keys.pop();
        if (key in object) {
          next.value = key;
          next.done = false;
          return next;
        }
      }
 
      // To avoid creating an additional object, we just hang the .value
      // and .done properties off the next function object itself. This
      // also ensures that the minifier will not anonymize the function.
      next.done = true;
      return next;
    };
  };
 
  function values(iterable) {
    if (iterable) {
      var iteratorMethod = iterable[iteratorSymbol];
      if (iteratorMethod) {
        return iteratorMethod.call(iterable);
      }
 
      if (typeof iterable.next === "function") {
        return iterable;
      }
 
      if (!isNaN(iterable.length)) {
        var i = -1, next = function next() {
          while (++i < iterable.length) {
            if (hasOwn.call(iterable, i)) {
              next.value = iterable[i];
              next.done = false;
              return next;
            }
          }
 
          next.value = undefined;
          next.done = true;
 
          return next;
        };
 
        return next.next = next;
      }
    }
 
    // Return an iterator with no values.
    return { next: doneResult };
  }
  runtime.values = values;
 
  function doneResult() {
    return { value: undefined, done: true };
  }
 
  Context.prototype = {
    constructor: Context,
 
    reset: function(skipTempReset) {
      this.prev = 0;
      this.next = 0;
      // Resetting context._sent for legacy support of Babel's
      // function.sent implementation.
      this.sent = this._sent = undefined;
      this.done = false;
      this.delegate = null;
 
      this.method = "next";
      this.arg = undefined;
 
      this.tryEntries.forEach(resetTryEntry);
 
      if (!skipTempReset) {
        for (var name in this) {
          // Not sure about the optimal order of these conditions:
          if (name.charAt(0) === "t" &&
              hasOwn.call(this, name) &&
              !isNaN(+name.slice(1))) {
            this[name] = undefined;
          }
        }
      }
    },
 
    stop: function() {
      this.done = true;
 
      var rootEntry = this.tryEntries[0];
      var rootRecord = rootEntry.completion;
      if (rootRecord.type === "throw") {
        throw rootRecord.arg;
      }
 
      return this.rval;
    },
 
    dispatchException: function(exception) {
      if (this.done) {
        throw exception;
      }
 
      var context = this;
      function handle(loc, caught) {
        record.type = "throw";
        record.arg = exception;
        context.next = loc;
 
        if (caught) {
          // If the dispatched exception was caught by a catch block,
          // then let that catch block handle the exception normally.
          context.method = "next";
          context.arg = undefined;
        }
 
        return !! caught;
      }
 
      for (var i = this.tryEntries.length - 1; i >= 0; --i) {
        var entry = this.tryEntries[i];
        var record = entry.completion;
 
        if (entry.tryLoc === "root") {
          // Exception thrown outside of any try block that could handle
          // it, so set the completion value of the entire function to
          // throw the exception.
          return handle("end");
        }
 
        if (entry.tryLoc <= this.prev) {
          var hasCatch = hasOwn.call(entry, "catchLoc");
          var hasFinally = hasOwn.call(entry, "finallyLoc");
 
          if (hasCatch && hasFinally) {
            if (this.prev < entry.catchLoc) {
              return handle(entry.catchLoc, true);
            } else if (this.prev < entry.finallyLoc) {
              return handle(entry.finallyLoc);
            }
 
          } else if (hasCatch) {
            if (this.prev < entry.catchLoc) {
              return handle(entry.catchLoc, true);
            }
 
          } else if (hasFinally) {
            if (this.prev < entry.finallyLoc) {
              return handle(entry.finallyLoc);
            }
 
          } else {
            throw new Error("try statement without catch or finally");
          }
        }
      }
    },
 
    abrupt: function(type, arg) {
      for (var i = this.tryEntries.length - 1; i >= 0; --i) {
        var entry = this.tryEntries[i];
        if (entry.tryLoc <= this.prev &&
            hasOwn.call(entry, "finallyLoc") &&
            this.prev < entry.finallyLoc) {
          var finallyEntry = entry;
          break;
        }
      }
 
      if (finallyEntry &&
          (type === "break" ||
           type === "continue") &&
          finallyEntry.tryLoc <= arg &&
          arg <= finallyEntry.finallyLoc) {
        // Ignore the finally entry if control is not jumping to a
        // location outside the try/catch block.
        finallyEntry = null;
      }
 
      var record = finallyEntry ? finallyEntry.completion : {};
      record.type = type;
      record.arg = arg;
 
      if (finallyEntry) {
        this.method = "next";
        this.next = finallyEntry.finallyLoc;
        return ContinueSentinel;
      }
 
      return this.complete(record);
    },
 
    complete: function(record, afterLoc) {
      if (record.type === "throw") {
        throw record.arg;
      }
 
      if (record.type === "break" ||
          record.type === "continue") {
        this.next = record.arg;
      } else if (record.type === "return") {
        this.rval = this.arg = record.arg;
        this.method = "return";
        this.next = "end";
      } else if (record.type === "normal" && afterLoc) {
        this.next = afterLoc;
      }
 
      return ContinueSentinel;
    },
 
    finish: function(finallyLoc) {
      for (var i = this.tryEntries.length - 1; i >= 0; --i) {
        var entry = this.tryEntries[i];
        if (entry.finallyLoc === finallyLoc) {
          this.complete(entry.completion, entry.afterLoc);
          resetTryEntry(entry);
          return ContinueSentinel;
        }
      }
    },
 
    "catch": function(tryLoc) {
      for (var i = this.tryEntries.length - 1; i >= 0; --i) {
        var entry = this.tryEntries[i];
        if (entry.tryLoc === tryLoc) {
          var record = entry.completion;
          if (record.type === "throw") {
            var thrown = record.arg;
            resetTryEntry(entry);
          }
          return thrown;
        }
      }
 
      // The context.catch method must only be called with a location
      // argument that corresponds to a known catch block.
      throw new Error("illegal catch attempt");
    },
 
    delegateYield: function(iterable, resultName, nextLoc) {
      this.delegate = {
        iterator: values(iterable),
        resultName: resultName,
        nextLoc: nextLoc
      };
 
      if (this.method === "next") {
        // Deliberately forget the last sent value so that we don't
        // accidentally pass it on to the delegate.
        this.arg = undefined;
      }
 
      return ContinueSentinel;
    }
  };
})(
  // Among the various tricks for obtaining a reference to the global
  // object, this seems to be the most reliable technique that does not
  // use indirect eval (which violates Content Security Policy).
  typeof global === "object" ? global :
  typeof window === "object" ? window :
  typeof self === "object" ? self : this
);
 
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(47)))
 
/***/ }),
/* 367 */
/***/ (function(module, exports, __webpack_require__) {
 
__webpack_require__(374);
module.exports = __webpack_require__(33).RegExp.escape;
 
 
/***/ }),
/* 368 */
/***/ (function(module, exports, __webpack_require__) {
 
var isObject = __webpack_require__(5);
var isArray = __webpack_require__(91);
var SPECIES = __webpack_require__(6)('species');
 
module.exports = function (original) {
  var C;
  if (isArray(original)) {
    C = original.constructor;
    // cross-realm fallback
    if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;
    if (isObject(C)) {
      C = C[SPECIES];
      if (C === null) C = undefined;
    }
  } return C === undefined ? Array : C;
};
 
 
/***/ }),
/* 369 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
// 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString()
var fails = __webpack_require__(4);
var getTime = Date.prototype.getTime;
var $toISOString = Date.prototype.toISOString;
 
var lz = function (num) {
  return num > 9 ? num : '0' + num;
};
 
// PhantomJS / old WebKit has a broken implementations
module.exports = (fails(function () {
  return $toISOString.call(new Date(-5e13 - 1)) != '0385-07-25T07:06:39.999Z';
}) || !fails(function () {
  $toISOString.call(new Date(NaN));
})) ? function toISOString() {
  if (!isFinite(getTime.call(this))) throw RangeError('Invalid time value');
  var d = this;
  var y = d.getUTCFullYear();
  var m = d.getUTCMilliseconds();
  var s = y < 0 ? '-' : y > 9999 ? '+' : '';
  return s + ('00000' + Math.abs(y)).slice(s ? -6 : -4) +
    '-' + lz(d.getUTCMonth() + 1) + '-' + lz(d.getUTCDate()) +
    'T' + lz(d.getUTCHours()) + ':' + lz(d.getUTCMinutes()) +
    ':' + lz(d.getUTCSeconds()) + '.' + (m > 99 ? m : '0' + lz(m)) + 'Z';
} : $toISOString;
 
 
/***/ }),
/* 370 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var anObject = __webpack_require__(2);
var toPrimitive = __webpack_require__(37);
var NUMBER = 'number';
 
module.exports = function (hint) {
  if (hint !== 'string' && hint !== NUMBER && hint !== 'default') throw TypeError('Incorrect hint');
  return toPrimitive(anObject(this), hint != NUMBER);
};
 
 
/***/ }),
/* 371 */
/***/ (function(module, exports, __webpack_require__) {
 
// all enumerable object keys, includes symbols
var getKeys = __webpack_require__(53);
var gOPS = __webpack_require__(95);
var pIE = __webpack_require__(73);
module.exports = function (it) {
  var result = getKeys(it);
  var getSymbols = gOPS.f;
  if (getSymbols) {
    var symbols = getSymbols(it);
    var isEnum = pIE.f;
    var i = 0;
    var key;
    while (symbols.length > i) if (isEnum.call(it, key = symbols[i++])) result.push(key);
  } return result;
};
 
 
/***/ }),
/* 372 */
/***/ (function(module, exports) {
 
module.exports = function (regExp, replace) {
  var replacer = replace === Object(replace) ? function (part) {
    return replace[part];
  } : replace;
  return function (it) {
    return String(it).replace(regExp, replacer);
  };
};
 
 
/***/ }),
/* 373 */
/***/ (function(module, exports) {
 
// 7.2.9 SameValue(x, y)
module.exports = Object.is || function is(x, y) {
  // eslint-disable-next-line no-self-compare
  return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y;
};
 
 
/***/ }),
/* 374 */
/***/ (function(module, exports, __webpack_require__) {
 
// https://github.com/benjamingr/RexExp.escape
var $export = __webpack_require__(0);
var $re = __webpack_require__(372)(/[\\^$*+?.()|[\]{}]/g, '\\$&');
 
$export($export.S, 'RegExp', { escape: function escape(it) { return $re(it); } });
 
 
/***/ }),
/* 375 */
/***/ (function(module, exports, __webpack_require__) {
 
// 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length)
var $export = __webpack_require__(0);
 
$export($export.P, 'Array', { copyWithin: __webpack_require__(199) });
 
__webpack_require__(43)('copyWithin');
 
 
/***/ }),
/* 376 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var $export = __webpack_require__(0);
var $every = __webpack_require__(32)(4);
 
$export($export.P + $export.F * !__webpack_require__(29)([].every, true), 'Array', {
  // 22.1.3.5 / 15.4.4.16 Array.prototype.every(callbackfn [, thisArg])
  every: function every(callbackfn /* , thisArg */) {
    return $every(this, callbackfn, arguments[1]);
  }
});
 
 
/***/ }),
/* 377 */
/***/ (function(module, exports, __webpack_require__) {
 
// 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length)
var $export = __webpack_require__(0);
 
$export($export.P, 'Array', { fill: __webpack_require__(128) });
 
__webpack_require__(43)('fill');
 
 
/***/ }),
/* 378 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var $export = __webpack_require__(0);
var $filter = __webpack_require__(32)(2);
 
$export($export.P + $export.F * !__webpack_require__(29)([].filter, true), 'Array', {
  // 22.1.3.7 / 15.4.4.20 Array.prototype.filter(callbackfn [, thisArg])
  filter: function filter(callbackfn /* , thisArg */) {
    return $filter(this, callbackfn, arguments[1]);
  }
});
 
 
/***/ }),
/* 379 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
// 22.1.3.9 Array.prototype.findIndex(predicate, thisArg = undefined)
var $export = __webpack_require__(0);
var $find = __webpack_require__(32)(6);
var KEY = 'findIndex';
var forced = true;
// Shouldn't skip holes
if (KEY in []) Array(1)[KEY](function () { forced = false; });
$export($export.P + $export.F * forced, 'Array', {
  findIndex: function findIndex(callbackfn /* , that = undefined */) {
    return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  }
});
__webpack_require__(43)(KEY);
 
 
/***/ }),
/* 380 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
// 22.1.3.8 Array.prototype.find(predicate, thisArg = undefined)
var $export = __webpack_require__(0);
var $find = __webpack_require__(32)(5);
var KEY = 'find';
var forced = true;
// Shouldn't skip holes
if (KEY in []) Array(1)[KEY](function () { forced = false; });
$export($export.P + $export.F * forced, 'Array', {
  find: function find(callbackfn /* , that = undefined */) {
    return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  }
});
__webpack_require__(43)(KEY);
 
 
/***/ }),
/* 381 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var $export = __webpack_require__(0);
var $forEach = __webpack_require__(32)(0);
var STRICT = __webpack_require__(29)([].forEach, true);
 
$export($export.P + $export.F * !STRICT, 'Array', {
  // 22.1.3.10 / 15.4.4.18 Array.prototype.forEach(callbackfn [, thisArg])
  forEach: function forEach(callbackfn /* , thisArg */) {
    return $forEach(this, callbackfn, arguments[1]);
  }
});
 
 
/***/ }),
/* 382 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var ctx = __webpack_require__(28);
var $export = __webpack_require__(0);
var toObject = __webpack_require__(14);
var call = __webpack_require__(210);
var isArrayIter = __webpack_require__(136);
var toLength = __webpack_require__(11);
var createProperty = __webpack_require__(130);
var getIterFn = __webpack_require__(153);
 
$export($export.S + $export.F * !__webpack_require__(93)(function (iter) { Array.from(iter); }), 'Array', {
  // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined)
  from: function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) {
    var O = toObject(arrayLike);
    var C = typeof this == 'function' ? this : Array;
    var aLen = arguments.length;
    var mapfn = aLen > 1 ? arguments[1] : undefined;
    var mapping = mapfn !== undefined;
    var index = 0;
    var iterFn = getIterFn(O);
    var length, result, step, iterator;
    if (mapping) mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2);
    // if object isn't iterable or it's array with default iterator - use simple case
    if (iterFn != undefined && !(C == Array && isArrayIter(iterFn))) {
      for (iterator = iterFn.call(O), result = new C(); !(step = iterator.next()).done; index++) {
        createProperty(result, index, mapping ? call(iterator, mapfn, [step.value, index], true) : step.value);
      }
    } else {
      length = toLength(O.length);
      for (result = new C(length); length > index; index++) {
        createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]);
      }
    }
    result.length = index;
    return result;
  }
});
 
 
/***/ }),
/* 383 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var $export = __webpack_require__(0);
var $indexOf = __webpack_require__(87)(false);
var $native = [].indexOf;
var NEGATIVE_ZERO = !!$native && 1 / [1].indexOf(1, -0) < 0;
 
$export($export.P + $export.F * (NEGATIVE_ZERO || !__webpack_require__(29)($native)), 'Array', {
  // 22.1.3.11 / 15.4.4.14 Array.prototype.indexOf(searchElement [, fromIndex])
  indexOf: function indexOf(searchElement /* , fromIndex = 0 */) {
    return NEGATIVE_ZERO
      // convert -0 to +0
      ? $native.apply(this, arguments) || 0
      : $indexOf(this, searchElement, arguments[1]);
  }
});
 
 
/***/ }),
/* 384 */
/***/ (function(module, exports, __webpack_require__) {
 
// 22.1.2.2 / 15.4.3.2 Array.isArray(arg)
var $export = __webpack_require__(0);
 
$export($export.S, 'Array', { isArray: __webpack_require__(91) });
 
 
/***/ }),
/* 385 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
// 22.1.3.13 Array.prototype.join(separator)
var $export = __webpack_require__(0);
var toIObject = __webpack_require__(24);
var arrayJoin = [].join;
 
// fallback for not array-like strings
$export($export.P + $export.F * (__webpack_require__(72) != Object || !__webpack_require__(29)(arrayJoin)), 'Array', {
  join: function join(separator) {
    return arrayJoin.call(toIObject(this), separator === undefined ? ',' : separator);
  }
});
 
 
/***/ }),
/* 386 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var $export = __webpack_require__(0);
var toIObject = __webpack_require__(24);
var toInteger = __webpack_require__(36);
var toLength = __webpack_require__(11);
var $native = [].lastIndexOf;
var NEGATIVE_ZERO = !!$native && 1 / [1].lastIndexOf(1, -0) < 0;
 
$export($export.P + $export.F * (NEGATIVE_ZERO || !__webpack_require__(29)($native)), 'Array', {
  // 22.1.3.14 / 15.4.4.15 Array.prototype.lastIndexOf(searchElement [, fromIndex])
  lastIndexOf: function lastIndexOf(searchElement /* , fromIndex = @[*-1] */) {
    // convert -0 to +0
    if (NEGATIVE_ZERO) return $native.apply(this, arguments) || 0;
    var O = toIObject(this);
    var length = toLength(O.length);
    var index = length - 1;
    if (arguments.length > 1) index = Math.min(index, toInteger(arguments[1]));
    if (index < 0) index = length + index;
    for (;index >= 0; index--) if (index in O) if (O[index] === searchElement) return index || 0;
    return -1;
  }
});
 
 
/***/ }),
/* 387 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var $export = __webpack_require__(0);
var $map = __webpack_require__(32)(1);
 
$export($export.P + $export.F * !__webpack_require__(29)([].map, true), 'Array', {
  // 22.1.3.15 / 15.4.4.19 Array.prototype.map(callbackfn [, thisArg])
  map: function map(callbackfn /* , thisArg */) {
    return $map(this, callbackfn, arguments[1]);
  }
});
 
 
/***/ }),
/* 388 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var $export = __webpack_require__(0);
var createProperty = __webpack_require__(130);
 
// WebKit Array.of isn't generic
$export($export.S + $export.F * __webpack_require__(4)(function () {
  function F() { /* empty */ }
  return !(Array.of.call(F) instanceof F);
}), 'Array', {
  // 22.1.2.3 Array.of( ...items)
  of: function of(/* ...args */) {
    var index = 0;
    var aLen = arguments.length;
    var result = new (typeof this == 'function' ? this : Array)(aLen);
    while (aLen > index) createProperty(result, index, arguments[index++]);
    result.length = aLen;
    return result;
  }
});
 
 
/***/ }),
/* 389 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var $export = __webpack_require__(0);
var $reduce = __webpack_require__(201);
 
$export($export.P + $export.F * !__webpack_require__(29)([].reduceRight, true), 'Array', {
  // 22.1.3.19 / 15.4.4.22 Array.prototype.reduceRight(callbackfn [, initialValue])
  reduceRight: function reduceRight(callbackfn /* , initialValue */) {
    return $reduce(this, callbackfn, arguments.length, arguments[1], true);
  }
});
 
 
/***/ }),
/* 390 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var $export = __webpack_require__(0);
var $reduce = __webpack_require__(201);
 
$export($export.P + $export.F * !__webpack_require__(29)([].reduce, true), 'Array', {
  // 22.1.3.18 / 15.4.4.21 Array.prototype.reduce(callbackfn [, initialValue])
  reduce: function reduce(callbackfn /* , initialValue */) {
    return $reduce(this, callbackfn, arguments.length, arguments[1], false);
  }
});
 
 
/***/ }),
/* 391 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var $export = __webpack_require__(0);
var html = __webpack_require__(134);
var cof = __webpack_require__(27);
var toAbsoluteIndex = __webpack_require__(57);
var toLength = __webpack_require__(11);
var arraySlice = [].slice;
 
// fallback for not array-like ES3 strings and DOM objects
$export($export.P + $export.F * __webpack_require__(4)(function () {
  if (html) arraySlice.call(html);
}), 'Array', {
  slice: function slice(begin, end) {
    var len = toLength(this.length);
    var klass = cof(this);
    end = end === undefined ? len : end;
    if (klass == 'Array') return arraySlice.call(this, begin, end);
    var start = toAbsoluteIndex(begin, len);
    var upTo = toAbsoluteIndex(end, len);
    var size = toLength(upTo - start);
    var cloned = new Array(size);
    var i = 0;
    for (; i < size; i++) cloned[i] = klass == 'String'
      ? this.charAt(start + i)
      : this[start + i];
    return cloned;
  }
});
 
 
/***/ }),
/* 392 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var $export = __webpack_require__(0);
var $some = __webpack_require__(32)(3);
 
$export($export.P + $export.F * !__webpack_require__(29)([].some, true), 'Array', {
  // 22.1.3.23 / 15.4.4.17 Array.prototype.some(callbackfn [, thisArg])
  some: function some(callbackfn /* , thisArg */) {
    return $some(this, callbackfn, arguments[1]);
  }
});
 
 
/***/ }),
/* 393 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var $export = __webpack_require__(0);
var aFunction = __webpack_require__(15);
var toObject = __webpack_require__(14);
var fails = __webpack_require__(4);
var $sort = [].sort;
var test = [1, 2, 3];
 
$export($export.P + $export.F * (fails(function () {
  // IE8-
  test.sort(undefined);
}) || !fails(function () {
  // V8 bug
  test.sort(null);
  // Old WebKit
}) || !__webpack_require__(29)($sort)), 'Array', {
  // 22.1.3.25 Array.prototype.sort(comparefn)
  sort: function sort(comparefn) {
    return comparefn === undefined
      ? $sort.call(toObject(this))
      : $sort.call(toObject(this), aFunction(comparefn));
  }
});
 
 
/***/ }),
/* 394 */
/***/ (function(module, exports, __webpack_require__) {
 
__webpack_require__(56)('Array');
 
 
/***/ }),
/* 395 */
/***/ (function(module, exports, __webpack_require__) {
 
// 20.3.3.1 / 15.9.4.4 Date.now()
var $export = __webpack_require__(0);
 
$export($export.S, 'Date', { now: function () { return new Date().getTime(); } });
 
 
/***/ }),
/* 396 */
/***/ (function(module, exports, __webpack_require__) {
 
// 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString()
var $export = __webpack_require__(0);
var toISOString = __webpack_require__(369);
 
// PhantomJS / old WebKit has a broken implementations
$export($export.P + $export.F * (Date.prototype.toISOString !== toISOString), 'Date', {
  toISOString: toISOString
});
 
 
/***/ }),
/* 397 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var $export = __webpack_require__(0);
var toObject = __webpack_require__(14);
var toPrimitive = __webpack_require__(37);
 
$export($export.P + $export.F * __webpack_require__(4)(function () {
  return new Date(NaN).toJSON() !== null
    || Date.prototype.toJSON.call({ toISOString: function () { return 1; } }) !== 1;
}), 'Date', {
  // eslint-disable-next-line no-unused-vars
  toJSON: function toJSON(key) {
    var O = toObject(this);
    var pv = toPrimitive(O);
    return typeof pv == 'number' && !isFinite(pv) ? null : O.toISOString();
  }
});
 
 
/***/ }),
/* 398 */
/***/ (function(module, exports, __webpack_require__) {
 
var TO_PRIMITIVE = __webpack_require__(6)('toPrimitive');
var proto = Date.prototype;
 
if (!(TO_PRIMITIVE in proto)) __webpack_require__(19)(proto, TO_PRIMITIVE, __webpack_require__(370));
 
 
/***/ }),
/* 399 */
/***/ (function(module, exports, __webpack_require__) {
 
var DateProto = Date.prototype;
var INVALID_DATE = 'Invalid Date';
var TO_STRING = 'toString';
var $toString = DateProto[TO_STRING];
var getTime = DateProto.getTime;
if (new Date(NaN) + '' != INVALID_DATE) {
  __webpack_require__(20)(DateProto, TO_STRING, function toString() {
    var value = getTime.call(this);
    // eslint-disable-next-line no-self-compare
    return value === value ? $toString.call(this) : INVALID_DATE;
  });
}
 
 
/***/ }),
/* 400 */
/***/ (function(module, exports, __webpack_require__) {
 
// 19.2.3.2 / 15.3.4.5 Function.prototype.bind(thisArg, args...)
var $export = __webpack_require__(0);
 
$export($export.P, 'Function', { bind: __webpack_require__(202) });
 
 
/***/ }),
/* 401 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var isObject = __webpack_require__(5);
var getPrototypeOf = __webpack_require__(23);
var HAS_INSTANCE = __webpack_require__(6)('hasInstance');
var FunctionProto = Function.prototype;
// 19.2.3.6 Function.prototype[@@hasInstance](V)
if (!(HAS_INSTANCE in FunctionProto)) __webpack_require__(10).f(FunctionProto, HAS_INSTANCE, { value: function (O) {
  if (typeof this != 'function' || !isObject(O)) return false;
  if (!isObject(this.prototype)) return O instanceof this;
  // for environment w/o native `@@hasInstance` logic enough `instanceof`, but add this:
  while (O = getPrototypeOf(O)) if (this.prototype === O) return true;
  return false;
} });
 
 
/***/ }),
/* 402 */
/***/ (function(module, exports, __webpack_require__) {
 
var dP = __webpack_require__(10).f;
var FProto = Function.prototype;
var nameRE = /^\s*function ([^ (]*)/;
var NAME = 'name';
 
// 19.2.4.2 name
NAME in FProto || __webpack_require__(9) && dP(FProto, NAME, {
  configurable: true,
  get: function () {
    try {
      return ('' + this).match(nameRE)[1];
    } catch (e) {
      return '';
    }
  }
});
 
 
/***/ }),
/* 403 */
/***/ (function(module, exports, __webpack_require__) {
 
// 20.2.2.3 Math.acosh(x)
var $export = __webpack_require__(0);
var log1p = __webpack_require__(213);
var sqrt = Math.sqrt;
var $acosh = Math.acosh;
 
$export($export.S + $export.F * !($acosh
  // V8 bug: https://code.google.com/p/v8/issues/detail?id=3509
  && Math.floor($acosh(Number.MAX_VALUE)) == 710
  // Tor Browser bug: Math.acosh(Infinity) -> NaN
  && $acosh(Infinity) == Infinity
), 'Math', {
  acosh: function acosh(x) {
    return (x = +x) < 1 ? NaN : x > 94906265.62425156
      ? Math.log(x) + Math.LN2
      : log1p(x - 1 + sqrt(x - 1) * sqrt(x + 1));
  }
});
 
 
/***/ }),
/* 404 */
/***/ (function(module, exports, __webpack_require__) {
 
// 20.2.2.5 Math.asinh(x)
var $export = __webpack_require__(0);
var $asinh = Math.asinh;
 
function asinh(x) {
  return !isFinite(x = +x) || x == 0 ? x : x < 0 ? -asinh(-x) : Math.log(x + Math.sqrt(x * x + 1));
}
 
// Tor Browser bug: Math.asinh(0) -> -0
$export($export.S + $export.F * !($asinh && 1 / $asinh(0) > 0), 'Math', { asinh: asinh });
 
 
/***/ }),
/* 405 */
/***/ (function(module, exports, __webpack_require__) {
 
// 20.2.2.7 Math.atanh(x)
var $export = __webpack_require__(0);
var $atanh = Math.atanh;
 
// Tor Browser bug: Math.atanh(-0) -> 0
$export($export.S + $export.F * !($atanh && 1 / $atanh(-0) < 0), 'Math', {
  atanh: function atanh(x) {
    return (x = +x) == 0 ? x : Math.log((1 + x) / (1 - x)) / 2;
  }
});
 
 
/***/ }),
/* 406 */
/***/ (function(module, exports, __webpack_require__) {
 
// 20.2.2.9 Math.cbrt(x)
var $export = __webpack_require__(0);
var sign = __webpack_require__(140);
 
$export($export.S, 'Math', {
  cbrt: function cbrt(x) {
    return sign(x = +x) * Math.pow(Math.abs(x), 1 / 3);
  }
});
 
 
/***/ }),
/* 407 */
/***/ (function(module, exports, __webpack_require__) {
 
// 20.2.2.11 Math.clz32(x)
var $export = __webpack_require__(0);
 
$export($export.S, 'Math', {
  clz32: function clz32(x) {
    return (x >>>= 0) ? 31 - Math.floor(Math.log(x + 0.5) * Math.LOG2E) : 32;
  }
});
 
 
/***/ }),
/* 408 */
/***/ (function(module, exports, __webpack_require__) {
 
// 20.2.2.12 Math.cosh(x)
var $export = __webpack_require__(0);
var exp = Math.exp;
 
$export($export.S, 'Math', {
  cosh: function cosh(x) {
    return (exp(x = +x) + exp(-x)) / 2;
  }
});
 
 
/***/ }),
/* 409 */
/***/ (function(module, exports, __webpack_require__) {
 
// 20.2.2.14 Math.expm1(x)
var $export = __webpack_require__(0);
var $expm1 = __webpack_require__(139);
 
$export($export.S + $export.F * ($expm1 != Math.expm1), 'Math', { expm1: $expm1 });
 
 
/***/ }),
/* 410 */
/***/ (function(module, exports, __webpack_require__) {
 
// 20.2.2.16 Math.fround(x)
var $export = __webpack_require__(0);
 
$export($export.S, 'Math', { fround: __webpack_require__(212) });
 
 
/***/ }),
/* 411 */
/***/ (function(module, exports, __webpack_require__) {
 
// 20.2.2.17 Math.hypot([value1[, value2[, … ]]])
var $export = __webpack_require__(0);
var abs = Math.abs;
 
$export($export.S, 'Math', {
  hypot: function hypot(value1, value2) { // eslint-disable-line no-unused-vars
    var sum = 0;
    var i = 0;
    var aLen = arguments.length;
    var larg = 0;
    var arg, div;
    while (i < aLen) {
      arg = abs(arguments[i++]);
      if (larg < arg) {
        div = larg / arg;
        sum = sum * div * div + 1;
        larg = arg;
      } else if (arg > 0) {
        div = arg / larg;
        sum += div * div;
      } else sum += arg;
    }
    return larg === Infinity ? Infinity : larg * Math.sqrt(sum);
  }
});
 
 
/***/ }),
/* 412 */
/***/ (function(module, exports, __webpack_require__) {
 
// 20.2.2.18 Math.imul(x, y)
var $export = __webpack_require__(0);
var $imul = Math.imul;
 
// some WebKit versions fails with big numbers, some has wrong arity
$export($export.S + $export.F * __webpack_require__(4)(function () {
  return $imul(0xffffffff, 5) != -5 || $imul.length != 2;
}), 'Math', {
  imul: function imul(x, y) {
    var UINT16 = 0xffff;
    var xn = +x;
    var yn = +y;
    var xl = UINT16 & xn;
    var yl = UINT16 & yn;
    return 0 | xl * yl + ((UINT16 & xn >>> 16) * yl + xl * (UINT16 & yn >>> 16) << 16 >>> 0);
  }
});
 
 
/***/ }),
/* 413 */
/***/ (function(module, exports, __webpack_require__) {
 
// 20.2.2.21 Math.log10(x)
var $export = __webpack_require__(0);
 
$export($export.S, 'Math', {
  log10: function log10(x) {
    return Math.log(x) * Math.LOG10E;
  }
});
 
 
/***/ }),
/* 414 */
/***/ (function(module, exports, __webpack_require__) {
 
// 20.2.2.20 Math.log1p(x)
var $export = __webpack_require__(0);
 
$export($export.S, 'Math', { log1p: __webpack_require__(213) });
 
 
/***/ }),
/* 415 */
/***/ (function(module, exports, __webpack_require__) {
 
// 20.2.2.22 Math.log2(x)
var $export = __webpack_require__(0);
 
$export($export.S, 'Math', {
  log2: function log2(x) {
    return Math.log(x) / Math.LN2;
  }
});
 
 
/***/ }),
/* 416 */
/***/ (function(module, exports, __webpack_require__) {
 
// 20.2.2.28 Math.sign(x)
var $export = __webpack_require__(0);
 
$export($export.S, 'Math', { sign: __webpack_require__(140) });
 
 
/***/ }),
/* 417 */
/***/ (function(module, exports, __webpack_require__) {
 
// 20.2.2.30 Math.sinh(x)
var $export = __webpack_require__(0);
var expm1 = __webpack_require__(139);
var exp = Math.exp;
 
// V8 near Chromium 38 has a problem with very small numbers
$export($export.S + $export.F * __webpack_require__(4)(function () {
  return !Math.sinh(-2e-17) != -2e-17;
}), 'Math', {
  sinh: function sinh(x) {
    return Math.abs(x = +x) < 1
      ? (expm1(x) - expm1(-x)) / 2
      : (exp(x - 1) - exp(-x - 1)) * (Math.E / 2);
  }
});
 
 
/***/ }),
/* 418 */
/***/ (function(module, exports, __webpack_require__) {
 
// 20.2.2.33 Math.tanh(x)
var $export = __webpack_require__(0);
var expm1 = __webpack_require__(139);
var exp = Math.exp;
 
$export($export.S, 'Math', {
  tanh: function tanh(x) {
    var a = expm1(x = +x);
    var b = expm1(-x);
    return a == Infinity ? 1 : b == Infinity ? -1 : (a - b) / (exp(x) + exp(-x));
  }
});
 
 
/***/ }),
/* 419 */
/***/ (function(module, exports, __webpack_require__) {
 
// 20.2.2.34 Math.trunc(x)
var $export = __webpack_require__(0);
 
$export($export.S, 'Math', {
  trunc: function trunc(it) {
    return (it > 0 ? Math.floor : Math.ceil)(it);
  }
});
 
 
/***/ }),
/* 420 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var global = __webpack_require__(3);
var has = __webpack_require__(18);
var cof = __webpack_require__(27);
var inheritIfRequired = __webpack_require__(135);
var toPrimitive = __webpack_require__(37);
var fails = __webpack_require__(4);
var gOPN = __webpack_require__(52).f;
var gOPD = __webpack_require__(22).f;
var dP = __webpack_require__(10).f;
var $trim = __webpack_require__(65).trim;
var NUMBER = 'Number';
var $Number = global[NUMBER];
var Base = $Number;
var proto = $Number.prototype;
// Opera ~12 has broken Object#toString
var BROKEN_COF = cof(__webpack_require__(51)(proto)) == NUMBER;
var TRIM = 'trim' in String.prototype;
 
// 7.1.3 ToNumber(argument)
var toNumber = function (argument) {
  var it = toPrimitive(argument, false);
  if (typeof it == 'string' && it.length > 2) {
    it = TRIM ? it.trim() : $trim(it, 3);
    var first = it.charCodeAt(0);
    var third, radix, maxCode;
    if (first === 43 || first === 45) {
      third = it.charCodeAt(2);
      if (third === 88 || third === 120) return NaN; // Number('+0x1') should be NaN, old V8 fix
    } else if (first === 48) {
      switch (it.charCodeAt(1)) {
        case 66: case 98: radix = 2; maxCode = 49; break; // fast equal /^0b[01]+$/i
        case 79: case 111: radix = 8; maxCode = 55; break; // fast equal /^0o[0-7]+$/i
        default: return +it;
      }
      for (var digits = it.slice(2), i = 0, l = digits.length, code; i < l; i++) {
        code = digits.charCodeAt(i);
        // parseInt parses a string to a first unavailable symbol
        // but ToNumber should return NaN if a string contains unavailable symbols
        if (code < 48 || code > maxCode) return NaN;
      } return parseInt(digits, radix);
    }
  } return +it;
};
 
if (!$Number(' 0o1') || !$Number('0b1') || $Number('+0x1')) {
  $Number = function Number(value) {
    var it = arguments.length < 1 ? 0 : value;
    var that = this;
    return that instanceof $Number
      // check on 1..constructor(foo) case
      && (BROKEN_COF ? fails(function () { proto.valueOf.call(that); }) : cof(that) != NUMBER)
        ? inheritIfRequired(new Base(toNumber(it)), that, $Number) : toNumber(it);
  };
  for (var keys = __webpack_require__(9) ? gOPN(Base) : (
    // ES3:
    'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' +
    // ES6 (in case, if modules with ES6 Number statics required before):
    'EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,' +
    'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger'
  ).split(','), j = 0, key; keys.length > j; j++) {
    if (has(Base, key = keys[j]) && !has($Number, key)) {
      dP($Number, key, gOPD(Base, key));
    }
  }
  $Number.prototype = proto;
  proto.constructor = $Number;
  __webpack_require__(20)(global, NUMBER, $Number);
}
 
 
/***/ }),
/* 421 */
/***/ (function(module, exports, __webpack_require__) {
 
// 20.1.2.1 Number.EPSILON
var $export = __webpack_require__(0);
 
$export($export.S, 'Number', { EPSILON: Math.pow(2, -52) });
 
 
/***/ }),
/* 422 */
/***/ (function(module, exports, __webpack_require__) {
 
// 20.1.2.2 Number.isFinite(number)
var $export = __webpack_require__(0);
var _isFinite = __webpack_require__(3).isFinite;
 
$export($export.S, 'Number', {
  isFinite: function isFinite(it) {
    return typeof it == 'number' && _isFinite(it);
  }
});
 
 
/***/ }),
/* 423 */
/***/ (function(module, exports, __webpack_require__) {
 
// 20.1.2.3 Number.isInteger(number)
var $export = __webpack_require__(0);
 
$export($export.S, 'Number', { isInteger: __webpack_require__(209) });
 
 
/***/ }),
/* 424 */
/***/ (function(module, exports, __webpack_require__) {
 
// 20.1.2.4 Number.isNaN(number)
var $export = __webpack_require__(0);
 
$export($export.S, 'Number', {
  isNaN: function isNaN(number) {
    // eslint-disable-next-line no-self-compare
    return number != number;
  }
});
 
 
/***/ }),
/* 425 */
/***/ (function(module, exports, __webpack_require__) {
 
// 20.1.2.5 Number.isSafeInteger(number)
var $export = __webpack_require__(0);
var isInteger = __webpack_require__(209);
var abs = Math.abs;
 
$export($export.S, 'Number', {
  isSafeInteger: function isSafeInteger(number) {
    return isInteger(number) && abs(number) <= 0x1fffffffffffff;
  }
});
 
 
/***/ }),
/* 426 */
/***/ (function(module, exports, __webpack_require__) {
 
// 20.1.2.6 Number.MAX_SAFE_INTEGER
var $export = __webpack_require__(0);
 
$export($export.S, 'Number', { MAX_SAFE_INTEGER: 0x1fffffffffffff });
 
 
/***/ }),
/* 427 */
/***/ (function(module, exports, __webpack_require__) {
 
// 20.1.2.10 Number.MIN_SAFE_INTEGER
var $export = __webpack_require__(0);
 
$export($export.S, 'Number', { MIN_SAFE_INTEGER: -0x1fffffffffffff });
 
 
/***/ }),
/* 428 */
/***/ (function(module, exports, __webpack_require__) {
 
var $export = __webpack_require__(0);
var $parseFloat = __webpack_require__(221);
// 20.1.2.12 Number.parseFloat(string)
$export($export.S + $export.F * (Number.parseFloat != $parseFloat), 'Number', { parseFloat: $parseFloat });
 
 
/***/ }),
/* 429 */
/***/ (function(module, exports, __webpack_require__) {
 
var $export = __webpack_require__(0);
var $parseInt = __webpack_require__(222);
// 20.1.2.13 Number.parseInt(string, radix)
$export($export.S + $export.F * (Number.parseInt != $parseInt), 'Number', { parseInt: $parseInt });
 
 
/***/ }),
/* 430 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var $export = __webpack_require__(0);
var toInteger = __webpack_require__(36);
var aNumberValue = __webpack_require__(198);
var repeat = __webpack_require__(147);
var $toFixed = 1.0.toFixed;
var floor = Math.floor;
var data = [0, 0, 0, 0, 0, 0];
var ERROR = 'Number.toFixed: incorrect invocation!';
var ZERO = '0';
 
var multiply = function (n, c) {
  var i = -1;
  var c2 = c;
  while (++i < 6) {
    c2 += n * data[i];
    data[i] = c2 % 1e7;
    c2 = floor(c2 / 1e7);
  }
};
var divide = function (n) {
  var i = 6;
  var c = 0;
  while (--i >= 0) {
    c += data[i];
    data[i] = floor(c / n);
    c = (c % n) * 1e7;
  }
};
var numToString = function () {
  var i = 6;
  var s = '';
  while (--i >= 0) {
    if (s !== '' || i === 0 || data[i] !== 0) {
      var t = String(data[i]);
      s = s === '' ? t : s + repeat.call(ZERO, 7 - t.length) + t;
    }
  } return s;
};
var pow = function (x, n, acc) {
  return n === 0 ? acc : n % 2 === 1 ? pow(x, n - 1, acc * x) : pow(x * x, n / 2, acc);
};
var log = function (x) {
  var n = 0;
  var x2 = x;
  while (x2 >= 4096) {
    n += 12;
    x2 /= 4096;
  }
  while (x2 >= 2) {
    n += 1;
    x2 /= 2;
  } return n;
};
 
$export($export.P + $export.F * (!!$toFixed && (
  0.00008.toFixed(3) !== '0.000' ||
  0.9.toFixed(0) !== '1' ||
  1.255.toFixed(2) !== '1.25' ||
  1000000000000000128.0.toFixed(0) !== '1000000000000000128'
) || !__webpack_require__(4)(function () {
  // V8 ~ Android 4.3-
  $toFixed.call({});
})), 'Number', {
  toFixed: function toFixed(fractionDigits) {
    var x = aNumberValue(this, ERROR);
    var f = toInteger(fractionDigits);
    var s = '';
    var m = ZERO;
    var e, z, j, k;
    if (f < 0 || f > 20) throw RangeError(ERROR);
    // eslint-disable-next-line no-self-compare
    if (x != x) return 'NaN';
    if (x <= -1e21 || x >= 1e21) return String(x);
    if (x < 0) {
      s = '-';
      x = -x;
    }
    if (x > 1e-21) {
      e = log(x * pow(2, 69, 1)) - 69;
      z = e < 0 ? x * pow(2, -e, 1) : x / pow(2, e, 1);
      z *= 0x10000000000000;
      e = 52 - e;
      if (e > 0) {
        multiply(0, z);
        j = f;
        while (j >= 7) {
          multiply(1e7, 0);
          j -= 7;
        }
        multiply(pow(10, j, 1), 0);
        j = e - 1;
        while (j >= 23) {
          divide(1 << 23);
          j -= 23;
        }
        divide(1 << j);
        multiply(1, 1);
        divide(2);
        m = numToString();
      } else {
        multiply(0, z);
        multiply(1 << -e, 0);
        m = numToString() + repeat.call(ZERO, f);
      }
    }
    if (f > 0) {
      k = m.length;
      m = s + (k <= f ? '0.' + repeat.call(ZERO, f - k) + m : m.slice(0, k - f) + '.' + m.slice(k - f));
    } else {
      m = s + m;
    } return m;
  }
});
 
 
/***/ }),
/* 431 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var $export = __webpack_require__(0);
var $fails = __webpack_require__(4);
var aNumberValue = __webpack_require__(198);
var $toPrecision = 1.0.toPrecision;
 
$export($export.P + $export.F * ($fails(function () {
  // IE7-
  return $toPrecision.call(1, undefined) !== '1';
}) || !$fails(function () {
  // V8 ~ Android 4.3-
  $toPrecision.call({});
})), 'Number', {
  toPrecision: function toPrecision(precision) {
    var that = aNumberValue(this, 'Number#toPrecision: incorrect invocation!');
    return precision === undefined ? $toPrecision.call(that) : $toPrecision.call(that, precision);
  }
});
 
 
/***/ }),
/* 432 */
/***/ (function(module, exports, __webpack_require__) {
 
// 19.1.3.1 Object.assign(target, source)
var $export = __webpack_require__(0);
 
$export($export.S + $export.F, 'Object', { assign: __webpack_require__(215) });
 
 
/***/ }),
/* 433 */
/***/ (function(module, exports, __webpack_require__) {
 
var $export = __webpack_require__(0);
// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
$export($export.S, 'Object', { create: __webpack_require__(51) });
 
 
/***/ }),
/* 434 */
/***/ (function(module, exports, __webpack_require__) {
 
var $export = __webpack_require__(0);
// 19.1.2.3 / 15.2.3.7 Object.defineProperties(O, Properties)
$export($export.S + $export.F * !__webpack_require__(9), 'Object', { defineProperties: __webpack_require__(216) });
 
 
/***/ }),
/* 435 */
/***/ (function(module, exports, __webpack_require__) {
 
var $export = __webpack_require__(0);
// 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes)
$export($export.S + $export.F * !__webpack_require__(9), 'Object', { defineProperty: __webpack_require__(10).f });
 
 
/***/ }),
/* 436 */
/***/ (function(module, exports, __webpack_require__) {
 
// 19.1.2.5 Object.freeze(O)
var isObject = __webpack_require__(5);
var meta = __webpack_require__(44).onFreeze;
 
__webpack_require__(35)('freeze', function ($freeze) {
  return function freeze(it) {
    return $freeze && isObject(it) ? $freeze(meta(it)) : it;
  };
});
 
 
/***/ }),
/* 437 */
/***/ (function(module, exports, __webpack_require__) {
 
// 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)
var toIObject = __webpack_require__(24);
var $getOwnPropertyDescriptor = __webpack_require__(22).f;
 
__webpack_require__(35)('getOwnPropertyDescriptor', function () {
  return function getOwnPropertyDescriptor(it, key) {
    return $getOwnPropertyDescriptor(toIObject(it), key);
  };
});
 
 
/***/ }),
/* 438 */
/***/ (function(module, exports, __webpack_require__) {
 
// 19.1.2.7 Object.getOwnPropertyNames(O)
__webpack_require__(35)('getOwnPropertyNames', function () {
  return __webpack_require__(217).f;
});
 
 
/***/ }),
/* 439 */
/***/ (function(module, exports, __webpack_require__) {
 
// 19.1.2.9 Object.getPrototypeOf(O)
var toObject = __webpack_require__(14);
var $getPrototypeOf = __webpack_require__(23);
 
__webpack_require__(35)('getPrototypeOf', function () {
  return function getPrototypeOf(it) {
    return $getPrototypeOf(toObject(it));
  };
});
 
 
/***/ }),
/* 440 */
/***/ (function(module, exports, __webpack_require__) {
 
// 19.1.2.11 Object.isExtensible(O)
var isObject = __webpack_require__(5);
 
__webpack_require__(35)('isExtensible', function ($isExtensible) {
  return function isExtensible(it) {
    return isObject(it) ? $isExtensible ? $isExtensible(it) : true : false;
  };
});
 
 
/***/ }),
/* 441 */
/***/ (function(module, exports, __webpack_require__) {
 
// 19.1.2.12 Object.isFrozen(O)
var isObject = __webpack_require__(5);
 
__webpack_require__(35)('isFrozen', function ($isFrozen) {
  return function isFrozen(it) {
    return isObject(it) ? $isFrozen ? $isFrozen(it) : false : true;
  };
});
 
 
/***/ }),
/* 442 */
/***/ (function(module, exports, __webpack_require__) {
 
// 19.1.2.13 Object.isSealed(O)
var isObject = __webpack_require__(5);
 
__webpack_require__(35)('isSealed', function ($isSealed) {
  return function isSealed(it) {
    return isObject(it) ? $isSealed ? $isSealed(it) : false : true;
  };
});
 
 
/***/ }),
/* 443 */
/***/ (function(module, exports, __webpack_require__) {
 
// 19.1.3.10 Object.is(value1, value2)
var $export = __webpack_require__(0);
$export($export.S, 'Object', { is: __webpack_require__(373) });
 
 
/***/ }),
/* 444 */
/***/ (function(module, exports, __webpack_require__) {
 
// 19.1.2.14 Object.keys(O)
var toObject = __webpack_require__(14);
var $keys = __webpack_require__(53);
 
__webpack_require__(35)('keys', function () {
  return function keys(it) {
    return $keys(toObject(it));
  };
});
 
 
/***/ }),
/* 445 */
/***/ (function(module, exports, __webpack_require__) {
 
// 19.1.2.15 Object.preventExtensions(O)
var isObject = __webpack_require__(5);
var meta = __webpack_require__(44).onFreeze;
 
__webpack_require__(35)('preventExtensions', function ($preventExtensions) {
  return function preventExtensions(it) {
    return $preventExtensions && isObject(it) ? $preventExtensions(meta(it)) : it;
  };
});
 
 
/***/ }),
/* 446 */
/***/ (function(module, exports, __webpack_require__) {
 
// 19.1.2.17 Object.seal(O)
var isObject = __webpack_require__(5);
var meta = __webpack_require__(44).onFreeze;
 
__webpack_require__(35)('seal', function ($seal) {
  return function seal(it) {
    return $seal && isObject(it) ? $seal(meta(it)) : it;
  };
});
 
 
/***/ }),
/* 447 */
/***/ (function(module, exports, __webpack_require__) {
 
// 19.1.3.19 Object.setPrototypeOf(O, proto)
var $export = __webpack_require__(0);
$export($export.S, 'Object', { setPrototypeOf: __webpack_require__(143).set });
 
 
/***/ }),
/* 448 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
// 19.1.3.6 Object.prototype.toString()
var classof = __webpack_require__(71);
var test = {};
test[__webpack_require__(6)('toStringTag')] = 'z';
if (test + '' != '[object z]') {
  __webpack_require__(20)(Object.prototype, 'toString', function toString() {
    return '[object ' + classof(this) + ']';
  }, true);
}
 
 
/***/ }),
/* 449 */
/***/ (function(module, exports, __webpack_require__) {
 
var $export = __webpack_require__(0);
var $parseFloat = __webpack_require__(221);
// 18.2.4 parseFloat(string)
$export($export.G + $export.F * (parseFloat != $parseFloat), { parseFloat: $parseFloat });
 
 
/***/ }),
/* 450 */
/***/ (function(module, exports, __webpack_require__) {
 
var $export = __webpack_require__(0);
var $parseInt = __webpack_require__(222);
// 18.2.5 parseInt(string, radix)
$export($export.G + $export.F * (parseInt != $parseInt), { parseInt: $parseInt });
 
 
/***/ }),
/* 451 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var LIBRARY = __webpack_require__(50);
var global = __webpack_require__(3);
var ctx = __webpack_require__(28);
var classof = __webpack_require__(71);
var $export = __webpack_require__(0);
var isObject = __webpack_require__(5);
var aFunction = __webpack_require__(15);
var anInstance = __webpack_require__(48);
var forOf = __webpack_require__(49);
var speciesConstructor = __webpack_require__(99);
var task = __webpack_require__(149).set;
var microtask = __webpack_require__(141)();
var newPromiseCapabilityModule = __webpack_require__(142);
var perform = __webpack_require__(223);
var promiseResolve = __webpack_require__(224);
var PROMISE = 'Promise';
var TypeError = global.TypeError;
var process = global.process;
var $Promise = global[PROMISE];
var isNode = classof(process) == 'process';
var empty = function () { /* empty */ };
var Internal, newGenericPromiseCapability, OwnPromiseCapability, Wrapper;
var newPromiseCapability = newGenericPromiseCapability = newPromiseCapabilityModule.f;
 
var USE_NATIVE = !!function () {
  try {
    // correct subclassing with @@species support
    var promise = $Promise.resolve(1);
    var FakePromise = (promise.constructor = {})[__webpack_require__(6)('species')] = function (exec) {
      exec(empty, empty);
    };
    // unhandled rejections tracking support, NodeJS Promise without it fails @@species test
    return (isNode || typeof PromiseRejectionEvent == 'function') && promise.then(empty) instanceof FakePromise;
  } catch (e) { /* empty */ }
}();
 
// helpers
var isThenable = function (it) {
  var then;
  return isObject(it) && typeof (then = it.then) == 'function' ? then : false;
};
var notify = function (promise, isReject) {
  if (promise._n) return;
  promise._n = true;
  var chain = promise._c;
  microtask(function () {
    var value = promise._v;
    var ok = promise._s == 1;
    var i = 0;
    var run = function (reaction) {
      var handler = ok ? reaction.ok : reaction.fail;
      var resolve = reaction.resolve;
      var reject = reaction.reject;
      var domain = reaction.domain;
      var result, then;
      try {
        if (handler) {
          if (!ok) {
            if (promise._h == 2) onHandleUnhandled(promise);
            promise._h = 1;
          }
          if (handler === true) result = value;
          else {
            if (domain) domain.enter();
            result = handler(value);
            if (domain) domain.exit();
          }
          if (result === reaction.promise) {
            reject(TypeError('Promise-chain cycle'));
          } else if (then = isThenable(result)) {
            then.call(result, resolve, reject);
          } else resolve(result);
        } else reject(value);
      } catch (e) {
        reject(e);
      }
    };
    while (chain.length > i) run(chain[i++]); // variable length - can't use forEach
    promise._c = [];
    promise._n = false;
    if (isReject && !promise._h) onUnhandled(promise);
  });
};
var onUnhandled = function (promise) {
  task.call(global, function () {
    var value = promise._v;
    var unhandled = isUnhandled(promise);
    var result, handler, console;
    if (unhandled) {
      result = perform(function () {
        if (isNode) {
          process.emit('unhandledRejection', value, promise);
        } else if (handler = global.onunhandledrejection) {
          handler({ promise: promise, reason: value });
        } else if ((console = global.console) && console.error) {
          console.error('Unhandled promise rejection', value);
        }
      });
      // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should
      promise._h = isNode || isUnhandled(promise) ? 2 : 1;
    } promise._a = undefined;
    if (unhandled && result.e) throw result.v;
  });
};
var isUnhandled = function (promise) {
  return promise._h !== 1 && (promise._a || promise._c).length === 0;
};
var onHandleUnhandled = function (promise) {
  task.call(global, function () {
    var handler;
    if (isNode) {
      process.emit('rejectionHandled', promise);
    } else if (handler = global.onrejectionhandled) {
      handler({ promise: promise, reason: promise._v });
    }
  });
};
var $reject = function (value) {
  var promise = this;
  if (promise._d) return;
  promise._d = true;
  promise = promise._w || promise; // unwrap
  promise._v = value;
  promise._s = 2;
  if (!promise._a) promise._a = promise._c.slice();
  notify(promise, true);
};
var $resolve = function (value) {
  var promise = this;
  var then;
  if (promise._d) return;
  promise._d = true;
  promise = promise._w || promise; // unwrap
  try {
    if (promise === value) throw TypeError("Promise can't be resolved itself");
    if (then = isThenable(value)) {
      microtask(function () {
        var wrapper = { _w: promise, _d: false }; // wrap
        try {
          then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1));
        } catch (e) {
          $reject.call(wrapper, e);
        }
      });
    } else {
      promise._v = value;
      promise._s = 1;
      notify(promise, false);
    }
  } catch (e) {
    $reject.call({ _w: promise, _d: false }, e); // wrap
  }
};
 
// constructor polyfill
if (!USE_NATIVE) {
  // 25.4.3.1 Promise(executor)
  $Promise = function Promise(executor) {
    anInstance(this, $Promise, PROMISE, '_h');
    aFunction(executor);
    Internal.call(this);
    try {
      executor(ctx($resolve, this, 1), ctx($reject, this, 1));
    } catch (err) {
      $reject.call(this, err);
    }
  };
  // eslint-disable-next-line no-unused-vars
  Internal = function Promise(executor) {
    this._c = [];             // <- awaiting reactions
    this._a = undefined;      // <- checked in isUnhandled reactions
    this._s = 0;              // <- state
    this._d = false;          // <- done
    this._v = undefined;      // <- value
    this._h = 0;              // <- rejection state, 0 - default, 1 - handled, 2 - unhandled
    this._n = false;          // <- notify
  };
  Internal.prototype = __webpack_require__(55)($Promise.prototype, {
    // 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected)
    then: function then(onFulfilled, onRejected) {
      var reaction = newPromiseCapability(speciesConstructor(this, $Promise));
      reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true;
      reaction.fail = typeof onRejected == 'function' && onRejected;
      reaction.domain = isNode ? process.domain : undefined;
      this._c.push(reaction);
      if (this._a) this._a.push(reaction);
      if (this._s) notify(this, false);
      return reaction.promise;
    },
    // 25.4.5.1 Promise.prototype.catch(onRejected)
    'catch': function (onRejected) {
      return this.then(undefined, onRejected);
    }
  });
  OwnPromiseCapability = function () {
    var promise = new Internal();
    this.promise = promise;
    this.resolve = ctx($resolve, promise, 1);
    this.reject = ctx($reject, promise, 1);
  };
  newPromiseCapabilityModule.f = newPromiseCapability = function (C) {
    return C === $Promise || C === Wrapper
      ? new OwnPromiseCapability(C)
      : newGenericPromiseCapability(C);
  };
}
 
$export($export.G + $export.W + $export.F * !USE_NATIVE, { Promise: $Promise });
__webpack_require__(64)($Promise, PROMISE);
__webpack_require__(56)(PROMISE);
Wrapper = __webpack_require__(33)[PROMISE];
 
// statics
$export($export.S + $export.F * !USE_NATIVE, PROMISE, {
  // 25.4.4.5 Promise.reject(r)
  reject: function reject(r) {
    var capability = newPromiseCapability(this);
    var $$reject = capability.reject;
    $$reject(r);
    return capability.promise;
  }
});
$export($export.S + $export.F * (LIBRARY || !USE_NATIVE), PROMISE, {
  // 25.4.4.6 Promise.resolve(x)
  resolve: function resolve(x) {
    return promiseResolve(LIBRARY && this === Wrapper ? $Promise : this, x);
  }
});
$export($export.S + $export.F * !(USE_NATIVE && __webpack_require__(93)(function (iter) {
  $Promise.all(iter)['catch'](empty);
})), PROMISE, {
  // 25.4.4.1 Promise.all(iterable)
  all: function all(iterable) {
    var C = this;
    var capability = newPromiseCapability(C);
    var resolve = capability.resolve;
    var reject = capability.reject;
    var result = perform(function () {
      var values = [];
      var index = 0;
      var remaining = 1;
      forOf(iterable, false, function (promise) {
        var $index = index++;
        var alreadyCalled = false;
        values.push(undefined);
        remaining++;
        C.resolve(promise).then(function (value) {
          if (alreadyCalled) return;
          alreadyCalled = true;
          values[$index] = value;
          --remaining || resolve(values);
        }, reject);
      });
      --remaining || resolve(values);
    });
    if (result.e) reject(result.v);
    return capability.promise;
  },
  // 25.4.4.4 Promise.race(iterable)
  race: function race(iterable) {
    var C = this;
    var capability = newPromiseCapability(C);
    var reject = capability.reject;
    var result = perform(function () {
      forOf(iterable, false, function (promise) {
        C.resolve(promise).then(capability.resolve, reject);
      });
    });
    if (result.e) reject(result.v);
    return capability.promise;
  }
});
 
 
/***/ }),
/* 452 */
/***/ (function(module, exports, __webpack_require__) {
 
// 26.1.1 Reflect.apply(target, thisArgument, argumentsList)
var $export = __webpack_require__(0);
var aFunction = __webpack_require__(15);
var anObject = __webpack_require__(2);
var rApply = (__webpack_require__(3).Reflect || {}).apply;
var fApply = Function.apply;
// MS Edge argumentsList argument is optional
$export($export.S + $export.F * !__webpack_require__(4)(function () {
  rApply(function () { /* empty */ });
}), 'Reflect', {
  apply: function apply(target, thisArgument, argumentsList) {
    var T = aFunction(target);
    var L = anObject(argumentsList);
    return rApply ? rApply(T, thisArgument, L) : fApply.call(T, thisArgument, L);
  }
});
 
 
/***/ }),
/* 453 */
/***/ (function(module, exports, __webpack_require__) {
 
// 26.1.2 Reflect.construct(target, argumentsList [, newTarget])
var $export = __webpack_require__(0);
var create = __webpack_require__(51);
var aFunction = __webpack_require__(15);
var anObject = __webpack_require__(2);
var isObject = __webpack_require__(5);
var fails = __webpack_require__(4);
var bind = __webpack_require__(202);
var rConstruct = (__webpack_require__(3).Reflect || {}).construct;
 
// MS Edge supports only 2 arguments and argumentsList argument is optional
// FF Nightly sets third argument as `new.target`, but does not create `this` from it
var NEW_TARGET_BUG = fails(function () {
  function F() { /* empty */ }
  return !(rConstruct(function () { /* empty */ }, [], F) instanceof F);
});
var ARGS_BUG = !fails(function () {
  rConstruct(function () { /* empty */ });
});
 
$export($export.S + $export.F * (NEW_TARGET_BUG || ARGS_BUG), 'Reflect', {
  construct: function construct(Target, args /* , newTarget */) {
    aFunction(Target);
    anObject(args);
    var newTarget = arguments.length < 3 ? Target : aFunction(arguments[2]);
    if (ARGS_BUG && !NEW_TARGET_BUG) return rConstruct(Target, args, newTarget);
    if (Target == newTarget) {
      // w/o altered newTarget, optimization for 0-4 arguments
      switch (args.length) {
        case 0: return new Target();
        case 1: return new Target(args[0]);
        case 2: return new Target(args[0], args[1]);
        case 3: return new Target(args[0], args[1], args[2]);
        case 4: return new Target(args[0], args[1], args[2], args[3]);
      }
      // w/o altered newTarget, lot of arguments case
      var $args = [null];
      $args.push.apply($args, args);
      return new (bind.apply(Target, $args))();
    }
    // with altered newTarget, not support built-in constructors
    var proto = newTarget.prototype;
    var instance = create(isObject(proto) ? proto : Object.prototype);
    var result = Function.apply.call(Target, instance, args);
    return isObject(result) ? result : instance;
  }
});
 
 
/***/ }),
/* 454 */
/***/ (function(module, exports, __webpack_require__) {
 
// 26.1.3 Reflect.defineProperty(target, propertyKey, attributes)
var dP = __webpack_require__(10);
var $export = __webpack_require__(0);
var anObject = __webpack_require__(2);
var toPrimitive = __webpack_require__(37);
 
// MS Edge has broken Reflect.defineProperty - throwing instead of returning false
$export($export.S + $export.F * __webpack_require__(4)(function () {
  // eslint-disable-next-line no-undef
  Reflect.defineProperty(dP.f({}, 1, { value: 1 }), 1, { value: 2 });
}), 'Reflect', {
  defineProperty: function defineProperty(target, propertyKey, attributes) {
    anObject(target);
    propertyKey = toPrimitive(propertyKey, true);
    anObject(attributes);
    try {
      dP.f(target, propertyKey, attributes);
      return true;
    } catch (e) {
      return false;
    }
  }
});
 
 
/***/ }),
/* 455 */
/***/ (function(module, exports, __webpack_require__) {
 
// 26.1.4 Reflect.deleteProperty(target, propertyKey)
var $export = __webpack_require__(0);
var gOPD = __webpack_require__(22).f;
var anObject = __webpack_require__(2);
 
$export($export.S, 'Reflect', {
  deleteProperty: function deleteProperty(target, propertyKey) {
    var desc = gOPD(anObject(target), propertyKey);
    return desc && !desc.configurable ? false : delete target[propertyKey];
  }
});
 
 
/***/ }),
/* 456 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
// 26.1.5 Reflect.enumerate(target)
var $export = __webpack_require__(0);
var anObject = __webpack_require__(2);
var Enumerate = function (iterated) {
  this._t = anObject(iterated); // target
  this._i = 0;                  // next index
  var keys = this._k = [];      // keys
  var key;
  for (key in iterated) keys.push(key);
};
__webpack_require__(137)(Enumerate, 'Object', function () {
  var that = this;
  var keys = that._k;
  var key;
  do {
    if (that._i >= keys.length) return { value: undefined, done: true };
  } while (!((key = keys[that._i++]) in that._t));
  return { value: key, done: false };
});
 
$export($export.S, 'Reflect', {
  enumerate: function enumerate(target) {
    return new Enumerate(target);
  }
});
 
 
/***/ }),
/* 457 */
/***/ (function(module, exports, __webpack_require__) {
 
// 26.1.7 Reflect.getOwnPropertyDescriptor(target, propertyKey)
var gOPD = __webpack_require__(22);
var $export = __webpack_require__(0);
var anObject = __webpack_require__(2);
 
$export($export.S, 'Reflect', {
  getOwnPropertyDescriptor: function getOwnPropertyDescriptor(target, propertyKey) {
    return gOPD.f(anObject(target), propertyKey);
  }
});
 
 
/***/ }),
/* 458 */
/***/ (function(module, exports, __webpack_require__) {
 
// 26.1.8 Reflect.getPrototypeOf(target)
var $export = __webpack_require__(0);
var getProto = __webpack_require__(23);
var anObject = __webpack_require__(2);
 
$export($export.S, 'Reflect', {
  getPrototypeOf: function getPrototypeOf(target) {
    return getProto(anObject(target));
  }
});
 
 
/***/ }),
/* 459 */
/***/ (function(module, exports, __webpack_require__) {
 
// 26.1.6 Reflect.get(target, propertyKey [, receiver])
var gOPD = __webpack_require__(22);
var getPrototypeOf = __webpack_require__(23);
var has = __webpack_require__(18);
var $export = __webpack_require__(0);
var isObject = __webpack_require__(5);
var anObject = __webpack_require__(2);
 
function get(target, propertyKey /* , receiver */) {
  var receiver = arguments.length < 3 ? target : arguments[2];
  var desc, proto;
  if (anObject(target) === receiver) return target[propertyKey];
  if (desc = gOPD.f(target, propertyKey)) return has(desc, 'value')
    ? desc.value
    : desc.get !== undefined
      ? desc.get.call(receiver)
      : undefined;
  if (isObject(proto = getPrototypeOf(target))) return get(proto, propertyKey, receiver);
}
 
$export($export.S, 'Reflect', { get: get });
 
 
/***/ }),
/* 460 */
/***/ (function(module, exports, __webpack_require__) {
 
// 26.1.9 Reflect.has(target, propertyKey)
var $export = __webpack_require__(0);
 
$export($export.S, 'Reflect', {
  has: function has(target, propertyKey) {
    return propertyKey in target;
  }
});
 
 
/***/ }),
/* 461 */
/***/ (function(module, exports, __webpack_require__) {
 
// 26.1.10 Reflect.isExtensible(target)
var $export = __webpack_require__(0);
var anObject = __webpack_require__(2);
var $isExtensible = Object.isExtensible;
 
$export($export.S, 'Reflect', {
  isExtensible: function isExtensible(target) {
    anObject(target);
    return $isExtensible ? $isExtensible(target) : true;
  }
});
 
 
/***/ }),
/* 462 */
/***/ (function(module, exports, __webpack_require__) {
 
// 26.1.11 Reflect.ownKeys(target)
var $export = __webpack_require__(0);
 
$export($export.S, 'Reflect', { ownKeys: __webpack_require__(220) });
 
 
/***/ }),
/* 463 */
/***/ (function(module, exports, __webpack_require__) {
 
// 26.1.12 Reflect.preventExtensions(target)
var $export = __webpack_require__(0);
var anObject = __webpack_require__(2);
var $preventExtensions = Object.preventExtensions;
 
$export($export.S, 'Reflect', {
  preventExtensions: function preventExtensions(target) {
    anObject(target);
    try {
      if ($preventExtensions) $preventExtensions(target);
      return true;
    } catch (e) {
      return false;
    }
  }
});
 
 
/***/ }),
/* 464 */
/***/ (function(module, exports, __webpack_require__) {
 
// 26.1.14 Reflect.setPrototypeOf(target, proto)
var $export = __webpack_require__(0);
var setProto = __webpack_require__(143);
 
if (setProto) $export($export.S, 'Reflect', {
  setPrototypeOf: function setPrototypeOf(target, proto) {
    setProto.check(target, proto);
    try {
      setProto.set(target, proto);
      return true;
    } catch (e) {
      return false;
    }
  }
});
 
 
/***/ }),
/* 465 */
/***/ (function(module, exports, __webpack_require__) {
 
// 26.1.13 Reflect.set(target, propertyKey, V [, receiver])
var dP = __webpack_require__(10);
var gOPD = __webpack_require__(22);
var getPrototypeOf = __webpack_require__(23);
var has = __webpack_require__(18);
var $export = __webpack_require__(0);
var createDesc = __webpack_require__(54);
var anObject = __webpack_require__(2);
var isObject = __webpack_require__(5);
 
function set(target, propertyKey, V /* , receiver */) {
  var receiver = arguments.length < 4 ? target : arguments[3];
  var ownDesc = gOPD.f(anObject(target), propertyKey);
  var existingDescriptor, proto;
  if (!ownDesc) {
    if (isObject(proto = getPrototypeOf(target))) {
      return set(proto, propertyKey, V, receiver);
    }
    ownDesc = createDesc(0);
  }
  if (has(ownDesc, 'value')) {
    if (ownDesc.writable === false || !isObject(receiver)) return false;
    existingDescriptor = gOPD.f(receiver, propertyKey) || createDesc(0);
    existingDescriptor.value = V;
    dP.f(receiver, propertyKey, existingDescriptor);
    return true;
  }
  return ownDesc.set === undefined ? false : (ownDesc.set.call(receiver, V), true);
}
 
$export($export.S, 'Reflect', { set: set });
 
 
/***/ }),
/* 466 */
/***/ (function(module, exports, __webpack_require__) {
 
var global = __webpack_require__(3);
var inheritIfRequired = __webpack_require__(135);
var dP = __webpack_require__(10).f;
var gOPN = __webpack_require__(52).f;
var isRegExp = __webpack_require__(92);
var $flags = __webpack_require__(90);
var $RegExp = global.RegExp;
var Base = $RegExp;
var proto = $RegExp.prototype;
var re1 = /a/g;
var re2 = /a/g;
// "new" creates a new object, old webkit buggy here
var CORRECT_NEW = new $RegExp(re1) !== re1;
 
if (__webpack_require__(9) && (!CORRECT_NEW || __webpack_require__(4)(function () {
  re2[__webpack_require__(6)('match')] = false;
  // RegExp constructor can alter flags and IsRegExp works correct with @@match
  return $RegExp(re1) != re1 || $RegExp(re2) == re2 || $RegExp(re1, 'i') != '/a/i';
}))) {
  $RegExp = function RegExp(p, f) {
    var tiRE = this instanceof $RegExp;
    var piRE = isRegExp(p);
    var fiU = f === undefined;
    return !tiRE && piRE && p.constructor === $RegExp && fiU ? p
      : inheritIfRequired(CORRECT_NEW
        ? new Base(piRE && !fiU ? p.source : p, f)
        : Base((piRE = p instanceof $RegExp) ? p.source : p, piRE && fiU ? $flags.call(p) : f)
      , tiRE ? this : proto, $RegExp);
  };
  var proxy = function (key) {
    key in $RegExp || dP($RegExp, key, {
      configurable: true,
      get: function () { return Base[key]; },
      set: function (it) { Base[key] = it; }
    });
  };
  for (var keys = gOPN(Base), i = 0; keys.length > i;) proxy(keys[i++]);
  proto.constructor = $RegExp;
  $RegExp.prototype = proto;
  __webpack_require__(20)(global, 'RegExp', $RegExp);
}
 
__webpack_require__(56)('RegExp');
 
 
/***/ }),
/* 467 */
/***/ (function(module, exports, __webpack_require__) {
 
// @@match logic
__webpack_require__(89)('match', 1, function (defined, MATCH, $match) {
  // 21.1.3.11 String.prototype.match(regexp)
  return [function match(regexp) {
    'use strict';
    var O = defined(this);
    var fn = regexp == undefined ? undefined : regexp[MATCH];
    return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[MATCH](String(O));
  }, $match];
});
 
 
/***/ }),
/* 468 */
/***/ (function(module, exports, __webpack_require__) {
 
// @@replace logic
__webpack_require__(89)('replace', 2, function (defined, REPLACE, $replace) {
  // 21.1.3.14 String.prototype.replace(searchValue, replaceValue)
  return [function replace(searchValue, replaceValue) {
    'use strict';
    var O = defined(this);
    var fn = searchValue == undefined ? undefined : searchValue[REPLACE];
    return fn !== undefined
      ? fn.call(searchValue, O, replaceValue)
      : $replace.call(String(O), searchValue, replaceValue);
  }, $replace];
});
 
 
/***/ }),
/* 469 */
/***/ (function(module, exports, __webpack_require__) {
 
// @@search logic
__webpack_require__(89)('search', 1, function (defined, SEARCH, $search) {
  // 21.1.3.15 String.prototype.search(regexp)
  return [function search(regexp) {
    'use strict';
    var O = defined(this);
    var fn = regexp == undefined ? undefined : regexp[SEARCH];
    return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[SEARCH](String(O));
  }, $search];
});
 
 
/***/ }),
/* 470 */
/***/ (function(module, exports, __webpack_require__) {
 
// @@split logic
__webpack_require__(89)('split', 2, function (defined, SPLIT, $split) {
  'use strict';
  var isRegExp = __webpack_require__(92);
  var _split = $split;
  var $push = [].push;
  var $SPLIT = 'split';
  var LENGTH = 'length';
  var LAST_INDEX = 'lastIndex';
  if (
    'abbc'[$SPLIT](/(b)*/)[1] == 'c' ||
    'test'[$SPLIT](/(?:)/, -1)[LENGTH] != 4 ||
    'ab'[$SPLIT](/(?:ab)*/)[LENGTH] != 2 ||
    '.'[$SPLIT](/(.?)(.?)/)[LENGTH] != 4 ||
    '.'[$SPLIT](/()()/)[LENGTH] > 1 ||
    ''[$SPLIT](/.?/)[LENGTH]
  ) {
    var NPCG = /()??/.exec('')[1] === undefined; // nonparticipating capturing group
    // based on es5-shim implementation, need to rework it
    $split = function (separator, limit) {
      var string = String(this);
      if (separator === undefined && limit === 0) return [];
      // If `separator` is not a regex, use native split
      if (!isRegExp(separator)) return _split.call(string, separator, limit);
      var output = [];
      var flags = (separator.ignoreCase ? 'i' : '') +
                  (separator.multiline ? 'm' : '') +
                  (separator.unicode ? 'u' : '') +
                  (separator.sticky ? 'y' : '');
      var lastLastIndex = 0;
      var splitLimit = limit === undefined ? 4294967295 : limit >>> 0;
      // Make `global` and avoid `lastIndex` issues by working with a copy
      var separatorCopy = new RegExp(separator.source, flags + 'g');
      var separator2, match, lastIndex, lastLength, i;
      // Doesn't need flags gy, but they don't hurt
      if (!NPCG) separator2 = new RegExp('^' + separatorCopy.source + '$(?!\\s)', flags);
      while (match = separatorCopy.exec(string)) {
        // `separatorCopy.lastIndex` is not reliable cross-browser
        lastIndex = match.index + match[0][LENGTH];
        if (lastIndex > lastLastIndex) {
          output.push(string.slice(lastLastIndex, match.index));
          // Fix browsers whose `exec` methods don't consistently return `undefined` for NPCG
          // eslint-disable-next-line no-loop-func
          if (!NPCG && match[LENGTH] > 1) match[0].replace(separator2, function () {
            for (i = 1; i < arguments[LENGTH] - 2; i++) if (arguments[i] === undefined) match[i] = undefined;
          });
          if (match[LENGTH] > 1 && match.index < string[LENGTH]) $push.apply(output, match.slice(1));
          lastLength = match[0][LENGTH];
          lastLastIndex = lastIndex;
          if (output[LENGTH] >= splitLimit) break;
        }
        if (separatorCopy[LAST_INDEX] === match.index) separatorCopy[LAST_INDEX]++; // Avoid an infinite loop
      }
      if (lastLastIndex === string[LENGTH]) {
        if (lastLength || !separatorCopy.test('')) output.push('');
      } else output.push(string.slice(lastLastIndex));
      return output[LENGTH] > splitLimit ? output.slice(0, splitLimit) : output;
    };
  // Chakra, V8
  } else if ('0'[$SPLIT](undefined, 0)[LENGTH]) {
    $split = function (separator, limit) {
      return separator === undefined && limit === 0 ? [] : _split.call(this, separator, limit);
    };
  }
  // 21.1.3.17 String.prototype.split(separator, limit)
  return [function split(separator, limit) {
    var O = defined(this);
    var fn = separator == undefined ? undefined : separator[SPLIT];
    return fn !== undefined ? fn.call(separator, O, limit) : $split.call(String(O), separator, limit);
  }, $split];
});
 
 
/***/ }),
/* 471 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
__webpack_require__(229);
var anObject = __webpack_require__(2);
var $flags = __webpack_require__(90);
var DESCRIPTORS = __webpack_require__(9);
var TO_STRING = 'toString';
var $toString = /./[TO_STRING];
 
var define = function (fn) {
  __webpack_require__(20)(RegExp.prototype, TO_STRING, fn, true);
};
 
// 21.2.5.14 RegExp.prototype.toString()
if (__webpack_require__(4)(function () { return $toString.call({ source: 'a', flags: 'b' }) != '/a/b'; })) {
  define(function toString() {
    var R = anObject(this);
    return '/'.concat(R.source, '/',
      'flags' in R ? R.flags : !DESCRIPTORS && R instanceof RegExp ? $flags.call(R) : undefined);
  });
// FF44- RegExp#toString has a wrong name
} else if ($toString.name != TO_STRING) {
  define(function toString() {
    return $toString.call(this);
  });
}
 
 
/***/ }),
/* 472 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
// B.2.3.2 String.prototype.anchor(name)
__webpack_require__(21)('anchor', function (createHTML) {
  return function anchor(name) {
    return createHTML(this, 'a', 'name', name);
  };
});
 
 
/***/ }),
/* 473 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
// B.2.3.3 String.prototype.big()
__webpack_require__(21)('big', function (createHTML) {
  return function big() {
    return createHTML(this, 'big', '', '');
  };
});
 
 
/***/ }),
/* 474 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
// B.2.3.4 String.prototype.blink()
__webpack_require__(21)('blink', function (createHTML) {
  return function blink() {
    return createHTML(this, 'blink', '', '');
  };
});
 
 
/***/ }),
/* 475 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
// B.2.3.5 String.prototype.bold()
__webpack_require__(21)('bold', function (createHTML) {
  return function bold() {
    return createHTML(this, 'b', '', '');
  };
});
 
 
/***/ }),
/* 476 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var $export = __webpack_require__(0);
var $at = __webpack_require__(145)(false);
$export($export.P, 'String', {
  // 21.1.3.3 String.prototype.codePointAt(pos)
  codePointAt: function codePointAt(pos) {
    return $at(this, pos);
  }
});
 
 
/***/ }),
/* 477 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
// 21.1.3.6 String.prototype.endsWith(searchString [, endPosition])
 
var $export = __webpack_require__(0);
var toLength = __webpack_require__(11);
var context = __webpack_require__(146);
var ENDS_WITH = 'endsWith';
var $endsWith = ''[ENDS_WITH];
 
$export($export.P + $export.F * __webpack_require__(133)(ENDS_WITH), 'String', {
  endsWith: function endsWith(searchString /* , endPosition = @length */) {
    var that = context(this, searchString, ENDS_WITH);
    var endPosition = arguments.length > 1 ? arguments[1] : undefined;
    var len = toLength(that.length);
    var end = endPosition === undefined ? len : Math.min(toLength(endPosition), len);
    var search = String(searchString);
    return $endsWith
      ? $endsWith.call(that, search, end)
      : that.slice(end - search.length, end) === search;
  }
});
 
 
/***/ }),
/* 478 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
// B.2.3.6 String.prototype.fixed()
__webpack_require__(21)('fixed', function (createHTML) {
  return function fixed() {
    return createHTML(this, 'tt', '', '');
  };
});
 
 
/***/ }),
/* 479 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
// B.2.3.7 String.prototype.fontcolor(color)
__webpack_require__(21)('fontcolor', function (createHTML) {
  return function fontcolor(color) {
    return createHTML(this, 'font', 'color', color);
  };
});
 
 
/***/ }),
/* 480 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
// B.2.3.8 String.prototype.fontsize(size)
__webpack_require__(21)('fontsize', function (createHTML) {
  return function fontsize(size) {
    return createHTML(this, 'font', 'size', size);
  };
});
 
 
/***/ }),
/* 481 */
/***/ (function(module, exports, __webpack_require__) {
 
var $export = __webpack_require__(0);
var toAbsoluteIndex = __webpack_require__(57);
var fromCharCode = String.fromCharCode;
var $fromCodePoint = String.fromCodePoint;
 
// length should be 1, old FF problem
$export($export.S + $export.F * (!!$fromCodePoint && $fromCodePoint.length != 1), 'String', {
  // 21.1.2.2 String.fromCodePoint(...codePoints)
  fromCodePoint: function fromCodePoint(x) { // eslint-disable-line no-unused-vars
    var res = [];
    var aLen = arguments.length;
    var i = 0;
    var code;
    while (aLen > i) {
      code = +arguments[i++];
      if (toAbsoluteIndex(code, 0x10ffff) !== code) throw RangeError(code + ' is not a valid code point');
      res.push(code < 0x10000
        ? fromCharCode(code)
        : fromCharCode(((code -= 0x10000) >> 10) + 0xd800, code % 0x400 + 0xdc00)
      );
    } return res.join('');
  }
});
 
 
/***/ }),
/* 482 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
// 21.1.3.7 String.prototype.includes(searchString, position = 0)
 
var $export = __webpack_require__(0);
var context = __webpack_require__(146);
var INCLUDES = 'includes';
 
$export($export.P + $export.F * __webpack_require__(133)(INCLUDES), 'String', {
  includes: function includes(searchString /* , position = 0 */) {
    return !!~context(this, searchString, INCLUDES)
      .indexOf(searchString, arguments.length > 1 ? arguments[1] : undefined);
  }
});
 
 
/***/ }),
/* 483 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
// B.2.3.9 String.prototype.italics()
__webpack_require__(21)('italics', function (createHTML) {
  return function italics() {
    return createHTML(this, 'i', '', '');
  };
});
 
 
/***/ }),
/* 484 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var $at = __webpack_require__(145)(true);
 
// 21.1.3.27 String.prototype[@@iterator]()
__webpack_require__(138)(String, 'String', function (iterated) {
  this._t = String(iterated); // target
  this._i = 0;                // next index
// 21.1.5.2.1 %StringIteratorPrototype%.next()
}, function () {
  var O = this._t;
  var index = this._i;
  var point;
  if (index >= O.length) return { value: undefined, done: true };
  point = $at(O, index);
  this._i += point.length;
  return { value: point, done: false };
});
 
 
/***/ }),
/* 485 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
// B.2.3.10 String.prototype.link(url)
__webpack_require__(21)('link', function (createHTML) {
  return function link(url) {
    return createHTML(this, 'a', 'href', url);
  };
});
 
 
/***/ }),
/* 486 */
/***/ (function(module, exports, __webpack_require__) {
 
var $export = __webpack_require__(0);
var toIObject = __webpack_require__(24);
var toLength = __webpack_require__(11);
 
$export($export.S, 'String', {
  // 21.1.2.4 String.raw(callSite, ...substitutions)
  raw: function raw(callSite) {
    var tpl = toIObject(callSite.raw);
    var len = toLength(tpl.length);
    var aLen = arguments.length;
    var res = [];
    var i = 0;
    while (len > i) {
      res.push(String(tpl[i++]));
      if (i < aLen) res.push(String(arguments[i]));
    } return res.join('');
  }
});
 
 
/***/ }),
/* 487 */
/***/ (function(module, exports, __webpack_require__) {
 
var $export = __webpack_require__(0);
 
$export($export.P, 'String', {
  // 21.1.3.13 String.prototype.repeat(count)
  repeat: __webpack_require__(147)
});
 
 
/***/ }),
/* 488 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
// B.2.3.11 String.prototype.small()
__webpack_require__(21)('small', function (createHTML) {
  return function small() {
    return createHTML(this, 'small', '', '');
  };
});
 
 
/***/ }),
/* 489 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
// 21.1.3.18 String.prototype.startsWith(searchString [, position ])
 
var $export = __webpack_require__(0);
var toLength = __webpack_require__(11);
var context = __webpack_require__(146);
var STARTS_WITH = 'startsWith';
var $startsWith = ''[STARTS_WITH];
 
$export($export.P + $export.F * __webpack_require__(133)(STARTS_WITH), 'String', {
  startsWith: function startsWith(searchString /* , position = 0 */) {
    var that = context(this, searchString, STARTS_WITH);
    var index = toLength(Math.min(arguments.length > 1 ? arguments[1] : undefined, that.length));
    var search = String(searchString);
    return $startsWith
      ? $startsWith.call(that, search, index)
      : that.slice(index, index + search.length) === search;
  }
});
 
 
/***/ }),
/* 490 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
// B.2.3.12 String.prototype.strike()
__webpack_require__(21)('strike', function (createHTML) {
  return function strike() {
    return createHTML(this, 'strike', '', '');
  };
});
 
 
/***/ }),
/* 491 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
// B.2.3.13 String.prototype.sub()
__webpack_require__(21)('sub', function (createHTML) {
  return function sub() {
    return createHTML(this, 'sub', '', '');
  };
});
 
 
/***/ }),
/* 492 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
// B.2.3.14 String.prototype.sup()
__webpack_require__(21)('sup', function (createHTML) {
  return function sup() {
    return createHTML(this, 'sup', '', '');
  };
});
 
 
/***/ }),
/* 493 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
// 21.1.3.25 String.prototype.trim()
__webpack_require__(65)('trim', function ($trim) {
  return function trim() {
    return $trim(this, 3);
  };
});
 
 
/***/ }),
/* 494 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
// ECMAScript 6 symbols shim
var global = __webpack_require__(3);
var has = __webpack_require__(18);
var DESCRIPTORS = __webpack_require__(9);
var $export = __webpack_require__(0);
var redefine = __webpack_require__(20);
var META = __webpack_require__(44).KEY;
var $fails = __webpack_require__(4);
var shared = __webpack_require__(98);
var setToStringTag = __webpack_require__(64);
var uid = __webpack_require__(58);
var wks = __webpack_require__(6);
var wksExt = __webpack_require__(227);
var wksDefine = __webpack_require__(152);
var enumKeys = __webpack_require__(371);
var isArray = __webpack_require__(91);
var anObject = __webpack_require__(2);
var isObject = __webpack_require__(5);
var toIObject = __webpack_require__(24);
var toPrimitive = __webpack_require__(37);
var createDesc = __webpack_require__(54);
var _create = __webpack_require__(51);
var gOPNExt = __webpack_require__(217);
var $GOPD = __webpack_require__(22);
var $DP = __webpack_require__(10);
var $keys = __webpack_require__(53);
var gOPD = $GOPD.f;
var dP = $DP.f;
var gOPN = gOPNExt.f;
var $Symbol = global.Symbol;
var $JSON = global.JSON;
var _stringify = $JSON && $JSON.stringify;
var PROTOTYPE = 'prototype';
var HIDDEN = wks('_hidden');
var TO_PRIMITIVE = wks('toPrimitive');
var isEnum = {}.propertyIsEnumerable;
var SymbolRegistry = shared('symbol-registry');
var AllSymbols = shared('symbols');
var OPSymbols = shared('op-symbols');
var ObjectProto = Object[PROTOTYPE];
var USE_NATIVE = typeof $Symbol == 'function';
var QObject = global.QObject;
// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173
var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;
 
// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687
var setSymbolDesc = DESCRIPTORS && $fails(function () {
  return _create(dP({}, 'a', {
    get: function () { return dP(this, 'a', { value: 7 }).a; }
  })).a != 7;
}) ? function (it, key, D) {
  var protoDesc = gOPD(ObjectProto, key);
  if (protoDesc) delete ObjectProto[key];
  dP(it, key, D);
  if (protoDesc && it !== ObjectProto) dP(ObjectProto, key, protoDesc);
} : dP;
 
var wrap = function (tag) {
  var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]);
  sym._k = tag;
  return sym;
};
 
var isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function (it) {
  return typeof it == 'symbol';
} : function (it) {
  return it instanceof $Symbol;
};
 
var $defineProperty = function defineProperty(it, key, D) {
  if (it === ObjectProto) $defineProperty(OPSymbols, key, D);
  anObject(it);
  key = toPrimitive(key, true);
  anObject(D);
  if (has(AllSymbols, key)) {
    if (!D.enumerable) {
      if (!has(it, HIDDEN)) dP(it, HIDDEN, createDesc(1, {}));
      it[HIDDEN][key] = true;
    } else {
      if (has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false;
      D = _create(D, { enumerable: createDesc(0, false) });
    } return setSymbolDesc(it, key, D);
  } return dP(it, key, D);
};
var $defineProperties = function defineProperties(it, P) {
  anObject(it);
  var keys = enumKeys(P = toIObject(P));
  var i = 0;
  var l = keys.length;
  var key;
  while (l > i) $defineProperty(it, key = keys[i++], P[key]);
  return it;
};
var $create = function create(it, P) {
  return P === undefined ? _create(it) : $defineProperties(_create(it), P);
};
var $propertyIsEnumerable = function propertyIsEnumerable(key) {
  var E = isEnum.call(this, key = toPrimitive(key, true));
  if (this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return false;
  return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true;
};
var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) {
  it = toIObject(it);
  key = toPrimitive(key, true);
  if (it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return;
  var D = gOPD(it, key);
  if (D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true;
  return D;
};
var $getOwnPropertyNames = function getOwnPropertyNames(it) {
  var names = gOPN(toIObject(it));
  var result = [];
  var i = 0;
  var key;
  while (names.length > i) {
    if (!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META) result.push(key);
  } return result;
};
var $getOwnPropertySymbols = function getOwnPropertySymbols(it) {
  var IS_OP = it === ObjectProto;
  var names = gOPN(IS_OP ? OPSymbols : toIObject(it));
  var result = [];
  var i = 0;
  var key;
  while (names.length > i) {
    if (has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true)) result.push(AllSymbols[key]);
  } return result;
};
 
// 19.4.1.1 Symbol([description])
if (!USE_NATIVE) {
  $Symbol = function Symbol() {
    if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!');
    var tag = uid(arguments.length > 0 ? arguments[0] : undefined);
    var $set = function (value) {
      if (this === ObjectProto) $set.call(OPSymbols, value);
      if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false;
      setSymbolDesc(this, tag, createDesc(1, value));
    };
    if (DESCRIPTORS && setter) setSymbolDesc(ObjectProto, tag, { configurable: true, set: $set });
    return wrap(tag);
  };
  redefine($Symbol[PROTOTYPE], 'toString', function toString() {
    return this._k;
  });
 
  $GOPD.f = $getOwnPropertyDescriptor;
  $DP.f = $defineProperty;
  __webpack_require__(52).f = gOPNExt.f = $getOwnPropertyNames;
  __webpack_require__(73).f = $propertyIsEnumerable;
  __webpack_require__(95).f = $getOwnPropertySymbols;
 
  if (DESCRIPTORS && !__webpack_require__(50)) {
    redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true);
  }
 
  wksExt.f = function (name) {
    return wrap(wks(name));
  };
}
 
$export($export.G + $export.W + $export.F * !USE_NATIVE, { Symbol: $Symbol });
 
for (var es6Symbols = (
  // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14
  'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables'
).split(','), j = 0; es6Symbols.length > j;)wks(es6Symbols[j++]);
 
for (var wellKnownSymbols = $keys(wks.store), k = 0; wellKnownSymbols.length > k;) wksDefine(wellKnownSymbols[k++]);
 
$export($export.S + $export.F * !USE_NATIVE, 'Symbol', {
  // 19.4.2.1 Symbol.for(key)
  'for': function (key) {
    return has(SymbolRegistry, key += '')
      ? SymbolRegistry[key]
      : SymbolRegistry[key] = $Symbol(key);
  },
  // 19.4.2.5 Symbol.keyFor(sym)
  keyFor: function keyFor(sym) {
    if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol!');
    for (var key in SymbolRegistry) if (SymbolRegistry[key] === sym) return key;
  },
  useSetter: function () { setter = true; },
  useSimple: function () { setter = false; }
});
 
$export($export.S + $export.F * !USE_NATIVE, 'Object', {
  // 19.1.2.2 Object.create(O [, Properties])
  create: $create,
  // 19.1.2.4 Object.defineProperty(O, P, Attributes)
  defineProperty: $defineProperty,
  // 19.1.2.3 Object.defineProperties(O, Properties)
  defineProperties: $defineProperties,
  // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)
  getOwnPropertyDescriptor: $getOwnPropertyDescriptor,
  // 19.1.2.7 Object.getOwnPropertyNames(O)
  getOwnPropertyNames: $getOwnPropertyNames,
  // 19.1.2.8 Object.getOwnPropertySymbols(O)
  getOwnPropertySymbols: $getOwnPropertySymbols
});
 
// 24.3.2 JSON.stringify(value [, replacer [, space]])
$JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function () {
  var S = $Symbol();
  // MS Edge converts symbol values to JSON as {}
  // WebKit converts symbol values to JSON as null
  // V8 throws on boxed symbols
  return _stringify([S]) != '[null]' || _stringify({ a: S }) != '{}' || _stringify(Object(S)) != '{}';
})), 'JSON', {
  stringify: function stringify(it) {
    var args = [it];
    var i = 1;
    var replacer, $replacer;
    while (arguments.length > i) args.push(arguments[i++]);
    $replacer = replacer = args[1];
    if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined
    if (!isArray(replacer)) replacer = function (key, value) {
      if (typeof $replacer == 'function') value = $replacer.call(this, key, value);
      if (!isSymbol(value)) return value;
    };
    args[1] = replacer;
    return _stringify.apply($JSON, args);
  }
});
 
// 19.4.3.4 Symbol.prototype[@@toPrimitive](hint)
$Symbol[PROTOTYPE][TO_PRIMITIVE] || __webpack_require__(19)($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf);
// 19.4.3.5 Symbol.prototype[@@toStringTag]
setToStringTag($Symbol, 'Symbol');
// 20.2.1.9 Math[@@toStringTag]
setToStringTag(Math, 'Math', true);
// 24.3.3 JSON[@@toStringTag]
setToStringTag(global.JSON, 'JSON', true);
 
 
/***/ }),
/* 495 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var $export = __webpack_require__(0);
var $typed = __webpack_require__(100);
var buffer = __webpack_require__(150);
var anObject = __webpack_require__(2);
var toAbsoluteIndex = __webpack_require__(57);
var toLength = __webpack_require__(11);
var isObject = __webpack_require__(5);
var ArrayBuffer = __webpack_require__(3).ArrayBuffer;
var speciesConstructor = __webpack_require__(99);
var $ArrayBuffer = buffer.ArrayBuffer;
var $DataView = buffer.DataView;
var $isView = $typed.ABV && ArrayBuffer.isView;
var $slice = $ArrayBuffer.prototype.slice;
var VIEW = $typed.VIEW;
var ARRAY_BUFFER = 'ArrayBuffer';
 
$export($export.G + $export.W + $export.F * (ArrayBuffer !== $ArrayBuffer), { ArrayBuffer: $ArrayBuffer });
 
$export($export.S + $export.F * !$typed.CONSTR, ARRAY_BUFFER, {
  // 24.1.3.1 ArrayBuffer.isView(arg)
  isView: function isView(it) {
    return $isView && $isView(it) || isObject(it) && VIEW in it;
  }
});
 
$export($export.P + $export.U + $export.F * __webpack_require__(4)(function () {
  return !new $ArrayBuffer(2).slice(1, undefined).byteLength;
}), ARRAY_BUFFER, {
  // 24.1.4.3 ArrayBuffer.prototype.slice(start, end)
  slice: function slice(start, end) {
    if ($slice !== undefined && end === undefined) return $slice.call(anObject(this), start); // FF fix
    var len = anObject(this).byteLength;
    var first = toAbsoluteIndex(start, len);
    var final = toAbsoluteIndex(end === undefined ? len : end, len);
    var result = new (speciesConstructor(this, $ArrayBuffer))(toLength(final - first));
    var viewS = new $DataView(this);
    var viewT = new $DataView(result);
    var index = 0;
    while (first < final) {
      viewT.setUint8(index++, viewS.getUint8(first++));
    } return result;
  }
});
 
__webpack_require__(56)(ARRAY_BUFFER);
 
 
/***/ }),
/* 496 */
/***/ (function(module, exports, __webpack_require__) {
 
var $export = __webpack_require__(0);
$export($export.G + $export.W + $export.F * !__webpack_require__(100).ABV, {
  DataView: __webpack_require__(150).DataView
});
 
 
/***/ }),
/* 497 */
/***/ (function(module, exports, __webpack_require__) {
 
__webpack_require__(40)('Float32', 4, function (init) {
  return function Float32Array(data, byteOffset, length) {
    return init(this, data, byteOffset, length);
  };
});
 
 
/***/ }),
/* 498 */
/***/ (function(module, exports, __webpack_require__) {
 
__webpack_require__(40)('Float64', 8, function (init) {
  return function Float64Array(data, byteOffset, length) {
    return init(this, data, byteOffset, length);
  };
});
 
 
/***/ }),
/* 499 */
/***/ (function(module, exports, __webpack_require__) {
 
__webpack_require__(40)('Int16', 2, function (init) {
  return function Int16Array(data, byteOffset, length) {
    return init(this, data, byteOffset, length);
  };
});
 
 
/***/ }),
/* 500 */
/***/ (function(module, exports, __webpack_require__) {
 
__webpack_require__(40)('Int32', 4, function (init) {
  return function Int32Array(data, byteOffset, length) {
    return init(this, data, byteOffset, length);
  };
});
 
 
/***/ }),
/* 501 */
/***/ (function(module, exports, __webpack_require__) {
 
__webpack_require__(40)('Int8', 1, function (init) {
  return function Int8Array(data, byteOffset, length) {
    return init(this, data, byteOffset, length);
  };
});
 
 
/***/ }),
/* 502 */
/***/ (function(module, exports, __webpack_require__) {
 
__webpack_require__(40)('Uint16', 2, function (init) {
  return function Uint16Array(data, byteOffset, length) {
    return init(this, data, byteOffset, length);
  };
});
 
 
/***/ }),
/* 503 */
/***/ (function(module, exports, __webpack_require__) {
 
__webpack_require__(40)('Uint32', 4, function (init) {
  return function Uint32Array(data, byteOffset, length) {
    return init(this, data, byteOffset, length);
  };
});
 
 
/***/ }),
/* 504 */
/***/ (function(module, exports, __webpack_require__) {
 
__webpack_require__(40)('Uint8', 1, function (init) {
  return function Uint8Array(data, byteOffset, length) {
    return init(this, data, byteOffset, length);
  };
});
 
 
/***/ }),
/* 505 */
/***/ (function(module, exports, __webpack_require__) {
 
__webpack_require__(40)('Uint8', 1, function (init) {
  return function Uint8ClampedArray(data, byteOffset, length) {
    return init(this, data, byteOffset, length);
  };
}, true);
 
 
/***/ }),
/* 506 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var weak = __webpack_require__(205);
var validate = __webpack_require__(66);
var WEAK_SET = 'WeakSet';
 
// 23.4 WeakSet Objects
__webpack_require__(88)(WEAK_SET, function (get) {
  return function WeakSet() { return get(this, arguments.length > 0 ? arguments[0] : undefined); };
}, {
  // 23.4.3.1 WeakSet.prototype.add(value)
  add: function add(value) {
    return weak.def(validate(this, WEAK_SET), value, true);
  }
}, weak, false, true);
 
 
/***/ }),
/* 507 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
// https://tc39.github.io/proposal-flatMap/#sec-Array.prototype.flatMap
var $export = __webpack_require__(0);
var flattenIntoArray = __webpack_require__(206);
var toObject = __webpack_require__(14);
var toLength = __webpack_require__(11);
var aFunction = __webpack_require__(15);
var arraySpeciesCreate = __webpack_require__(129);
 
$export($export.P, 'Array', {
  flatMap: function flatMap(callbackfn /* , thisArg */) {
    var O = toObject(this);
    var sourceLen, A;
    aFunction(callbackfn);
    sourceLen = toLength(O.length);
    A = arraySpeciesCreate(O, 0);
    flattenIntoArray(A, O, O, sourceLen, 0, 1, callbackfn, arguments[1]);
    return A;
  }
});
 
__webpack_require__(43)('flatMap');
 
 
/***/ }),
/* 508 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
// https://tc39.github.io/proposal-flatMap/#sec-Array.prototype.flatten
var $export = __webpack_require__(0);
var flattenIntoArray = __webpack_require__(206);
var toObject = __webpack_require__(14);
var toLength = __webpack_require__(11);
var toInteger = __webpack_require__(36);
var arraySpeciesCreate = __webpack_require__(129);
 
$export($export.P, 'Array', {
  flatten: function flatten(/* depthArg = 1 */) {
    var depthArg = arguments[0];
    var O = toObject(this);
    var sourceLen = toLength(O.length);
    var A = arraySpeciesCreate(O, 0);
    flattenIntoArray(A, O, O, sourceLen, 0, depthArg === undefined ? 1 : toInteger(depthArg));
    return A;
  }
});
 
__webpack_require__(43)('flatten');
 
 
/***/ }),
/* 509 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
// https://github.com/tc39/Array.prototype.includes
var $export = __webpack_require__(0);
var $includes = __webpack_require__(87)(true);
 
$export($export.P, 'Array', {
  includes: function includes(el /* , fromIndex = 0 */) {
    return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
  }
});
 
__webpack_require__(43)('includes');
 
 
/***/ }),
/* 510 */
/***/ (function(module, exports, __webpack_require__) {
 
// https://github.com/rwaldron/tc39-notes/blob/master/es6/2014-09/sept-25.md#510-globalasap-for-enqueuing-a-microtask
var $export = __webpack_require__(0);
var microtask = __webpack_require__(141)();
var process = __webpack_require__(3).process;
var isNode = __webpack_require__(27)(process) == 'process';
 
$export($export.G, {
  asap: function asap(fn) {
    var domain = isNode && process.domain;
    microtask(domain ? domain.bind(fn) : fn);
  }
});
 
 
/***/ }),
/* 511 */
/***/ (function(module, exports, __webpack_require__) {
 
// https://github.com/ljharb/proposal-is-error
var $export = __webpack_require__(0);
var cof = __webpack_require__(27);
 
$export($export.S, 'Error', {
  isError: function isError(it) {
    return cof(it) === 'Error';
  }
});
 
 
/***/ }),
/* 512 */
/***/ (function(module, exports, __webpack_require__) {
 
// https://github.com/tc39/proposal-global
var $export = __webpack_require__(0);
 
$export($export.G, { global: __webpack_require__(3) });
 
 
/***/ }),
/* 513 */
/***/ (function(module, exports, __webpack_require__) {
 
// https://tc39.github.io/proposal-setmap-offrom/#sec-map.from
__webpack_require__(96)('Map');
 
 
/***/ }),
/* 514 */
/***/ (function(module, exports, __webpack_require__) {
 
// https://tc39.github.io/proposal-setmap-offrom/#sec-map.of
__webpack_require__(97)('Map');
 
 
/***/ }),
/* 515 */
/***/ (function(module, exports, __webpack_require__) {
 
// https://github.com/DavidBruant/Map-Set.prototype.toJSON
var $export = __webpack_require__(0);
 
$export($export.P + $export.R, 'Map', { toJSON: __webpack_require__(204)('Map') });
 
 
/***/ }),
/* 516 */
/***/ (function(module, exports, __webpack_require__) {
 
// https://rwaldron.github.io/proposal-math-extensions/
var $export = __webpack_require__(0);
 
$export($export.S, 'Math', {
  clamp: function clamp(x, lower, upper) {
    return Math.min(upper, Math.max(lower, x));
  }
});
 
 
/***/ }),
/* 517 */
/***/ (function(module, exports, __webpack_require__) {
 
// https://rwaldron.github.io/proposal-math-extensions/
var $export = __webpack_require__(0);
 
$export($export.S, 'Math', { DEG_PER_RAD: Math.PI / 180 });
 
 
/***/ }),
/* 518 */
/***/ (function(module, exports, __webpack_require__) {
 
// https://rwaldron.github.io/proposal-math-extensions/
var $export = __webpack_require__(0);
var RAD_PER_DEG = 180 / Math.PI;
 
$export($export.S, 'Math', {
  degrees: function degrees(radians) {
    return radians * RAD_PER_DEG;
  }
});
 
 
/***/ }),
/* 519 */
/***/ (function(module, exports, __webpack_require__) {
 
// https://rwaldron.github.io/proposal-math-extensions/
var $export = __webpack_require__(0);
var scale = __webpack_require__(214);
var fround = __webpack_require__(212);
 
$export($export.S, 'Math', {
  fscale: function fscale(x, inLow, inHigh, outLow, outHigh) {
    return fround(scale(x, inLow, inHigh, outLow, outHigh));
  }
});
 
 
/***/ }),
/* 520 */
/***/ (function(module, exports, __webpack_require__) {
 
// https://gist.github.com/BrendanEich/4294d5c212a6d2254703
var $export = __webpack_require__(0);
 
$export($export.S, 'Math', {
  iaddh: function iaddh(x0, x1, y0, y1) {
    var $x0 = x0 >>> 0;
    var $x1 = x1 >>> 0;
    var $y0 = y0 >>> 0;
    return $x1 + (y1 >>> 0) + (($x0 & $y0 | ($x0 | $y0) & ~($x0 + $y0 >>> 0)) >>> 31) | 0;
  }
});
 
 
/***/ }),
/* 521 */
/***/ (function(module, exports, __webpack_require__) {
 
// https://gist.github.com/BrendanEich/4294d5c212a6d2254703
var $export = __webpack_require__(0);
 
$export($export.S, 'Math', {
  imulh: function imulh(u, v) {
    var UINT16 = 0xffff;
    var $u = +u;
    var $v = +v;
    var u0 = $u & UINT16;
    var v0 = $v & UINT16;
    var u1 = $u >> 16;
    var v1 = $v >> 16;
    var t = (u1 * v0 >>> 0) + (u0 * v0 >>> 16);
    return u1 * v1 + (t >> 16) + ((u0 * v1 >>> 0) + (t & UINT16) >> 16);
  }
});
 
 
/***/ }),
/* 522 */
/***/ (function(module, exports, __webpack_require__) {
 
// https://gist.github.com/BrendanEich/4294d5c212a6d2254703
var $export = __webpack_require__(0);
 
$export($export.S, 'Math', {
  isubh: function isubh(x0, x1, y0, y1) {
    var $x0 = x0 >>> 0;
    var $x1 = x1 >>> 0;
    var $y0 = y0 >>> 0;
    return $x1 - (y1 >>> 0) - ((~$x0 & $y0 | ~($x0 ^ $y0) & $x0 - $y0 >>> 0) >>> 31) | 0;
  }
});
 
 
/***/ }),
/* 523 */
/***/ (function(module, exports, __webpack_require__) {
 
// https://rwaldron.github.io/proposal-math-extensions/
var $export = __webpack_require__(0);
 
$export($export.S, 'Math', { RAD_PER_DEG: 180 / Math.PI });
 
 
/***/ }),
/* 524 */
/***/ (function(module, exports, __webpack_require__) {
 
// https://rwaldron.github.io/proposal-math-extensions/
var $export = __webpack_require__(0);
var DEG_PER_RAD = Math.PI / 180;
 
$export($export.S, 'Math', {
  radians: function radians(degrees) {
    return degrees * DEG_PER_RAD;
  }
});
 
 
/***/ }),
/* 525 */
/***/ (function(module, exports, __webpack_require__) {
 
// https://rwaldron.github.io/proposal-math-extensions/
var $export = __webpack_require__(0);
 
$export($export.S, 'Math', { scale: __webpack_require__(214) });
 
 
/***/ }),
/* 526 */
/***/ (function(module, exports, __webpack_require__) {
 
// http://jfbastien.github.io/papers/Math.signbit.html
var $export = __webpack_require__(0);
 
$export($export.S, 'Math', { signbit: function signbit(x) {
  // eslint-disable-next-line no-self-compare
  return (x = +x) != x ? x : x == 0 ? 1 / x == Infinity : x > 0;
} });
 
 
/***/ }),
/* 527 */
/***/ (function(module, exports, __webpack_require__) {
 
// https://gist.github.com/BrendanEich/4294d5c212a6d2254703
var $export = __webpack_require__(0);
 
$export($export.S, 'Math', {
  umulh: function umulh(u, v) {
    var UINT16 = 0xffff;
    var $u = +u;
    var $v = +v;
    var u0 = $u & UINT16;
    var v0 = $v & UINT16;
    var u1 = $u >>> 16;
    var v1 = $v >>> 16;
    var t = (u1 * v0 >>> 0) + (u0 * v0 >>> 16);
    return u1 * v1 + (t >>> 16) + ((u0 * v1 >>> 0) + (t & UINT16) >>> 16);
  }
});
 
 
/***/ }),
/* 528 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var $export = __webpack_require__(0);
var toObject = __webpack_require__(14);
var aFunction = __webpack_require__(15);
var $defineProperty = __webpack_require__(10);
 
// B.2.2.2 Object.prototype.__defineGetter__(P, getter)
__webpack_require__(9) && $export($export.P + __webpack_require__(94), 'Object', {
  __defineGetter__: function __defineGetter__(P, getter) {
    $defineProperty.f(toObject(this), P, { get: aFunction(getter), enumerable: true, configurable: true });
  }
});
 
 
/***/ }),
/* 529 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var $export = __webpack_require__(0);
var toObject = __webpack_require__(14);
var aFunction = __webpack_require__(15);
var $defineProperty = __webpack_require__(10);
 
// B.2.2.3 Object.prototype.__defineSetter__(P, setter)
__webpack_require__(9) && $export($export.P + __webpack_require__(94), 'Object', {
  __defineSetter__: function __defineSetter__(P, setter) {
    $defineProperty.f(toObject(this), P, { set: aFunction(setter), enumerable: true, configurable: true });
  }
});
 
 
/***/ }),
/* 530 */
/***/ (function(module, exports, __webpack_require__) {
 
// https://github.com/tc39/proposal-object-values-entries
var $export = __webpack_require__(0);
var $entries = __webpack_require__(219)(true);
 
$export($export.S, 'Object', {
  entries: function entries(it) {
    return $entries(it);
  }
});
 
 
/***/ }),
/* 531 */
/***/ (function(module, exports, __webpack_require__) {
 
// https://github.com/tc39/proposal-object-getownpropertydescriptors
var $export = __webpack_require__(0);
var ownKeys = __webpack_require__(220);
var toIObject = __webpack_require__(24);
var gOPD = __webpack_require__(22);
var createProperty = __webpack_require__(130);
 
$export($export.S, 'Object', {
  getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object) {
    var O = toIObject(object);
    var getDesc = gOPD.f;
    var keys = ownKeys(O);
    var result = {};
    var i = 0;
    var key, desc;
    while (keys.length > i) {
      desc = getDesc(O, key = keys[i++]);
      if (desc !== undefined) createProperty(result, key, desc);
    }
    return result;
  }
});
 
 
/***/ }),
/* 532 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var $export = __webpack_require__(0);
var toObject = __webpack_require__(14);
var toPrimitive = __webpack_require__(37);
var getPrototypeOf = __webpack_require__(23);
var getOwnPropertyDescriptor = __webpack_require__(22).f;
 
// B.2.2.4 Object.prototype.__lookupGetter__(P)
__webpack_require__(9) && $export($export.P + __webpack_require__(94), 'Object', {
  __lookupGetter__: function __lookupGetter__(P) {
    var O = toObject(this);
    var K = toPrimitive(P, true);
    var D;
    do {
      if (D = getOwnPropertyDescriptor(O, K)) return D.get;
    } while (O = getPrototypeOf(O));
  }
});
 
 
/***/ }),
/* 533 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
var $export = __webpack_require__(0);
var toObject = __webpack_require__(14);
var toPrimitive = __webpack_require__(37);
var getPrototypeOf = __webpack_require__(23);
var getOwnPropertyDescriptor = __webpack_require__(22).f;
 
// B.2.2.5 Object.prototype.__lookupSetter__(P)
__webpack_require__(9) && $export($export.P + __webpack_require__(94), 'Object', {
  __lookupSetter__: function __lookupSetter__(P) {
    var O = toObject(this);
    var K = toPrimitive(P, true);
    var D;
    do {
      if (D = getOwnPropertyDescriptor(O, K)) return D.set;
    } while (O = getPrototypeOf(O));
  }
});
 
 
/***/ }),
/* 534 */
/***/ (function(module, exports, __webpack_require__) {
 
// https://github.com/tc39/proposal-object-values-entries
var $export = __webpack_require__(0);
var $values = __webpack_require__(219)(false);
 
$export($export.S, 'Object', {
  values: function values(it) {
    return $values(it);
  }
});
 
 
/***/ }),
/* 535 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
// https://github.com/zenparsing/es-observable
var $export = __webpack_require__(0);
var global = __webpack_require__(3);
var core = __webpack_require__(33);
var microtask = __webpack_require__(141)();
var OBSERVABLE = __webpack_require__(6)('observable');
var aFunction = __webpack_require__(15);
var anObject = __webpack_require__(2);
var anInstance = __webpack_require__(48);
var redefineAll = __webpack_require__(55);
var hide = __webpack_require__(19);
var forOf = __webpack_require__(49);
var RETURN = forOf.RETURN;
 
var getMethod = function (fn) {
  return fn == null ? undefined : aFunction(fn);
};
 
var cleanupSubscription = function (subscription) {
  var cleanup = subscription._c;
  if (cleanup) {
    subscription._c = undefined;
    cleanup();
  }
};
 
var subscriptionClosed = function (subscription) {
  return subscription._o === undefined;
};
 
var closeSubscription = function (subscription) {
  if (!subscriptionClosed(subscription)) {
    subscription._o = undefined;
    cleanupSubscription(subscription);
  }
};
 
var Subscription = function (observer, subscriber) {
  anObject(observer);
  this._c = undefined;
  this._o = observer;
  observer = new SubscriptionObserver(this);
  try {
    var cleanup = subscriber(observer);
    var subscription = cleanup;
    if (cleanup != null) {
      if (typeof cleanup.unsubscribe === 'function') cleanup = function () { subscription.unsubscribe(); };
      else aFunction(cleanup);
      this._c = cleanup;
    }
  } catch (e) {
    observer.error(e);
    return;
  } if (subscriptionClosed(this)) cleanupSubscription(this);
};
 
Subscription.prototype = redefineAll({}, {
  unsubscribe: function unsubscribe() { closeSubscription(this); }
});
 
var SubscriptionObserver = function (subscription) {
  this._s = subscription;
};
 
SubscriptionObserver.prototype = redefineAll({}, {
  next: function next(value) {
    var subscription = this._s;
    if (!subscriptionClosed(subscription)) {
      var observer = subscription._o;
      try {
        var m = getMethod(observer.next);
        if (m) return m.call(observer, value);
      } catch (e) {
        try {
          closeSubscription(subscription);
        } finally {
          throw e;
        }
      }
    }
  },
  error: function error(value) {
    var subscription = this._s;
    if (subscriptionClosed(subscription)) throw value;
    var observer = subscription._o;
    subscription._o = undefined;
    try {
      var m = getMethod(observer.error);
      if (!m) throw value;
      value = m.call(observer, value);
    } catch (e) {
      try {
        cleanupSubscription(subscription);
      } finally {
        throw e;
      }
    } cleanupSubscription(subscription);
    return value;
  },
  complete: function complete(value) {
    var subscription = this._s;
    if (!subscriptionClosed(subscription)) {
      var observer = subscription._o;
      subscription._o = undefined;
      try {
        var m = getMethod(observer.complete);
        value = m ? m.call(observer, value) : undefined;
      } catch (e) {
        try {
          cleanupSubscription(subscription);
        } finally {
          throw e;
        }
      } cleanupSubscription(subscription);
      return value;
    }
  }
});
 
var $Observable = function Observable(subscriber) {
  anInstance(this, $Observable, 'Observable', '_f')._f = aFunction(subscriber);
};
 
redefineAll($Observable.prototype, {
  subscribe: function subscribe(observer) {
    return new Subscription(observer, this._f);
  },
  forEach: function forEach(fn) {
    var that = this;
    return new (core.Promise || global.Promise)(function (resolve, reject) {
      aFunction(fn);
      var subscription = that.subscribe({
        next: function (value) {
          try {
            return fn(value);
          } catch (e) {
            reject(e);
            subscription.unsubscribe();
          }
        },
        error: reject,
        complete: resolve
      });
    });
  }
});
 
redefineAll($Observable, {
  from: function from(x) {
    var C = typeof this === 'function' ? this : $Observable;
    var method = getMethod(anObject(x)[OBSERVABLE]);
    if (method) {
      var observable = anObject(method.call(x));
      return observable.constructor === C ? observable : new C(function (observer) {
        return observable.subscribe(observer);
      });
    }
    return new C(function (observer) {
      var done = false;
      microtask(function () {
        if (!done) {
          try {
            if (forOf(x, false, function (it) {
              observer.next(it);
              if (done) return RETURN;
            }) === RETURN) return;
          } catch (e) {
            if (done) throw e;
            observer.error(e);
            return;
          } observer.complete();
        }
      });
      return function () { done = true; };
    });
  },
  of: function of() {
    for (var i = 0, l = arguments.length, items = new Array(l); i < l;) items[i] = arguments[i++];
    return new (typeof this === 'function' ? this : $Observable)(function (observer) {
      var done = false;
      microtask(function () {
        if (!done) {
          for (var j = 0; j < items.length; ++j) {
            observer.next(items[j]);
            if (done) return;
          } observer.complete();
        }
      });
      return function () { done = true; };
    });
  }
});
 
hide($Observable.prototype, OBSERVABLE, function () { return this; });
 
$export($export.G, { Observable: $Observable });
 
__webpack_require__(56)('Observable');
 
 
/***/ }),
/* 536 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
// https://github.com/tc39/proposal-promise-finally
 
var $export = __webpack_require__(0);
var core = __webpack_require__(33);
var global = __webpack_require__(3);
var speciesConstructor = __webpack_require__(99);
var promiseResolve = __webpack_require__(224);
 
$export($export.P + $export.R, 'Promise', { 'finally': function (onFinally) {
  var C = speciesConstructor(this, core.Promise || global.Promise);
  var isFunction = typeof onFinally == 'function';
  return this.then(
    isFunction ? function (x) {
      return promiseResolve(C, onFinally()).then(function () { return x; });
    } : onFinally,
    isFunction ? function (e) {
      return promiseResolve(C, onFinally()).then(function () { throw e; });
    } : onFinally
  );
} });
 
 
/***/ }),
/* 537 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
// https://github.com/tc39/proposal-promise-try
var $export = __webpack_require__(0);
var newPromiseCapability = __webpack_require__(142);
var perform = __webpack_require__(223);
 
$export($export.S, 'Promise', { 'try': function (callbackfn) {
  var promiseCapability = newPromiseCapability.f(this);
  var result = perform(callbackfn);
  (result.e ? promiseCapability.reject : promiseCapability.resolve)(result.v);
  return promiseCapability.promise;
} });
 
 
/***/ }),
/* 538 */
/***/ (function(module, exports, __webpack_require__) {
 
var metadata = __webpack_require__(39);
var anObject = __webpack_require__(2);
var toMetaKey = metadata.key;
var ordinaryDefineOwnMetadata = metadata.set;
 
metadata.exp({ defineMetadata: function defineMetadata(metadataKey, metadataValue, target, targetKey) {
  ordinaryDefineOwnMetadata(metadataKey, metadataValue, anObject(target), toMetaKey(targetKey));
} });
 
 
/***/ }),
/* 539 */
/***/ (function(module, exports, __webpack_require__) {
 
var metadata = __webpack_require__(39);
var anObject = __webpack_require__(2);
var toMetaKey = metadata.key;
var getOrCreateMetadataMap = metadata.map;
var store = metadata.store;
 
metadata.exp({ deleteMetadata: function deleteMetadata(metadataKey, target /* , targetKey */) {
  var targetKey = arguments.length < 3 ? undefined : toMetaKey(arguments[2]);
  var metadataMap = getOrCreateMetadataMap(anObject(target), targetKey, false);
  if (metadataMap === undefined || !metadataMap['delete'](metadataKey)) return false;
  if (metadataMap.size) return true;
  var targetMetadata = store.get(target);
  targetMetadata['delete'](targetKey);
  return !!targetMetadata.size || store['delete'](target);
} });
 
 
/***/ }),
/* 540 */
/***/ (function(module, exports, __webpack_require__) {
 
var Set = __webpack_require__(230);
var from = __webpack_require__(200);
var metadata = __webpack_require__(39);
var anObject = __webpack_require__(2);
var getPrototypeOf = __webpack_require__(23);
var ordinaryOwnMetadataKeys = metadata.keys;
var toMetaKey = metadata.key;
 
var ordinaryMetadataKeys = function (O, P) {
  var oKeys = ordinaryOwnMetadataKeys(O, P);
  var parent = getPrototypeOf(O);
  if (parent === null) return oKeys;
  var pKeys = ordinaryMetadataKeys(parent, P);
  return pKeys.length ? oKeys.length ? from(new Set(oKeys.concat(pKeys))) : pKeys : oKeys;
};
 
metadata.exp({ getMetadataKeys: function getMetadataKeys(target /* , targetKey */) {
  return ordinaryMetadataKeys(anObject(target), arguments.length < 2 ? undefined : toMetaKey(arguments[1]));
} });
 
 
/***/ }),
/* 541 */
/***/ (function(module, exports, __webpack_require__) {
 
var metadata = __webpack_require__(39);
var anObject = __webpack_require__(2);
var getPrototypeOf = __webpack_require__(23);
var ordinaryHasOwnMetadata = metadata.has;
var ordinaryGetOwnMetadata = metadata.get;
var toMetaKey = metadata.key;
 
var ordinaryGetMetadata = function (MetadataKey, O, P) {
  var hasOwn = ordinaryHasOwnMetadata(MetadataKey, O, P);
  if (hasOwn) return ordinaryGetOwnMetadata(MetadataKey, O, P);
  var parent = getPrototypeOf(O);
  return parent !== null ? ordinaryGetMetadata(MetadataKey, parent, P) : undefined;
};
 
metadata.exp({ getMetadata: function getMetadata(metadataKey, target /* , targetKey */) {
  return ordinaryGetMetadata(metadataKey, anObject(target), arguments.length < 3 ? undefined : toMetaKey(arguments[2]));
} });
 
 
/***/ }),
/* 542 */
/***/ (function(module, exports, __webpack_require__) {
 
var metadata = __webpack_require__(39);
var anObject = __webpack_require__(2);
var ordinaryOwnMetadataKeys = metadata.keys;
var toMetaKey = metadata.key;
 
metadata.exp({ getOwnMetadataKeys: function getOwnMetadataKeys(target /* , targetKey */) {
  return ordinaryOwnMetadataKeys(anObject(target), arguments.length < 2 ? undefined : toMetaKey(arguments[1]));
} });
 
 
/***/ }),
/* 543 */
/***/ (function(module, exports, __webpack_require__) {
 
var metadata = __webpack_require__(39);
var anObject = __webpack_require__(2);
var ordinaryGetOwnMetadata = metadata.get;
var toMetaKey = metadata.key;
 
metadata.exp({ getOwnMetadata: function getOwnMetadata(metadataKey, target /* , targetKey */) {
  return ordinaryGetOwnMetadata(metadataKey, anObject(target)
    , arguments.length < 3 ? undefined : toMetaKey(arguments[2]));
} });
 
 
/***/ }),
/* 544 */
/***/ (function(module, exports, __webpack_require__) {
 
var metadata = __webpack_require__(39);
var anObject = __webpack_require__(2);
var getPrototypeOf = __webpack_require__(23);
var ordinaryHasOwnMetadata = metadata.has;
var toMetaKey = metadata.key;
 
var ordinaryHasMetadata = function (MetadataKey, O, P) {
  var hasOwn = ordinaryHasOwnMetadata(MetadataKey, O, P);
  if (hasOwn) return true;
  var parent = getPrototypeOf(O);
  return parent !== null ? ordinaryHasMetadata(MetadataKey, parent, P) : false;
};
 
metadata.exp({ hasMetadata: function hasMetadata(metadataKey, target /* , targetKey */) {
  return ordinaryHasMetadata(metadataKey, anObject(target), arguments.length < 3 ? undefined : toMetaKey(arguments[2]));
} });
 
 
/***/ }),
/* 545 */
/***/ (function(module, exports, __webpack_require__) {
 
var metadata = __webpack_require__(39);
var anObject = __webpack_require__(2);
var ordinaryHasOwnMetadata = metadata.has;
var toMetaKey = metadata.key;
 
metadata.exp({ hasOwnMetadata: function hasOwnMetadata(metadataKey, target /* , targetKey */) {
  return ordinaryHasOwnMetadata(metadataKey, anObject(target)
    , arguments.length < 3 ? undefined : toMetaKey(arguments[2]));
} });
 
 
/***/ }),
/* 546 */
/***/ (function(module, exports, __webpack_require__) {
 
var $metadata = __webpack_require__(39);
var anObject = __webpack_require__(2);
var aFunction = __webpack_require__(15);
var toMetaKey = $metadata.key;
var ordinaryDefineOwnMetadata = $metadata.set;
 
$metadata.exp({ metadata: function metadata(metadataKey, metadataValue) {
  return function decorator(target, targetKey) {
    ordinaryDefineOwnMetadata(
      metadataKey, metadataValue,
      (targetKey !== undefined ? anObject : aFunction)(target),
      toMetaKey(targetKey)
    );
  };
} });
 
 
/***/ }),
/* 547 */
/***/ (function(module, exports, __webpack_require__) {
 
// https://tc39.github.io/proposal-setmap-offrom/#sec-set.from
__webpack_require__(96)('Set');
 
 
/***/ }),
/* 548 */
/***/ (function(module, exports, __webpack_require__) {
 
// https://tc39.github.io/proposal-setmap-offrom/#sec-set.of
__webpack_require__(97)('Set');
 
 
/***/ }),
/* 549 */
/***/ (function(module, exports, __webpack_require__) {
 
// https://github.com/DavidBruant/Map-Set.prototype.toJSON
var $export = __webpack_require__(0);
 
$export($export.P + $export.R, 'Set', { toJSON: __webpack_require__(204)('Set') });
 
 
/***/ }),
/* 550 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
// https://github.com/mathiasbynens/String.prototype.at
var $export = __webpack_require__(0);
var $at = __webpack_require__(145)(true);
 
$export($export.P, 'String', {
  at: function at(pos) {
    return $at(this, pos);
  }
});
 
 
/***/ }),
/* 551 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
// https://tc39.github.io/String.prototype.matchAll/
var $export = __webpack_require__(0);
var defined = __webpack_require__(34);
var toLength = __webpack_require__(11);
var isRegExp = __webpack_require__(92);
var getFlags = __webpack_require__(90);
var RegExpProto = RegExp.prototype;
 
var $RegExpStringIterator = function (regexp, string) {
  this._r = regexp;
  this._s = string;
};
 
__webpack_require__(137)($RegExpStringIterator, 'RegExp String', function next() {
  var match = this._r.exec(this._s);
  return { value: match, done: match === null };
});
 
$export($export.P, 'String', {
  matchAll: function matchAll(regexp) {
    defined(this);
    if (!isRegExp(regexp)) throw TypeError(regexp + ' is not a regexp!');
    var S = String(this);
    var flags = 'flags' in RegExpProto ? String(regexp.flags) : getFlags.call(regexp);
    var rx = new RegExp(regexp.source, ~flags.indexOf('g') ? flags : 'g' + flags);
    rx.lastIndex = toLength(regexp.lastIndex);
    return new $RegExpStringIterator(rx, S);
  }
});
 
 
/***/ }),
/* 552 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
// https://github.com/tc39/proposal-string-pad-start-end
var $export = __webpack_require__(0);
var $pad = __webpack_require__(225);
var userAgent = __webpack_require__(151);
 
// https://github.com/zloirock/core-js/issues/280
$export($export.P + $export.F * /Version\/10\.\d+(\.\d+)? Safari\//.test(userAgent), 'String', {
  padEnd: function padEnd(maxLength /* , fillString = ' ' */) {
    return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, false);
  }
});
 
 
/***/ }),
/* 553 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
// https://github.com/tc39/proposal-string-pad-start-end
var $export = __webpack_require__(0);
var $pad = __webpack_require__(225);
var userAgent = __webpack_require__(151);
 
// https://github.com/zloirock/core-js/issues/280
$export($export.P + $export.F * /Version\/10\.\d+(\.\d+)? Safari\//.test(userAgent), 'String', {
  padStart: function padStart(maxLength /* , fillString = ' ' */) {
    return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, true);
  }
});
 
 
/***/ }),
/* 554 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
// https://github.com/sebmarkbage/ecmascript-string-left-right-trim
__webpack_require__(65)('trimLeft', function ($trim) {
  return function trimLeft() {
    return $trim(this, 1);
  };
}, 'trimStart');
 
 
/***/ }),
/* 555 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
// https://github.com/sebmarkbage/ecmascript-string-left-right-trim
__webpack_require__(65)('trimRight', function ($trim) {
  return function trimRight() {
    return $trim(this, 2);
  };
}, 'trimEnd');
 
 
/***/ }),
/* 556 */
/***/ (function(module, exports, __webpack_require__) {
 
__webpack_require__(152)('asyncIterator');
 
 
/***/ }),
/* 557 */
/***/ (function(module, exports, __webpack_require__) {
 
__webpack_require__(152)('observable');
 
 
/***/ }),
/* 558 */
/***/ (function(module, exports, __webpack_require__) {
 
// https://github.com/tc39/proposal-global
var $export = __webpack_require__(0);
 
$export($export.S, 'System', { global: __webpack_require__(3) });
 
 
/***/ }),
/* 559 */
/***/ (function(module, exports, __webpack_require__) {
 
// https://tc39.github.io/proposal-setmap-offrom/#sec-weakmap.from
__webpack_require__(96)('WeakMap');
 
 
/***/ }),
/* 560 */
/***/ (function(module, exports, __webpack_require__) {
 
// https://tc39.github.io/proposal-setmap-offrom/#sec-weakmap.of
__webpack_require__(97)('WeakMap');
 
 
/***/ }),
/* 561 */
/***/ (function(module, exports, __webpack_require__) {
 
// https://tc39.github.io/proposal-setmap-offrom/#sec-weakset.from
__webpack_require__(96)('WeakSet');
 
 
/***/ }),
/* 562 */
/***/ (function(module, exports, __webpack_require__) {
 
// https://tc39.github.io/proposal-setmap-offrom/#sec-weakset.of
__webpack_require__(97)('WeakSet');
 
 
/***/ }),
/* 563 */
/***/ (function(module, exports, __webpack_require__) {
 
var $iterators = __webpack_require__(154);
var getKeys = __webpack_require__(53);
var redefine = __webpack_require__(20);
var global = __webpack_require__(3);
var hide = __webpack_require__(19);
var Iterators = __webpack_require__(63);
var wks = __webpack_require__(6);
var ITERATOR = wks('iterator');
var TO_STRING_TAG = wks('toStringTag');
var ArrayValues = Iterators.Array;
 
var DOMIterables = {
  CSSRuleList: true, // TODO: Not spec compliant, should be false.
  CSSStyleDeclaration: false,
  CSSValueList: false,
  ClientRectList: false,
  DOMRectList: false,
  DOMStringList: false,
  DOMTokenList: true,
  DataTransferItemList: false,
  FileList: false,
  HTMLAllCollection: false,
  HTMLCollection: false,
  HTMLFormElement: false,
  HTMLSelectElement: false,
  MediaList: true, // TODO: Not spec compliant, should be false.
  MimeTypeArray: false,
  NamedNodeMap: false,
  NodeList: true,
  PaintRequestList: false,
  Plugin: false,
  PluginArray: false,
  SVGLengthList: false,
  SVGNumberList: false,
  SVGPathSegList: false,
  SVGPointList: false,
  SVGStringList: false,
  SVGTransformList: false,
  SourceBufferList: false,
  StyleSheetList: true, // TODO: Not spec compliant, should be false.
  TextTrackCueList: false,
  TextTrackList: false,
  TouchList: false
};
 
for (var collections = getKeys(DOMIterables), i = 0; i < collections.length; i++) {
  var NAME = collections[i];
  var explicit = DOMIterables[NAME];
  var Collection = global[NAME];
  var proto = Collection && Collection.prototype;
  var key;
  if (proto) {
    if (!proto[ITERATOR]) hide(proto, ITERATOR, ArrayValues);
    if (!proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME);
    Iterators[NAME] = ArrayValues;
    if (explicit) for (key in $iterators) if (!proto[key]) redefine(proto, key, $iterators[key], true);
  }
}
 
 
/***/ }),
/* 564 */
/***/ (function(module, exports, __webpack_require__) {
 
var $export = __webpack_require__(0);
var $task = __webpack_require__(149);
$export($export.G + $export.B, {
  setImmediate: $task.set,
  clearImmediate: $task.clear
});
 
 
/***/ }),
/* 565 */
/***/ (function(module, exports, __webpack_require__) {
 
// ie9- setTimeout & setInterval additional parameters fix
var global = __webpack_require__(3);
var $export = __webpack_require__(0);
var userAgent = __webpack_require__(151);
var slice = [].slice;
var MSIE = /MSIE .\./.test(userAgent); // <- dirty ie9- check
var wrap = function (set) {
  return function (fn, time /* , ...args */) {
    var boundArgs = arguments.length > 2;
    var args = boundArgs ? slice.call(arguments, 2) : false;
    return set(boundArgs ? function () {
      // eslint-disable-next-line no-new-func
      (typeof fn == 'function' ? fn : Function(fn)).apply(this, args);
    } : fn, time);
  };
};
$export($export.G + $export.B + $export.F * MSIE, {
  setTimeout: wrap(global.setTimeout),
  setInterval: wrap(global.setInterval)
});
 
 
/***/ }),
/* 566 */
/***/ (function(module, exports, __webpack_require__) {
 
__webpack_require__(494);
__webpack_require__(433);
__webpack_require__(435);
__webpack_require__(434);
__webpack_require__(437);
__webpack_require__(439);
__webpack_require__(444);
__webpack_require__(438);
__webpack_require__(436);
__webpack_require__(446);
__webpack_require__(445);
__webpack_require__(441);
__webpack_require__(442);
__webpack_require__(440);
__webpack_require__(432);
__webpack_require__(443);
__webpack_require__(447);
__webpack_require__(448);
__webpack_require__(400);
__webpack_require__(402);
__webpack_require__(401);
__webpack_require__(450);
__webpack_require__(449);
__webpack_require__(420);
__webpack_require__(430);
__webpack_require__(431);
__webpack_require__(421);
__webpack_require__(422);
__webpack_require__(423);
__webpack_require__(424);
__webpack_require__(425);
__webpack_require__(426);
__webpack_require__(427);
__webpack_require__(428);
__webpack_require__(429);
__webpack_require__(403);
__webpack_require__(404);
__webpack_require__(405);
__webpack_require__(406);
__webpack_require__(407);
__webpack_require__(408);
__webpack_require__(409);
__webpack_require__(410);
__webpack_require__(411);
__webpack_require__(412);
__webpack_require__(413);
__webpack_require__(414);
__webpack_require__(415);
__webpack_require__(416);
__webpack_require__(417);
__webpack_require__(418);
__webpack_require__(419);
__webpack_require__(481);
__webpack_require__(486);
__webpack_require__(493);
__webpack_require__(484);
__webpack_require__(476);
__webpack_require__(477);
__webpack_require__(482);
__webpack_require__(487);
__webpack_require__(489);
__webpack_require__(472);
__webpack_require__(473);
__webpack_require__(474);
__webpack_require__(475);
__webpack_require__(478);
__webpack_require__(479);
__webpack_require__(480);
__webpack_require__(483);
__webpack_require__(485);
__webpack_require__(488);
__webpack_require__(490);
__webpack_require__(491);
__webpack_require__(492);
__webpack_require__(395);
__webpack_require__(397);
__webpack_require__(396);
__webpack_require__(399);
__webpack_require__(398);
__webpack_require__(384);
__webpack_require__(382);
__webpack_require__(388);
__webpack_require__(385);
__webpack_require__(391);
__webpack_require__(393);
__webpack_require__(381);
__webpack_require__(387);
__webpack_require__(378);
__webpack_require__(392);
__webpack_require__(376);
__webpack_require__(390);
__webpack_require__(389);
__webpack_require__(383);
__webpack_require__(386);
__webpack_require__(375);
__webpack_require__(377);
__webpack_require__(380);
__webpack_require__(379);
__webpack_require__(394);
__webpack_require__(154);
__webpack_require__(466);
__webpack_require__(471);
__webpack_require__(229);
__webpack_require__(467);
__webpack_require__(468);
__webpack_require__(469);
__webpack_require__(470);
__webpack_require__(451);
__webpack_require__(228);
__webpack_require__(230);
__webpack_require__(231);
__webpack_require__(506);
__webpack_require__(495);
__webpack_require__(496);
__webpack_require__(501);
__webpack_require__(504);
__webpack_require__(505);
__webpack_require__(499);
__webpack_require__(502);
__webpack_require__(500);
__webpack_require__(503);
__webpack_require__(497);
__webpack_require__(498);
__webpack_require__(452);
__webpack_require__(453);
__webpack_require__(454);
__webpack_require__(455);
__webpack_require__(456);
__webpack_require__(459);
__webpack_require__(457);
__webpack_require__(458);
__webpack_require__(460);
__webpack_require__(461);
__webpack_require__(462);
__webpack_require__(463);
__webpack_require__(465);
__webpack_require__(464);
__webpack_require__(509);
__webpack_require__(507);
__webpack_require__(508);
__webpack_require__(550);
__webpack_require__(553);
__webpack_require__(552);
__webpack_require__(554);
__webpack_require__(555);
__webpack_require__(551);
__webpack_require__(556);
__webpack_require__(557);
__webpack_require__(531);
__webpack_require__(534);
__webpack_require__(530);
__webpack_require__(528);
__webpack_require__(529);
__webpack_require__(532);
__webpack_require__(533);
__webpack_require__(515);
__webpack_require__(549);
__webpack_require__(514);
__webpack_require__(548);
__webpack_require__(560);
__webpack_require__(562);
__webpack_require__(513);
__webpack_require__(547);
__webpack_require__(559);
__webpack_require__(561);
__webpack_require__(512);
__webpack_require__(558);
__webpack_require__(511);
__webpack_require__(516);
__webpack_require__(517);
__webpack_require__(518);
__webpack_require__(519);
__webpack_require__(520);
__webpack_require__(522);
__webpack_require__(521);
__webpack_require__(523);
__webpack_require__(524);
__webpack_require__(525);
__webpack_require__(527);
__webpack_require__(526);
__webpack_require__(536);
__webpack_require__(537);
__webpack_require__(538);
__webpack_require__(539);
__webpack_require__(541);
__webpack_require__(540);
__webpack_require__(543);
__webpack_require__(542);
__webpack_require__(544);
__webpack_require__(545);
__webpack_require__(546);
__webpack_require__(510);
__webpack_require__(535);
__webpack_require__(565);
__webpack_require__(564);
__webpack_require__(563);
module.exports = __webpack_require__(33);
 
 
/***/ }),
/* 567 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__src_hexbin__ = __webpack_require__(568);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "hexbin", function() { return __WEBPACK_IMPORTED_MODULE_0__src_hexbin__["a"]; });
 
 
 
/***/ }),
/* 568 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
var thirdPi = Math.PI / 3,
    angles = [0, thirdPi, 2 * thirdPi, 3 * thirdPi, 4 * thirdPi, 5 * thirdPi];
 
function pointX(d) {
  return d[0];
}
 
function pointY(d) {
  return d[1];
}
 
/* harmony default export */ __webpack_exports__["a"] = (function() {
  var x0 = 0,
      y0 = 0,
      x1 = 1,
      y1 = 1,
      x = pointX,
      y = pointY,
      r,
      dx,
      dy;
 
  function hexbin(points) {
    var binsById = {}, bins = [], i, n = points.length;
 
    for (i = 0; i < n; ++i) {
      if (isNaN(px = +x.call(null, point = points[i], i, points))
          || isNaN(py = +y.call(null, point, i, points))) continue;
 
      var point,
          px,
          py,
          pj = Math.round(py = py / dy),
          pi = Math.round(px = px / dx - (pj & 1) / 2),
          py1 = py - pj;
 
      if (Math.abs(py1) * 3 > 1) {
        var px1 = px - pi,
            pi2 = pi + (px < pi ? -1 : 1) / 2,
            pj2 = pj + (py < pj ? -1 : 1),
            px2 = px - pi2,
            py2 = py - pj2;
        if (px1 * px1 + py1 * py1 > px2 * px2 + py2 * py2) pi = pi2 + (pj & 1 ? 1 : -1) / 2, pj = pj2;
      }
 
      var id = pi + "-" + pj, bin = binsById[id];
      if (bin) bin.push(point);
      else {
        bins.push(bin = binsById[id] = [point]);
        bin.x = (pi + (pj & 1) / 2) * dx;
        bin.y = pj * dy;
      }
    }
 
    return bins;
  }
 
  function hexagon(radius) {
    var x0 = 0, y0 = 0;
    return angles.map(function(angle) {
      var x1 = Math.sin(angle) * radius,
          y1 = -Math.cos(angle) * radius,
          dx = x1 - x0,
          dy = y1 - y0;
      x0 = x1, y0 = y1;
      return [dx, dy];
    });
  }
 
  hexbin.hexagon = function(radius) {
    return "m" + hexagon(radius == null ? r : +radius).join("l") + "z";
  };
 
  hexbin.centers = function() {
    var centers = [],
        j = Math.round(y0 / dy),
        i = Math.round(x0 / dx);
    for (var y = j * dy; y < y1 + r; y += dy, ++j) {
      for (var x = i * dx + (j & 1) * dx / 2; x < x1 + dx / 2; x += dx) {
        centers.push([x, y]);
      }
    }
    return centers;
  };
 
  hexbin.mesh = function() {
    var fragment = hexagon(r).slice(0, 4).join("l");
    return hexbin.centers().map(function(p) { return "M" + p + "m" + fragment; }).join("");
  };
 
  hexbin.x = function(_) {
    return arguments.length ? (x = _, hexbin) : x;
  };
 
  hexbin.y = function(_) {
    return arguments.length ? (y = _, hexbin) : y;
  };
 
  hexbin.radius = function(_) {
    return arguments.length ? (r = +_, dx = r * 2 * Math.sin(thirdPi), dy = r * 1.5, hexbin) : r;
  };
 
  hexbin.size = function(_) {
    return arguments.length ? (x0 = y0 = 0, x1 = +_[0], y1 = +_[1], hexbin) : [x1 - x0, y1 - y0];
  };
 
  hexbin.extent = function(_) {
    return arguments.length ? (x0 = +_[0][0], y0 = +_[0][1], x1 = +_[1][0], y1 = +_[1][1], hexbin) : [[x0, y0], [x1, y1]];
  };
 
  return hexbin.radius(1);
});
 
 
/***/ }),
/* 569 */
/***/ (function(module, exports) {
 
module.exports = determinant;
 
/**
 * Calculates the determinant of a mat4
 *
 * @param {mat4} a the source matrix
 * @returns {Number} determinant of a
 */
function determinant(a) {
    var a00 = a[0], a01 = a[1], a02 = a[2], a03 = a[3],
        a10 = a[4], a11 = a[5], a12 = a[6], a13 = a[7],
        a20 = a[8], a21 = a[9], a22 = a[10], a23 = a[11],
        a30 = a[12], a31 = a[13], a32 = a[14], a33 = a[15],
 
        b00 = a00 * a11 - a01 * a10,
        b01 = a00 * a12 - a02 * a10,
        b02 = a00 * a13 - a03 * a10,
        b03 = a01 * a12 - a02 * a11,
        b04 = a01 * a13 - a03 * a11,
        b05 = a02 * a13 - a03 * a12,
        b06 = a20 * a31 - a21 * a30,
        b07 = a20 * a32 - a22 * a30,
        b08 = a20 * a33 - a23 * a30,
        b09 = a21 * a32 - a22 * a31,
        b10 = a21 * a33 - a23 * a31,
        b11 = a22 * a33 - a23 * a32;
 
    // Calculate the determinant
    return b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;
};
 
/***/ }),
/* 570 */
/***/ (function(module, exports) {
 
module.exports = fromQuat;
 
/**
 * Creates a matrix from a quaternion rotation.
 *
 * @param {mat4} out mat4 receiving operation result
 * @param {quat4} q Rotation quaternion
 * @returns {mat4} out
 */
function fromQuat(out, q) {
    var x = q[0], y = q[1], z = q[2], w = q[3],
        x2 = x + x,
        y2 = y + y,
        z2 = z + z,
 
        xx = x * x2,
        yx = y * x2,
        yy = y * y2,
        zx = z * x2,
        zy = z * y2,
        zz = z * z2,
        wx = w * x2,
        wy = w * y2,
        wz = w * z2;
 
    out[0] = 1 - yy - zz;
    out[1] = yx + wz;
    out[2] = zx - wy;
    out[3] = 0;
 
    out[4] = yx - wz;
    out[5] = 1 - xx - zz;
    out[6] = zy + wx;
    out[7] = 0;
 
    out[8] = zx + wy;
    out[9] = zy - wx;
    out[10] = 1 - xx - yy;
    out[11] = 0;
 
    out[12] = 0;
    out[13] = 0;
    out[14] = 0;
    out[15] = 1;
 
    return out;
};
 
/***/ }),
/* 571 */
/***/ (function(module, exports) {
 
module.exports = frustum;
 
/**
 * Generates a frustum matrix with the given bounds
 *
 * @param {mat4} out mat4 frustum matrix will be written into
 * @param {Number} left Left bound of the frustum
 * @param {Number} right Right bound of the frustum
 * @param {Number} bottom Bottom bound of the frustum
 * @param {Number} top Top bound of the frustum
 * @param {Number} near Near bound of the frustum
 * @param {Number} far Far bound of the frustum
 * @returns {mat4} out
 */
function frustum(out, left, right, bottom, top, near, far) {
    var rl = 1 / (right - left),
        tb = 1 / (top - bottom),
        nf = 1 / (near - far);
    out[0] = (near * 2) * rl;
    out[1] = 0;
    out[2] = 0;
    out[3] = 0;
    out[4] = 0;
    out[5] = (near * 2) * tb;
    out[6] = 0;
    out[7] = 0;
    out[8] = (right + left) * rl;
    out[9] = (top + bottom) * tb;
    out[10] = (far + near) * nf;
    out[11] = -1;
    out[12] = 0;
    out[13] = 0;
    out[14] = (far * near * 2) * nf;
    out[15] = 0;
    return out;
};
 
/***/ }),
/* 572 */
/***/ (function(module, exports) {
 
module.exports = identity;
 
/**
 * Set a mat4 to the identity matrix
 *
 * @param {mat4} out the receiving matrix
 * @returns {mat4} out
 */
function identity(out) {
    out[0] = 1;
    out[1] = 0;
    out[2] = 0;
    out[3] = 0;
    out[4] = 0;
    out[5] = 1;
    out[6] = 0;
    out[7] = 0;
    out[8] = 0;
    out[9] = 0;
    out[10] = 1;
    out[11] = 0;
    out[12] = 0;
    out[13] = 0;
    out[14] = 0;
    out[15] = 1;
    return out;
};
 
/***/ }),
/* 573 */
/***/ (function(module, exports) {
 
module.exports = rotate;
 
/**
 * Rotates a mat4 by the given angle
 *
 * @param {mat4} out the receiving matrix
 * @param {mat4} a the matrix to rotate
 * @param {Number} rad the angle to rotate the matrix by
 * @param {vec3} axis the axis to rotate around
 * @returns {mat4} out
 */
function rotate(out, a, rad, axis) {
    var x = axis[0], y = axis[1], z = axis[2],
        len = Math.sqrt(x * x + y * y + z * z),
        s, c, t,
        a00, a01, a02, a03,
        a10, a11, a12, a13,
        a20, a21, a22, a23,
        b00, b01, b02,
        b10, b11, b12,
        b20, b21, b22;
 
    if (Math.abs(len) < 0.000001) { return null; }
    
    len = 1 / len;
    x *= len;
    y *= len;
    z *= len;
 
    s = Math.sin(rad);
    c = Math.cos(rad);
    t = 1 - c;
 
    a00 = a[0]; a01 = a[1]; a02 = a[2]; a03 = a[3];
    a10 = a[4]; a11 = a[5]; a12 = a[6]; a13 = a[7];
    a20 = a[8]; a21 = a[9]; a22 = a[10]; a23 = a[11];
 
    // Construct the elements of the rotation matrix
    b00 = x * x * t + c; b01 = y * x * t + z * s; b02 = z * x * t - y * s;
    b10 = x * y * t - z * s; b11 = y * y * t + c; b12 = z * y * t + x * s;
    b20 = x * z * t + y * s; b21 = y * z * t - x * s; b22 = z * z * t + c;
 
    // Perform rotation-specific matrix multiplication
    out[0] = a00 * b00 + a10 * b01 + a20 * b02;
    out[1] = a01 * b00 + a11 * b01 + a21 * b02;
    out[2] = a02 * b00 + a12 * b01 + a22 * b02;
    out[3] = a03 * b00 + a13 * b01 + a23 * b02;
    out[4] = a00 * b10 + a10 * b11 + a20 * b12;
    out[5] = a01 * b10 + a11 * b11 + a21 * b12;
    out[6] = a02 * b10 + a12 * b11 + a22 * b12;
    out[7] = a03 * b10 + a13 * b11 + a23 * b12;
    out[8] = a00 * b20 + a10 * b21 + a20 * b22;
    out[9] = a01 * b20 + a11 * b21 + a21 * b22;
    out[10] = a02 * b20 + a12 * b21 + a22 * b22;
    out[11] = a03 * b20 + a13 * b21 + a23 * b22;
 
    if (a !== out) { // If the source and destination differ, copy the unchanged last row
        out[12] = a[12];
        out[13] = a[13];
        out[14] = a[14];
        out[15] = a[15];
    }
    return out;
};
 
/***/ }),
/* 574 */
/***/ (function(module, exports) {
 
module.exports = transpose;
 
/**
 * Transpose the values of a mat4
 *
 * @param {mat4} out the receiving matrix
 * @param {mat4} a the source matrix
 * @returns {mat4} out
 */
function transpose(out, a) {
    // If we are transposing ourselves we can skip a few steps but have to cache some values
    if (out === a) {
        var a01 = a[1], a02 = a[2], a03 = a[3],
            a12 = a[6], a13 = a[7],
            a23 = a[11];
 
        out[1] = a[4];
        out[2] = a[8];
        out[3] = a[12];
        out[4] = a01;
        out[6] = a[9];
        out[7] = a[13];
        out[8] = a02;
        out[9] = a12;
        out[11] = a[14];
        out[12] = a03;
        out[13] = a13;
        out[14] = a23;
    } else {
        out[0] = a[0];
        out[1] = a[4];
        out[2] = a[8];
        out[3] = a[12];
        out[4] = a[1];
        out[5] = a[5];
        out[6] = a[9];
        out[7] = a[13];
        out[8] = a[2];
        out[9] = a[6];
        out[10] = a[10];
        out[11] = a[14];
        out[12] = a[3];
        out[13] = a[7];
        out[14] = a[11];
        out[15] = a[15];
    }
    
    return out;
};
 
/***/ }),
/* 575 */
/***/ (function(module, exports, __webpack_require__) {
 
/**
 * Adds two quat's
 *
 * @param {quat} out the receiving quaternion
 * @param {quat} a the first operand
 * @param {quat} b the second operand
 * @returns {quat} out
 * @function
 */
module.exports = __webpack_require__(243)
 
 
/***/ }),
/* 576 */
/***/ (function(module, exports) {
 
module.exports = calculateW
 
/**
 * Calculates the W component of a quat from the X, Y, and Z components.
 * Assumes that quaternion is 1 unit in length.
 * Any existing W component will be ignored.
 *
 * @param {quat} out the receiving quaternion
 * @param {quat} a quat to calculate W component of
 * @returns {quat} out
 */
function calculateW (out, a) {
  var x = a[0], y = a[1], z = a[2]
 
  out[0] = x
  out[1] = y
  out[2] = z
  out[3] = Math.sqrt(Math.abs(1.0 - x * x - y * y - z * z))
  return out
}
 
 
/***/ }),
/* 577 */
/***/ (function(module, exports) {
 
module.exports = conjugate
 
/**
 * Calculates the conjugate of a quat
 * If the quaternion is normalized, this function is faster than quat.inverse and produces the same result.
 *
 * @param {quat} out the receiving quaternion
 * @param {quat} a quat to calculate conjugate of
 * @returns {quat} out
 */
function conjugate (out, a) {
  out[0] = -a[0]
  out[1] = -a[1]
  out[2] = -a[2]
  out[3] = a[3]
  return out
}
 
 
/***/ }),
/* 578 */
/***/ (function(module, exports, __webpack_require__) {
 
/**
 * Calculates the dot product of two quat's
 *
 * @param {quat} a the first operand
 * @param {quat} b the second operand
 * @returns {Number} dot product of a and b
 * @function
 */
module.exports = __webpack_require__(244)
 
 
/***/ }),
/* 579 */
/***/ (function(module, exports) {
 
module.exports = fromMat3
 
/**
 * Creates a quaternion from the given 3x3 rotation matrix.
 *
 * NOTE: The resultant quaternion is not normalized, so you should be sure
 * to renormalize the quaternion yourself where necessary.
 *
 * @param {quat} out the receiving quaternion
 * @param {mat3} m rotation matrix
 * @returns {quat} out
 * @function
 */
function fromMat3 (out, m) {
  // Algorithm in Ken Shoemake's article in 1987 SIGGRAPH course notes
  // article "Quaternion Calculus and Fast Animation".
  var fTrace = m[0] + m[4] + m[8]
  var fRoot
 
  if (fTrace > 0.0) {
    // |w| > 1/2, may as well choose w > 1/2
    fRoot = Math.sqrt(fTrace + 1.0)  // 2w
    out[3] = 0.5 * fRoot
    fRoot = 0.5 / fRoot  // 1/(4w)
    out[0] = (m[5] - m[7]) * fRoot
    out[1] = (m[6] - m[2]) * fRoot
    out[2] = (m[1] - m[3]) * fRoot
  } else {
    // |w| <= 1/2
    var i = 0
    if (m[4] > m[0]) {
      i = 1
    }
    if (m[8] > m[i * 3 + i]) {
      i = 2
    }
    var j = (i + 1) % 3
    var k = (i + 2) % 3
 
    fRoot = Math.sqrt(m[i * 3 + i] - m[j * 3 + j] - m[k * 3 + k] + 1.0)
    out[i] = 0.5 * fRoot
    fRoot = 0.5 / fRoot
    out[3] = (m[j * 3 + k] - m[k * 3 + j]) * fRoot
    out[j] = (m[j * 3 + i] + m[i * 3 + j]) * fRoot
    out[k] = (m[k * 3 + i] + m[i * 3 + k]) * fRoot
  }
 
  return out
}
 
 
/***/ }),
/* 580 */
/***/ (function(module, exports) {
 
module.exports = identity
 
/**
 * Set a quat to the identity quaternion
 *
 * @param {quat} out the receiving quaternion
 * @returns {quat} out
 */
function identity (out) {
  out[0] = 0
  out[1] = 0
  out[2] = 0
  out[3] = 1
  return out
}
 
 
/***/ }),
/* 581 */
/***/ (function(module, exports) {
 
module.exports = invert
 
/**
 * Calculates the inverse of a quat
 *
 * @param {quat} out the receiving quaternion
 * @param {quat} a quat to calculate inverse of
 * @returns {quat} out
 */
function invert (out, a) {
  var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3],
    dot = a0 * a0 + a1 * a1 + a2 * a2 + a3 * a3,
    invDot = dot ? 1.0 / dot : 0
 
  // TODO: Would be faster to return [0,0,0,0] immediately if dot == 0
 
  out[0] = -a0 * invDot
  out[1] = -a1 * invDot
  out[2] = -a2 * invDot
  out[3] = a3 * invDot
  return out
}
 
 
/***/ }),
/* 582 */
/***/ (function(module, exports, __webpack_require__) {
 
/**
 * Calculates the length of a quat
 *
 * @param {quat} a vector to calculate length of
 * @returns {Number} length of a
 * @function
 */
module.exports = __webpack_require__(619)
 
 
/***/ }),
/* 583 */
/***/ (function(module, exports, __webpack_require__) {
 
/**
 * Performs a linear interpolation between two quat's
 *
 * @param {quat} out the receiving quaternion
 * @param {quat} a the first operand
 * @param {quat} b the second operand
 * @param {Number} t interpolation amount between the two inputs
 * @returns {quat} out
 * @function
 */
module.exports = __webpack_require__(245)
 
 
/***/ }),
/* 584 */
/***/ (function(module, exports) {
 
module.exports = multiply
 
/**
 * Multiplies two quat's
 *
 * @param {quat} out the receiving quaternion
 * @param {quat} a the first operand
 * @param {quat} b the second operand
 * @returns {quat} out
 */
function multiply (out, a, b) {
  var ax = a[0], ay = a[1], az = a[2], aw = a[3],
    bx = b[0], by = b[1], bz = b[2], bw = b[3]
 
  out[0] = ax * bw + aw * bx + ay * bz - az * by
  out[1] = ay * bw + aw * by + az * bx - ax * bz
  out[2] = az * bw + aw * bz + ax * by - ay * bx
  out[3] = aw * bw - ax * bx - ay * by - az * bz
  return out
}
 
 
/***/ }),
/* 585 */
/***/ (function(module, exports) {
 
module.exports = rotateX
 
/**
 * Rotates a quaternion by the given angle about the X axis
 *
 * @param {quat} out quat receiving operation result
 * @param {quat} a quat to rotate
 * @param {number} rad angle (in radians) to rotate
 * @returns {quat} out
 */
function rotateX (out, a, rad) {
  rad *= 0.5
 
  var ax = a[0], ay = a[1], az = a[2], aw = a[3],
    bx = Math.sin(rad), bw = Math.cos(rad)
 
  out[0] = ax * bw + aw * bx
  out[1] = ay * bw + az * bx
  out[2] = az * bw - ay * bx
  out[3] = aw * bw - ax * bx
  return out
}
 
 
/***/ }),
/* 586 */
/***/ (function(module, exports) {
 
module.exports = rotateY
 
/**
 * Rotates a quaternion by the given angle about the Y axis
 *
 * @param {quat} out quat receiving operation result
 * @param {quat} a quat to rotate
 * @param {number} rad angle (in radians) to rotate
 * @returns {quat} out
 */
function rotateY (out, a, rad) {
  rad *= 0.5
 
  var ax = a[0], ay = a[1], az = a[2], aw = a[3],
    by = Math.sin(rad), bw = Math.cos(rad)
 
  out[0] = ax * bw - az * by
  out[1] = ay * bw + aw * by
  out[2] = az * bw + ax * by
  out[3] = aw * bw - ay * by
  return out
}
 
 
/***/ }),
/* 587 */
/***/ (function(module, exports) {
 
module.exports = rotateZ
 
/**
 * Rotates a quaternion by the given angle about the Z axis
 *
 * @param {quat} out quat receiving operation result
 * @param {quat} a quat to rotate
 * @param {number} rad angle (in radians) to rotate
 * @returns {quat} out
 */
function rotateZ (out, a, rad) {
  rad *= 0.5
 
  var ax = a[0], ay = a[1], az = a[2], aw = a[3],
    bz = Math.sin(rad), bw = Math.cos(rad)
 
  out[0] = ax * bw + ay * bz
  out[1] = ay * bw - ax * bz
  out[2] = az * bw + aw * bz
  out[3] = aw * bw - az * bz
  return out
}
 
 
/***/ }),
/* 588 */
/***/ (function(module, exports, __webpack_require__) {
 
var vecDot = __webpack_require__(240)
var vecCross = __webpack_require__(239)
var vecLength = __webpack_require__(241)
var vecNormalize = __webpack_require__(242)
 
var quatNormalize = __webpack_require__(236)
var quatAxisAngle = __webpack_require__(237)
 
module.exports = rotationTo
 
var tmpvec3 = [0, 0, 0]
var xUnitVec3 = [1, 0, 0]
var yUnitVec3 = [0, 1, 0]
 
/**
 * Sets a quaternion to represent the shortest rotation from one
 * vector to another.
 *
 * Both vectors are assumed to be unit length.
 *
 * @param {quat} out the receiving quaternion.
 * @param {vec3} a the initial vector
 * @param {vec3} b the destination vector
 * @returns {quat} out
 */
function rotationTo (out, a, b) {
  var dot = vecDot(a, b)
  if (dot < -0.999999) {
    vecCross(tmpvec3, xUnitVec3, a)
    if (vecLength(tmpvec3) < 0.000001) {
      vecCross(tmpvec3, yUnitVec3, a)
    }
    vecNormalize(tmpvec3, tmpvec3)
    quatAxisAngle(out, tmpvec3, Math.PI)
    return out
  } else if (dot > 0.999999) {
    out[0] = 0
    out[1] = 0
    out[2] = 0
    out[3] = 1
    return out
  } else {
    vecCross(tmpvec3, a, b)
    out[0] = tmpvec3[0]
    out[1] = tmpvec3[1]
    out[2] = tmpvec3[2]
    out[3] = 1 + dot
    return quatNormalize(out, out)
  }
}
 
 
/***/ }),
/* 589 */
/***/ (function(module, exports, __webpack_require__) {
 
/**
 * Scales a quat by a scalar number
 *
 * @param {quat} out the receiving vector
 * @param {quat} a the vector to scale
 * @param {Number} b amount to scale the vector by
 * @returns {quat} out
 * @function
 */
module.exports = __webpack_require__(161)
 
 
/***/ }),
/* 590 */
/***/ (function(module, exports, __webpack_require__) {
 
/**
 * Set the components of a quat to the given values
 *
 * @param {quat} out the receiving quaternion
 * @param {Number} x X component
 * @param {Number} y Y component
 * @param {Number} z Z component
 * @param {Number} w W component
 * @returns {quat} out
 * @function
 */
module.exports = __webpack_require__(248)
 
 
/***/ }),
/* 591 */
/***/ (function(module, exports) {
 
module.exports = slerp
 
/**
 * Performs a spherical linear interpolation between two quat
 *
 * @param {quat} out the receiving quaternion
 * @param {quat} a the first operand
 * @param {quat} b the second operand
 * @param {Number} t interpolation amount between the two inputs
 * @returns {quat} out
 */
function slerp (out, a, b, t) {
  // benchmarks:
  //    http://jsperf.com/quaternion-slerp-implementations
 
  var ax = a[0], ay = a[1], az = a[2], aw = a[3],
    bx = b[0], by = b[1], bz = b[2], bw = b[3]
 
  var omega, cosom, sinom, scale0, scale1
 
  // calc cosine
  cosom = ax * bx + ay * by + az * bz + aw * bw
  // adjust signs (if necessary)
  if (cosom < 0.0) {
    cosom = -cosom
    bx = -bx
    by = -by
    bz = -bz
    bw = -bw
  }
  // calculate coefficients
  if ((1.0 - cosom) > 0.000001) {
    // standard case (slerp)
    omega = Math.acos(cosom)
    sinom = Math.sin(omega)
    scale0 = Math.sin((1.0 - t) * omega) / sinom
    scale1 = Math.sin(t * omega) / sinom
  } else {
    // "from" and "to" quaternions are very close
    //  ... so we can do a linear interpolation
    scale0 = 1.0 - t
    scale1 = t
  }
  // calculate final values
  out[0] = scale0 * ax + scale1 * bx
  out[1] = scale0 * ay + scale1 * by
  out[2] = scale0 * az + scale1 * bz
  out[3] = scale0 * aw + scale1 * bw
 
  return out
}
 
 
/***/ }),
/* 592 */
/***/ (function(module, exports, __webpack_require__) {
 
/**
 * Calculates the squared length of a quat
 *
 * @param {quat} a vector to calculate squared length of
 * @returns {Number} squared length of a
 * @function
 */
module.exports = __webpack_require__(622)
 
 
/***/ }),
/* 593 */
/***/ (function(module, exports) {
 
module.exports = cross
 
/**
 * Computes the cross product of two vec2's
 * Note that the cross product must by definition produce a 3D vector
 *
 * @param {vec3} out the receiving vector
 * @param {vec2} a the first operand
 * @param {vec2} b the second operand
 * @returns {vec3} out
 */
function cross(out, a, b) {
    var z = a[0] * b[1] - a[1] * b[0]
    out[0] = out[1] = 0
    out[2] = z
    return out
}
 
/***/ }),
/* 594 */
/***/ (function(module, exports) {
 
module.exports = divide
 
/**
 * Divides two vec2's
 *
 * @param {vec2} out the receiving vector
 * @param {vec2} a the first operand
 * @param {vec2} b the second operand
 * @returns {vec2} out
 */
function divide(out, a, b) {
    out[0] = a[0] / b[0]
    out[1] = a[1] / b[1]
    return out
}
 
/***/ }),
/* 595 */
/***/ (function(module, exports) {
 
module.exports = dot
 
/**
 * Calculates the dot product of two vec2's
 *
 * @param {vec2} a the first operand
 * @param {vec2} b the second operand
 * @returns {Number} dot product of a and b
 */
function dot(a, b) {
    return a[0] * b[0] + a[1] * b[1]
}
 
/***/ }),
/* 596 */
/***/ (function(module, exports) {
 
module.exports = multiply
 
/**
 * Multiplies two vec2's
 *
 * @param {vec2} out the receiving vector
 * @param {vec2} a the first operand
 * @param {vec2} b the second operand
 * @returns {vec2} out
 */
function multiply(out, a, b) {
    out[0] = a[0] * b[0]
    out[1] = a[1] * b[1]
    return out
}
 
/***/ }),
/* 597 */
/***/ (function(module, exports) {
 
module.exports = normalize
 
/**
 * Normalize a vec2
 *
 * @param {vec2} out the receiving vector
 * @param {vec2} a vector to normalize
 * @returns {vec2} out
 */
function normalize(out, a) {
    var x = a[0],
        y = a[1]
    var len = x*x + y*y
    if (len > 0) {
        //TODO: evaluate use of glm_invsqrt here?
        len = 1 / Math.sqrt(len)
        out[0] = a[0] * len
        out[1] = a[1] * len
    }
    return out
}
 
/***/ }),
/* 598 */
/***/ (function(module, exports) {
 
module.exports = scale
 
/**
 * Scales a vec2 by a scalar number
 *
 * @param {vec2} out the receiving vector
 * @param {vec2} a the vector to scale
 * @param {Number} b amount to scale the vector by
 * @returns {vec2} out
 */
function scale(out, a, b) {
    out[0] = a[0] * b
    out[1] = a[1] * b
    return out
}
 
/***/ }),
/* 599 */
/***/ (function(module, exports) {
 
module.exports = scaleAndAdd
 
/**
 * Adds two vec2's after scaling the second operand by a scalar value
 *
 * @param {vec2} out the receiving vector
 * @param {vec2} a the first operand
 * @param {vec2} b the second operand
 * @param {Number} scale the amount to scale b by before adding
 * @returns {vec2} out
 */
function scaleAndAdd(out, a, b, scale) {
    out[0] = a[0] + (b[0] * scale)
    out[1] = a[1] + (b[1] * scale)
    return out
}
 
/***/ }),
/* 600 */
/***/ (function(module, exports) {
 
module.exports = set
 
/**
 * Set the components of a vec2 to the given values
 *
 * @param {vec2} out the receiving vector
 * @param {Number} x X component
 * @param {Number} y Y component
 * @returns {vec2} out
 */
function set(out, x, y) {
    out[0] = x
    out[1] = y
    return out
}
 
/***/ }),
/* 601 */
/***/ (function(module, exports) {
 
module.exports = subtract
 
/**
 * Subtracts vector b from vector a
 *
 * @param {vec2} out the receiving vector
 * @param {vec2} a the first operand
 * @param {vec2} b the second operand
 * @returns {vec2} out
 */
function subtract(out, a, b) {
    out[0] = a[0] - b[0]
    out[1] = a[1] - b[1]
    return out
}
 
/***/ }),
/* 602 */
/***/ (function(module, exports) {
 
module.exports = transformMat4
 
/**
 * Transforms the vec2 with a mat4
 * 3rd vector component is implicitly '0'
 * 4th vector component is implicitly '1'
 *
 * @param {vec2} out the receiving vector
 * @param {vec2} a the vector to transform
 * @param {mat4} m matrix to transform with
 * @returns {vec2} out
 */
function transformMat4(out, a, m) {
    var x = a[0], 
        y = a[1]
    out[0] = m[0] * x + m[4] * y + m[12]
    out[1] = m[1] * x + m[5] * y + m[13]
    return out
}
 
/***/ }),
/* 603 */
/***/ (function(module, exports) {
 
module.exports = add;
 
/**
 * Adds two vec3's
 *
 * @param {vec3} out the receiving vector
 * @param {vec3} a the first operand
 * @param {vec3} b the second operand
 * @returns {vec3} out
 */
function add(out, a, b) {
    out[0] = a[0] + b[0]
    out[1] = a[1] + b[1]
    out[2] = a[2] + b[2]
    return out
}
 
/***/ }),
/* 604 */
/***/ (function(module, exports, __webpack_require__) {
 
module.exports = angle
 
var fromValues = __webpack_require__(606)
var normalize = __webpack_require__(242)
var dot = __webpack_require__(240)
 
/**
 * Get the angle between two 3D vectors
 * @param {vec3} a The first operand
 * @param {vec3} b The second operand
 * @returns {Number} The angle in radians
 */
function angle(a, b) {
    var tempA = fromValues(a[0], a[1], a[2])
    var tempB = fromValues(b[0], b[1], b[2])
 
    normalize(tempA, tempA)
    normalize(tempB, tempB)
 
    var cosine = dot(tempA, tempB)
 
    if(cosine > 1.0){
        return 0
    } else {
        return Math.acos(cosine)
    }     
}
 
 
/***/ }),
/* 605 */
/***/ (function(module, exports) {
 
module.exports = divide;
 
/**
 * Divides two vec3's
 *
 * @param {vec3} out the receiving vector
 * @param {vec3} a the first operand
 * @param {vec3} b the second operand
 * @returns {vec3} out
 */
function divide(out, a, b) {
    out[0] = a[0] / b[0]
    out[1] = a[1] / b[1]
    out[2] = a[2] / b[2]
    return out
}
 
/***/ }),
/* 606 */
/***/ (function(module, exports) {
 
module.exports = fromValues;
 
/**
 * Creates a new vec3 initialized with the given values
 *
 * @param {Number} x X component
 * @param {Number} y Y component
 * @param {Number} z Z component
 * @returns {vec3} a new 3D vector
 */
function fromValues(x, y, z) {
    var out = new Float32Array(3)
    out[0] = x
    out[1] = y
    out[2] = z
    return out
}
 
/***/ }),
/* 607 */
/***/ (function(module, exports) {
 
module.exports = multiply;
 
/**
 * Multiplies two vec3's
 *
 * @param {vec3} out the receiving vector
 * @param {vec3} a the first operand
 * @param {vec3} b the second operand
 * @returns {vec3} out
 */
function multiply(out, a, b) {
    out[0] = a[0] * b[0]
    out[1] = a[1] * b[1]
    out[2] = a[2] * b[2]
    return out
}
 
/***/ }),
/* 608 */
/***/ (function(module, exports) {
 
module.exports = rotateX;
 
/**
 * Rotate a 3D vector around the x-axis
 * @param {vec3} out The receiving vec3
 * @param {vec3} a The vec3 point to rotate
 * @param {vec3} b The origin of the rotation
 * @param {Number} c The angle of rotation
 * @returns {vec3} out
 */
function rotateX(out, a, b, c){
    var p = [], r=[]
    //Translate point to the origin
    p[0] = a[0] - b[0]
    p[1] = a[1] - b[1]
    p[2] = a[2] - b[2]
 
    //perform rotation
    r[0] = p[0]
    r[1] = p[1]*Math.cos(c) - p[2]*Math.sin(c)
    r[2] = p[1]*Math.sin(c) + p[2]*Math.cos(c)
 
    //translate to correct position
    out[0] = r[0] + b[0]
    out[1] = r[1] + b[1]
    out[2] = r[2] + b[2]
 
    return out
}
 
/***/ }),
/* 609 */
/***/ (function(module, exports) {
 
module.exports = rotateY;
 
/**
 * Rotate a 3D vector around the y-axis
 * @param {vec3} out The receiving vec3
 * @param {vec3} a The vec3 point to rotate
 * @param {vec3} b The origin of the rotation
 * @param {Number} c The angle of rotation
 * @returns {vec3} out
 */
function rotateY(out, a, b, c){
    var p = [], r=[]
    //Translate point to the origin
    p[0] = a[0] - b[0]
    p[1] = a[1] - b[1]
    p[2] = a[2] - b[2]
  
    //perform rotation
    r[0] = p[2]*Math.sin(c) + p[0]*Math.cos(c)
    r[1] = p[1]
    r[2] = p[2]*Math.cos(c) - p[0]*Math.sin(c)
  
    //translate to correct position
    out[0] = r[0] + b[0]
    out[1] = r[1] + b[1]
    out[2] = r[2] + b[2]
  
    return out
}
 
/***/ }),
/* 610 */
/***/ (function(module, exports) {
 
module.exports = rotateZ;
 
/**
 * Rotate a 3D vector around the z-axis
 * @param {vec3} out The receiving vec3
 * @param {vec3} a The vec3 point to rotate
 * @param {vec3} b The origin of the rotation
 * @param {Number} c The angle of rotation
 * @returns {vec3} out
 */
function rotateZ(out, a, b, c){
    var p = [], r=[]
    //Translate point to the origin
    p[0] = a[0] - b[0]
    p[1] = a[1] - b[1]
    p[2] = a[2] - b[2]
  
    //perform rotation
    r[0] = p[0]*Math.cos(c) - p[1]*Math.sin(c)
    r[1] = p[0]*Math.sin(c) + p[1]*Math.cos(c)
    r[2] = p[2]
  
    //translate to correct position
    out[0] = r[0] + b[0]
    out[1] = r[1] + b[1]
    out[2] = r[2] + b[2]
  
    return out
}
 
/***/ }),
/* 611 */
/***/ (function(module, exports) {
 
module.exports = scale;
 
/**
 * Scales a vec3 by a scalar number
 *
 * @param {vec3} out the receiving vector
 * @param {vec3} a the vector to scale
 * @param {Number} b amount to scale the vector by
 * @returns {vec3} out
 */
function scale(out, a, b) {
    out[0] = a[0] * b
    out[1] = a[1] * b
    out[2] = a[2] * b
    return out
}
 
/***/ }),
/* 612 */
/***/ (function(module, exports) {
 
module.exports = scaleAndAdd;
 
/**
 * Adds two vec3's after scaling the second operand by a scalar value
 *
 * @param {vec3} out the receiving vector
 * @param {vec3} a the first operand
 * @param {vec3} b the second operand
 * @param {Number} scale the amount to scale b by before adding
 * @returns {vec3} out
 */
function scaleAndAdd(out, a, b, scale) {
    out[0] = a[0] + (b[0] * scale)
    out[1] = a[1] + (b[1] * scale)
    out[2] = a[2] + (b[2] * scale)
    return out
}
 
/***/ }),
/* 613 */
/***/ (function(module, exports) {
 
module.exports = set;
 
/**
 * Set the components of a vec3 to the given values
 *
 * @param {vec3} out the receiving vector
 * @param {Number} x X component
 * @param {Number} y Y component
 * @param {Number} z Z component
 * @returns {vec3} out
 */
function set(out, x, y, z) {
    out[0] = x
    out[1] = y
    out[2] = z
    return out
}
 
/***/ }),
/* 614 */
/***/ (function(module, exports) {
 
module.exports = subtract;
 
/**
 * Subtracts vector b from vector a
 *
 * @param {vec3} out the receiving vector
 * @param {vec3} a the first operand
 * @param {vec3} b the second operand
 * @returns {vec3} out
 */
function subtract(out, a, b) {
    out[0] = a[0] - b[0]
    out[1] = a[1] - b[1]
    out[2] = a[2] - b[2]
    return out
}
 
/***/ }),
/* 615 */
/***/ (function(module, exports) {
 
module.exports = transformMat4;
 
/**
 * Transforms the vec3 with a mat4.
 * 4th vector component is implicitly '1'
 *
 * @param {vec3} out the receiving vector
 * @param {vec3} a the vector to transform
 * @param {mat4} m matrix to transform with
 * @returns {vec3} out
 */
function transformMat4(out, a, m) {
    var x = a[0], y = a[1], z = a[2],
        w = m[3] * x + m[7] * y + m[11] * z + m[15]
    w = w || 1.0
    out[0] = (m[0] * x + m[4] * y + m[8] * z + m[12]) / w
    out[1] = (m[1] * x + m[5] * y + m[9] * z + m[13]) / w
    out[2] = (m[2] * x + m[6] * y + m[10] * z + m[14]) / w
    return out
}
 
/***/ }),
/* 616 */
/***/ (function(module, exports) {
 
module.exports = distance
 
/**
 * Calculates the euclidian distance between two vec4's
 *
 * @param {vec4} a the first operand
 * @param {vec4} b the second operand
 * @returns {Number} distance between a and b
 */
function distance (a, b) {
  var x = b[0] - a[0],
    y = b[1] - a[1],
    z = b[2] - a[2],
    w = b[3] - a[3]
  return Math.sqrt(x * x + y * y + z * z + w * w)
}
 
 
/***/ }),
/* 617 */
/***/ (function(module, exports) {
 
module.exports = divide
 
/**
 * Divides two vec4's
 *
 * @param {vec4} out the receiving vector
 * @param {vec4} a the first operand
 * @param {vec4} b the second operand
 * @returns {vec4} out
 */
function divide (out, a, b) {
  out[0] = a[0] / b[0]
  out[1] = a[1] / b[1]
  out[2] = a[2] / b[2]
  out[3] = a[3] / b[3]
  return out
}
 
 
/***/ }),
/* 618 */
/***/ (function(module, exports) {
 
module.exports = inverse
 
/**
 * Returns the inverse of the components of a vec4
 *
 * @param {vec4} out the receiving vector
 * @param {vec4} a vector to invert
 * @returns {vec4} out
 */
function inverse (out, a) {
  out[0] = 1.0 / a[0]
  out[1] = 1.0 / a[1]
  out[2] = 1.0 / a[2]
  out[3] = 1.0 / a[3]
  return out
}
 
 
/***/ }),
/* 619 */
/***/ (function(module, exports) {
 
module.exports = length
 
/**
 * Calculates the length of a vec4
 *
 * @param {vec4} a vector to calculate length of
 * @returns {Number} length of a
 */
function length (a) {
  var x = a[0],
    y = a[1],
    z = a[2],
    w = a[3]
  return Math.sqrt(x * x + y * y + z * z + w * w)
}
 
 
/***/ }),
/* 620 */
/***/ (function(module, exports) {
 
module.exports = negate
 
/**
 * Negates the components of a vec4
 *
 * @param {vec4} out the receiving vector
 * @param {vec4} a vector to negate
 * @returns {vec4} out
 */
function negate (out, a) {
  out[0] = -a[0]
  out[1] = -a[1]
  out[2] = -a[2]
  out[3] = -a[3]
  return out
}
 
 
/***/ }),
/* 621 */
/***/ (function(module, exports) {
 
module.exports = scaleAndAdd
 
/**
 * Adds two vec4's after scaling the second operand by a scalar value
 *
 * @param {vec4} out the receiving vector
 * @param {vec4} a the first operand
 * @param {vec4} b the second operand
 * @param {Number} scale the amount to scale b by before adding
 * @returns {vec4} out
 */
function scaleAndAdd (out, a, b, scale) {
  out[0] = a[0] + (b[0] * scale)
  out[1] = a[1] + (b[1] * scale)
  out[2] = a[2] + (b[2] * scale)
  out[3] = a[3] + (b[3] * scale)
  return out
}
 
 
/***/ }),
/* 622 */
/***/ (function(module, exports) {
 
module.exports = squaredLength
 
/**
 * Calculates the squared length of a vec4
 *
 * @param {vec4} a vector to calculate squared length of
 * @returns {Number} squared length of a
 */
function squaredLength (a) {
  var x = a[0],
    y = a[1],
    z = a[2],
    w = a[3]
  return x * x + y * y + z * z + w * w
}
 
 
/***/ }),
/* 623 */
/***/ (function(module, exports) {
 
module.exports = subtract
 
/**
 * Subtracts vector b from vector a
 *
 * @param {vec4} out the receiving vector
 * @param {vec4} a the first operand
 * @param {vec4} b the second operand
 * @returns {vec4} out
 */
function subtract (out, a, b) {
  out[0] = a[0] - b[0]
  out[1] = a[1] - b[1]
  out[2] = a[2] - b[2]
  out[3] = a[3] - b[3]
  return out
}
 
 
/***/ }),
/* 624 */
/***/ (function(module, exports, __webpack_require__) {
 
var __WEBPACK_AMD_DEFINE_RESULT__;/*! Hammer.JS - v2.0.7 - 2016-04-22
 * http://hammerjs.github.io/
 *
 * Copyright (c) 2016 Jorik Tangelder;
 * Licensed under the MIT license */
(function(window, document, exportName, undefined) {
  'use strict';
 
var VENDOR_PREFIXES = ['', 'webkit', 'Moz', 'MS', 'ms', 'o'];
var TEST_ELEMENT = document.createElement('div');
 
var TYPE_FUNCTION = 'function';
 
var round = Math.round;
var abs = Math.abs;
var now = Date.now;
 
/**
 * set a timeout with a given scope
 * @param {Function} fn
 * @param {Number} timeout
 * @param {Object} context
 * @returns {number}
 */
function setTimeoutContext(fn, timeout, context) {
    return setTimeout(bindFn(fn, context), timeout);
}
 
/**
 * if the argument is an array, we want to execute the fn on each entry
 * if it aint an array we don't want to do a thing.
 * this is used by all the methods that accept a single and array argument.
 * @param {*|Array} arg
 * @param {String} fn
 * @param {Object} [context]
 * @returns {Boolean}
 */
function invokeArrayArg(arg, fn, context) {
    if (Array.isArray(arg)) {
        each(arg, context[fn], context);
        return true;
    }
    return false;
}
 
/**
 * walk objects and arrays
 * @param {Object} obj
 * @param {Function} iterator
 * @param {Object} context
 */
function each(obj, iterator, context) {
    var i;
 
    if (!obj) {
        return;
    }
 
    if (obj.forEach) {
        obj.forEach(iterator, context);
    } else if (obj.length !== undefined) {
        i = 0;
        while (i < obj.length) {
            iterator.call(context, obj[i], i, obj);
            i++;
        }
    } else {
        for (i in obj) {
            obj.hasOwnProperty(i) && iterator.call(context, obj[i], i, obj);
        }
    }
}
 
/**
 * wrap a method with a deprecation warning and stack trace
 * @param {Function} method
 * @param {String} name
 * @param {String} message
 * @returns {Function} A new function wrapping the supplied method.
 */
function deprecate(method, name, message) {
    var deprecationMessage = 'DEPRECATED METHOD: ' + name + '\n' + message + ' AT \n';
    return function() {
        var e = new Error('get-stack-trace');
        var stack = e && e.stack ? e.stack.replace(/^[^\(]+?[\n$]/gm, '')
            .replace(/^\s+at\s+/gm, '')
            .replace(/^Object.<anonymous>\s*\(/gm, '{anonymous}()@') : 'Unknown Stack Trace';
 
        var log = window.console && (window.console.warn || window.console.log);
        if (log) {
            log.call(window.console, deprecationMessage, stack);
        }
        return method.apply(this, arguments);
    };
}
 
/**
 * extend object.
 * means that properties in dest will be overwritten by the ones in src.
 * @param {Object} target
 * @param {...Object} objects_to_assign
 * @returns {Object} target
 */
var assign;
if (typeof Object.assign !== 'function') {
    assign = function assign(target) {
        if (target === undefined || target === null) {
            throw new TypeError('Cannot convert undefined or null to object');
        }
 
        var output = Object(target);
        for (var index = 1; index < arguments.length; index++) {
            var source = arguments[index];
            if (source !== undefined && source !== null) {
                for (var nextKey in source) {
                    if (source.hasOwnProperty(nextKey)) {
                        output[nextKey] = source[nextKey];
                    }
                }
            }
        }
        return output;
    };
} else {
    assign = Object.assign;
}
 
/**
 * extend object.
 * means that properties in dest will be overwritten by the ones in src.
 * @param {Object} dest
 * @param {Object} src
 * @param {Boolean} [merge=false]
 * @returns {Object} dest
 */
var extend = deprecate(function extend(dest, src, merge) {
    var keys = Object.keys(src);
    var i = 0;
    while (i < keys.length) {
        if (!merge || (merge && dest[keys[i]] === undefined)) {
            dest[keys[i]] = src[keys[i]];
        }
        i++;
    }
    return dest;
}, 'extend', 'Use `assign`.');
 
/**
 * merge the values from src in the dest.
 * means that properties that exist in dest will not be overwritten by src
 * @param {Object} dest
 * @param {Object} src
 * @returns {Object} dest
 */
var merge = deprecate(function merge(dest, src) {
    return extend(dest, src, true);
}, 'merge', 'Use `assign`.');
 
/**
 * simple class inheritance
 * @param {Function} child
 * @param {Function} base
 * @param {Object} [properties]
 */
function inherit(child, base, properties) {
    var baseP = base.prototype,
        childP;
 
    childP = child.prototype = Object.create(baseP);
    childP.constructor = child;
    childP._super = baseP;
 
    if (properties) {
        assign(childP, properties);
    }
}
 
/**
 * simple function bind
 * @param {Function} fn
 * @param {Object} context
 * @returns {Function}
 */
function bindFn(fn, context) {
    return function boundFn() {
        return fn.apply(context, arguments);
    };
}
 
/**
 * let a boolean value also be a function that must return a boolean
 * this first item in args will be used as the context
 * @param {Boolean|Function} val
 * @param {Array} [args]
 * @returns {Boolean}
 */
function boolOrFn(val, args) {
    if (typeof val == TYPE_FUNCTION) {
        return val.apply(args ? args[0] || undefined : undefined, args);
    }
    return val;
}
 
/**
 * use the val2 when val1 is undefined
 * @param {*} val1
 * @param {*} val2
 * @returns {*}
 */
function ifUndefined(val1, val2) {
    return (val1 === undefined) ? val2 : val1;
}
 
/**
 * addEventListener with multiple events at once
 * @param {EventTarget} target
 * @param {String} types
 * @param {Function} handler
 */
function addEventListeners(target, types, handler) {
    each(splitStr(types), function(type) {
        target.addEventListener(type, handler, false);
    });
}
 
/**
 * removeEventListener with multiple events at once
 * @param {EventTarget} target
 * @param {String} types
 * @param {Function} handler
 */
function removeEventListeners(target, types, handler) {
    each(splitStr(types), function(type) {
        target.removeEventListener(type, handler, false);
    });
}
 
/**
 * find if a node is in the given parent
 * @method hasParent
 * @param {HTMLElement} node
 * @param {HTMLElement} parent
 * @return {Boolean} found
 */
function hasParent(node, parent) {
    while (node) {
        if (node == parent) {
            return true;
        }
        node = node.parentNode;
    }
    return false;
}
 
/**
 * small indexOf wrapper
 * @param {String} str
 * @param {String} find
 * @returns {Boolean} found
 */
function inStr(str, find) {
    return str.indexOf(find) > -1;
}
 
/**
 * split string on whitespace
 * @param {String} str
 * @returns {Array} words
 */
function splitStr(str) {
    return str.trim().split(/\s+/g);
}
 
/**
 * find if a array contains the object using indexOf or a simple polyFill
 * @param {Array} src
 * @param {String} find
 * @param {String} [findByKey]
 * @return {Boolean|Number} false when not found, or the index
 */
function inArray(src, find, findByKey) {
    if (src.indexOf && !findByKey) {
        return src.indexOf(find);
    } else {
        var i = 0;
        while (i < src.length) {
            if ((findByKey && src[i][findByKey] == find) || (!findByKey && src[i] === find)) {
                return i;
            }
            i++;
        }
        return -1;
    }
}
 
/**
 * convert array-like objects to real arrays
 * @param {Object} obj
 * @returns {Array}
 */
function toArray(obj) {
    return Array.prototype.slice.call(obj, 0);
}
 
/**
 * unique array with objects based on a key (like 'id') or just by the array's value
 * @param {Array} src [{id:1},{id:2},{id:1}]
 * @param {String} [key]
 * @param {Boolean} [sort=False]
 * @returns {Array} [{id:1},{id:2}]
 */
function uniqueArray(src, key, sort) {
    var results = [];
    var values = [];
    var i = 0;
 
    while (i < src.length) {
        var val = key ? src[i][key] : src[i];
        if (inArray(values, val) < 0) {
            results.push(src[i]);
        }
        values[i] = val;
        i++;
    }
 
    if (sort) {
        if (!key) {
            results = results.sort();
        } else {
            results = results.sort(function sortUniqueArray(a, b) {
                return a[key] > b[key];
            });
        }
    }
 
    return results;
}
 
/**
 * get the prefixed property
 * @param {Object} obj
 * @param {String} property
 * @returns {String|Undefined} prefixed
 */
function prefixed(obj, property) {
    var prefix, prop;
    var camelProp = property[0].toUpperCase() + property.slice(1);
 
    var i = 0;
    while (i < VENDOR_PREFIXES.length) {
        prefix = VENDOR_PREFIXES[i];
        prop = (prefix) ? prefix + camelProp : property;
 
        if (prop in obj) {
            return prop;
        }
        i++;
    }
    return undefined;
}
 
/**
 * get a unique id
 * @returns {number} uniqueId
 */
var _uniqueId = 1;
function uniqueId() {
    return _uniqueId++;
}
 
/**
 * get the window object of an element
 * @param {HTMLElement} element
 * @returns {DocumentView|Window}
 */
function getWindowForElement(element) {
    var doc = element.ownerDocument || element;
    return (doc.defaultView || doc.parentWindow || window);
}
 
var MOBILE_REGEX = /mobile|tablet|ip(ad|hone|od)|android/i;
 
var SUPPORT_TOUCH = ('ontouchstart' in window);
var SUPPORT_POINTER_EVENTS = prefixed(window, 'PointerEvent') !== undefined;
var SUPPORT_ONLY_TOUCH = SUPPORT_TOUCH && MOBILE_REGEX.test(navigator.userAgent);
 
var INPUT_TYPE_TOUCH = 'touch';
var INPUT_TYPE_PEN = 'pen';
var INPUT_TYPE_MOUSE = 'mouse';
var INPUT_TYPE_KINECT = 'kinect';
 
var COMPUTE_INTERVAL = 25;
 
var INPUT_START = 1;
var INPUT_MOVE = 2;
var INPUT_END = 4;
var INPUT_CANCEL = 8;
 
var DIRECTION_NONE = 1;
var DIRECTION_LEFT = 2;
var DIRECTION_RIGHT = 4;
var DIRECTION_UP = 8;
var DIRECTION_DOWN = 16;
 
var DIRECTION_HORIZONTAL = DIRECTION_LEFT | DIRECTION_RIGHT;
var DIRECTION_VERTICAL = DIRECTION_UP | DIRECTION_DOWN;
var DIRECTION_ALL = DIRECTION_HORIZONTAL | DIRECTION_VERTICAL;
 
var PROPS_XY = ['x', 'y'];
var PROPS_CLIENT_XY = ['clientX', 'clientY'];
 
/**
 * create new input type manager
 * @param {Manager} manager
 * @param {Function} callback
 * @returns {Input}
 * @constructor
 */
function Input(manager, callback) {
    var self = this;
    this.manager = manager;
    this.callback = callback;
    this.element = manager.element;
    this.target = manager.options.inputTarget;
 
    // smaller wrapper around the handler, for the scope and the enabled state of the manager,
    // so when disabled the input events are completely bypassed.
    this.domHandler = function(ev) {
        if (boolOrFn(manager.options.enable, [manager])) {
            self.handler(ev);
        }
    };
 
    this.init();
 
}
 
Input.prototype = {
    /**
     * should handle the inputEvent data and trigger the callback
     * @virtual
     */
    handler: function() { },
 
    /**
     * bind the events
     */
    init: function() {
        this.evEl && addEventListeners(this.element, this.evEl, this.domHandler);
        this.evTarget && addEventListeners(this.target, this.evTarget, this.domHandler);
        this.evWin && addEventListeners(getWindowForElement(this.element), this.evWin, this.domHandler);
    },
 
    /**
     * unbind the events
     */
    destroy: function() {
        this.evEl && removeEventListeners(this.element, this.evEl, this.domHandler);
        this.evTarget && removeEventListeners(this.target, this.evTarget, this.domHandler);
        this.evWin && removeEventListeners(getWindowForElement(this.element), this.evWin, this.domHandler);
    }
};
 
/**
 * create new input type manager
 * called by the Manager constructor
 * @param {Hammer} manager
 * @returns {Input}
 */
function createInputInstance(manager) {
    var Type;
    var inputClass = manager.options.inputClass;
 
    if (inputClass) {
        Type = inputClass;
    } else if (SUPPORT_POINTER_EVENTS) {
        Type = PointerEventInput;
    } else if (SUPPORT_ONLY_TOUCH) {
        Type = TouchInput;
    } else if (!SUPPORT_TOUCH) {
        Type = MouseInput;
    } else {
        Type = TouchMouseInput;
    }
    return new (Type)(manager, inputHandler);
}
 
/**
 * handle input events
 * @param {Manager} manager
 * @param {String} eventType
 * @param {Object} input
 */
function inputHandler(manager, eventType, input) {
    var pointersLen = input.pointers.length;
    var changedPointersLen = input.changedPointers.length;
    var isFirst = (eventType & INPUT_START && (pointersLen - changedPointersLen === 0));
    var isFinal = (eventType & (INPUT_END | INPUT_CANCEL) && (pointersLen - changedPointersLen === 0));
 
    input.isFirst = !!isFirst;
    input.isFinal = !!isFinal;
 
    if (isFirst) {
        manager.session = {};
    }
 
    // source event is the normalized value of the domEvents
    // like 'touchstart, mouseup, pointerdown'
    input.eventType = eventType;
 
    // compute scale, rotation etc
    computeInputData(manager, input);
 
    // emit secret event
    manager.emit('hammer.input', input);
 
    manager.recognize(input);
    manager.session.prevInput = input;
}
 
/**
 * extend the data with some usable properties like scale, rotate, velocity etc
 * @param {Object} manager
 * @param {Object} input
 */
function computeInputData(manager, input) {
    var session = manager.session;
    var pointers = input.pointers;
    var pointersLength = pointers.length;
 
    // store the first input to calculate the distance and direction
    if (!session.firstInput) {
        session.firstInput = simpleCloneInputData(input);
    }
 
    // to compute scale and rotation we need to store the multiple touches
    if (pointersLength > 1 && !session.firstMultiple) {
        session.firstMultiple = simpleCloneInputData(input);
    } else if (pointersLength === 1) {
        session.firstMultiple = false;
    }
 
    var firstInput = session.firstInput;
    var firstMultiple = session.firstMultiple;
    var offsetCenter = firstMultiple ? firstMultiple.center : firstInput.center;
 
    var center = input.center = getCenter(pointers);
    input.timeStamp = now();
    input.deltaTime = input.timeStamp - firstInput.timeStamp;
 
    input.angle = getAngle(offsetCenter, center);
    input.distance = getDistance(offsetCenter, center);
 
    computeDeltaXY(session, input);
    input.offsetDirection = getDirection(input.deltaX, input.deltaY);
 
    var overallVelocity = getVelocity(input.deltaTime, input.deltaX, input.deltaY);
    input.overallVelocityX = overallVelocity.x;
    input.overallVelocityY = overallVelocity.y;
    input.overallVelocity = (abs(overallVelocity.x) > abs(overallVelocity.y)) ? overallVelocity.x : overallVelocity.y;
 
    input.scale = firstMultiple ? getScale(firstMultiple.pointers, pointers) : 1;
    input.rotation = firstMultiple ? getRotation(firstMultiple.pointers, pointers) : 0;
 
    input.maxPointers = !session.prevInput ? input.pointers.length : ((input.pointers.length >
        session.prevInput.maxPointers) ? input.pointers.length : session.prevInput.maxPointers);
 
    computeIntervalInputData(session, input);
 
    // find the correct target
    var target = manager.element;
    if (hasParent(input.srcEvent.target, target)) {
        target = input.srcEvent.target;
    }
    input.target = target;
}
 
function computeDeltaXY(session, input) {
    var center = input.center;
    var offset = session.offsetDelta || {};
    var prevDelta = session.prevDelta || {};
    var prevInput = session.prevInput || {};
 
    if (input.eventType === INPUT_START || prevInput.eventType === INPUT_END) {
        prevDelta = session.prevDelta = {
            x: prevInput.deltaX || 0,
            y: prevInput.deltaY || 0
        };
 
        offset = session.offsetDelta = {
            x: center.x,
            y: center.y
        };
    }
 
    input.deltaX = prevDelta.x + (center.x - offset.x);
    input.deltaY = prevDelta.y + (center.y - offset.y);
}
 
/**
 * velocity is calculated every x ms
 * @param {Object} session
 * @param {Object} input
 */
function computeIntervalInputData(session, input) {
    var last = session.lastInterval || input,
        deltaTime = input.timeStamp - last.timeStamp,
        velocity, velocityX, velocityY, direction;
 
    if (input.eventType != INPUT_CANCEL && (deltaTime > COMPUTE_INTERVAL || last.velocity === undefined)) {
        var deltaX = input.deltaX - last.deltaX;
        var deltaY = input.deltaY - last.deltaY;
 
        var v = getVelocity(deltaTime, deltaX, deltaY);
        velocityX = v.x;
        velocityY = v.y;
        velocity = (abs(v.x) > abs(v.y)) ? v.x : v.y;
        direction = getDirection(deltaX, deltaY);
 
        session.lastInterval = input;
    } else {
        // use latest velocity info if it doesn't overtake a minimum period
        velocity = last.velocity;
        velocityX = last.velocityX;
        velocityY = last.velocityY;
        direction = last.direction;
    }
 
    input.velocity = velocity;
    input.velocityX = velocityX;
    input.velocityY = velocityY;
    input.direction = direction;
}
 
/**
 * create a simple clone from the input used for storage of firstInput and firstMultiple
 * @param {Object} input
 * @returns {Object} clonedInputData
 */
function simpleCloneInputData(input) {
    // make a simple copy of the pointers because we will get a reference if we don't
    // we only need clientXY for the calculations
    var pointers = [];
    var i = 0;
    while (i < input.pointers.length) {
        pointers[i] = {
            clientX: round(input.pointers[i].clientX),
            clientY: round(input.pointers[i].clientY)
        };
        i++;
    }
 
    return {
        timeStamp: now(),
        pointers: pointers,
        center: getCenter(pointers),
        deltaX: input.deltaX,
        deltaY: input.deltaY
    };
}
 
/**
 * get the center of all the pointers
 * @param {Array} pointers
 * @return {Object} center contains `x` and `y` properties
 */
function getCenter(pointers) {
    var pointersLength = pointers.length;
 
    // no need to loop when only one touch
    if (pointersLength === 1) {
        return {
            x: round(pointers[0].clientX),
            y: round(pointers[0].clientY)
        };
    }
 
    var x = 0, y = 0, i = 0;
    while (i < pointersLength) {
        x += pointers[i].clientX;
        y += pointers[i].clientY;
        i++;
    }
 
    return {
        x: round(x / pointersLength),
        y: round(y / pointersLength)
    };
}
 
/**
 * calculate the velocity between two points. unit is in px per ms.
 * @param {Number} deltaTime
 * @param {Number} x
 * @param {Number} y
 * @return {Object} velocity `x` and `y`
 */
function getVelocity(deltaTime, x, y) {
    return {
        x: x / deltaTime || 0,
        y: y / deltaTime || 0
    };
}
 
/**
 * get the direction between two points
 * @param {Number} x
 * @param {Number} y
 * @return {Number} direction
 */
function getDirection(x, y) {
    if (x === y) {
        return DIRECTION_NONE;
    }
 
    if (abs(x) >= abs(y)) {
        return x < 0 ? DIRECTION_LEFT : DIRECTION_RIGHT;
    }
    return y < 0 ? DIRECTION_UP : DIRECTION_DOWN;
}
 
/**
 * calculate the absolute distance between two points
 * @param {Object} p1 {x, y}
 * @param {Object} p2 {x, y}
 * @param {Array} [props] containing x and y keys
 * @return {Number} distance
 */
function getDistance(p1, p2, props) {
    if (!props) {
        props = PROPS_XY;
    }
    var x = p2[props[0]] - p1[props[0]],
        y = p2[props[1]] - p1[props[1]];
 
    return Math.sqrt((x * x) + (y * y));
}
 
/**
 * calculate the angle between two coordinates
 * @param {Object} p1
 * @param {Object} p2
 * @param {Array} [props] containing x and y keys
 * @return {Number} angle
 */
function getAngle(p1, p2, props) {
    if (!props) {
        props = PROPS_XY;
    }
    var x = p2[props[0]] - p1[props[0]],
        y = p2[props[1]] - p1[props[1]];
    return Math.atan2(y, x) * 180 / Math.PI;
}
 
/**
 * calculate the rotation degrees between two pointersets
 * @param {Array} start array of pointers
 * @param {Array} end array of pointers
 * @return {Number} rotation
 */
function getRotation(start, end) {
    return getAngle(end[1], end[0], PROPS_CLIENT_XY) + getAngle(start[1], start[0], PROPS_CLIENT_XY);
}
 
/**
 * calculate the scale factor between two pointersets
 * no scale is 1, and goes down to 0 when pinched together, and bigger when pinched out
 * @param {Array} start array of pointers
 * @param {Array} end array of pointers
 * @return {Number} scale
 */
function getScale(start, end) {
    return getDistance(end[0], end[1], PROPS_CLIENT_XY) / getDistance(start[0], start[1], PROPS_CLIENT_XY);
}
 
var MOUSE_INPUT_MAP = {
    mousedown: INPUT_START,
    mousemove: INPUT_MOVE,
    mouseup: INPUT_END
};
 
var MOUSE_ELEMENT_EVENTS = 'mousedown';
var MOUSE_WINDOW_EVENTS = 'mousemove mouseup';
 
/**
 * Mouse events input
 * @constructor
 * @extends Input
 */
function MouseInput() {
    this.evEl = MOUSE_ELEMENT_EVENTS;
    this.evWin = MOUSE_WINDOW_EVENTS;
 
    this.pressed = false; // mousedown state
 
    Input.apply(this, arguments);
}
 
inherit(MouseInput, Input, {
    /**
     * handle mouse events
     * @param {Object} ev
     */
    handler: function MEhandler(ev) {
        var eventType = MOUSE_INPUT_MAP[ev.type];
 
        // on start we want to have the left mouse button down
        if (eventType & INPUT_START && ev.button === 0) {
            this.pressed = true;
        }
 
        if (eventType & INPUT_MOVE && ev.which !== 1) {
            eventType = INPUT_END;
        }
 
        // mouse must be down
        if (!this.pressed) {
            return;
        }
 
        if (eventType & INPUT_END) {
            this.pressed = false;
        }
 
        this.callback(this.manager, eventType, {
            pointers: [ev],
            changedPointers: [ev],
            pointerType: INPUT_TYPE_MOUSE,
            srcEvent: ev
        });
    }
});
 
var POINTER_INPUT_MAP = {
    pointerdown: INPUT_START,
    pointermove: INPUT_MOVE,
    pointerup: INPUT_END,
    pointercancel: INPUT_CANCEL,
    pointerout: INPUT_CANCEL
};
 
// in IE10 the pointer types is defined as an enum
var IE10_POINTER_TYPE_ENUM = {
    2: INPUT_TYPE_TOUCH,
    3: INPUT_TYPE_PEN,
    4: INPUT_TYPE_MOUSE,
    5: INPUT_TYPE_KINECT // see https://twitter.com/jacobrossi/status/480596438489890816
};
 
var POINTER_ELEMENT_EVENTS = 'pointerdown';
var POINTER_WINDOW_EVENTS = 'pointermove pointerup pointercancel';
 
// IE10 has prefixed support, and case-sensitive
if (window.MSPointerEvent && !window.PointerEvent) {
    POINTER_ELEMENT_EVENTS = 'MSPointerDown';
    POINTER_WINDOW_EVENTS = 'MSPointerMove MSPointerUp MSPointerCancel';
}
 
/**
 * Pointer events input
 * @constructor
 * @extends Input
 */
function PointerEventInput() {
    this.evEl = POINTER_ELEMENT_EVENTS;
    this.evWin = POINTER_WINDOW_EVENTS;
 
    Input.apply(this, arguments);
 
    this.store = (this.manager.session.pointerEvents = []);
}
 
inherit(PointerEventInput, Input, {
    /**
     * handle mouse events
     * @param {Object} ev
     */
    handler: function PEhandler(ev) {
        var store = this.store;
        var removePointer = false;
 
        var eventTypeNormalized = ev.type.toLowerCase().replace('ms', '');
        var eventType = POINTER_INPUT_MAP[eventTypeNormalized];
        var pointerType = IE10_POINTER_TYPE_ENUM[ev.pointerType] || ev.pointerType;
 
        var isTouch = (pointerType == INPUT_TYPE_TOUCH);
 
        // get index of the event in the store
        var storeIndex = inArray(store, ev.pointerId, 'pointerId');
 
        // start and mouse must be down
        if (eventType & INPUT_START && (ev.button === 0 || isTouch)) {
            if (storeIndex < 0) {
                store.push(ev);
                storeIndex = store.length - 1;
            }
        } else if (eventType & (INPUT_END | INPUT_CANCEL)) {
            removePointer = true;
        }
 
        // it not found, so the pointer hasn't been down (so it's probably a hover)
        if (storeIndex < 0) {
            return;
        }
 
        // update the event in the store
        store[storeIndex] = ev;
 
        this.callback(this.manager, eventType, {
            pointers: store,
            changedPointers: [ev],
            pointerType: pointerType,
            srcEvent: ev
        });
 
        if (removePointer) {
            // remove from the store
            store.splice(storeIndex, 1);
        }
    }
});
 
var SINGLE_TOUCH_INPUT_MAP = {
    touchstart: INPUT_START,
    touchmove: INPUT_MOVE,
    touchend: INPUT_END,
    touchcancel: INPUT_CANCEL
};
 
var SINGLE_TOUCH_TARGET_EVENTS = 'touchstart';
var SINGLE_TOUCH_WINDOW_EVENTS = 'touchstart touchmove touchend touchcancel';
 
/**
 * Touch events input
 * @constructor
 * @extends Input
 */
function SingleTouchInput() {
    this.evTarget = SINGLE_TOUCH_TARGET_EVENTS;
    this.evWin = SINGLE_TOUCH_WINDOW_EVENTS;
    this.started = false;
 
    Input.apply(this, arguments);
}
 
inherit(SingleTouchInput, Input, {
    handler: function TEhandler(ev) {
        var type = SINGLE_TOUCH_INPUT_MAP[ev.type];
 
        // should we handle the touch events?
        if (type === INPUT_START) {
            this.started = true;
        }
 
        if (!this.started) {
            return;
        }
 
        var touches = normalizeSingleTouches.call(this, ev, type);
 
        // when done, reset the started state
        if (type & (INPUT_END | INPUT_CANCEL) && touches[0].length - touches[1].length === 0) {
            this.started = false;
        }
 
        this.callback(this.manager, type, {
            pointers: touches[0],
            changedPointers: touches[1],
            pointerType: INPUT_TYPE_TOUCH,
            srcEvent: ev
        });
    }
});
 
/**
 * @this {TouchInput}
 * @param {Object} ev
 * @param {Number} type flag
 * @returns {undefined|Array} [all, changed]
 */
function normalizeSingleTouches(ev, type) {
    var all = toArray(ev.touches);
    var changed = toArray(ev.changedTouches);
 
    if (type & (INPUT_END | INPUT_CANCEL)) {
        all = uniqueArray(all.concat(changed), 'identifier', true);
    }
 
    return [all, changed];
}
 
var TOUCH_INPUT_MAP = {
    touchstart: INPUT_START,
    touchmove: INPUT_MOVE,
    touchend: INPUT_END,
    touchcancel: INPUT_CANCEL
};
 
var TOUCH_TARGET_EVENTS = 'touchstart touchmove touchend touchcancel';
 
/**
 * Multi-user touch events input
 * @constructor
 * @extends Input
 */
function TouchInput() {
    this.evTarget = TOUCH_TARGET_EVENTS;
    this.targetIds = {};
 
    Input.apply(this, arguments);
}
 
inherit(TouchInput, Input, {
    handler: function MTEhandler(ev) {
        var type = TOUCH_INPUT_MAP[ev.type];
        var touches = getTouches.call(this, ev, type);
        if (!touches) {
            return;
        }
 
        this.callback(this.manager, type, {
            pointers: touches[0],
            changedPointers: touches[1],
            pointerType: INPUT_TYPE_TOUCH,
            srcEvent: ev
        });
    }
});
 
/**
 * @this {TouchInput}
 * @param {Object} ev
 * @param {Number} type flag
 * @returns {undefined|Array} [all, changed]
 */
function getTouches(ev, type) {
    var allTouches = toArray(ev.touches);
    var targetIds = this.targetIds;
 
    // when there is only one touch, the process can be simplified
    if (type & (INPUT_START | INPUT_MOVE) && allTouches.length === 1) {
        targetIds[allTouches[0].identifier] = true;
        return [allTouches, allTouches];
    }
 
    var i,
        targetTouches,
        changedTouches = toArray(ev.changedTouches),
        changedTargetTouches = [],
        target = this.target;
 
    // get target touches from touches
    targetTouches = allTouches.filter(function(touch) {
        return hasParent(touch.target, target);
    });
 
    // collect touches
    if (type === INPUT_START) {
        i = 0;
        while (i < targetTouches.length) {
            targetIds[targetTouches[i].identifier] = true;
            i++;
        }
    }
 
    // filter changed touches to only contain touches that exist in the collected target ids
    i = 0;
    while (i < changedTouches.length) {
        if (targetIds[changedTouches[i].identifier]) {
            changedTargetTouches.push(changedTouches[i]);
        }
 
        // cleanup removed touches
        if (type & (INPUT_END | INPUT_CANCEL)) {
            delete targetIds[changedTouches[i].identifier];
        }
        i++;
    }
 
    if (!changedTargetTouches.length) {
        return;
    }
 
    return [
        // merge targetTouches with changedTargetTouches so it contains ALL touches, including 'end' and 'cancel'
        uniqueArray(targetTouches.concat(changedTargetTouches), 'identifier', true),
        changedTargetTouches
    ];
}
 
/**
 * Combined touch and mouse input
 *
 * Touch has a higher priority then mouse, and while touching no mouse events are allowed.
 * This because touch devices also emit mouse events while doing a touch.
 *
 * @constructor
 * @extends Input
 */
 
var DEDUP_TIMEOUT = 2500;
var DEDUP_DISTANCE = 25;
 
function TouchMouseInput() {
    Input.apply(this, arguments);
 
    var handler = bindFn(this.handler, this);
    this.touch = new TouchInput(this.manager, handler);
    this.mouse = new MouseInput(this.manager, handler);
 
    this.primaryTouch = null;
    this.lastTouches = [];
}
 
inherit(TouchMouseInput, Input, {
    /**
     * handle mouse and touch events
     * @param {Hammer} manager
     * @param {String} inputEvent
     * @param {Object} inputData
     */
    handler: function TMEhandler(manager, inputEvent, inputData) {
        var isTouch = (inputData.pointerType == INPUT_TYPE_TOUCH),
            isMouse = (inputData.pointerType == INPUT_TYPE_MOUSE);
 
        if (isMouse && inputData.sourceCapabilities && inputData.sourceCapabilities.firesTouchEvents) {
            return;
        }
 
        // when we're in a touch event, record touches to  de-dupe synthetic mouse event
        if (isTouch) {
            recordTouches.call(this, inputEvent, inputData);
        } else if (isMouse && isSyntheticEvent.call(this, inputData)) {
            return;
        }
 
        this.callback(manager, inputEvent, inputData);
    },
 
    /**
     * remove the event listeners
     */
    destroy: function destroy() {
        this.touch.destroy();
        this.mouse.destroy();
    }
});
 
function recordTouches(eventType, eventData) {
    if (eventType & INPUT_START) {
        this.primaryTouch = eventData.changedPointers[0].identifier;
        setLastTouch.call(this, eventData);
    } else if (eventType & (INPUT_END | INPUT_CANCEL)) {
        setLastTouch.call(this, eventData);
    }
}
 
function setLastTouch(eventData) {
    var touch = eventData.changedPointers[0];
 
    if (touch.identifier === this.primaryTouch) {
        var lastTouch = {x: touch.clientX, y: touch.clientY};
        this.lastTouches.push(lastTouch);
        var lts = this.lastTouches;
        var removeLastTouch = function() {
            var i = lts.indexOf(lastTouch);
            if (i > -1) {
                lts.splice(i, 1);
            }
        };
        setTimeout(removeLastTouch, DEDUP_TIMEOUT);
    }
}
 
function isSyntheticEvent(eventData) {
    var x = eventData.srcEvent.clientX, y = eventData.srcEvent.clientY;
    for (var i = 0; i < this.lastTouches.length; i++) {
        var t = this.lastTouches[i];
        var dx = Math.abs(x - t.x), dy = Math.abs(y - t.y);
        if (dx <= DEDUP_DISTANCE && dy <= DEDUP_DISTANCE) {
            return true;
        }
    }
    return false;
}
 
var PREFIXED_TOUCH_ACTION = prefixed(TEST_ELEMENT.style, 'touchAction');
var NATIVE_TOUCH_ACTION = PREFIXED_TOUCH_ACTION !== undefined;
 
// magical touchAction value
var TOUCH_ACTION_COMPUTE = 'compute';
var TOUCH_ACTION_AUTO = 'auto';
var TOUCH_ACTION_MANIPULATION = 'manipulation'; // not implemented
var TOUCH_ACTION_NONE = 'none';
var TOUCH_ACTION_PAN_X = 'pan-x';
var TOUCH_ACTION_PAN_Y = 'pan-y';
var TOUCH_ACTION_MAP = getTouchActionProps();
 
/**
 * Touch Action
 * sets the touchAction property or uses the js alternative
 * @param {Manager} manager
 * @param {String} value
 * @constructor
 */
function TouchAction(manager, value) {
    this.manager = manager;
    this.set(value);
}
 
TouchAction.prototype = {
    /**
     * set the touchAction value on the element or enable the polyfill
     * @param {String} value
     */
    set: function(value) {
        // find out the touch-action by the event handlers
        if (value == TOUCH_ACTION_COMPUTE) {
            value = this.compute();
        }
 
        if (NATIVE_TOUCH_ACTION && this.manager.element.style && TOUCH_ACTION_MAP[value]) {
            this.manager.element.style[PREFIXED_TOUCH_ACTION] = value;
        }
        this.actions = value.toLowerCase().trim();
    },
 
    /**
     * just re-set the touchAction value
     */
    update: function() {
        this.set(this.manager.options.touchAction);
    },
 
    /**
     * compute the value for the touchAction property based on the recognizer's settings
     * @returns {String} value
     */
    compute: function() {
        var actions = [];
        each(this.manager.recognizers, function(recognizer) {
            if (boolOrFn(recognizer.options.enable, [recognizer])) {
                actions = actions.concat(recognizer.getTouchAction());
            }
        });
        return cleanTouchActions(actions.join(' '));
    },
 
    /**
     * this method is called on each input cycle and provides the preventing of the browser behavior
     * @param {Object} input
     */
    preventDefaults: function(input) {
        var srcEvent = input.srcEvent;
        var direction = input.offsetDirection;
 
        // if the touch action did prevented once this session
        if (this.manager.session.prevented) {
            srcEvent.preventDefault();
            return;
        }
 
        var actions = this.actions;
        var hasNone = inStr(actions, TOUCH_ACTION_NONE) && !TOUCH_ACTION_MAP[TOUCH_ACTION_NONE];
        var hasPanY = inStr(actions, TOUCH_ACTION_PAN_Y) && !TOUCH_ACTION_MAP[TOUCH_ACTION_PAN_Y];
        var hasPanX = inStr(actions, TOUCH_ACTION_PAN_X) && !TOUCH_ACTION_MAP[TOUCH_ACTION_PAN_X];
 
        if (hasNone) {
            //do not prevent defaults if this is a tap gesture
 
            var isTapPointer = input.pointers.length === 1;
            var isTapMovement = input.distance < 2;
            var isTapTouchTime = input.deltaTime < 250;
 
            if (isTapPointer && isTapMovement && isTapTouchTime) {
                return;
            }
        }
 
        if (hasPanX && hasPanY) {
            // `pan-x pan-y` means browser handles all scrolling/panning, do not prevent
            return;
        }
 
        if (hasNone ||
            (hasPanY && direction & DIRECTION_HORIZONTAL) ||
            (hasPanX && direction & DIRECTION_VERTICAL)) {
            return this.preventSrc(srcEvent);
        }
    },
 
    /**
     * call preventDefault to prevent the browser's default behavior (scrolling in most cases)
     * @param {Object} srcEvent
     */
    preventSrc: function(srcEvent) {
        this.manager.session.prevented = true;
        srcEvent.preventDefault();
    }
};
 
/**
 * when the touchActions are collected they are not a valid value, so we need to clean things up. *
 * @param {String} actions
 * @returns {*}
 */
function cleanTouchActions(actions) {
    // none
    if (inStr(actions, TOUCH_ACTION_NONE)) {
        return TOUCH_ACTION_NONE;
    }
 
    var hasPanX = inStr(actions, TOUCH_ACTION_PAN_X);
    var hasPanY = inStr(actions, TOUCH_ACTION_PAN_Y);
 
    // if both pan-x and pan-y are set (different recognizers
    // for different directions, e.g. horizontal pan but vertical swipe?)
    // we need none (as otherwise with pan-x pan-y combined none of these
    // recognizers will work, since the browser would handle all panning
    if (hasPanX && hasPanY) {
        return TOUCH_ACTION_NONE;
    }
 
    // pan-x OR pan-y
    if (hasPanX || hasPanY) {
        return hasPanX ? TOUCH_ACTION_PAN_X : TOUCH_ACTION_PAN_Y;
    }
 
    // manipulation
    if (inStr(actions, TOUCH_ACTION_MANIPULATION)) {
        return TOUCH_ACTION_MANIPULATION;
    }
 
    return TOUCH_ACTION_AUTO;
}
 
function getTouchActionProps() {
    if (!NATIVE_TOUCH_ACTION) {
        return false;
    }
    var touchMap = {};
    var cssSupports = window.CSS && window.CSS.supports;
    ['auto', 'manipulation', 'pan-y', 'pan-x', 'pan-x pan-y', 'none'].forEach(function(val) {
 
        // If css.supports is not supported but there is native touch-action assume it supports
        // all values. This is the case for IE 10 and 11.
        touchMap[val] = cssSupports ? window.CSS.supports('touch-action', val) : true;
    });
    return touchMap;
}
 
/**
 * Recognizer flow explained; *
 * All recognizers have the initial state of POSSIBLE when a input session starts.
 * The definition of a input session is from the first input until the last input, with all it's movement in it. *
 * Example session for mouse-input: mousedown -> mousemove -> mouseup
 *
 * On each recognizing cycle (see Manager.recognize) the .recognize() method is executed
 * which determines with state it should be.
 *
 * If the recognizer has the state FAILED, CANCELLED or RECOGNIZED (equals ENDED), it is reset to
 * POSSIBLE to give it another change on the next cycle.
 *
 *               Possible
 *                  |
 *            +-----+---------------+
 *            |                     |
 *      +-----+-----+               |
 *      |           |               |
 *   Failed      Cancelled          |
 *                          +-------+------+
 *                          |              |
 *                      Recognized       Began
 *                                         |
 *                                      Changed
 *                                         |
 *                                  Ended/Recognized
 */
var STATE_POSSIBLE = 1;
var STATE_BEGAN = 2;
var STATE_CHANGED = 4;
var STATE_ENDED = 8;
var STATE_RECOGNIZED = STATE_ENDED;
var STATE_CANCELLED = 16;
var STATE_FAILED = 32;
 
/**
 * Recognizer
 * Every recognizer needs to extend from this class.
 * @constructor
 * @param {Object} options
 */
function Recognizer(options) {
    this.options = assign({}, this.defaults, options || {});
 
    this.id = uniqueId();
 
    this.manager = null;
 
    // default is enable true
    this.options.enable = ifUndefined(this.options.enable, true);
 
    this.state = STATE_POSSIBLE;
 
    this.simultaneous = {};
    this.requireFail = [];
}
 
Recognizer.prototype = {
    /**
     * @virtual
     * @type {Object}
     */
    defaults: {},
 
    /**
     * set options
     * @param {Object} options
     * @return {Recognizer}
     */
    set: function(options) {
        assign(this.options, options);
 
        // also update the touchAction, in case something changed about the directions/enabled state
        this.manager && this.manager.touchAction.update();
        return this;
    },
 
    /**
     * recognize simultaneous with an other recognizer.
     * @param {Recognizer} otherRecognizer
     * @returns {Recognizer} this
     */
    recognizeWith: function(otherRecognizer) {
        if (invokeArrayArg(otherRecognizer, 'recognizeWith', this)) {
            return this;
        }
 
        var simultaneous = this.simultaneous;
        otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);
        if (!simultaneous[otherRecognizer.id]) {
            simultaneous[otherRecognizer.id] = otherRecognizer;
            otherRecognizer.recognizeWith(this);
        }
        return this;
    },
 
    /**
     * drop the simultaneous link. it doesnt remove the link on the other recognizer.
     * @param {Recognizer} otherRecognizer
     * @returns {Recognizer} this
     */
    dropRecognizeWith: function(otherRecognizer) {
        if (invokeArrayArg(otherRecognizer, 'dropRecognizeWith', this)) {
            return this;
        }
 
        otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);
        delete this.simultaneous[otherRecognizer.id];
        return this;
    },
 
    /**
     * recognizer can only run when an other is failing
     * @param {Recognizer} otherRecognizer
     * @returns {Recognizer} this
     */
    requireFailure: function(otherRecognizer) {
        if (invokeArrayArg(otherRecognizer, 'requireFailure', this)) {
            return this;
        }
 
        var requireFail = this.requireFail;
        otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);
        if (inArray(requireFail, otherRecognizer) === -1) {
            requireFail.push(otherRecognizer);
            otherRecognizer.requireFailure(this);
        }
        return this;
    },
 
    /**
     * drop the requireFailure link. it does not remove the link on the other recognizer.
     * @param {Recognizer} otherRecognizer
     * @returns {Recognizer} this
     */
    dropRequireFailure: function(otherRecognizer) {
        if (invokeArrayArg(otherRecognizer, 'dropRequireFailure', this)) {
            return this;
        }
 
        otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);
        var index = inArray(this.requireFail, otherRecognizer);
        if (index > -1) {
            this.requireFail.splice(index, 1);
        }
        return this;
    },
 
    /**
     * has require failures boolean
     * @returns {boolean}
     */
    hasRequireFailures: function() {
        return this.requireFail.length > 0;
    },
 
    /**
     * if the recognizer can recognize simultaneous with an other recognizer
     * @param {Recognizer} otherRecognizer
     * @returns {Boolean}
     */
    canRecognizeWith: function(otherRecognizer) {
        return !!this.simultaneous[otherRecognizer.id];
    },
 
    /**
     * You should use `tryEmit` instead of `emit` directly to check
     * that all the needed recognizers has failed before emitting.
     * @param {Object} input
     */
    emit: function(input) {
        var self = this;
        var state = this.state;
 
        function emit(event) {
            self.manager.emit(event, input);
        }
 
        // 'panstart' and 'panmove'
        if (state < STATE_ENDED) {
            emit(self.options.event + stateStr(state));
        }
 
        emit(self.options.event); // simple 'eventName' events
 
        if (input.additionalEvent) { // additional event(panleft, panright, pinchin, pinchout...)
            emit(input.additionalEvent);
        }
 
        // panend and pancancel
        if (state >= STATE_ENDED) {
            emit(self.options.event + stateStr(state));
        }
    },
 
    /**
     * Check that all the require failure recognizers has failed,
     * if true, it emits a gesture event,
     * otherwise, setup the state to FAILED.
     * @param {Object} input
     */
    tryEmit: function(input) {
        if (this.canEmit()) {
            return this.emit(input);
        }
        // it's failing anyway
        this.state = STATE_FAILED;
    },
 
    /**
     * can we emit?
     * @returns {boolean}
     */
    canEmit: function() {
        var i = 0;
        while (i < this.requireFail.length) {
            if (!(this.requireFail[i].state & (STATE_FAILED | STATE_POSSIBLE))) {
                return false;
            }
            i++;
        }
        return true;
    },
 
    /**
     * update the recognizer
     * @param {Object} inputData
     */
    recognize: function(inputData) {
        // make a new copy of the inputData
        // so we can change the inputData without messing up the other recognizers
        var inputDataClone = assign({}, inputData);
 
        // is is enabled and allow recognizing?
        if (!boolOrFn(this.options.enable, [this, inputDataClone])) {
            this.reset();
            this.state = STATE_FAILED;
            return;
        }
 
        // reset when we've reached the end
        if (this.state & (STATE_RECOGNIZED | STATE_CANCELLED | STATE_FAILED)) {
            this.state = STATE_POSSIBLE;
        }
 
        this.state = this.process(inputDataClone);
 
        // the recognizer has recognized a gesture
        // so trigger an event
        if (this.state & (STATE_BEGAN | STATE_CHANGED | STATE_ENDED | STATE_CANCELLED)) {
            this.tryEmit(inputDataClone);
        }
    },
 
    /**
     * return the state of the recognizer
     * the actual recognizing happens in this method
     * @virtual
     * @param {Object} inputData
     * @returns {Const} STATE
     */
    process: function(inputData) { }, // jshint ignore:line
 
    /**
     * return the preferred touch-action
     * @virtual
     * @returns {Array}
     */
    getTouchAction: function() { },
 
    /**
     * called when the gesture isn't allowed to recognize
     * like when another is being recognized or it is disabled
     * @virtual
     */
    reset: function() { }
};
 
/**
 * get a usable string, used as event postfix
 * @param {Const} state
 * @returns {String} state
 */
function stateStr(state) {
    if (state & STATE_CANCELLED) {
        return 'cancel';
    } else if (state & STATE_ENDED) {
        return 'end';
    } else if (state & STATE_CHANGED) {
        return 'move';
    } else if (state & STATE_BEGAN) {
        return 'start';
    }
    return '';
}
 
/**
 * direction cons to string
 * @param {Const} direction
 * @returns {String}
 */
function directionStr(direction) {
    if (direction == DIRECTION_DOWN) {
        return 'down';
    } else if (direction == DIRECTION_UP) {
        return 'up';
    } else if (direction == DIRECTION_LEFT) {
        return 'left';
    } else if (direction == DIRECTION_RIGHT) {
        return 'right';
    }
    return '';
}
 
/**
 * get a recognizer by name if it is bound to a manager
 * @param {Recognizer|String} otherRecognizer
 * @param {Recognizer} recognizer
 * @returns {Recognizer}
 */
function getRecognizerByNameIfManager(otherRecognizer, recognizer) {
    var manager = recognizer.manager;
    if (manager) {
        return manager.get(otherRecognizer);
    }
    return otherRecognizer;
}
 
/**
 * This recognizer is just used as a base for the simple attribute recognizers.
 * @constructor
 * @extends Recognizer
 */
function AttrRecognizer() {
    Recognizer.apply(this, arguments);
}
 
inherit(AttrRecognizer, Recognizer, {
    /**
     * @namespace
     * @memberof AttrRecognizer
     */
    defaults: {
        /**
         * @type {Number}
         * @default 1
         */
        pointers: 1
    },
 
    /**
     * Used to check if it the recognizer receives valid input, like input.distance > 10.
     * @memberof AttrRecognizer
     * @param {Object} input
     * @returns {Boolean} recognized
     */
    attrTest: function(input) {
        var optionPointers = this.options.pointers;
        return optionPointers === 0 || input.pointers.length === optionPointers;
    },
 
    /**
     * Process the input and return the state for the recognizer
     * @memberof AttrRecognizer
     * @param {Object} input
     * @returns {*} State
     */
    process: function(input) {
        var state = this.state;
        var eventType = input.eventType;
 
        var isRecognized = state & (STATE_BEGAN | STATE_CHANGED);
        var isValid = this.attrTest(input);
 
        // on cancel input and we've recognized before, return STATE_CANCELLED
        if (isRecognized && (eventType & INPUT_CANCEL || !isValid)) {
            return state | STATE_CANCELLED;
        } else if (isRecognized || isValid) {
            if (eventType & INPUT_END) {
                return state | STATE_ENDED;
            } else if (!(state & STATE_BEGAN)) {
                return STATE_BEGAN;
            }
            return state | STATE_CHANGED;
        }
        return STATE_FAILED;
    }
});
 
/**
 * Pan
 * Recognized when the pointer is down and moved in the allowed direction.
 * @constructor
 * @extends AttrRecognizer
 */
function PanRecognizer() {
    AttrRecognizer.apply(this, arguments);
 
    this.pX = null;
    this.pY = null;
}
 
inherit(PanRecognizer, AttrRecognizer, {
    /**
     * @namespace
     * @memberof PanRecognizer
     */
    defaults: {
        event: 'pan',
        threshold: 10,
        pointers: 1,
        direction: DIRECTION_ALL
    },
 
    getTouchAction: function() {
        var direction = this.options.direction;
        var actions = [];
        if (direction & DIRECTION_HORIZONTAL) {
            actions.push(TOUCH_ACTION_PAN_Y);
        }
        if (direction & DIRECTION_VERTICAL) {
            actions.push(TOUCH_ACTION_PAN_X);
        }
        return actions;
    },
 
    directionTest: function(input) {
        var options = this.options;
        var hasMoved = true;
        var distance = input.distance;
        var direction = input.direction;
        var x = input.deltaX;
        var y = input.deltaY;
 
        // lock to axis?
        if (!(direction & options.direction)) {
            if (options.direction & DIRECTION_HORIZONTAL) {
                direction = (x === 0) ? DIRECTION_NONE : (x < 0) ? DIRECTION_LEFT : DIRECTION_RIGHT;
                hasMoved = x != this.pX;
                distance = Math.abs(input.deltaX);
            } else {
                direction = (y === 0) ? DIRECTION_NONE : (y < 0) ? DIRECTION_UP : DIRECTION_DOWN;
                hasMoved = y != this.pY;
                distance = Math.abs(input.deltaY);
            }
        }
        input.direction = direction;
        return hasMoved && distance > options.threshold && direction & options.direction;
    },
 
    attrTest: function(input) {
        return AttrRecognizer.prototype.attrTest.call(this, input) &&
            (this.state & STATE_BEGAN || (!(this.state & STATE_BEGAN) && this.directionTest(input)));
    },
 
    emit: function(input) {
 
        this.pX = input.deltaX;
        this.pY = input.deltaY;
 
        var direction = directionStr(input.direction);
 
        if (direction) {
            input.additionalEvent = this.options.event + direction;
        }
        this._super.emit.call(this, input);
    }
});
 
/**
 * Pinch
 * Recognized when two or more pointers are moving toward (zoom-in) or away from each other (zoom-out).
 * @constructor
 * @extends AttrRecognizer
 */
function PinchRecognizer() {
    AttrRecognizer.apply(this, arguments);
}
 
inherit(PinchRecognizer, AttrRecognizer, {
    /**
     * @namespace
     * @memberof PinchRecognizer
     */
    defaults: {
        event: 'pinch',
        threshold: 0,
        pointers: 2
    },
 
    getTouchAction: function() {
        return [TOUCH_ACTION_NONE];
    },
 
    attrTest: function(input) {
        return this._super.attrTest.call(this, input) &&
            (Math.abs(input.scale - 1) > this.options.threshold || this.state & STATE_BEGAN);
    },
 
    emit: function(input) {
        if (input.scale !== 1) {
            var inOut = input.scale < 1 ? 'in' : 'out';
            input.additionalEvent = this.options.event + inOut;
        }
        this._super.emit.call(this, input);
    }
});
 
/**
 * Press
 * Recognized when the pointer is down for x ms without any movement.
 * @constructor
 * @extends Recognizer
 */
function PressRecognizer() {
    Recognizer.apply(this, arguments);
 
    this._timer = null;
    this._input = null;
}
 
inherit(PressRecognizer, Recognizer, {
    /**
     * @namespace
     * @memberof PressRecognizer
     */
    defaults: {
        event: 'press',
        pointers: 1,
        time: 251, // minimal time of the pointer to be pressed
        threshold: 9 // a minimal movement is ok, but keep it low
    },
 
    getTouchAction: function() {
        return [TOUCH_ACTION_AUTO];
    },
 
    process: function(input) {
        var options = this.options;
        var validPointers = input.pointers.length === options.pointers;
        var validMovement = input.distance < options.threshold;
        var validTime = input.deltaTime > options.time;
 
        this._input = input;
 
        // we only allow little movement
        // and we've reached an end event, so a tap is possible
        if (!validMovement || !validPointers || (input.eventType & (INPUT_END | INPUT_CANCEL) && !validTime)) {
            this.reset();
        } else if (input.eventType & INPUT_START) {
            this.reset();
            this._timer = setTimeoutContext(function() {
                this.state = STATE_RECOGNIZED;
                this.tryEmit();
            }, options.time, this);
        } else if (input.eventType & INPUT_END) {
            return STATE_RECOGNIZED;
        }
        return STATE_FAILED;
    },
 
    reset: function() {
        clearTimeout(this._timer);
    },
 
    emit: function(input) {
        if (this.state !== STATE_RECOGNIZED) {
            return;
        }
 
        if (input && (input.eventType & INPUT_END)) {
            this.manager.emit(this.options.event + 'up', input);
        } else {
            this._input.timeStamp = now();
            this.manager.emit(this.options.event, this._input);
        }
    }
});
 
/**
 * Rotate
 * Recognized when two or more pointer are moving in a circular motion.
 * @constructor
 * @extends AttrRecognizer
 */
function RotateRecognizer() {
    AttrRecognizer.apply(this, arguments);
}
 
inherit(RotateRecognizer, AttrRecognizer, {
    /**
     * @namespace
     * @memberof RotateRecognizer
     */
    defaults: {
        event: 'rotate',
        threshold: 0,
        pointers: 2
    },
 
    getTouchAction: function() {
        return [TOUCH_ACTION_NONE];
    },
 
    attrTest: function(input) {
        return this._super.attrTest.call(this, input) &&
            (Math.abs(input.rotation) > this.options.threshold || this.state & STATE_BEGAN);
    }
});
 
/**
 * Swipe
 * Recognized when the pointer is moving fast (velocity), with enough distance in the allowed direction.
 * @constructor
 * @extends AttrRecognizer
 */
function SwipeRecognizer() {
    AttrRecognizer.apply(this, arguments);
}
 
inherit(SwipeRecognizer, AttrRecognizer, {
    /**
     * @namespace
     * @memberof SwipeRecognizer
     */
    defaults: {
        event: 'swipe',
        threshold: 10,
        velocity: 0.3,
        direction: DIRECTION_HORIZONTAL | DIRECTION_VERTICAL,
        pointers: 1
    },
 
    getTouchAction: function() {
        return PanRecognizer.prototype.getTouchAction.call(this);
    },
 
    attrTest: function(input) {
        var direction = this.options.direction;
        var velocity;
 
        if (direction & (DIRECTION_HORIZONTAL | DIRECTION_VERTICAL)) {
            velocity = input.overallVelocity;
        } else if (direction & DIRECTION_HORIZONTAL) {
            velocity = input.overallVelocityX;
        } else if (direction & DIRECTION_VERTICAL) {
            velocity = input.overallVelocityY;
        }
 
        return this._super.attrTest.call(this, input) &&
            direction & input.offsetDirection &&
            input.distance > this.options.threshold &&
            input.maxPointers == this.options.pointers &&
            abs(velocity) > this.options.velocity && input.eventType & INPUT_END;
    },
 
    emit: function(input) {
        var direction = directionStr(input.offsetDirection);
        if (direction) {
            this.manager.emit(this.options.event + direction, input);
        }
 
        this.manager.emit(this.options.event, input);
    }
});
 
/**
 * A tap is ecognized when the pointer is doing a small tap/click. Multiple taps are recognized if they occur
 * between the given interval and position. The delay option can be used to recognize multi-taps without firing
 * a single tap.
 *
 * The eventData from the emitted event contains the property `tapCount`, which contains the amount of
 * multi-taps being recognized.
 * @constructor
 * @extends Recognizer
 */
function TapRecognizer() {
    Recognizer.apply(this, arguments);
 
    // previous time and center,
    // used for tap counting
    this.pTime = false;
    this.pCenter = false;
 
    this._timer = null;
    this._input = null;
    this.count = 0;
}
 
inherit(TapRecognizer, Recognizer, {
    /**
     * @namespace
     * @memberof PinchRecognizer
     */
    defaults: {
        event: 'tap',
        pointers: 1,
        taps: 1,
        interval: 300, // max time between the multi-tap taps
        time: 250, // max time of the pointer to be down (like finger on the screen)
        threshold: 9, // a minimal movement is ok, but keep it low
        posThreshold: 10 // a multi-tap can be a bit off the initial position
    },
 
    getTouchAction: function() {
        return [TOUCH_ACTION_MANIPULATION];
    },
 
    process: function(input) {
        var options = this.options;
 
        var validPointers = input.pointers.length === options.pointers;
        var validMovement = input.distance < options.threshold;
        var validTouchTime = input.deltaTime < options.time;
 
        this.reset();
 
        if ((input.eventType & INPUT_START) && (this.count === 0)) {
            return this.failTimeout();
        }
 
        // we only allow little movement
        // and we've reached an end event, so a tap is possible
        if (validMovement && validTouchTime && validPointers) {
            if (input.eventType != INPUT_END) {
                return this.failTimeout();
            }
 
            var validInterval = this.pTime ? (input.timeStamp - this.pTime < options.interval) : true;
            var validMultiTap = !this.pCenter || getDistance(this.pCenter, input.center) < options.posThreshold;
 
            this.pTime = input.timeStamp;
            this.pCenter = input.center;
 
            if (!validMultiTap || !validInterval) {
                this.count = 1;
            } else {
                this.count += 1;
            }
 
            this._input = input;
 
            // if tap count matches we have recognized it,
            // else it has began recognizing...
            var tapCount = this.count % options.taps;
            if (tapCount === 0) {
                // no failing requirements, immediately trigger the tap event
                // or wait as long as the multitap interval to trigger
                if (!this.hasRequireFailures()) {
                    return STATE_RECOGNIZED;
                } else {
                    this._timer = setTimeoutContext(function() {
                        this.state = STATE_RECOGNIZED;
                        this.tryEmit();
                    }, options.interval, this);
                    return STATE_BEGAN;
                }
            }
        }
        return STATE_FAILED;
    },
 
    failTimeout: function() {
        this._timer = setTimeoutContext(function() {
            this.state = STATE_FAILED;
        }, this.options.interval, this);
        return STATE_FAILED;
    },
 
    reset: function() {
        clearTimeout(this._timer);
    },
 
    emit: function() {
        if (this.state == STATE_RECOGNIZED) {
            this._input.tapCount = this.count;
            this.manager.emit(this.options.event, this._input);
        }
    }
});
 
/**
 * Simple way to create a manager with a default set of recognizers.
 * @param {HTMLElement} element
 * @param {Object} [options]
 * @constructor
 */
function Hammer(element, options) {
    options = options || {};
    options.recognizers = ifUndefined(options.recognizers, Hammer.defaults.preset);
    return new Manager(element, options);
}
 
/**
 * @const {string}
 */
Hammer.VERSION = '2.0.7';
 
/**
 * default settings
 * @namespace
 */
Hammer.defaults = {
    /**
     * set if DOM events are being triggered.
     * But this is slower and unused by simple implementations, so disabled by default.
     * @type {Boolean}
     * @default false
     */
    domEvents: false,
 
    /**
     * The value for the touchAction property/fallback.
     * When set to `compute` it will magically set the correct value based on the added recognizers.
     * @type {String}
     * @default compute
     */
    touchAction: TOUCH_ACTION_COMPUTE,
 
    /**
     * @type {Boolean}
     * @default true
     */
    enable: true,
 
    /**
     * EXPERIMENTAL FEATURE -- can be removed/changed
     * Change the parent input target element.
     * If Null, then it is being set the to main element.
     * @type {Null|EventTarget}
     * @default null
     */
    inputTarget: null,
 
    /**
     * force an input class
     * @type {Null|Function}
     * @default null
     */
    inputClass: null,
 
    /**
     * Default recognizer setup when calling `Hammer()`
     * When creating a new Manager these will be skipped.
     * @type {Array}
     */
    preset: [
        // RecognizerClass, options, [recognizeWith, ...], [requireFailure, ...]
        [RotateRecognizer, {enable: false}],
        [PinchRecognizer, {enable: false}, ['rotate']],
        [SwipeRecognizer, {direction: DIRECTION_HORIZONTAL}],
        [PanRecognizer, {direction: DIRECTION_HORIZONTAL}, ['swipe']],
        [TapRecognizer],
        [TapRecognizer, {event: 'doubletap', taps: 2}, ['tap']],
        [PressRecognizer]
    ],
 
    /**
     * Some CSS properties can be used to improve the working of Hammer.
     * Add them to this method and they will be set when creating a new Manager.
     * @namespace
     */
    cssProps: {
        /**
         * Disables text selection to improve the dragging gesture. Mainly for desktop browsers.
         * @type {String}
         * @default 'none'
         */
        userSelect: 'none',
 
        /**
         * Disable the Windows Phone grippers when pressing an element.
         * @type {String}
         * @default 'none'
         */
        touchSelect: 'none',
 
        /**
         * Disables the default callout shown when you touch and hold a touch target.
         * On iOS, when you touch and hold a touch target such as a link, Safari displays
         * a callout containing information about the link. This property allows you to disable that callout.
         * @type {String}
         * @default 'none'
         */
        touchCallout: 'none',
 
        /**
         * Specifies whether zooming is enabled. Used by IE10>
         * @type {String}
         * @default 'none'
         */
        contentZooming: 'none',
 
        /**
         * Specifies that an entire element should be draggable instead of its contents. Mainly for desktop browsers.
         * @type {String}
         * @default 'none'
         */
        userDrag: 'none',
 
        /**
         * Overrides the highlight color shown when the user taps a link or a JavaScript
         * clickable element in iOS. This property obeys the alpha value, if specified.
         * @type {String}
         * @default 'rgba(0,0,0,0)'
         */
        tapHighlightColor: 'rgba(0,0,0,0)'
    }
};
 
var STOP = 1;
var FORCED_STOP = 2;
 
/**
 * Manager
 * @param {HTMLElement} element
 * @param {Object} [options]
 * @constructor
 */
function Manager(element, options) {
    this.options = assign({}, Hammer.defaults, options || {});
 
    this.options.inputTarget = this.options.inputTarget || element;
 
    this.handlers = {};
    this.session = {};
    this.recognizers = [];
    this.oldCssProps = {};
 
    this.element = element;
    this.input = createInputInstance(this);
    this.touchAction = new TouchAction(this, this.options.touchAction);
 
    toggleCssProps(this, true);
 
    each(this.options.recognizers, function(item) {
        var recognizer = this.add(new (item[0])(item[1]));
        item[2] && recognizer.recognizeWith(item[2]);
        item[3] && recognizer.requireFailure(item[3]);
    }, this);
}
 
Manager.prototype = {
    /**
     * set options
     * @param {Object} options
     * @returns {Manager}
     */
    set: function(options) {
        assign(this.options, options);
 
        // Options that need a little more setup
        if (options.touchAction) {
            this.touchAction.update();
        }
        if (options.inputTarget) {
            // Clean up existing event listeners and reinitialize
            this.input.destroy();
            this.input.target = options.inputTarget;
            this.input.init();
        }
        return this;
    },
 
    /**
     * stop recognizing for this session.
     * This session will be discarded, when a new [input]start event is fired.
     * When forced, the recognizer cycle is stopped immediately.
     * @param {Boolean} [force]
     */
    stop: function(force) {
        this.session.stopped = force ? FORCED_STOP : STOP;
    },
 
    /**
     * run the recognizers!
     * called by the inputHandler function on every movement of the pointers (touches)
     * it walks through all the recognizers and tries to detect the gesture that is being made
     * @param {Object} inputData
     */
    recognize: function(inputData) {
        var session = this.session;
        if (session.stopped) {
            return;
        }
 
        // run the touch-action polyfill
        this.touchAction.preventDefaults(inputData);
 
        var recognizer;
        var recognizers = this.recognizers;
 
        // this holds the recognizer that is being recognized.
        // so the recognizer's state needs to be BEGAN, CHANGED, ENDED or RECOGNIZED
        // if no recognizer is detecting a thing, it is set to `null`
        var curRecognizer = session.curRecognizer;
 
        // reset when the last recognizer is recognized
        // or when we're in a new session
        if (!curRecognizer || (curRecognizer && curRecognizer.state & STATE_RECOGNIZED)) {
            curRecognizer = session.curRecognizer = null;
        }
 
        var i = 0;
        while (i < recognizers.length) {
            recognizer = recognizers[i];
 
            // find out if we are allowed try to recognize the input for this one.
            // 1.   allow if the session is NOT forced stopped (see the .stop() method)
            // 2.   allow if we still haven't recognized a gesture in this session, or the this recognizer is the one
            //      that is being recognized.
            // 3.   allow if the recognizer is allowed to run simultaneous with the current recognized recognizer.
            //      this can be setup with the `recognizeWith()` method on the recognizer.
            if (session.stopped !== FORCED_STOP && ( // 1
                    !curRecognizer || recognizer == curRecognizer || // 2
                    recognizer.canRecognizeWith(curRecognizer))) { // 3
                recognizer.recognize(inputData);
            } else {
                recognizer.reset();
            }
 
            // if the recognizer has been recognizing the input as a valid gesture, we want to store this one as the
            // current active recognizer. but only if we don't already have an active recognizer
            if (!curRecognizer && recognizer.state & (STATE_BEGAN | STATE_CHANGED | STATE_ENDED)) {
                curRecognizer = session.curRecognizer = recognizer;
            }
            i++;
        }
    },
 
    /**
     * get a recognizer by its event name.
     * @param {Recognizer|String} recognizer
     * @returns {Recognizer|Null}
     */
    get: function(recognizer) {
        if (recognizer instanceof Recognizer) {
            return recognizer;
        }
 
        var recognizers = this.recognizers;
        for (var i = 0; i < recognizers.length; i++) {
            if (recognizers[i].options.event == recognizer) {
                return recognizers[i];
            }
        }
        return null;
    },
 
    /**
     * add a recognizer to the manager
     * existing recognizers with the same event name will be removed
     * @param {Recognizer} recognizer
     * @returns {Recognizer|Manager}
     */
    add: function(recognizer) {
        if (invokeArrayArg(recognizer, 'add', this)) {
            return this;
        }
 
        // remove existing
        var existing = this.get(recognizer.options.event);
        if (existing) {
            this.remove(existing);
        }
 
        this.recognizers.push(recognizer);
        recognizer.manager = this;
 
        this.touchAction.update();
        return recognizer;
    },
 
    /**
     * remove a recognizer by name or instance
     * @param {Recognizer|String} recognizer
     * @returns {Manager}
     */
    remove: function(recognizer) {
        if (invokeArrayArg(recognizer, 'remove', this)) {
            return this;
        }
 
        recognizer = this.get(recognizer);
 
        // let's make sure this recognizer exists
        if (recognizer) {
            var recognizers = this.recognizers;
            var index = inArray(recognizers, recognizer);
 
            if (index !== -1) {
                recognizers.splice(index, 1);
                this.touchAction.update();
            }
        }
 
        return this;
    },
 
    /**
     * bind event
     * @param {String} events
     * @param {Function} handler
     * @returns {EventEmitter} this
     */
    on: function(events, handler) {
        if (events === undefined) {
            return;
        }
        if (handler === undefined) {
            return;
        }
 
        var handlers = this.handlers;
        each(splitStr(events), function(event) {
            handlers[event] = handlers[event] || [];
            handlers[event].push(handler);
        });
        return this;
    },
 
    /**
     * unbind event, leave emit blank to remove all handlers
     * @param {String} events
     * @param {Function} [handler]
     * @returns {EventEmitter} this
     */
    off: function(events, handler) {
        if (events === undefined) {
            return;
        }
 
        var handlers = this.handlers;
        each(splitStr(events), function(event) {
            if (!handler) {
                delete handlers[event];
            } else {
                handlers[event] && handlers[event].splice(inArray(handlers[event], handler), 1);
            }
        });
        return this;
    },
 
    /**
     * emit event to the listeners
     * @param {String} event
     * @param {Object} data
     */
    emit: function(event, data) {
        // we also want to trigger dom events
        if (this.options.domEvents) {
            triggerDomEvent(event, data);
        }
 
        // no handlers, so skip it all
        var handlers = this.handlers[event] && this.handlers[event].slice();
        if (!handlers || !handlers.length) {
            return;
        }
 
        data.type = event;
        data.preventDefault = function() {
            data.srcEvent.preventDefault();
        };
 
        var i = 0;
        while (i < handlers.length) {
            handlers[i](data);
            i++;
        }
    },
 
    /**
     * destroy the manager and unbinds all events
     * it doesn't unbind dom events, that is the user own responsibility
     */
    destroy: function() {
        this.element && toggleCssProps(this, false);
 
        this.handlers = {};
        this.session = {};
        this.input.destroy();
        this.element = null;
    }
};
 
/**
 * add/remove the css properties as defined in manager.options.cssProps
 * @param {Manager} manager
 * @param {Boolean} add
 */
function toggleCssProps(manager, add) {
    var element = manager.element;
    if (!element.style) {
        return;
    }
    var prop;
    each(manager.options.cssProps, function(value, name) {
        prop = prefixed(element.style, name);
        if (add) {
            manager.oldCssProps[prop] = element.style[prop];
            element.style[prop] = value;
        } else {
            element.style[prop] = manager.oldCssProps[prop] || '';
        }
    });
    if (!add) {
        manager.oldCssProps = {};
    }
}
 
/**
 * trigger dom event
 * @param {String} event
 * @param {Object} data
 */
function triggerDomEvent(event, data) {
    var gestureEvent = document.createEvent('Event');
    gestureEvent.initEvent(event, true, true);
    gestureEvent.gesture = data;
    data.target.dispatchEvent(gestureEvent);
}
 
assign(Hammer, {
    INPUT_START: INPUT_START,
    INPUT_MOVE: INPUT_MOVE,
    INPUT_END: INPUT_END,
    INPUT_CANCEL: INPUT_CANCEL,
 
    STATE_POSSIBLE: STATE_POSSIBLE,
    STATE_BEGAN: STATE_BEGAN,
    STATE_CHANGED: STATE_CHANGED,
    STATE_ENDED: STATE_ENDED,
    STATE_RECOGNIZED: STATE_RECOGNIZED,
    STATE_CANCELLED: STATE_CANCELLED,
    STATE_FAILED: STATE_FAILED,
 
    DIRECTION_NONE: DIRECTION_NONE,
    DIRECTION_LEFT: DIRECTION_LEFT,
    DIRECTION_RIGHT: DIRECTION_RIGHT,
    DIRECTION_UP: DIRECTION_UP,
    DIRECTION_DOWN: DIRECTION_DOWN,
    DIRECTION_HORIZONTAL: DIRECTION_HORIZONTAL,
    DIRECTION_VERTICAL: DIRECTION_VERTICAL,
    DIRECTION_ALL: DIRECTION_ALL,
 
    Manager: Manager,
    Input: Input,
    TouchAction: TouchAction,
 
    TouchInput: TouchInput,
    MouseInput: MouseInput,
    PointerEventInput: PointerEventInput,
    TouchMouseInput: TouchMouseInput,
    SingleTouchInput: SingleTouchInput,
 
    Recognizer: Recognizer,
    AttrRecognizer: AttrRecognizer,
    Tap: TapRecognizer,
    Pan: PanRecognizer,
    Swipe: SwipeRecognizer,
    Pinch: PinchRecognizer,
    Rotate: RotateRecognizer,
    Press: PressRecognizer,
 
    on: addEventListeners,
    off: removeEventListeners,
    each: each,
    merge: merge,
    extend: extend,
    assign: assign,
    inherit: inherit,
    bindFn: bindFn,
    prefixed: prefixed
});
 
// this prevents errors when Hammer is loaded in the presence of an AMD
//  style loader but by script tag, not by the loader.
var freeGlobal = (typeof window !== 'undefined' ? window : (typeof self !== 'undefined' ? self : {})); // jshint ignore:line
freeGlobal.Hammer = Hammer;
 
if (true) {
    !(__WEBPACK_AMD_DEFINE_RESULT__ = function() {
        return Hammer;
    }.call(exports, __webpack_require__, exports, module),
                __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
} else if (typeof module != 'undefined' && module.exports) {
    module.exports = Hammer;
} else {
    window[exportName] = Hammer;
}
 
})(window, document, 'Hammer');
 
 
/***/ }),
/* 625 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__object_3d__ = __webpack_require__(250);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_math_gl__ = __webpack_require__(16);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_assert__ = __webpack_require__(1);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_assert___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_assert__);
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
 
function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
 
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
 
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
 
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
 
 
 
 
 
var Group = /*#__PURE__*/function (_Object3D) {
  _inherits(Group, _Object3D);
 
  function Group() {
    var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
 
    _classCallCheck(this, Group);
 
    var _opts$children = opts.children,
        children = _opts$children === undefined ? [] : _opts$children;
 
    children.every(function (child) {
      return __WEBPACK_IMPORTED_MODULE_2_assert___default()(child instanceof __WEBPACK_IMPORTED_MODULE_0__object_3d__["a" /* default */]);
    });
 
    var _this = _possibleConstructorReturn(this, (Group.__proto__ || Object.getPrototypeOf(Group)).call(this, opts));
 
    _this.children = children;
    return _this;
  }
 
  // Unpacks arrays and nested arrays of children
 
 
  _createClass(Group, [{
    key: 'add',
    value: function add() {
      for (var _len = arguments.length, children = Array(_len), _key = 0; _key < _len; _key++) {
        children[_key] = arguments[_key];
      }
 
      var _iteratorNormalCompletion = true;
      var _didIteratorError = false;
      var _iteratorError = undefined;
 
      try {
        for (var _iterator = children[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
          var child = _step.value;
 
          if (Array.isArray(child)) {
            this.add.apply(this, _toConsumableArray(child));
          } else {
            this.children.push(child);
          }
        }
      } catch (err) {
        _didIteratorError = true;
        _iteratorError = err;
      } finally {
        try {
          if (!_iteratorNormalCompletion && _iterator.return) {
            _iterator.return();
          }
        } finally {
          if (_didIteratorError) {
            throw _iteratorError;
          }
        }
      }
 
      return this;
    }
  }, {
    key: 'remove',
    value: function remove(child) {
      var children = this.children;
      var indexOf = children.indexOf(child);
      if (indexOf > -1) {
        children.splice(indexOf, 1);
      }
      return this;
    }
  }, {
    key: 'removeAll',
    value: function removeAll() {
      this.children = [];
      return this;
    }
 
    // If visitor returns a truthy value, traversal will be aborted and that value
    // will be returned from `traverse`. Otherwise `traverse` will return null.
 
  }, {
    key: 'traverse',
    value: function traverse(visitor) {
      var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
          _ref$modelMatrix = _ref.modelMatrix,
          modelMatrix = _ref$modelMatrix === undefined ? new __WEBPACK_IMPORTED_MODULE_1_math_gl__["Matrix4"]() : _ref$modelMatrix;
 
      var _iteratorNormalCompletion2 = true;
      var _didIteratorError2 = false;
      var _iteratorError2 = undefined;
 
      try {
        for (var _iterator2 = this.children[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
          var child = _step2.value;
          var matrix = child.matrix;
 
          modelMatrix = modelMatrix.multiplyRight(matrix);
          var result = void 0;
          if (child instanceof Group) {
            result = child.traverse(visitor, { modelMatrix: modelMatrix });
          } else {
            // child.setUniforms({modelMatrix});
            result = visitor(child, {});
          }
          // Abort if a result was returned
          if (result) {
            return result;
          }
        }
      } catch (err) {
        _didIteratorError2 = true;
        _iteratorError2 = err;
      } finally {
        try {
          if (!_iteratorNormalCompletion2 && _iterator2.return) {
            _iterator2.return();
          }
        } finally {
          if (_didIteratorError2) {
            throw _iteratorError2;
          }
        }
      }
 
      return null;
    }
 
    // If visitor returns a truthy value, traversal will be aborted and that value
    // will be returned from `traverseReverse`. Otherwise `traverseReverse` will return null.
 
  }, {
    key: 'traverseReverse',
    value: function traverseReverse(visitor) {
      var _ref2 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
          _ref2$modelMatrix = _ref2.modelMatrix,
          modelMatrix = _ref2$modelMatrix === undefined ? new __WEBPACK_IMPORTED_MODULE_1_math_gl__["Matrix4"]() : _ref2$modelMatrix;
 
      for (var i = this.children.length - 1; i >= 0; --i) {
        var child = this.children[i];
        var matrix = child.matrix;
 
        modelMatrix = modelMatrix.multiplyRight(matrix);
        var result = void 0;
        if (child instanceof Group) {
          result = child.traverseReverse(visitor, { modelMatrix: modelMatrix });
        } else {
          // child.setUniforms({modelMatrix});
          result = visitor(child, {});
        }
        // Abort if a result was returned
        if (result) {
          return result;
        }
      }
      return null;
    }
  }]);
 
  return Group;
}(__WEBPACK_IMPORTED_MODULE_0__object_3d__["a" /* default */]);
 
/* harmony default export */ __webpack_exports__["a"] = (Group);
//# sourceMappingURL=group.js.map
 
/***/ }),
/* 626 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = pickModels;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__webgl__ = __webpack_require__(61);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__utils__ = __webpack_require__(8);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__group__ = __webpack_require__(625);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_assert__ = __webpack_require__(1);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_assert___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_assert__);
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
 
/* global window */
 
 
 
 
 
var ILLEGAL_ARG = 'Illegal argument to pick';
 
function getDevicePixelRatio() {
  return typeof window !== 'undefined' ? window.devicePixelRatio : 1;
}
 
function pickModels(gl, _ref) {
  var models = _ref.models,
      position = _ref.position,
      _ref$uniforms = _ref.uniforms,
      uniforms = _ref$uniforms === undefined ? {} : _ref$uniforms,
      _ref$parameters = _ref.parameters,
      parameters = _ref$parameters === undefined ? {} : _ref$parameters,
      settings = _ref.settings,
      _ref$useDevicePixelRa = _ref.useDevicePixelRatio,
      useDevicePixelRatio = _ref$useDevicePixelRa === undefined ? null : _ref$useDevicePixelRa,
      _ref$useDevicePixels = _ref.useDevicePixels,
      useDevicePixels = _ref$useDevicePixels === undefined ? true : _ref$useDevicePixels,
      framebuffer = _ref.framebuffer;
 
  __WEBPACK_IMPORTED_MODULE_3_assert___default()(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__webgl__["isWebGL"])(gl), ILLEGAL_ARG);
  __WEBPACK_IMPORTED_MODULE_3_assert___default()(framebuffer, ILLEGAL_ARG);
  __WEBPACK_IMPORTED_MODULE_3_assert___default()(position, ILLEGAL_ARG);
  if (useDevicePixelRatio !== null) {
    __WEBPACK_IMPORTED_MODULE_1__utils__["b" /* log */].deprecated('useDevicePixelRatio', 'useDevicePixels');
    useDevicePixels = useDevicePixelRatio;
  }
 
  var _position = _slicedToArray(position, 2),
      x = _position[0],
      y = _position[1];
 
  // Match our picking framebuffer with the size of the canvas drawing buffer
 
 
  framebuffer.resize({ width: gl.canvas.width, height: gl.canvas.height });
 
  // Compensate for devicePixelRatio
  // Note: this assumes the canvas framebuffer has been matched
  var dpr = useDevicePixels ? getDevicePixelRatio() : 1;
  // Reverse the y coordinate
  var deviceX = x * dpr;
  var deviceY = gl.canvas.height - y * dpr;
 
  // return withParameters(gl, {
  //   // framebuffer,
  //   // // We are only interested in one pixel, no need to render anything else
  //   // scissorTest: {x: deviceX, y: deviceY, w: 1, h: 1}
  // }, () => {
  var group = new __WEBPACK_IMPORTED_MODULE_2__group__["a" /* default */]({ children: models });
  return group.traverseReverse(function (model) {
 
    if (model.isPickable()) {
      // Clear the frame buffer
      __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__webgl__["clear"])(gl, { framebuffer: framebuffer, color: true, depth: true });
 
      // Render picking colors
      /* eslint-disable camelcase */
      model.setUniforms({ picking_uActive: 1 });
      model.draw({ uniforms: uniforms, parameters: parameters, settings: settings, framebuffer: framebuffer });
      model.setUniforms({ picking_uActive: 0 });
 
      // Sample Read color in the central pixel, to be mapped as a picking color
      var color = framebuffer.readPixels({
        x: deviceX,
        y: deviceY,
        width: 1,
        height: 1,
        format: gl.RGBA,
        type: gl.UNSIGNED_BYTE });
 
      var isPicked = color[0] !== 0 || color[1] !== 0 || color[2] !== 0;
 
      // Add the information to the stack
      if (isPicked) {
        return {
          model: model,
          color: color,
          x: x,
          y: y,
          deviceX: deviceX,
          deviceY: deviceY
        };
      }
    }
 
    return null;
  });
  // });
}
//# sourceMappingURL=pick-models.js.map
 
/***/ }),
/* 627 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = encodePickingColor;
/* harmony export (immutable) */ __webpack_exports__["b"] = decodePickingColor;
/* harmony export (immutable) */ __webpack_exports__["c"] = getNullPickingColor;
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
 
var NULL_PICKING_COLOR = new Uint8Array([0, 0, 0]);
 
// Encodes an index as a Uint8Array([r, g, b]) format picking color
function encodePickingColor(i) {
  return [i + 1 & 255, i + 1 >> 8 & 255, i + 1 >> 16 & 255];
}
 
// Decodes a picking color in [r, g, b] format to an index
function decodePickingColor(color) {
  // assert(color instanceof Uint8Array);
  var _color = _slicedToArray(color, 3),
      i1 = _color[0],
      i2 = _color[1],
      i3 = _color[2];
  // 1 was added to seperate from no selection
 
 
  var index = i1 + i2 * 256 + i3 * 65536 - 1;
  return index;
}
 
// Return picking color representing no item at that pixel
function getNullPickingColor() {
  return NULL_PICKING_COLOR;
}
//# sourceMappingURL=picking-colors.js.map
 
/***/ }),
/* 628 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return addModel; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return logModel; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return removeModel; });
/* unused harmony export setOverride */
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return getOverrides; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_seer__ = __webpack_require__(173);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_seer___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_seer__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__utils_globals__ = __webpack_require__(261);
 
 
 
 
var models = {};
 
/**
 * Add a model to our cache indexed by id
 */
var addModel = function addModel(model) {
  if (models[model.id]) {
    return;
  }
  models[model.id] = model;
 
  __WEBPACK_IMPORTED_MODULE_0_seer___default.a.listItem('luma.gl', model.id);
};
 
/**
 * Log a model uniforms and attributes.
 */
var logModel = function logModel(model, uniforms) {
  if (!__WEBPACK_IMPORTED_MODULE_0_seer___default.a.isReady() || __WEBPACK_IMPORTED_MODULE_0_seer___default.a.throttle('luma.gl:' + model.id, 1E3)) {
    return;
  }
 
  var attributesObject = Object.assign({}, model.geometry.attributes, model.attributes);
  var uniformsObject = Object.assign({}, model.uniforms, uniforms);
 
  __WEBPACK_IMPORTED_MODULE_0_seer___default.a.multiUpdate('luma.gl', model.id, [{ path: 'objects.uniforms', data: uniformsObject }, { path: 'objects.attributes', data: attributesObject }]);
};
 
/**
 * Remove a previously set model from the cache
 */
var removeModel = function removeModel(id) {
  delete models[id];
  __WEBPACK_IMPORTED_MODULE_0_seer___default.a.deleteItem('luma.gl', id);
};
 
/**
 * Recursively traverse an object given a path of properties and set the given value
 */
var recursiveSet = function recursiveSet(obj, path, value) {
  if (!obj) {
    return;
  }
 
  if (path.length > 1) {
    recursiveSet(obj[path[0]], path.slice(1), value);
  } else {
    obj[path[0]] = value;
  }
};
 
var overrides = new Map();
 
/**
 * Create an override on the specify layer, indexed by a valuePath array.
 * Do nothing in case Seer as not been initialized to prevent any preformance drawback.
 */
var setOverride = function setOverride(id, valuePath, value) {
  if (!__WEBPACK_IMPORTED_MODULE_1__utils_globals__["a" /* window */].__SEER_INITIALIZED__) {
    return;
  }
 
  if (!overrides.has(id)) {
    overrides.set(id, new Map());
  }
 
  var uniforms = overrides.get(id);
  uniforms.set(valuePath, value);
};
 
/**
 * Apply overrides to a specific model's uniforms
 */
var getOverrides = function getOverrides(id, uniforms) {
  if (!__WEBPACK_IMPORTED_MODULE_1__utils_globals__["a" /* window */].__SEER_INITIALIZED__ || !id) {
    return;
  }
 
  var overs = overrides.get(id);
  if (!overs) {
    return;
  }
 
  overs.forEach(function (value, valuePath) {
    recursiveSet(uniforms, valuePath, value);
  });
};
 
/**
 * Listen for luma.gl edit events
 */
__WEBPACK_IMPORTED_MODULE_0_seer___default.a.listenFor('luma.gl', function (payload) {
  var model = models[payload.itemKey];
  if (!model || payload.type !== 'edit' || payload.valuePath[0] !== 'uniforms') {
    return;
  }
 
  var valuePath = payload.valuePath.slice(1);
  setOverride(payload.itemKey, valuePath, payload.value);
 
  var uniforms = model.getUniforms();
  recursiveSet(uniforms, valuePath, payload.value);
  model.setUniforms(uniforms);
});
//# sourceMappingURL=seer-integration.js.map
 
/***/ }),
/* 629 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
 
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
 
exports.requestFile = requestFile;
 
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
 
// Supports loading (requesting) assets with XHR (XmlHttpRequest)
/* eslint-disable guard-for-in, complexity, no-try-catch */
 
/* global XMLHttpRequest */
function noop() {}
 
var XHR_STATES = {
  UNINITIALIZED: 0,
  LOADING: 1,
  LOADED: 2,
  INTERACTIVE: 3,
  COMPLETED: 4
};
 
var XHR = function () {
  function XHR(_ref) {
    var url = _ref.url,
        _ref$path = _ref.path,
        path = _ref$path === undefined ? null : _ref$path,
        _ref$method = _ref.method,
        method = _ref$method === undefined ? 'GET' : _ref$method,
        _ref$asynchronous = _ref.asynchronous,
        asynchronous = _ref$asynchronous === undefined ? true : _ref$asynchronous,
        _ref$noCache = _ref.noCache,
        noCache = _ref$noCache === undefined ? false : _ref$noCache,
        _ref$sendAsBinary = _ref.sendAsBinary,
        sendAsBinary = _ref$sendAsBinary === undefined ? false : _ref$sendAsBinary,
        _ref$responseType = _ref.responseType,
        responseType = _ref$responseType === undefined ? false : _ref$responseType,
        _ref$onProgress = _ref.onProgress,
        onProgress = _ref$onProgress === undefined ? noop : _ref$onProgress,
        _ref$onError = _ref.onError,
        onError = _ref$onError === undefined ? noop : _ref$onError,
        _ref$onAbort = _ref.onAbort,
        onAbort = _ref$onAbort === undefined ? noop : _ref$onAbort,
        _ref$onComplete = _ref.onComplete,
        onComplete = _ref$onComplete === undefined ? noop : _ref$onComplete;
 
    _classCallCheck(this, XHR);
 
    this.url = path ? path.join(path, url) : url;
    this.method = method;
    this.async = asynchronous;
    this.noCache = noCache;
    this.sendAsBinary = sendAsBinary;
    this.responseType = responseType;
 
    this.req = new XMLHttpRequest();
 
    this.req.onload = function (e) {
      return onComplete(e);
    };
    this.req.onerror = function (e) {
      return onError(e);
    };
    this.req.onabort = function (e) {
      return onAbort(e);
    };
    this.req.onprogress = function (e) {
      if (e.lengthComputable) {
        onProgress(e, Math.round(e.loaded / e.total * 100));
      } else {
        onProgress(e, -1);
      }
    };
  }
 
  _createClass(XHR, [{
    key: 'setRequestHeader',
    value: function setRequestHeader(header, value) {
      this.req.setRequestHeader(header, value);
      return this;
    }
 
    // /* eslint-disable max-statements */
 
  }, {
    key: 'sendAsync',
    value: function sendAsync() {
      var _this = this;
 
      var body = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.body || null;
 
      return new Promise(function (resolve, reject) {
        try {
          var req = _this.req,
              method = _this.method,
              noCache = _this.noCache,
              sendAsBinary = _this.sendAsBinary,
              responseType = _this.responseType;
 
 
          var url = noCache ? _this.url + (_this.url.indexOf('?') >= 0 ? '&' : '?') + Date.now() : _this.url;
 
          req.open(method, url, _this.async);
 
          if (responseType) {
            req.responseType = responseType;
          }
 
          if (_this.async) {
            req.onreadystatechange = function (e) {
              if (req.readyState === XHR_STATES.COMPLETED) {
                if (req.status === 200) {
                  resolve(req.responseType ? req.response : req.responseText);
                } else {
                  reject(new Error(req.status + ': ' + url));
                }
              }
            };
          }
 
          if (sendAsBinary) {
            req.sendAsBinary(body);
          } else {
            req.send(body);
          }
 
          if (!_this.async) {
            if (req.status === 200) {
              resolve(req.responseType ? req.response : req.responseText);
            } else {
              reject(new Error(req.status + ': ' + url));
            }
          }
        } catch (error) {
          reject(error);
        }
      });
    }
    /* eslint-enable max-statements */
 
  }]);
 
  return XHR;
}();
 
function requestFile(opts) {
  var xhr = new XHR(opts);
  return xhr.sendAsync();
}
//# sourceMappingURL=browser-request-file.js.map
 
/***/ }),
/* 630 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
 
var _browserLoad = __webpack_require__(257);
 
Object.defineProperty(exports, 'setPathPrefix', {
  enumerable: true,
  get: function get() {
    return _browserLoad.setPathPrefix;
  }
});
Object.defineProperty(exports, 'loadFile', {
  enumerable: true,
  get: function get() {
    return _browserLoad.loadFile;
  }
});
Object.defineProperty(exports, 'loadImage', {
  enumerable: true,
  get: function get() {
    return _browserLoad.loadImage;
  }
});
 
var _loadFiles = __webpack_require__(631);
 
Object.defineProperty(exports, 'loadFiles', {
  enumerable: true,
  get: function get() {
    return _loadFiles.loadFiles;
  }
});
Object.defineProperty(exports, 'loadImages', {
  enumerable: true,
  get: function get() {
    return _loadFiles.loadImages;
  }
});
Object.defineProperty(exports, 'loadTextures', {
  enumerable: true,
  get: function get() {
    return _loadFiles.loadTextures;
  }
});
Object.defineProperty(exports, 'loadProgram', {
  enumerable: true,
  get: function get() {
    return _loadFiles.loadProgram;
  }
});
Object.defineProperty(exports, 'loadModel', {
  enumerable: true,
  get: function get() {
    return _loadFiles.loadModel;
  }
});
Object.defineProperty(exports, 'parseModel', {
  enumerable: true,
  get: function get() {
    return _loadFiles.parseModel;
  }
});
//# sourceMappingURL=index.js.map
 
/***/ }),
/* 631 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
 
 
Object.defineProperty(exports, "__esModule", {
  value: true
});
 
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); /* eslint-disable guard-for-in, complexity, no-try-catch */
 
 
exports.loadTexture = loadTexture;
exports.loadFiles = loadFiles;
exports.loadImages = loadImages;
exports.loadTextures = loadTextures;
exports.loadProgram = loadProgram;
exports.loadModel = loadModel;
exports.parseModel = parseModel;
 
var _assert = __webpack_require__(1);
 
var _assert2 = _interopRequireDefault(_assert);
 
var _browserLoad = __webpack_require__(257);
 
var _webgl = __webpack_require__(61);
 
var _core = __webpack_require__(59);
 
var _geometry = __webpack_require__(41);
 
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
 
function noop() {}
 
function loadTexture(gl, url) {
  var opts = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  var urls = opts.urls,
      _opts$onProgress = opts.onProgress,
      onProgress = _opts$onProgress === undefined ? noop : _opts$onProgress;
 
  (0, _assert2.default)(typeof url === 'string', 'loadTexture: url must be string');
 
  return loadImages(Object.assign({ urls: urls, onProgress: onProgress }, opts)).then(function (images) {
    return images.map(function (img, i) {
      return new _webgl.Texture2D(gl, Object.assign({ id: urls[i] }, opts, { data: img }));
    });
  });
}
 
/*
 * Loads (Requests) multiple files asynchronously
 */
function loadFiles() {
  var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  var urls = opts.urls,
      _opts$onProgress2 = opts.onProgress,
      onProgress = _opts$onProgress2 === undefined ? noop : _opts$onProgress2;
 
  (0, _assert2.default)(urls.every(function (url) {
    return typeof url === 'string';
  }), 'loadImages: {urls} must be array of strings');
  var count = 0;
  return Promise.all(urls.map(function (url) {
    var promise = (0, _browserLoad.loadFile)(Object.assign({ url: url }, opts));
    promise.then(function (file) {
      return onProgress({
        progress: ++count / urls.length,
        count: count,
        total: urls.length,
        url: url
      });
    });
    return promise;
  }));
}
 
/*
 * Loads (requests) multiple images asynchronously
 */
function loadImages() {
  var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  var urls = opts.urls,
      _opts$onProgress3 = opts.onProgress,
      onProgress = _opts$onProgress3 === undefined ? noop : _opts$onProgress3;
 
  (0, _assert2.default)(urls.every(function (url) {
    return typeof url === 'string';
  }), 'loadImages: {urls} must be array of strings');
  var count = 0;
  return Promise.all(urls.map(function (url) {
    var promise = (0, _browserLoad.loadImage)(url, opts);
    promise.then(function (file) {
      return onProgress({
        progress: ++count / urls.length,
        count: count,
        total: urls.length,
        url: url
      });
    });
    return promise;
  }));
}
 
function loadTextures(gl) {
  var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  var urls = opts.urls,
      _opts$onProgress4 = opts.onProgress,
      onProgress = _opts$onProgress4 === undefined ? noop : _opts$onProgress4;
 
  (0, _assert2.default)(urls.every(function (url) {
    return typeof url === 'string';
  }), 'loadTextures: {urls} must be array of strings');
 
  return loadImages(Object.assign({ urls: urls, onProgress: onProgress }, opts)).then(function (images) {
    return images.map(function (img, i) {
      var params = Array.isArray(opts.parameters) ? opts.parameters[i] : opts.parameters;
      params = params === undefined ? {} : params;
      return new _webgl.Texture2D(gl, Object.assign({ id: urls[i] }, params, { data: img }));
    });
  });
}
 
function loadProgram(gl) {
  var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  var vs = opts.vs,
      fs = opts.fs,
      _opts$onProgress5 = opts.onProgress,
      onProgress = _opts$onProgress5 === undefined ? noop : _opts$onProgress5;
 
  return loadFiles(Object.assign({ urls: [vs, fs], onProgress: onProgress }, opts)).then(function (_ref) {
    var _ref2 = _slicedToArray(_ref, 2),
        vsText = _ref2[0],
        fsText = _ref2[1];
 
    return new _webgl.Program(gl, Object.assign({ vs: vsText, fs: fsText }, opts));
  });
}
 
// Loads a simple JSON format
function loadModel(gl) {
  var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  var url = opts.url,
      _opts$onProgress6 = opts.onProgress,
      onProgress = _opts$onProgress6 === undefined ? noop : _opts$onProgress6;
 
  return loadFiles(Object.assign({ urls: [url], onProgress: onProgress }, opts)).then(function (_ref3) {
    var _ref4 = _slicedToArray(_ref3, 1),
        file = _ref4[0];
 
    return parseModel(gl, Object.assign({ file: file }, opts));
  });
}
 
function parseModel(gl) {
  var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  var file = opts.file,
      _opts$program = opts.program,
      program = _opts$program === undefined ? new _webgl.Program(gl) : _opts$program;
 
  var json = typeof file === 'string' ? parseJSON(file) : file;
  // Remove any attributes so that we can create a geometry
  // TODO - change format to put these in geometry sub object?
  var attributes = {};
  var modelOptions = {};
  for (var key in json) {
    var value = json[key];
    if (Array.isArray(value)) {
      attributes[key] = key === 'indices' ? new Uint16Array(value) : new Float32Array(value);
    } else {
      modelOptions[key] = value;
    }
  }
 
  return new _core.Model(gl, Object.assign({ program: program, geometry: new _geometry.Geometry({ attributes: attributes }) }, modelOptions, opts));
}
 
function parseJSON(file) {
  try {
    return JSON.parse(file);
  } catch (error) {
    throw new Error('Failed to parse JSON: ' + error);
  }
}
//# sourceMappingURL=load-files.js.map
 
/***/ }),
/* 632 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__core__ = __webpack_require__(59);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__geometry__ = __webpack_require__(41);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__webgl__ = __webpack_require__(61);
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
 
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
 
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
 
// ClipSpaceQuad
 
 
 
 
var CLIPSPACE_QUAD_VERTEX_SHADER = 'attribute vec2 aClipSpacePosition;\nattribute vec2 aTexCoord;\nattribute vec2 aCoordinate;\n\nvarying vec2 position;\nvarying vec2 coordinate;\nvarying vec2 uv;\n\nvoid main(void) {\n  gl_Position = vec4(aClipSpacePosition, 0., 1.);\n  position = aClipSpacePosition;\n  coordinate = aCoordinate;\n  uv = aTexCoord;\n}\n';
 
/* eslint-disable indent, no-multi-spaces */
var POSITIONS = [-1, -1, 1, -1, -1, 1, 1, 1];
 
var ClipSpaceQuad = /*#__PURE__*/function (_Model) {
  _inherits(ClipSpaceQuad, _Model);
 
  function ClipSpaceQuad(gl, opts) {
    _classCallCheck(this, ClipSpaceQuad);
 
    var TEX_COORDS = POSITIONS.map(function (coord) {
      return coord === -1 ? 0 : coord;
    });
 
    var _this = _possibleConstructorReturn(this, (ClipSpaceQuad.__proto__ || Object.getPrototypeOf(ClipSpaceQuad)).call(this, gl, Object.assign({}, opts, {
      vs: CLIPSPACE_QUAD_VERTEX_SHADER,
      geometry: new __WEBPACK_IMPORTED_MODULE_1__geometry__["Geometry"]({
        drawMode: __WEBPACK_IMPORTED_MODULE_2__webgl__["GL"].TRIANGLE_STRIP,
        vertexCount: 4,
        attributes: {
          aClipSpacePosition: { size: 2, value: new Float32Array(POSITIONS) },
          aTexCoord: { size: 2, value: new Float32Array(TEX_COORDS) },
          aCoordinate: { size: 2, value: new Float32Array(TEX_COORDS) }
        }
      })
    })));
 
    _this.setVertexCount(4);
    return _this;
  }
 
  return ClipSpaceQuad;
}(__WEBPACK_IMPORTED_MODULE_0__core__["Model"]);
 
/* harmony default export */ __webpack_exports__["a"] = (ClipSpaceQuad);
//# sourceMappingURL=clip-space-quad.js.map
 
/***/ }),
/* 633 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__geometry__ = __webpack_require__(41);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__core__ = __webpack_require__(59);
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
 
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
 
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
 
 
 
 
var Cone = /*#__PURE__*/function (_Model) {
  _inherits(Cone, _Model);
 
  function Cone(gl) {
    var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
 
    _classCallCheck(this, Cone);
 
    return _possibleConstructorReturn(this, (Cone.__proto__ || Object.getPrototypeOf(Cone)).call(this, gl, Object.assign({}, opts, { geometry: new __WEBPACK_IMPORTED_MODULE_0__geometry__["ConeGeometry"](opts) })));
  }
 
  return Cone;
}(__WEBPACK_IMPORTED_MODULE_1__core__["Model"]);
 
/* harmony default export */ __webpack_exports__["a"] = (Cone);
//# sourceMappingURL=cone.js.map
 
/***/ }),
/* 634 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__geometry__ = __webpack_require__(41);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__core__ = __webpack_require__(59);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils__ = __webpack_require__(8);
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
 
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
 
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
 
 
 
 
 
var Cube = /*#__PURE__*/function (_Model) {
  _inherits(Cube, _Model);
 
  function Cube(gl) {
    var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
 
    _classCallCheck(this, Cube);
 
    var _opts$id = opts.id,
        id = _opts$id === undefined ? __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__utils__["d" /* uid */])('cube') : _opts$id;
    return _possibleConstructorReturn(this, (Cube.__proto__ || Object.getPrototypeOf(Cube)).call(this, gl, Object.assign({}, opts, { id: id, geometry: new __WEBPACK_IMPORTED_MODULE_0__geometry__["CubeGeometry"](opts) })));
  }
 
  return Cube;
}(__WEBPACK_IMPORTED_MODULE_1__core__["Model"]);
 
/* harmony default export */ __webpack_exports__["a"] = (Cube);
//# sourceMappingURL=cube.js.map
 
/***/ }),
/* 635 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__geometry__ = __webpack_require__(41);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__core_model__ = __webpack_require__(104);
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
 
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
 
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
 
 
 
 
var Cylinder = /*#__PURE__*/function (_Model) {
  _inherits(Cylinder, _Model);
 
  function Cylinder(gl) {
    var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
 
    _classCallCheck(this, Cylinder);
 
    return _possibleConstructorReturn(this, (Cylinder.__proto__ || Object.getPrototypeOf(Cylinder)).call(this, gl, Object.assign({}, opts, { geometry: new __WEBPACK_IMPORTED_MODULE_0__geometry__["CylinderGeometry"](opts) })));
  }
 
  return Cylinder;
}(__WEBPACK_IMPORTED_MODULE_1__core_model__["a" /* default */]);
 
/* harmony default export */ __webpack_exports__["a"] = (Cylinder);
//# sourceMappingURL=cylinder.js.map
 
/***/ }),
/* 636 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__core__ = __webpack_require__(59);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__geometry__ = __webpack_require__(41);
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
 
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
 
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
 
 
 
 
var IcoSphere = /*#__PURE__*/function (_Model) {
  _inherits(IcoSphere, _Model);
 
  function IcoSphere(gl) {
    var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
 
    _classCallCheck(this, IcoSphere);
 
    return _possibleConstructorReturn(this, (IcoSphere.__proto__ || Object.getPrototypeOf(IcoSphere)).call(this, gl, Object.assign({}, opts, { geometry: new __WEBPACK_IMPORTED_MODULE_1__geometry__["IcoSphereGeometry"](opts) })));
  }
 
  return IcoSphere;
}(__WEBPACK_IMPORTED_MODULE_0__core__["Model"]);
 
/* harmony default export */ __webpack_exports__["a"] = (IcoSphere);
//# sourceMappingURL=ico-sphere.js.map
 
/***/ }),
/* 637 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__geometry__ = __webpack_require__(41);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__core_model__ = __webpack_require__(104);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils__ = __webpack_require__(8);
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
 
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
 
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
 
 
 
 
 
var Plane = /*#__PURE__*/function (_Model) {
  _inherits(Plane, _Model);
 
  function Plane(gl) {
    var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
 
    _classCallCheck(this, Plane);
 
    var _opts$id = opts.id,
        id = _opts$id === undefined ? __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__utils__["d" /* uid */])('plane') : _opts$id;
    return _possibleConstructorReturn(this, (Plane.__proto__ || Object.getPrototypeOf(Plane)).call(this, gl, Object.assign({}, opts, { id: id, geometry: new __WEBPACK_IMPORTED_MODULE_0__geometry__["PlaneGeometry"](opts) })));
  }
 
  return Plane;
}(__WEBPACK_IMPORTED_MODULE_1__core_model__["a" /* default */]);
 
/* harmony default export */ __webpack_exports__["a"] = (Plane);
//# sourceMappingURL=plane.js.map
 
/***/ }),
/* 638 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__core__ = __webpack_require__(59);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__geometry__ = __webpack_require__(41);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils__ = __webpack_require__(8);
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
 
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
 
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
 
 
 
 
 
var Sphere = /*#__PURE__*/function (_Model) {
  _inherits(Sphere, _Model);
 
  function Sphere(gl) {
    var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
 
    _classCallCheck(this, Sphere);
 
    var _opts$id = opts.id,
        id = _opts$id === undefined ? __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__utils__["d" /* uid */])('sphere') : _opts$id;
    return _possibleConstructorReturn(this, (Sphere.__proto__ || Object.getPrototypeOf(Sphere)).call(this, gl, Object.assign({}, opts, { id: id, geometry: new __WEBPACK_IMPORTED_MODULE_1__geometry__["SphereGeometry"](opts) })));
  }
 
  return Sphere;
}(__WEBPACK_IMPORTED_MODULE_0__core__["Model"]);
 
/* harmony default export */ __webpack_exports__["a"] = (Sphere);
//# sourceMappingURL=sphere.js.map
 
/***/ }),
/* 639 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__geometry__ = __webpack_require__(41);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__core__ = __webpack_require__(59);
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
 
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
 
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
 
 
 
 
var TruncatedCone = /*#__PURE__*/function (_Model) {
  _inherits(TruncatedCone, _Model);
 
  function TruncatedCone(gl) {
    var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
 
    _classCallCheck(this, TruncatedCone);
 
    return _possibleConstructorReturn(this, (TruncatedCone.__proto__ || Object.getPrototypeOf(TruncatedCone)).call(this, gl, Object.assign({}, opts, { geometry: new __WEBPACK_IMPORTED_MODULE_0__geometry__["TruncatedConeGeometry"](opts) })));
  }
 
  return TruncatedCone;
}(__WEBPACK_IMPORTED_MODULE_1__core__["Model"]);
 
/* harmony default export */ __webpack_exports__["a"] = (TruncatedCone);
//# sourceMappingURL=truncated-cone.js.map
 
/***/ }),
/* 640 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* unused harmony export stop */
/* unused harmony export get */
/* unused harmony export getWheel */
/* unused harmony export getKey */
/* unused harmony export isRightClick */
/* unused harmony export getPos */
/* unused harmony export EventsProxy */
/* unused harmony export Keys */
/* harmony export (immutable) */ __webpack_exports__["a"] = addEvents;
/* unused harmony export removeEvents */
 
 
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
 
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
 
// event.js
// Handle keyboard/mouse/touch events in the Canvas
// TODO - this will not work under node
 
/* eslint-disable dot-notation, max-statements, no-loop-func */
/* global window, document */
function noop() {}
 
var KEYS = {
  enter: 13,
  up: 38,
  down: 40,
  left: 37,
  right: 39,
  esc: 27,
  space: 32,
  backspace: 8,
  tab: 9,
  delete: 46
};
 
// returns an O3D object or false otherwise.
function toO3D(n) {
  return n !== true ? n : false;
}
 
// Returns an element position
function _getPos(elem) {
  var bbox = elem.getBoundingClientRect();
  return {
    x: bbox.left,
    y: bbox.top,
    bbox: bbox
  };
}
 
// event object wrapper
function get(e, win) {
  win = win || window;
  return e || win.event;
}
 
function getWheel(e) {
  return e.wheelDelta ? e.wheelDelta / 120 : -(e.detail || 0) / 3;
}
 
function getKey(e) {
  var code = e.which || e.keyCode;
  var key = keyOf(code);
  // onkeydown
  var fKey = code - 111;
  if (fKey > 0 && fKey < 13) {
    key = 'f' + fKey;
  }
  key = key || String.fromCharCode(code).toLowerCase();
 
  return {
    code: code,
    key: key,
    shift: e.shiftKey,
    control: e.ctrlKey,
    alt: e.altKey,
    meta: e.metaKey
  };
}
 
function isRightClick(e) {
  return e.which === 3 || e.button === 2;
}
 
function getPos(e, win) {
  // get mouse position
  win = win || window;
  e = e || win.event;
  var doc = win.document;
  doc = doc.documentElement || doc.body;
  // TODO(nico): make touch event handling better
  if (e.touches && e.touches.length) {
    var touchesPos = [];
    var l = e.touches.length;
    var evt = void 0;
    for (var i = 0; i < l; ++i) {
      evt = e.touches[i];
      touchesPos.push({
        x: evt.pageX || evt.clientX + doc.scrollLeft,
        y: evt.pageY || evt.clientY + doc.scrollTop
      });
    }
    return touchesPos;
  }
  var page = {
    x: e.pageX || e.clientX + doc.scrollLeft,
    y: e.pageY || e.clientY + doc.scrollTop
  };
  return [page];
}
 
function _stop(e) {
  if (e.stopPropagation) {
    e.stopPropagation();
  }
  e.cancelBubble = true;
  if (e.preventDefault) {
    e.preventDefault();
  } else {
    e.returnValue = false;
  }
}
 
var EventsProxy = /*#__PURE__*/function () {
  function EventsProxy(domElem, opt) {
    _classCallCheck(this, EventsProxy);
 
    this.scene = opt.scene;
    this.domElem = domElem;
    this.pos = _getPos(domElem);
    this.opt = this.callbacks = opt;
 
    this.size = {
      width: domElem.width || domElem.offsetWidth,
      height: domElem.height || domElem.offsetHeight
    };
 
    this.attachEvents();
  }
 
  _createClass(EventsProxy, [{
    key: 'attachEvents',
    value: function attachEvents() {
      var _this = this;
 
      var domElem = this.domElem;
      var opt = this.opt;
 
      if (opt.disableContextMenu) {
        domElem.oncontextmenu = function () {
          return false;
        };
      }
 
      if (opt.enableMouse) {
        ['mouseup', 'mousedown', 'mousemove', 'mouseover', 'mouseout'].forEach(function (action) {
          domElem.addEventListener(action, function (e, win) {
            _this[action](_this.eventInfo(action, e, win));
          }, false);
        });
 
        // "well, this is embarrassing..."
        var type = '';
        if (!document.getBoxObjectFor && window.mozInnerScreenX === null) {
          type = 'mousewheel';
        } else {
          type = 'DOMMouseScroll';
        }
        domElem.addEventListener(type, function (e, win) {
          _this['mousewheel'](_this.eventInfo('mousewheel', e, win));
        }, false);
      }
 
      if (opt.enableTouch) {
        ['touchstart', 'touchmove', 'touchend'].forEach(function (action) {
          domElem.addEventListener(action, function (e, win) {
            _this[action](_this.eventInfo(action, e, win));
          }, false);
        });
      }
 
      if (opt.enableKeyboard) {
        ['keydown', 'keyup'].forEach(function (action) {
          document.addEventListener(action, function (e, win) {
            _this[action](_this.eventInfo(action, e, win));
          }, false);
        });
      }
    }
  }, {
    key: 'eventInfo',
    value: function eventInfo(type, e, win) {
      var domElem = this.domElem;
      var scene = this.scene;
      var opt = this.opt;
      var size = this.getSize();
      var relative = opt.relative;
      var centerOrigin = opt.centerOrigin;
      var pos = opt.cachePosition && this.pos || _getPos(domElem);
      var ge = get(e, win);
      var epos = getPos(e, win);
      var origPos = { x: epos[0].x, y: epos[0].y };
      var evt = {};
      var x = void 0;
      var y = void 0;
 
      // get Position
      for (var i = 0, l = epos.length; i < l; ++i) {
        x = epos[i].x;
        y = epos[i].y;
        if (relative) {
          x -= pos.x;y -= pos.y;
          if (centerOrigin) {
            x -= size.width / 2;
            y -= size.height / 2;
            // y axis now points to the top of the screen
            y *= -1;
          }
        }
        epos[i].x = x;
        epos[i].y = y;
      }
 
      switch (type) {
        case 'mousewheel':
          evt.wheel = getWheel(ge);
          break;
        case 'keydown':
        case 'keyup':
          Object.assign(evt, getKey(ge));
          break;
        case 'mouseup':
          evt.isRightClick = isRightClick(ge);
          break;
        default:
          break;
      }
 
      var cacheTarget = void 0;
 
      Object.assign(evt, {
        x: epos[0].x,
        y: epos[0].y,
        posArray: epos,
 
        cache: false,
        // stop event propagation
        stop: function stop() {
          _stop(ge);
        },
 
        // get the target element of the event
        getTarget: function getTarget() {
          if (cacheTarget) {
            return cacheTarget;
          }
          return cacheTarget = opt.picking && scene.pick(origPos.x - pos.x, origPos.y - pos.y) || true;
        }
      });
      // wrap native event
      evt.event = ge;
 
      return evt;
    }
  }, {
    key: 'getSize',
    value: function getSize() {
      if (this.cacheSize) {
        return this.size;
      }
      var domElem = this.domElem;
      return {
        width: domElem.width || domElem.offsetWidth,
        height: domElem.height || domElem.offsetHeight
      };
    }
  }, {
    key: 'mouseup',
    value: function mouseup(e) {
      if (!this.moved) {
        if (e.isRightClick) {
          this.callbacks.onRightClick(e, this.hovered);
        } else {
          this.callbacks.onClick(e, toO3D(this.pressed));
        }
      }
      if (this.pressed) {
        if (this.moved) {
          this.callbacks.onDragEnd(e, toO3D(this.pressed));
        } else {
          this.callbacks.onDragCancel(e, toO3D(this.pressed));
        }
        this.pressed = this.moved = false;
      }
    }
  }, {
    key: 'mouseout',
    value: function mouseout(e) {
      // mouseout canvas
      var rt = e.relatedTarget;
      var domElem = this.domElem;
      while (rt && rt.parentNode) {
        if (domElem === rt.parentNode) {
          return;
        }
        rt = rt.parentNode;
      }
      if (this.hovered) {
        this.callbacks.onMouseLeave(e, this.hovered);
        this.hovered = false;
      }
      if (this.pressed && this.moved) {
        this.callbacks.onDragEnd(e);
        this.pressed = this.moved = false;
      }
    }
  }, {
    key: 'mouseover',
    value: function mouseover(e) {}
  }, {
    key: 'mousemove',
    value: function mousemove(e) {
      if (this.pressed) {
        this.moved = true;
        this.callbacks.onDragMove(e, toO3D(this.pressed));
        return;
      }
      if (this.hovered) {
        var target = toO3D(e.getTarget());
        if (!target || target.hash !== this.hash) {
          this.callbacks.onMouseLeave(e, this.hovered);
          this.hovered = target;
          this.hash = target;
          if (target) {
            this.hash = target.hash;
            this.callbacks.onMouseEnter(e, this.hovered);
          }
        } else {
          this.callbacks.onMouseMove(e, this.hovered);
        }
      } else {
        this.hovered = toO3D(e.getTarget());
        this.hash = this.hovered;
        if (this.hovered) {
          this.hash = this.hovered.hash;
          this.callbacks.onMouseEnter(e, this.hovered);
        }
      }
      if (!this.opt.picking) {
        this.callbacks.onMouseMove(e);
      }
    }
  }, {
    key: 'mousewheel',
    value: function mousewheel(e) {
      this.callbacks.onMouseWheel(e);
    }
  }, {
    key: 'mousedown',
    value: function mousedown(e) {
      this.pressed = e.getTarget();
      this.callbacks.onDragStart(e, toO3D(this.pressed));
    }
  }, {
    key: 'touchstart',
    value: function touchstart(e) {
      this.touched = e.getTarget();
      this.touchedLastPosition = { x: e.x, y: e.y };
      this.callbacks.onTouchStart(e, toO3D(this.touched));
    }
  }, {
    key: 'touchmove',
    value: function touchmove(e) {
      if (this.touched) {
        this.touchMoved = true;
        this.callbacks.onTouchMove(e, toO3D(this.touched));
      }
    }
  }, {
    key: 'touchend',
    value: function touchend(e) {
      if (this.touched) {
        if (this.touchMoved) {
          this.callbacks.onTouchEnd(e, toO3D(this.touched));
        } else {
          e.x = isNaN(e.x) ? this.touchedLastPosition.x : e.x;
          e.y = isNaN(e.y) ? this.touchedLastPosition.y : e.y;
          this.callbacks.onTap(e, toO3D(this.touched));
          this.callbacks.onTouchCancel(e, toO3D(this.touched));
        }
        this.touched = this.touchMoved = false;
      }
    }
  }, {
    key: 'keydown',
    value: function keydown(e) {
      this.callbacks.onKeyDown(e);
    }
  }, {
    key: 'keyup',
    value: function keyup(e) {
      this.callbacks.onKeyUp(e);
    }
  }]);
 
  return EventsProxy;
}();
 
Object.assign(EventsProxy.prototype, {
  hovered: false,
  pressed: false,
  touched: false,
  touchedLastPosition: { x: 0, y: 0 },
  touchMoved: false,
  moved: false
});
 
var DEFAULT_OPTS = {
  cachePosition: true,
  cacheSize: true,
  relative: true,
  centerOrigin: true,
  disableContextMenu: true,
  bind: false,
  picking: false,
 
  enableTouch: true,
  enableMouse: true,
  enableKeyboard: true,
 
  onClick: noop,
  onRightClick: noop,
  onDragStart: noop,
  onDragMove: noop,
  onDragEnd: noop,
  onDragCancel: noop,
  onTouchStart: noop,
  onTouchMove: noop,
  onTouchEnd: noop,
  onTouchCancel: noop,
  onTap: noop,
  onMouseMove: noop,
  onMouseEnter: noop,
  onMouseLeave: noop,
  onMouseWheel: noop,
  onKeyDown: noop,
  onKeyUp: noop
};
 
var Keys = KEYS;
 
function keyOf(code) {
  var keyMap = Keys;
  for (var name in keyMap) {
    if (keyMap[name] === code) {
      return name;
    }
  }
  return null;
}
 
function addEvents(domElement) {
  var opt = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
 
  opt = Object.assign({}, DEFAULT_OPTS, opt);
 
  var bind = opt.bind;
  if (bind) {
    for (var name in opt) {
      if (name.match(/^on[a-zA-Z0-9]+$/)) {
        (function (fname, fn) {
          opt[fname] = function f() {
            fn.apply(bind, Array.prototype.slice.call(arguments));
          };
        })(name, opt[name]);
      }
    }
  }
 
  return new EventsProxy(domElement, opt);
}
 
function removeEvents(domElement) {
  var opt = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
 
  opt = Object.assign({}, DEFAULT_OPTS, opt);
 
  var bind = opt.bind;
  if (bind) {
    for (var name in opt) {
      if (name.match(/^on[a-zA-Z0-9]+$/)) {
        (function (fname, fn) {
          opt[fname] = function f() {
            fn.apply(bind, Array.prototype.slice.call(arguments));
          };
        })(name, opt[name]);
      }
    }
  }
 
  return new EventsProxy(domElement, opt);
}
//# sourceMappingURL=add-events.js.map
 
/***/ }),
/* 641 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__add_events__ = __webpack_require__(640);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_0__add_events__["a"]; });
 
//# sourceMappingURL=index.js.map
 
/***/ }),
/* 642 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__lib_shader_modules__ = __webpack_require__(162);
/* unused harmony reexport registerShaderModules */
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__lib_assemble_shaders__ = __webpack_require__(258);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_1__lib_assemble_shaders__["a"]; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__lib_shader_cache__ = __webpack_require__(259);
/* unused harmony reexport ShaderCache */
 
 
 
//# sourceMappingURL=index.js.map
 
/***/ }),
/* 643 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* unused harmony export checkRendererVendor */
/* harmony export (immutable) */ __webpack_exports__["a"] = getPlatformShaderDefines;
/* harmony export (immutable) */ __webpack_exports__["b"] = getVersionDefines;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__webgl__ = __webpack_require__(61);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__webgl_context_features__ = __webpack_require__(108);
 
 
 
function checkRendererVendor(debugInfo, gpuVendor) {
  var vendor = debugInfo.vendor,
      renderer = debugInfo.renderer;
 
  var result = void 0;
  switch (gpuVendor) {
    case 'nvidia':
      result = vendor.match(/NVIDIA/i) || renderer.match(/NVIDIA/i);
      break;
    case 'intel':
      result = vendor.match(/INTEL/i) || renderer.match(/INTEL/i);
      break;
    case 'amd':
      result = vendor.match(/AMD/i) || renderer.match(/AMD/i) || vendor.match(/ATI/i) || renderer.match(/ATI/i);
      break;
    default:
      result = false;
  }
  return result;
}
 
function getPlatformShaderDefines(gl) {
  /* eslint-disable */
  var platformDefines = '';
  var debugInfo = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__webgl__["getContextInfo"])(gl);
 
  if (checkRendererVendor(debugInfo, 'nvidia')) {
    platformDefines += '#define NVIDIA_GPU\n// Nvidia optimizes away the calculation necessary for emulated fp64\n#define LUMA_FP64_CODE_ELIMINATION_WORKAROUND 1\n';
  } else if (checkRendererVendor(debugInfo, 'intel')) {
    platformDefines += '#define INTEL_GPU\n// Intel optimizes away the calculation necessary for emulated fp64\n#define LUMA_FP64_CODE_ELIMINATION_WORKAROUND 1\n// Intel\'s built-in \'tan\' function doesn\'t have acceptable precision\n#define LUMA_FP32_TAN_PRECISION_WORKAROUND 1\n// Intel GPU doesn\'t have full 32 bits precision in same cases, causes overflow\n#define LUMA_FP64_HIGH_BITS_OVERFLOW_WORKAROUND 1\n';
  } else if (checkRendererVendor(debugInfo, 'amd')) {
    // AMD Does not eliminate fp64 code
    platformDefines += '#define AMD_GPU\n';
  } else {
    // We don't know what GPU it is, could be that the GPU driver or
    // browser is not implementing UNMASKED_RENDERER constant and not
    // reporting a correct name
    platformDefines += '#define DEFAULT_GPU\n// Prevent driver from optimizing away the calculation necessary for emulated fp64\n#define LUMA_FP64_CODE_ELIMINATION_WORKAROUND 1\n// Intel\'s built-in \'tan\' function doesn\'t have acceptable precision\n#define LUMA_FP32_TAN_PRECISION_WORKAROUND 1\n// Intel GPU doesn\'t have full 32 bits precision in same cases, causes overflow\n#define LUMA_FP64_HIGH_BITS_OVERFLOW_WORKAROUND 1\n';
  }
 
  return platformDefines;
}
 
function getVersionDefines(gl) {
  var versionDefines = '// Defines for shader portability\n#if (__VERSION__ > 120)\n# define attribute in\n# define varying out\n# define FRAG_DEPTH\n# define DERIVATIVES\n# define DRAW_BUFFERS\n# define TEXTURE_LOD\n#else\n// # define in attribute\n// # define out varying\n#endif // __VERSION\n';
 
  if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__webgl_context_features__["b" /* hasFeature */])(gl, __WEBPACK_IMPORTED_MODULE_1__webgl_context_features__["a" /* FEATURES */].GLSL_FRAG_DEPTH)) {
    versionDefines += '// FRAG_DEPTH => gl_FragDepth is available\n#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n# define FRAG_DEPTH\n# define gl_FragDepth gl_FragDepthEXT\n#endif\n';
  }
  if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__webgl_context_features__["b" /* hasFeature */])(gl, __WEBPACK_IMPORTED_MODULE_1__webgl_context_features__["a" /* FEATURES */].GLSL_DERIVATIVES)) {
    versionDefines += '// DERIVATIVES => dxdF, dxdY and fwidth are available\n#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n# define DERIVATIVES\n#endif\n';
  }
  if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__webgl_context_features__["b" /* hasFeature */])(gl, __WEBPACK_IMPORTED_MODULE_1__webgl_context_features__["a" /* FEATURES */].GLSL_FRAG_DATA)) {
    versionDefines += '// DRAW_BUFFERS => gl_FragData[] is available\n#ifdef GL_EXT_draw_buffers\n#extension GL_EXT_draw_buffers : require\n#define DRAW_BUFFERS\n#endif\n';
  }
  if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__webgl_context_features__["b" /* hasFeature */])(gl, __WEBPACK_IMPORTED_MODULE_1__webgl_context_features__["a" /* FEATURES */].GLSL_TEXTURE_LOD)) {
    versionDefines += '// TEXTURE_LOD => texture2DLod etc are available\n#ifdef GL_EXT_shader_texture_lod\n#extension GL_EXT_shader_texture_lod : enable\n# define TEXTURE_LOD\n#define texture2DLod texture2DLodEXT\n#define texture2DProjLod texture2DProjLodEXT\n#define texture2DProjLod texture2DProjLodEXT\n#define textureCubeLod textureCubeLodEXT\n#define texture2DGrad texture2DGradEXT\n#define texture2DProjGrad texture2DProjGradEXT\n#define texture2DProjGrad texture2DProjGradEXT\n#define textureCubeGrad textureCubeGradEXT\n#endif\n';
  }
  return versionDefines;
}
//# sourceMappingURL=platform-defines.js.map
 
/***/ }),
/* 644 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
// Minimal texture (diffuse map) support
 
/* eslint-disable camelcase */
var DEFAULT_MODULE_OPTIONS = {
  diffuseTexture: null,
  diffuseColor: [0.5, 0.5, 0.5, 1]
};
 
function getUniforms() {
  var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : DEFAULT_MODULE_OPTIONS;
 
  var uniforms = {};
  if (opts.diffuseTexture !== undefined) {
    uniforms.diffuse_uHasTexture = Boolean(opts.diffuseTexture);
    uniforms.diffuse_uTexture = opts.diffuseTexture;
  }
  if (opts.diffuseColor !== undefined) {
    uniforms.diffuse_uColor = opts.diffuseColor;
  }
  return uniforms;
}
 
var vs = 'varying vec2 diffuse_vTexCoord;\n\n/* Set the UV coordinate from attributes */\nvoid diffuse_setTextureCoordinate(vec2 uv) {\n  diffuse_vTexCoord = uv;\n}\n';
 
var fs = 'uniform vec4 diffuse_uColor;\nuniform bool diffuse_uHasTexture;\nuniform sampler2D diffuse_uTexture;\n\nvarying vec2 diffuse_vTexCoord;\n\n// Gets diffuse color of material from uniform\n// If we have a standard (diffuse) texture, set color to texture\n// return (vec4) - rgba\n//\nvec4 diffuse_getColor() {\n  vec2 texCoord = diffuse_vTexCoord;\n  return diffuse_uHasTexture ?\n    texture2D(diffuse_uTexture, vec2(texCoord.s, texCoord.t)) :\n    diffuse_uColor;\n}\n\nvec4 diffuse_filterColor(vec4 color) {\n  return diffuse_getColor();\n}\n';
 
/* harmony default export */ __webpack_exports__["a"] = ({
  name: 'diffuse',
  getUniforms: getUniforms,
  vs: vs,
  fs: fs
});
//# sourceMappingURL=diffuse.js.map
 
/***/ }),
/* 645 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__project_project__ = __webpack_require__(260);
// Cheap lighting - single directional light, single dot product, one uniform
 
 
 
/* eslint-disable camelcase */
var DEFAULT_LIGHT_DIRECTION = new Float32Array([1, 1, 2]);
 
var DEFAULT_MODULE_OPTIONS = {
  lightDirection: DEFAULT_LIGHT_DIRECTION
};
 
function getUniforms() {
  var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : DEFAULT_MODULE_OPTIONS;
 
  var uniforms = {};
  if (opts.lightDirection) {
    uniforms.dirlight_uLightDirection = opts.lightDirection;
  }
  return uniforms;
}
 
// TODO - reuse normal from geometry module
var vs = null;
 
var fs = 'uniform vec3 dirlight_uLightDirection;\n\n/*\n * Returns color attenuated by angle from light source\n */\nvec4 dirlight_filterColor(vec4 color) {\n  vec3 normal = project_getNormal_World();\n  float d = abs(dot(normalize(normal), normalize(dirlight_uLightDirection)));\n  return vec4(color.rgb * d, color.a);\n}\n';
 
/* harmony default export */ __webpack_exports__["a"] = ({
  name: 'dirlight',
  vs: vs,
  fs: fs,
  getUniforms: getUniforms,
  dependencies: [__WEBPACK_IMPORTED_MODULE_0__project_project__["a" /* default */]]
});
//# sourceMappingURL=dirlight.js.map
 
/***/ }),
/* 646 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
var fp32shader = '#ifdef LUMA_FP32_TAN_PRECISION_WORKAROUND\n\n// All these functions are for substituting tan() function from Intel GPU only\nconst float TWO_PI = 6.2831854820251465;\nconst float PI_2 = 1.5707963705062866;\nconst float PI_16 = 0.1963495463132858;\n\nconst float SIN_TABLE_0 = 0.19509032368659973;\nconst float SIN_TABLE_1 = 0.3826834261417389;\nconst float SIN_TABLE_2 = 0.5555702447891235;\nconst float SIN_TABLE_3 = 0.7071067690849304;\n\nconst float COS_TABLE_0 = 0.9807852506637573;\nconst float COS_TABLE_1 = 0.9238795042037964;\nconst float COS_TABLE_2 = 0.8314695954322815;\nconst float COS_TABLE_3 = 0.7071067690849304;\n\nconst float INVERSE_FACTORIAL_3 = 1.666666716337204e-01; // 1/3!\nconst float INVERSE_FACTORIAL_5 = 8.333333767950535e-03; // 1/5!\nconst float INVERSE_FACTORIAL_7 = 1.9841270113829523e-04; // 1/7!\nconst float INVERSE_FACTORIAL_9 = 2.75573188446287533e-06; // 1/9!\n\nfloat sin_taylor_fp32(float a) {\n  float r, s, t, x;\n\n  if (a == 0.0) {\n    return 0.0;\n  }\n\n  x = -a * a;\n  s = a;\n  r = a;\n\n  r = r * x;\n  t = r * INVERSE_FACTORIAL_3;\n  s = s + t;\n\n  r = r * x;\n  t = r * INVERSE_FACTORIAL_5;\n  s = s + t;\n\n  r = r * x;\n  t = r * INVERSE_FACTORIAL_7;\n  s = s + t;\n\n  r = r * x;\n  t = r * INVERSE_FACTORIAL_9;\n  s = s + t;\n\n  return s;\n}\n\nvoid sincos_taylor_fp32(float a, out float sin_t, out float cos_t) {\n  if (a == 0.0) {\n    sin_t = 0.0;\n    cos_t = 1.0;\n  }\n  sin_t = sin_taylor_fp32(a);\n  cos_t = sqrt(1.0 - sin_t * sin_t);\n}\n\nfloat tan_taylor_fp32(float a) {\n    float sin_a;\n    float cos_a;\n\n    if (a == 0.0) {\n        return 0.0;\n    }\n\n    // 2pi range reduction\n    float z = floor(a / TWO_PI);\n    float r = a - TWO_PI * z;\n\n    float t;\n    float q = floor(r / PI_2 + 0.5);\n    int j = int(q);\n\n    if (j < -2 || j > 2) {\n        return 0.0 / 0.0;\n    }\n\n    t = r - PI_2 * q;\n\n    q = floor(t / PI_16 + 0.5);\n    int k = int(q);\n    int abs_k = int(abs(float(k)));\n\n    if (abs_k > 4) {\n        return 0.0 / 0.0;\n    } else {\n        t = t - PI_16 * q;\n    }\n\n    float u = 0.0;\n    float v = 0.0;\n\n    float sin_t, cos_t;\n    float s, c;\n    sincos_taylor_fp32(t, sin_t, cos_t);\n\n    if (k == 0) {\n        s = sin_t;\n        c = cos_t;\n    } else {\n        if (abs(float(abs_k) - 1.0) < 0.5) {\n            u = COS_TABLE_0;\n            v = SIN_TABLE_0;\n        } else if (abs(float(abs_k) - 2.0) < 0.5) {\n            u = COS_TABLE_1;\n            v = SIN_TABLE_1;\n        } else if (abs(float(abs_k) - 3.0) < 0.5) {\n            u = COS_TABLE_2;\n            v = SIN_TABLE_2;\n        } else if (abs(float(abs_k) - 4.0) < 0.5) {\n            u = COS_TABLE_3;\n            v = SIN_TABLE_3;\n        }\n        if (k > 0) {\n            s = u * sin_t + v * cos_t;\n            c = u * cos_t - v * sin_t;\n        } else {\n            s = u * sin_t - v * cos_t;\n            c = u * cos_t + v * sin_t;\n        }\n    }\n\n    if (j == 0) {\n        sin_a = s;\n        cos_a = c;\n    } else if (j == 1) {\n        sin_a = c;\n        cos_a = -s;\n    } else if (j == -1) {\n        sin_a = -c;\n        cos_a = s;\n    } else {\n        sin_a = -s;\n        cos_a = -c;\n    }\n    return sin_a / cos_a;\n}\n#endif\n\nfloat tan_fp32(float a) {\n#ifdef LUMA_FP32_TAN_PRECISION_WORKAROUND\n  return tan_taylor_fp32(a);\n#else\n  return tan(a);\n#endif\n}\n';
 
/* harmony default export */ __webpack_exports__["a"] = ({
    name: 'fp32',
    vs: fp32shader,
    fs: null
});
//# sourceMappingURL=fp32.js.map
 
/***/ }),
/* 647 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
// Copyright (c) 2015 - 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
 
/* harmony default export */ __webpack_exports__["a"] = ("uniform float ONE;\n\n/*\nAbout LUMA_FP64_CODE_ELIMINATION_WORKAROUND\n\nThe purpose of this workaround is to prevent shader compilers from\noptimizing away necessary arithmetic operations by swapping their sequences\nor transform the equation to some 'equivalent' from.\n\nThe method is to multiply an artifical variable, ONE, which will be known to\nthe compiler to be 1 only at runtime. The whole expression is then represented\nas a polynomial with respective to ONE. In the coefficients of all terms, only one a\nand one b should appear\n\nerr = (a + b) * ONE^6 - a * ONE^5 - (a + b) * ONE^4 + a * ONE^3 - b - (a + b) * ONE^2 + a * ONE\n*/\n\n// Divide float number to high and low floats to extend fraction bits\nvec2 split(float a) {\n  const float SPLIT = 4097.0;\n  float t = a * SPLIT;\n#if defined(LUMA_FP64_CODE_ELIMINATION_WORKAROUND)\n  float a_hi = t * ONE - (t - a);\n  float a_lo = a * ONE - a_hi;\n#else\n  float a_hi = t - (t - a);\n  float a_lo = a - a_hi;\n#endif\n  return vec2(a_hi, a_lo);\n}\n\n// Divide float number again when high float uses too many fraction bits\nvec2 split2(vec2 a) {\n  vec2 b = split(a.x);\n  b.y += a.y;\n  return b;\n}\n\n// Special sum operation when a > b\nvec2 quickTwoSum(float a, float b) {\n#if defined(LUMA_FP64_CODE_ELIMINATION_WORKAROUND)\n  float sum = (a + b) * ONE;\n  float err = b - (sum - a) * ONE;\n#else\n  float sum = a + b;\n  float err = b - (sum - a);\n#endif\n  return vec2(sum, err);\n}\n\n// General sum operation\nvec2 twoSum(float a, float b) {\n  float s = (a + b);\n#if defined(LUMA_FP64_CODE_ELIMINATION_WORKAROUND)\n  float v = (s * ONE - a) * ONE;\n  float err = (a - (s - v) * ONE) * ONE * ONE * ONE + (b - v);\n#else\n  float v = s - a;\n  float err = (a - (s - v)) + (b - v);\n#endif\n  return vec2(s, err);\n}\n\nvec2 twoSub(float a, float b) {\n  float s = (a - b);\n#if defined(LUMA_FP64_CODE_ELIMINATION_WORKAROUND)\n  float v = (s * ONE - a) * ONE;\n  float err = (a - (s - v) * ONE) * ONE * ONE * ONE - (b + v);\n#else\n  float v = s - a;\n  float err = (a - (s - v)) - (b + v);\n#endif\n  return vec2(s, err);\n}\n\nvec2 twoSqr(float a) {\n  float prod = a * a;\n  vec2 a_fp64 = split(a);\n#if defined(LUMA_FP64_CODE_ELIMINATION_WORKAROUND)\n  float err = ((a_fp64.x * a_fp64.x - prod) * ONE + 2.0 * a_fp64.x *\n    a_fp64.y * ONE * ONE) + a_fp64.y * a_fp64.y * ONE * ONE * ONE;\n#else\n  float err = ((a_fp64.x * a_fp64.x - prod) + 2.0 * a_fp64.x * a_fp64.y) + a_fp64.y * a_fp64.y;\n#endif\n  return vec2(prod, err);\n}\n\nvec2 twoProd(float a, float b) {\n  float prod = a * b;\n  vec2 a_fp64 = split(a);\n  vec2 b_fp64 = split(b);\n  float err = ((a_fp64.x * b_fp64.x - prod) + a_fp64.x * b_fp64.y +\n    a_fp64.y * b_fp64.x) + a_fp64.y * b_fp64.y;\n  return vec2(prod, err);\n}\n\nvec2 sum_fp64(vec2 a, vec2 b) {\n  vec2 s, t;\n  s = twoSum(a.x, b.x);\n  t = twoSum(a.y, b.y);\n  s.y += t.x;\n  s = quickTwoSum(s.x, s.y);\n  s.y += t.y;\n  s = quickTwoSum(s.x, s.y);\n  return s;\n}\n\nvec2 sub_fp64(vec2 a, vec2 b) {\n  vec2 s, t;\n  s = twoSub(a.x, b.x);\n  t = twoSub(a.y, b.y);\n  s.y += t.x;\n  s = quickTwoSum(s.x, s.y);\n  s.y += t.y;\n  s = quickTwoSum(s.x, s.y);\n  return s;\n}\n\nvec2 mul_fp64(vec2 a, vec2 b) {\n  vec2 prod = twoProd(a.x, b.x);\n  // y component is for the error\n  prod.y += a.x * b.y;\n#if defined(LUMA_FP64_HIGH_BITS_OVERFLOW_WORKAROUND)\n  prod = split2(prod);\n#endif\n  prod = quickTwoSum(prod.x, prod.y);\n  prod.y += a.y * b.x;\n#if defined(LUMA_FP64_HIGH_BITS_OVERFLOW_WORKAROUND)\n  prod = split2(prod);\n#endif\n  prod = quickTwoSum(prod.x, prod.y);\n  return prod;\n}\n\nvec2 div_fp64(vec2 a, vec2 b) {\n  float xn = 1.0 / b.x;\n#if defined(LUMA_FP64_HIGH_BITS_OVERFLOW_WORKAROUND)\n  vec2 yn = mul_fp64(a, vec2(xn, 0));\n#else\n  vec2 yn = a * xn;\n#endif\n  float diff = (sub_fp64(a, mul_fp64(b, yn))).x;\n  vec2 prod = twoProd(xn, diff);\n  return sum_fp64(yn, prod);\n}\n\nvec2 sqrt_fp64(vec2 a) {\n  if (a.x == 0.0 && a.y == 0.0) return vec2(0.0, 0.0);\n  if (a.x < 0.0) return vec2(0.0 / 0.0, 0.0 / 0.0);\n\n  float x = 1.0 / sqrt(a.x);\n  float yn = a.x * x;\n#if defined(LUMA_FP64_CODE_ELIMINATION_WORKAROUND)\n  vec2 yn_sqr = twoSqr(yn) * ONE;\n#else\n  vec2 yn_sqr = twoSqr(yn);\n#endif\n  float diff = sub_fp64(a, yn_sqr).x;\n  vec2 prod = twoProd(x * 0.5, diff);\n#if defined(LUMA_FP64_HIGH_BITS_OVERFLOW_WORKAROUND)\n  return sum_fp64(split(yn), prod);\n#else\n  return sum_fp64(vec2(yn, 0.0), prod);\n#endif\n}\n");
//# sourceMappingURL=fp64-arithmetic.glsl.js.map
 
/***/ }),
/* 648 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
// Copyright (c) 2015 - 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
 
/* harmony default export */ __webpack_exports__["a"] = ("const vec2 E_FP64 = vec2(2.7182817459106445e+00, 8.254840366817007e-08);\nconst vec2 LOG2_FP64 = vec2(0.6931471824645996e+00, -1.9046542121259336e-09);\nconst vec2 PI_FP64 = vec2(3.1415927410125732, -8.742278012618954e-8);\nconst vec2 TWO_PI_FP64 = vec2(6.2831854820251465, -1.7484556025237907e-7);\nconst vec2 PI_2_FP64 = vec2(1.5707963705062866, -4.371139006309477e-8);\nconst vec2 PI_4_FP64 = vec2(0.7853981852531433, -2.1855695031547384e-8);\nconst vec2 PI_16_FP64 = vec2(0.19634954631328583, -5.463923757886846e-9);\nconst vec2 PI_16_2_FP64 = vec2(0.39269909262657166, -1.0927847515773692e-8);\nconst vec2 PI_16_3_FP64 = vec2(0.5890486240386963, -1.4906100798128818e-9);\nconst vec2 PI_180_FP64 = vec2(0.01745329238474369, 1.3519960498364902e-10);\n\nconst vec2 SIN_TABLE_0_FP64 = vec2(0.19509032368659973, -1.6704714833615242e-9);\nconst vec2 SIN_TABLE_1_FP64 = vec2(0.3826834261417389, 6.22335089017767e-9);\nconst vec2 SIN_TABLE_2_FP64 = vec2(0.5555702447891235, -1.1769521357507529e-8);\nconst vec2 SIN_TABLE_3_FP64 = vec2(0.7071067690849304, 1.2101617041793133e-8);\n\nconst vec2 COS_TABLE_0_FP64 = vec2(0.9807852506637573, 2.9739473106360492e-8);\nconst vec2 COS_TABLE_1_FP64 = vec2(0.9238795042037964, 2.8307490351764386e-8);\nconst vec2 COS_TABLE_2_FP64 = vec2(0.8314695954322815, 1.6870263741530778e-8);\nconst vec2 COS_TABLE_3_FP64 = vec2(0.7071067690849304, 1.2101617152815436e-8);\n\nconst vec2 INVERSE_FACTORIAL_3_FP64 = vec2(1.666666716337204e-01, -4.967053879312289e-09); // 1/3!\nconst vec2 INVERSE_FACTORIAL_4_FP64 = vec2(4.16666679084301e-02, -1.2417634698280722e-09); // 1/4!\nconst vec2 INVERSE_FACTORIAL_5_FP64 = vec2(8.333333767950535e-03, -4.34617203337595e-10); // 1/5!\nconst vec2 INVERSE_FACTORIAL_6_FP64 = vec2(1.3888889225199819e-03, -3.3631094437103215e-11); // 1/6!\nconst vec2 INVERSE_FACTORIAL_7_FP64 = vec2(1.9841270113829523e-04,  -2.725596874933456e-12); // 1/7!\nconst vec2 INVERSE_FACTORIAL_8_FP64 = vec2(2.4801587642286904e-05, -3.406996025904184e-13); // 1/8!\nconst vec2 INVERSE_FACTORIAL_9_FP64 = vec2(2.75573188446287533e-06, 3.7935713937038186e-14); // 1/9!\nconst vec2 INVERSE_FACTORIAL_10_FP64 = vec2(2.755731998149713e-07, -7.575112367869873e-15); // 1/10!\n\nfloat nint(float d) {\n    if (d == floor(d)) return d;\n    return floor(d + 0.5);\n}\n\nvec2 nint_fp64(vec2 a) {\n    float hi = nint(a.x);\n    float lo;\n    vec2 tmp;\n    if (hi == a.x) {\n        lo = nint(a.y);\n        tmp = quickTwoSum(hi, lo);\n    } else {\n        lo = 0.0;\n        if (abs(hi - a.x) == 0.5 && a.y < 0.0) {\n            hi -= 1.0;\n        }\n        tmp = vec2(hi, lo);\n    }\n    return tmp;\n}\n\n/* k_power controls how much range reduction we would like to have\nRange reduction uses the following method:\nassume a = k_power * r + m * log(2), k and m being integers.\nSet k_power = 4 (we can choose other k to trade accuracy with performance.\nwe only need to calculate exp(r) and using exp(a) = 2^m * exp(r)^k_power;\n*/\n\nvec2 exp_fp64(vec2 a) {\n  // We need to make sure these two numbers match\n  // as bit-wise shift is not available in GLSL 1.0\n  const int k_power = 4;\n  const float k = 16.0;\n\n  const float inv_k = 1.0 / k;\n\n  if (a.x <= -88.0) return vec2(0.0, 0.0);\n  if (a.x >= 88.0) return vec2(1.0 / 0.0, 1.0 / 0.0);\n  if (a.x == 0.0 && a.y == 0.0) return vec2(1.0, 0.0);\n  if (a.x == 1.0 && a.y == 0.0) return E_FP64;\n\n  float m = floor(a.x / LOG2_FP64.x + 0.5);\n  vec2 r = sub_fp64(a, mul_fp64(LOG2_FP64, vec2(m, 0.0))) * inv_k;\n  vec2 s, t, p;\n\n  p = mul_fp64(r, r);\n  s = sum_fp64(r, p * 0.5);\n  p = mul_fp64(p, r);\n  t = mul_fp64(p, INVERSE_FACTORIAL_3_FP64);\n\n  s = sum_fp64(s, t);\n  p = mul_fp64(p, r);\n  t = mul_fp64(p, INVERSE_FACTORIAL_4_FP64);\n\n  s = sum_fp64(s, t);\n  p = mul_fp64(p, r);\n  t = mul_fp64(p, INVERSE_FACTORIAL_5_FP64);\n\n  // s = sum_fp64(s, t);\n  // p = mul_fp64(p, r);\n  // t = mul_fp64(p, INVERSE_FACTORIAL_6_FP64);\n\n  // s = sum_fp64(s, t);\n  // p = mul_fp64(p, r);\n  // t = mul_fp64(p, INVERSE_FACTORIAL_7_FP64);\n\n  s = sum_fp64(s, t);\n\n\n  // At this point, s = exp(r) - 1; but after following 4 recursions, we will get exp(r) ^ 512 - 1.\n  for (int i = 0; i < k_power; i++) {\n    s = sum_fp64(s * 2.0, mul_fp64(s, s));\n  }\n\n#if defined(NVIDIA_FP64_WORKAROUND) || defined(INTEL_FP64_WORKAROUND)\n  s = sum_fp64(s, vec2(ONE, 0.0));\n#else\n  s = sum_fp64(s, vec2(1.0, 0.0));\n#endif\n\n  return s * pow(2.0, m);\n//   return r;\n}\n\nvec2 log_fp64(vec2 a)\n{\n  if (a.x == 1.0 && a.y == 0.0) return vec2(0.0, 0.0);\n  if (a.x <= 0.0) return vec2(0.0 / 0.0, 0.0 / 0.0);\n  vec2 x = vec2(log(a.x), 0.0);\n  vec2 s;\n#if defined(NVIDIA_FP64_WORKAROUND) || defined(INTEL_FP64_WORKAROUND)\n  s = vec2(ONE, 0.0);\n#else\n  s = vec2(1.0, 0.0);\n#endif\n\n  x = sub_fp64(sum_fp64(x, mul_fp64(a, exp_fp64(-x))), s);\n  return x;\n}\n\nvec2 sin_taylor_fp64(vec2 a) {\n  vec2 r, s, t, x;\n\n  if (a.x == 0.0 && a.y == 0.0) {\n    return vec2(0.0, 0.0);\n  }\n\n  x = -mul_fp64(a, a);\n  s = a;\n  r = a;\n\n  r = mul_fp64(r, x);\n  t = mul_fp64(r, INVERSE_FACTORIAL_3_FP64);\n  s = sum_fp64(s, t);\n\n  r = mul_fp64(r, x);\n  t = mul_fp64(r, INVERSE_FACTORIAL_5_FP64);\n  s = sum_fp64(s, t);\n\n  /* keep the following commented code in case we need them\n  for extra accuracy from the Taylor expansion*/\n\n  // r = mul_fp64(r, x);\n  // t = mul_fp64(r, INVERSE_FACTORIAL_7_FP64);\n  // s = sum_fp64(s, t);\n\n  // r = mul_fp64(r, x);\n  // t = mul_fp64(r, INVERSE_FACTORIAL_9_FP64);\n  // s = sum_fp64(s, t);\n\n  return s;\n}\n\nvec2 cos_taylor_fp64(vec2 a) {\n  vec2 r, s, t, x;\n\n  if (a.x == 0.0 && a.y == 0.0) {\n    return vec2(1.0, 0.0);\n  }\n\n  x = -mul_fp64(a, a);\n  r = x;\n  s = sum_fp64(vec2(1.0, 0.0), r * 0.5);\n\n  r = mul_fp64(r, x);\n  t = mul_fp64(r, INVERSE_FACTORIAL_4_FP64);\n  s = sum_fp64(s, t);\n\n  r = mul_fp64(r, x);\n  t = mul_fp64(r, INVERSE_FACTORIAL_6_FP64);\n  s = sum_fp64(s, t);\n\n  /* keep the following commented code in case we need them\n  for extra accuracy from the Taylor expansion*/\n\n  // r = mul_fp64(r, x);\n  // t = mul_fp64(r, INVERSE_FACTORIAL_8_FP64);\n  // s = sum_fp64(s, t);\n\n  // r = mul_fp64(r, x);\n  // t = mul_fp64(r, INVERSE_FACTORIAL_10_FP64);\n  // s = sum_fp64(s, t);\n\n  return s;\n}\n\nvoid sincos_taylor_fp64(vec2 a, out vec2 sin_t, out vec2 cos_t) {\n  if (a.x == 0.0 && a.y == 0.0) {\n    sin_t = vec2(0.0, 0.0);\n    cos_t = vec2(1.0, 0.0);\n  }\n\n  sin_t = sin_taylor_fp64(a);\n  cos_t = sqrt_fp64(sub_fp64(vec2(1.0, 0.0), mul_fp64(sin_t, sin_t)));\n}\n\nvec2 sin_fp64(vec2 a) {\n    if (a.x == 0.0 && a.y == 0.0) {\n        return vec2(0.0, 0.0);\n    }\n\n    // 2pi range reduction\n    vec2 z = nint_fp64(div_fp64(a, TWO_PI_FP64));\n    vec2 r = sub_fp64(a, mul_fp64(TWO_PI_FP64, z));\n\n    vec2 t;\n    float q = floor(r.x / PI_2_FP64.x + 0.5);\n    int j = int(q);\n\n    if (j < -2 || j > 2) {\n        return vec2(0.0 / 0.0, 0.0 / 0.0);\n    }\n\n    t = sub_fp64(r, mul_fp64(PI_2_FP64, vec2(q, 0.0)));\n\n    q = floor(t.x / PI_16_FP64.x + 0.5);\n    int k = int(q);\n\n    if (k == 0) {\n        if (j == 0) {\n            return sin_taylor_fp64(t);\n        } else if (j == 1) {\n            return cos_taylor_fp64(t);\n        } else if (j == -1) {\n            return -cos_taylor_fp64(t);\n        } else {\n            return -sin_taylor_fp64(t);\n        }\n    }\n\n    int abs_k = int(abs(float(k)));\n\n    if (abs_k > 4) {\n        return vec2(0.0 / 0.0, 0.0 / 0.0);\n    } else {\n        t = sub_fp64(t, mul_fp64(PI_16_FP64, vec2(q, 0.0)));\n    }\n\n    vec2 u = vec2(0.0, 0.0);\n    vec2 v = vec2(0.0, 0.0);\n\n#if defined(NVIDIA_FP64_WORKAROUND) || defined(INTEL_FP64_WORKAROUND)\n    if (abs(float(abs_k) - 1.0) < 0.5) {\n        u = COS_TABLE_0_FP64;\n        v = SIN_TABLE_0_FP64;\n    } else if (abs(float(abs_k) - 2.0) < 0.5) {\n        u = COS_TABLE_1_FP64;\n        v = SIN_TABLE_1_FP64;\n    } else if (abs(float(abs_k) - 3.0) < 0.5) {\n        u = COS_TABLE_2_FP64;\n        v = SIN_TABLE_2_FP64;\n    } else if (abs(float(abs_k) - 4.0) < 0.5) {\n        u = COS_TABLE_3_FP64;\n        v = SIN_TABLE_3_FP64;\n    }\n#else\n    if (abs_k == 1) {\n        u = COS_TABLE_0_FP64;\n        v = SIN_TABLE_0_FP64;\n    } else if (abs_k == 2) {\n        u = COS_TABLE_1_FP64;\n        v = SIN_TABLE_1_FP64;\n    } else if (abs_k == 3) {\n        u = COS_TABLE_2_FP64;\n        v = SIN_TABLE_2_FP64;\n    } else if (abs_k == 4) {\n        u = COS_TABLE_3_FP64;\n        v = SIN_TABLE_3_FP64;\n    }\n#endif\n\n    vec2 sin_t, cos_t;\n    sincos_taylor_fp64(t, sin_t, cos_t);\n\n\n\n    vec2 result = vec2(0.0, 0.0);\n    if (j == 0) {\n        if (k > 0) {\n            result = sum_fp64(mul_fp64(u, sin_t), mul_fp64(v, cos_t));\n        } else {\n            result = sub_fp64(mul_fp64(u, sin_t), mul_fp64(v, cos_t));\n        }\n    } else if (j == 1) {\n        if (k > 0) {\n            result = sub_fp64(mul_fp64(u, cos_t), mul_fp64(v, sin_t));\n        } else {\n            result = sum_fp64(mul_fp64(u, cos_t), mul_fp64(v, sin_t));\n        }\n    } else if (j == -1) {\n        if (k > 0) {\n            result = sub_fp64(mul_fp64(v, sin_t), mul_fp64(u, cos_t));\n        } else {\n            result = -sum_fp64(mul_fp64(v, sin_t), mul_fp64(u, cos_t));\n        }\n    } else {\n        if (k > 0) {\n            result = -sum_fp64(mul_fp64(u, sin_t), mul_fp64(v, cos_t));\n        } else {\n            result = sub_fp64(mul_fp64(v, cos_t), mul_fp64(u, sin_t));\n        }\n    }\n\n    return result;\n}\n\nvec2 cos_fp64(vec2 a) {\n    if (a.x == 0.0 && a.y == 0.0) {\n        return vec2(1.0, 0.0);\n    }\n\n    // 2pi range reduction\n    vec2 z = nint_fp64(div_fp64(a, TWO_PI_FP64));\n    vec2 r = sub_fp64(a, mul_fp64(TWO_PI_FP64, z));\n\n    vec2 t;\n    float q = floor(r.x / PI_2_FP64.x + 0.5);\n    int j = int(q);\n\n    if (j < -2 || j > 2) {\n        return vec2(0.0 / 0.0, 0.0 / 0.0);\n    }\n\n    t = sub_fp64(r, mul_fp64(PI_2_FP64, vec2(q, 0.0)));\n\n    q = floor(t.x / PI_16_FP64.x + 0.5);\n    int k = int(q);\n\n    if (k == 0) {\n        if (j == 0) {\n            return cos_taylor_fp64(t);\n        } else if (j == 1) {\n            return -sin_taylor_fp64(t);\n        } else if (j == -1) {\n            return sin_taylor_fp64(t);\n        } else {\n            return -cos_taylor_fp64(t);\n        }\n    }\n\n    int abs_k = int(abs(float(k)));\n\n    if (abs_k > 4) {\n        return vec2(0.0 / 0.0, 0.0 / 0.0);\n    } else {\n        t = sub_fp64(t, mul_fp64(PI_16_FP64, vec2(q, 0.0)));\n    }\n\n    vec2 u = vec2(0.0, 0.0);\n    vec2 v = vec2(0.0, 0.0);\n\n#if defined(NVIDIA_FP64_WORKAROUND) || defined(INTEL_FP64_WORKAROUND)\n    if (abs(float(abs_k) - 1.0) < 0.5) {\n        u = COS_TABLE_0_FP64;\n        v = SIN_TABLE_0_FP64;\n    } else if (abs(float(abs_k) - 2.0) < 0.5) {\n        u = COS_TABLE_1_FP64;\n        v = SIN_TABLE_1_FP64;\n    } else if (abs(float(abs_k) - 3.0) < 0.5) {\n        u = COS_TABLE_2_FP64;\n        v = SIN_TABLE_2_FP64;\n    } else if (abs(float(abs_k) - 4.0) < 0.5) {\n        u = COS_TABLE_3_FP64;\n        v = SIN_TABLE_3_FP64;\n    }\n#else\n    if (abs_k == 1) {\n        u = COS_TABLE_0_FP64;\n        v = SIN_TABLE_0_FP64;\n    } else if (abs_k == 2) {\n        u = COS_TABLE_1_FP64;\n        v = SIN_TABLE_1_FP64;\n    } else if (abs_k == 3) {\n        u = COS_TABLE_2_FP64;\n        v = SIN_TABLE_2_FP64;\n    } else if (abs_k == 4) {\n        u = COS_TABLE_3_FP64;\n        v = SIN_TABLE_3_FP64;\n    }\n#endif\n\n    vec2 sin_t, cos_t;\n    sincos_taylor_fp64(t, sin_t, cos_t);\n\n    vec2 result = vec2(0.0, 0.0);\n    if (j == 0) {\n        if (k > 0) {\n            result = sub_fp64(mul_fp64(u, cos_t), mul_fp64(v, sin_t));\n        } else {\n            result = sum_fp64(mul_fp64(u, cos_t), mul_fp64(v, sin_t));\n        }\n    } else if (j == 1) {\n        if (k > 0) {\n            result = -sum_fp64(mul_fp64(u, sin_t), mul_fp64(v, cos_t));\n        } else {\n            result = sub_fp64(mul_fp64(v, cos_t), mul_fp64(u, sin_t));\n        }\n    } else if (j == -1) {\n        if (k > 0) {\n            result = sum_fp64(mul_fp64(u, sin_t), mul_fp64(v, cos_t));\n        } else {\n            result = sub_fp64(mul_fp64(u, sin_t), mul_fp64(v, cos_t));\n        }\n    } else {\n        if (k > 0) {\n            result = sub_fp64(mul_fp64(v, sin_t), mul_fp64(u, cos_t));\n        } else {\n            result = -sum_fp64(mul_fp64(u, cos_t), mul_fp64(v, sin_t));\n        }\n    }\n\n    return result;\n}\n\nvec2 tan_fp64(vec2 a) {\n    vec2 sin_a;\n    vec2 cos_a;\n\n    if (a.x == 0.0 && a.y == 0.0) {\n        return vec2(0.0, 0.0);\n    }\n\n    // 2pi range reduction\n    vec2 z = nint_fp64(div_fp64(a, TWO_PI_FP64));\n    vec2 r = sub_fp64(a, mul_fp64(TWO_PI_FP64, z));\n\n    vec2 t;\n    float q = floor(r.x / PI_2_FP64.x + 0.5);\n    int j = int(q);\n\n\n    if (j < -2 || j > 2) {\n        return vec2(0.0 / 0.0, 0.0 / 0.0);\n    }\n\n    t = sub_fp64(r, mul_fp64(PI_2_FP64, vec2(q, 0.0)));\n\n    q = floor(t.x / PI_16_FP64.x + 0.5);\n    int k = int(q);\n    int abs_k = int(abs(float(k)));\n\n    // We just can't get PI/16 * 3.0 very accurately.\n    // so let's just store it\n    if (abs_k > 4) {\n        return vec2(0.0 / 0.0, 0.0 / 0.0);\n    } else {\n        t = sub_fp64(t, mul_fp64(PI_16_FP64, vec2(q, 0.0)));\n    }\n\n\n    vec2 u = vec2(0.0, 0.0);\n    vec2 v = vec2(0.0, 0.0);\n\n    vec2 sin_t, cos_t;\n    vec2 s, c;\n    sincos_taylor_fp64(t, sin_t, cos_t);\n\n    if (k == 0) {\n        s = sin_t;\n        c = cos_t;\n    } else {\n#if defined(NVIDIA_FP64_WORKAROUND) || defined(INTEL_FP64_WORKAROUND)\n        if (abs(float(abs_k) - 1.0) < 0.5) {\n            u = COS_TABLE_0_FP64;\n            v = SIN_TABLE_0_FP64;\n        } else if (abs(float(abs_k) - 2.0) < 0.5) {\n            u = COS_TABLE_1_FP64;\n            v = SIN_TABLE_1_FP64;\n        } else if (abs(float(abs_k) - 3.0) < 0.5) {\n            u = COS_TABLE_2_FP64;\n            v = SIN_TABLE_2_FP64;\n        } else if (abs(float(abs_k) - 4.0) < 0.5) {\n            u = COS_TABLE_3_FP64;\n            v = SIN_TABLE_3_FP64;\n        }\n#else\n        if (abs_k == 1) {\n            u = COS_TABLE_0_FP64;\n            v = SIN_TABLE_0_FP64;\n        } else if (abs_k == 2) {\n            u = COS_TABLE_1_FP64;\n            v = SIN_TABLE_1_FP64;\n        } else if (abs_k == 3) {\n            u = COS_TABLE_2_FP64;\n            v = SIN_TABLE_2_FP64;\n        } else if (abs_k == 4) {\n            u = COS_TABLE_3_FP64;\n            v = SIN_TABLE_3_FP64;\n        }\n#endif\n        if (k > 0) {\n            s = sum_fp64(mul_fp64(u, sin_t), mul_fp64(v, cos_t));\n            c = sub_fp64(mul_fp64(u, cos_t), mul_fp64(v, sin_t));\n        } else {\n            s = sub_fp64(mul_fp64(u, sin_t), mul_fp64(v, cos_t));\n            c = sum_fp64(mul_fp64(u, cos_t), mul_fp64(v, sin_t));\n        }\n    }\n\n    if (j == 0) {\n        sin_a = s;\n        cos_a = c;\n    } else if (j == 1) {\n        sin_a = c;\n        cos_a = -s;\n    } else if (j == -1) {\n        sin_a = -c;\n        cos_a = s;\n    } else {\n        sin_a = -s;\n        cos_a = -c;\n    }\n    return div_fp64(sin_a, cos_a);\n}\n\nvec2 radians_fp64(vec2 degree) {\n  return mul_fp64(degree, PI_180_FP64);\n}\n\nvec2 mix_fp64(vec2 a, vec2 b, float x) {\n  vec2 range = sub_fp64(b, a);\n  return sum_fp64(a, mul_fp64(range, vec2(x, 0.0)));\n}\n\n// Vector functions\n// vec2 functions\nvoid vec2_sum_fp64(vec2 a[2], vec2 b[2], out vec2 out_val[2]) {\n    out_val[0] = sum_fp64(a[0], b[0]);\n    out_val[1] = sum_fp64(a[1], b[1]);\n}\n\nvoid vec2_sub_fp64(vec2 a[2], vec2 b[2], out vec2 out_val[2]) {\n    out_val[0] = sub_fp64(a[0], b[0]);\n    out_val[1] = sub_fp64(a[1], b[1]);\n}\n\nvoid vec2_mul_fp64(vec2 a[2], vec2 b[2], out vec2 out_val[2]) {\n    out_val[0] = mul_fp64(a[0], b[0]);\n    out_val[1] = mul_fp64(a[1], b[1]);\n}\n\nvoid vec2_div_fp64(vec2 a[2], vec2 b[2], out vec2 out_val[2]) {\n    out_val[0] = div_fp64(a[0], b[0]);\n    out_val[1] = div_fp64(a[1], b[1]);\n}\n\nvoid vec2_mix_fp64(vec2 x[2], vec2 y[2], float a, out vec2 out_val[2]) {\n  vec2 range[2];\n  vec2_sub_fp64(y, x, range);\n  vec2 portion[2];\n  portion[0] = range[0] * a;\n  portion[1] = range[1] * a;\n  vec2_sum_fp64(x, portion, out_val);\n}\n\nvec2 vec2_length_fp64(vec2 x[2]) {\n  return sqrt_fp64(sum_fp64(mul_fp64(x[0], x[0]), mul_fp64(x[1], x[1])));\n}\n\nvoid vec2_normalize_fp64(vec2 x[2], out vec2 out_val[2]) {\n  vec2 length = vec2_length_fp64(x);\n  vec2 length_vec2[2];\n  length_vec2[0] = length;\n  length_vec2[1] = length;\n\n  vec2_div_fp64(x, length_vec2, out_val);\n}\n\nvec2 vec2_distance_fp64(vec2 x[2], vec2 y[2]) {\n  vec2 diff[2];\n  vec2_sub_fp64(x, y, diff);\n  return vec2_length_fp64(diff);\n}\n\nvec2 vec2_dot_fp64(vec2 a[2], vec2 b[2]) {\n  vec2 v[2];\n\n  v[0] = mul_fp64(a[0], b[0]);\n  v[1] = mul_fp64(a[1], b[1]);\n\n  return sum_fp64(v[0], v[1]);\n}\n\n// vec3 functions\nvoid vec3_sub_fp64(vec2 a[3], vec2 b[3], out vec2 out_val[3]) {\n  for (int i = 0; i < 3; i++) {\n    out_val[i] = sum_fp64(a[i], b[i]);\n  }\n}\n\nvoid vec3_sum_fp64(vec2 a[3], vec2 b[3], out vec2 out_val[3]) {\n  for (int i = 0; i < 3; i++) {\n    out_val[i] = sum_fp64(a[i], b[i]);\n  }\n}\n\nvec2 vec3_length_fp64(vec2 x[3]) {\n  return sqrt_fp64(sum_fp64(sum_fp64(mul_fp64(x[0], x[0]), mul_fp64(x[1], x[1])),\n    mul_fp64(x[2], x[2])));\n}\n\nvec2 vec3_distance_fp64(vec2 x[3], vec2 y[3]) {\n  vec2 diff[3];\n  vec3_sub_fp64(x, y, diff);\n  return vec3_length_fp64(diff);\n}\n\n// vec4 functions\nvoid vec4_fp64(vec4 a, out vec2 out_val[4]) {\n  out_val[0].x = a[0];\n  out_val[0].y = 0.0;\n\n  out_val[1].x = a[1];\n  out_val[1].y = 0.0;\n\n  out_val[2].x = a[2];\n  out_val[2].y = 0.0;\n\n  out_val[3].x = a[3];\n  out_val[3].y = 0.0;\n}\n\nvoid vec4_scalar_mul_fp64(vec2 a[4], vec2 b, out vec2 out_val[4]) {\n  out_val[0] = mul_fp64(a[0], b);\n  out_val[1] = mul_fp64(a[1], b);\n  out_val[2] = mul_fp64(a[2], b);\n  out_val[3] = mul_fp64(a[3], b);\n}\n\nvoid vec4_sum_fp64(vec2 a[4], vec2 b[4], out vec2 out_val[4]) {\n  for (int i = 0; i < 4; i++) {\n    out_val[i] = sum_fp64(a[i], b[i]);\n  }\n}\n\nvoid vec4_dot_fp64(vec2 a[4], vec2 b[4], out vec2 out_val) {\n  vec2 v[4];\n\n  v[0] = mul_fp64(a[0], b[0]);\n  v[1] = mul_fp64(a[1], b[1]);\n  v[2] = mul_fp64(a[2], b[2]);\n  v[3] = mul_fp64(a[3], b[3]);\n\n  out_val = sum_fp64(sum_fp64(v[0], v[1]), sum_fp64(v[2], v[3]));\n}\n\nvoid mat4_vec4_mul_fp64(vec2 b[16], vec2 a[4], out vec2 out_val[4]) {\n  vec2 tmp[4];\n\n  for (int i = 0; i < 4; i++)\n  {\n    for (int j = 0; j < 4; j++)\n    {\n      tmp[j] = b[j + i * 4];\n    }\n    vec4_dot_fp64(a, tmp, out_val[i]);\n  }\n}\n");
//# sourceMappingURL=fp64-functions.glsl.js.map
 
/***/ }),
/* 649 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* unused harmony export fp64ify */
function fp64ify(a) {
  var hiPart = Math.fround(a);
  var loPart = a - hiPart;
  return [hiPart, loPart];
}
//# sourceMappingURL=fp64-utils.js.map
 
/***/ }),
/* 650 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* unused harmony export fp64arithmetic */
/* unused harmony export fp64fs */
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__fp64_utils__ = __webpack_require__(649);
/* unused harmony reexport fp64ify */
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__fp64_arithmetic_glsl__ = __webpack_require__(647);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__fp64_functions_glsl__ = __webpack_require__(648);
// Copyright (c) 2015 - 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
 
 
 
 
 
 
var fp64shader = __WEBPACK_IMPORTED_MODULE_1__fp64_arithmetic_glsl__["a" /* default */] + '\n' + __WEBPACK_IMPORTED_MODULE_2__fp64_functions_glsl__["a" /* default */];
 
/* harmony default export */ __webpack_exports__["a"] = ({
  name: 'fp64',
  vs: fp64shader,
  fs: null
});
 
// Arithmetic only
var fp64arithmetic = {
  name: 'fp64-arithmetic',
  vs: '' + __WEBPACK_IMPORTED_MODULE_1__fp64_arithmetic_glsl__["a" /* default */],
  fs: null
};
 
// Fragment shader fp64
var fp64fs = {
  name: 'fp64-fs',
  vs: null,
  fs: fp64shader
};
//# sourceMappingURL=fp64.js.map
 
/***/ }),
/* 651 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony default export */ __webpack_exports__["a"] = ("  // empty\n");
//# sourceMappingURL=lighting-common.glsl.js.map
 
/***/ }),
/* 652 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony default export */ __webpack_exports__["a"] = ("#ifdef GL_ES\nprecision highp float;\n#endif\n\n#define LIGHT_MAX 4\n\nvarying vec3 lighting_vLightWeighting;\n\nvec4 lighting_apply(vec4 color) {\n  // set color from texture\n  return vec4(color.rgb * lighting_vLightWeighting, color.a);\n}\n\n// spec-map.fs\n\nuniform mat4 viewMatrix;\n\n\nvarying vec4 lighting_vColor;\nvarying vec4 lighting_vTransformedNormal;\nvarying vec4 lighting_vPosition;\n\nuniform float shininess;\nuniform bool enableSpecularMap;\nuniform bool enableLights;\n\nuniform vec3 ambientColor;\nuniform vec3 directionalColor;\nuniform vec3 lightingDirection;\n\nuniform vec3 lighting_uPointLocation[LIGHT_MAX];\nuniform vec3 lighting_uPointColor[LIGHT_MAX];\nuniform float lighting_uPointSpecularEnable[LIGHT_MAX];\nuniform vec3 lighting_uPointSpecularColor[LIGHT_MAX];\nuniform int numberPoints;\n\n\nvec3 lighting__calculate_light_weighting() {\n\treturn lighting__calculate_light_weighting(shininess);\n}\n\nvec3 lighting__calculate_light_weighting(shininess) {\n  vec3 normal = vTransformedNormal.xyz;\n  vec3 eyeDirection = normalize(-vPosition.xyz);\n\n  vec3 specularLight = vec3(0., 0., 0.);\n  vec3 diffuseLight = vec3(0., 0., 0.);\n\n  for (int i = 0; i < LIGHT_MAX; i++) {\n    if (i < numberPoints) {\n      vec3 transformedPointLocation = (viewMatrix * vec4(lighting_uPointLocation[i], 1.0)).xyz;\n      vec3 lightDirection = normalize(transformedPointLocation - vPosition.xyz);\n\n      if (lighting_uPointSpecularEnable > 0.) {\n        vec3 reflectionDirection = reflect(-lightDirection, normal);\n        float specularLightWeighting =\n          pow(max(dot(reflectionDirection, eyeDirection), 0.0), shininessVal);\n        specularLight += specularLightWeighting * lighting_uPointSpecularColor[i];\n      }\n\n      float diffuseLightWeighting = max(dot(normal, lightDirection), 0.0);\n      diffuseLight += diffuseLightWeighting * lighting_uPointColor[i];\n    } else {\n      break;\n    }\n  }\n\n  return ambientColor + diffuseLight + specularLight;\n}\n\nvoid lighting_filterColor(fragmentColor) {\n  if (!lighting_enable) {\n  \treturn fragmentColor;\n  } else {\n  \tvec3 lightWeighting = lighting__calculate_light_weighting();\n  \treturn vec4(fragmentColor.rgb * lightWeighting, fragmentColor.a);\n  }\n}\n\n// render-tex.fs\n\nuniform vec3 material_uAmbientColor;\nuniform vec3 material_uDiffuseColor;\nuniform vec3 material_uSpecularColor;\nuniform vec3 material_uEmissiveColor;\n\nuniform bool hasTexture1;\nuniform sampler2D sampler1;\n\nuniform mat4 viewMatrix;\n\nvoid apply_lighting(color) {\n  vec3 ambientLightWeighting = ambientColor;\n\n  vec3 normal = vTransformedNormal.xyz;\n  vec3 eyeDirection = normalize(-vPosition.xyz);\n\n  vec3 specularLight = vec3(0.0, 0.0, 0.0);\n  vec3 diffuseLight = vec3(0.0, 0.0, 0.0);\n\n  for (int i = 0; i < LIGHT_MAX; i++) {\n    if (i < numberPoints) {\n      vec3 transformedPointLocation = (viewMatrix * vec4(pointLocation[i], 1.0)).xyz;\n      vec3 lightDirection = normalize(transformedPointLocation - vPosition.xyz);\n\n      if (enableSpecularHighlights) {\n        vec3 reflectionDirection = reflect(-lightDirection, normal);\n        float specularLightWeighting =\n          pow(max(dot(reflectionDirection, eyeDirection), 0.0), shininess);\n        specularLight += specularLightWeighting * pointSpecularColor[i];\n      }\n\n      float diffuseLightWeighting = max(dot(normal, lightDirection), 0.0);\n      diffuseLight += diffuseLightWeighting * pointColor[i];\n    } else {\n        break;\n    }\n  }\n\n  vec3 matAmbientColor = material_uAmbientColor * color.rgb;\n  vec3 matDiffuseColor = material_uDiffuseColor * color.rgb;\n  vec3 matSpecularColor = material_uSpecularColor * color.rgb;\n  vec3 matEmissiveColor = material_uEmissiveColor * color.rgb;\n  gl_FragColor = vec4(\n    matAmbientColor * ambientLightWeighting\n    + matDiffuseColor * diffuseLightWeighting\n    + matSpecularColor * specularLightWeighting\n    + matEmissiveColor,\n    color.a\n  );\n}\n\n/// frag-lighting\n\n  vec3 lightWeighting;\n  if (!enableLights) {\n    lightWeighting = vec3(1.0, 1.0, 1.0);\n  } else {\n    vec3 lightDirection;\n    float specularLightWeighting = 0.0;\n    float diffuseLightWeighting = 0.0;\n    vec3  specularLight = vec3(0.0, 0.0, 0.0);\n    vec3  diffuseLight = vec3(0.0, 0.0, 0.0);\n\n    vec3 transformedPointLocation;\n    vec3 normal = vTransformedNormal.xyz;\n\n    vec3 eyeDirection = normalize(-vPosition.xyz);\n    vec3 reflectionDirection;\n\n    vec3 pointWeight = vec3(0.0, 0.0, 0.0);\n\n    for (int i = 0; i < LIGHT_MAX; i++) {\n      if (i < numberPoints) {\n        transformedPointLocation = (viewMatrix * vec4(pointLocation[i], 1.0)).xyz;\n        lightDirection = normalize(transformedPointLocation - vPosition.xyz);\n\n        if (enableSpecular[i] > 0.0) {\n          reflectionDirection = reflect(-lightDirection, normal);\n          specularLightWeighting = pow(max(dot(reflectionDirection, eyeDirection), 0.0), shininess);\n          specularLight += specularLightWeighting * pointSpecularColor[i];\n        }\n\n        diffuseLightWeighting = max(dot(normal, lightDirection), 0.0);\n        diffuseLight += diffuseLightWeighting * pointColor[i];\n      } else {\n        break;\n      }\n    }\n\n    lightWeighting = ambientColor + diffuseLight + specularLight;\n  }\n\n// reflection / refraction configs\nuniform float reflection;\nuniform float refraction;\n\n///\n  // has cube texture then apply reflection\n  // if (hasTextureCube1) {\n  //   vec3 nReflection = normalize(vReflection);\n  //   vec3 reflectionValue;\n  //   if (refraction > 0.0) {\n  //    reflectionValue = refract(nReflection, vNormal.xyz, refraction);\n  //   } else {\n  //    reflectionValue = -reflect(nReflection, vNormal.xyz);\n  //   }\n\n  //   // TODO(nico): check whether this is right.\n  //   vec4 cubeColor = textureCube(samplerCube1,\n  //       vec3(-reflectionValue.x, -reflectionValue.y, reflectionValue.z));\n  //   gl_FragColor = vec4(mix(gl_FragColor.xyz, cubeColor.xyz, reflection), 1.0);\n  // }\n");
//# sourceMappingURL=lighting-fragment.glsl.js.map
 
/***/ }),
/* 653 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony default export */ __webpack_exports__["a"] = ("#define LIGHT_MAX 4\n\n/*\n// lighting configuration\nuniform bool enableLights;\nuniform vec3 ambientColor;\nuniform vec3 directionalColor;\nuniform vec3 lightingDirection;\n\n// point lights configuration\nuniform vec3 pointLocation[LIGHT_MAX];\nuniform vec3 pointColor[LIGHT_MAX];\nuniform int numberPoints;\n\n// reflection / refraction configuration\nuniform bool useReflection;\n*/\n\nuniform bool lighting_uEnableLights;\nuniform vec3 lighting_uAmbientColor;\nuniform vec3 lighting_uDirection;\nuniform vec3 lighting_uDirectionalColor;\n\n// point lights configuration\nuniform int  lighting_uPointCount;\nuniform vec3 lighting_uPointLocation[LIGHT_MAX];\nuniform vec3 lighting_uPointColor[LIGHT_MAX];\n\n// reflection / refraction configuration\nuniform bool lighting_uEnableReflections;\n\n// varyings\nvarying vec4 lighting_vPosition;\nvarying vec4 lighting_vNormal;\nvarying vec3 lighting_vColor;\nvarying vec3 lighting_vLightWeighting;\nvarying vec3 lighting_vReflection;\n\nvoid lighting_setPositionAndNormal(vec3 position, vec3 normal) {\n  lighting_vPosition = worldMatrix * vec4(position, 1.);\n  lighting_vNormal = worldInverseTransposeMatrix * vec4(normal, 1.);;\n}\n\nvoid lighting__getLightWeigting() {\n  float directionalLightWeighting = max(dot(lighting_vNormal.xyz, lighting_uDirection), 0.);\n  vec3 pointWeight = vec3(0., 0., 0.);\n  for (int i = 0; i < LIGHT_MAX; i++) {\n    if (i < numberPoints) {\n      vec4 mvLightPosition = viewMatrix * vec4(lighting_uPointLocation[i], 1.);\n      vec3 pointLightDirection = normalize(mvLightPosition.xyz - lighting_vPosition.xyz);\n      pointWeight += max(dot(lighting_vNormal.xyz, pointLightDirection), 0.) * pointColor[i];\n     } else {\n       break;\n     }\n   }\n   return ambientColor + (directionalColor * directionalLightWeighting) + pointWeight;\n}\n\nvoid lighting_apply(vec3 position, vec3 normal) {\n  lighting_setPositionAndNormal(position, normal);\n\n  // lighting code\n  if(!lighting_uEnableLights) {\n    lighting_vLightWeighting = vec3(1., 1., 1.);\n  } else {\n    lighting_vLightWeighting = lighting__getLightWeighting();\n  }\n}\n\nvoid lighting_set_reflection(vec3 position) {\n    // refraction / reflection code\n  if (lighting_uEnableReflections) {\n    lighting_vReflection = (viewInverseMatrix[3] - (worldMatrix * vec4(position, 1.))).xyz;\n  } else {\n    lighting_vReflection = vec3(1., 1., 1.);\n  }\n}\n");
//# sourceMappingURL=lighting-vertex.glsl.js.map
 
/***/ }),
/* 654 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* unused harmony export vertexShader */
/* unused harmony export fragmentShader */
/* unused harmony export name */
/* unused harmony export config */
/* unused harmony export getUniforms */
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_math_gl__ = __webpack_require__(16);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__lighting_common_glsl__ = __webpack_require__(651);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__lighting_vertex_glsl__ = __webpack_require__(653);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__lighting_fragment_glsl__ = __webpack_require__(652);
 
 
 
 
 
 
var vertexShader = __WEBPACK_IMPORTED_MODULE_1__lighting_common_glsl__["a" /* default */] + '\n' + __WEBPACK_IMPORTED_MODULE_2__lighting_vertex_glsl__["a" /* default */] + '\n';
 
var fragmentShader = __WEBPACK_IMPORTED_MODULE_1__lighting_common_glsl__["a" /* default */] + '\n' + __WEBPACK_IMPORTED_MODULE_3__lighting_fragment_glsl__["a" /* default */] + '\n';
 
var name = 'lighting';
 
var config = {
  MAX_POINT_LIGHTS: 4
};
 
// Setup the lighting system: ambient, directional, point lights.
function getUniforms(_ref) {
  var _ref$lightingEnable = _ref.lightingEnable,
      lightingEnable = _ref$lightingEnable === undefined ? false : _ref$lightingEnable,
      _ref$lightingAmbientC = _ref.lightingAmbientColor,
      lightingAmbientColor = _ref$lightingAmbientC === undefined ? [0.2, 0.2, 0.2] : _ref$lightingAmbientC,
      _ref$lightingDirectio = _ref.lightingDirection,
      lightingDirection = _ref$lightingDirectio === undefined ? [1, 1, 1] : _ref$lightingDirectio,
      _ref$lightingDirectio2 = _ref.lightingDirectionalColor,
      lightingDirectionalColor = _ref$lightingDirectio2 === undefined ? [0, 0, 0] : _ref$lightingDirectio2,
      _ref$lightingPointLig = _ref.lightingPointLights,
      lightingPointLights = _ref$lightingPointLig === undefined ? [] : _ref$lightingPointLig;
 
  // Set light uniforms. Ambient, directional and point lights.
  return Object.assign({
    lightingEnable: lightingEnable,
    // Ambient
    lightingAmbientColor: lightingAmbientColor
  }, getDirectionalUniforms(lightingDirection), getPointUniforms(lightingPointLights));
}
 
function getDirectionalUniforms(_ref2) {
  var color = _ref2.color,
      direction = _ref2.direction;
 
  // Normalize lighting direction vector
  var dir = new __WEBPACK_IMPORTED_MODULE_0_math_gl__["Vector3"](direction.x, direction.y, direction.z).normalize().scale(-1, -1, -1);
 
  return {
    directionalColor: [color.r, color.g, color.b],
    lightingDirection: [dir.x, dir.y, dir.z]
  };
}
 
function getPointUniforms(points) {
  points = points instanceof Array ? points : [points];
  var numberPoints = points.length;
  var pointLocations = [];
  var pointColors = [];
  var enableSpecular = [];
  var pointSpecularColors = [];
  var _iteratorNormalCompletion = true;
  var _didIteratorError = false;
  var _iteratorError = undefined;
 
  try {
    for (var _iterator = points[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
      var point = _step.value;
      var position = point.position,
          color = point.color,
          diffuse = point.diffuse,
          specular = point.specular;
 
      var pointColor = color || diffuse;
 
      pointLocations.push(position.x, position.y, position.z);
      pointColors.push(pointColor.r, pointColor.g, pointColor.b);
 
      // Add specular color
      enableSpecular.push(Number(Boolean(specular)));
      if (specular) {
        pointSpecularColors.push(specular.r, specular.g, specular.b);
      } else {
        pointSpecularColors.push(0, 0, 0);
      }
    }
  } catch (err) {
    _didIteratorError = true;
    _iteratorError = err;
  } finally {
    try {
      if (!_iteratorNormalCompletion && _iterator.return) {
        _iterator.return();
      }
    } finally {
      if (_didIteratorError) {
        throw _iteratorError;
      }
    }
  }
 
  return {
    numberPoints: numberPoints,
    pointLocation: pointLocations,
    pointColor: pointColors,
    enableSpecular: enableSpecular,
    pointSpecularColor: pointSpecularColors
  };
}
 
/* harmony default export */ __webpack_exports__["a"] = ({
  name: name,
  vs: vertexShader,
  fs: fragmentShader,
  getUniforms: getUniforms
});
//# sourceMappingURL=lighting.js.map
 
/***/ }),
/* 655 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return MODULE_INJECTORS_VS; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return MODULE_INJECTORS_FS; });
var MODULE_INJECTORS_VS = "#ifdef MODULE_LOGDEPTH\n  logdepth_adjustPosition(gl_Position);\n#endif\n";
 
var MODULE_INJECTORS_FS = "#ifdef MODULE_MATERIAL\n  gl_FragColor = material_filterColor(gl_FragColor);\n#endif\n\n#ifdef MODULE_LIGHTING\n  gl_FragColor = lighting_filterColor(gl_FragColor);\n#endif\n\n#ifdef MODULE_FOG\n  gl_FragColor = fog_filterColor(gl_FragColor);\n#endif\n\n#ifdef MODULE_PICKING\n  gl_FragColor = picking_filterHighlightColor(gl_FragColor);\n  gl_FragColor = picking_filterPickingColor(gl_FragColor);\n#endif\n\n#ifdef MODULE_LOGDEPTH\n  logdepth_setFragDepth();\n#endif\n";
//# sourceMappingURL=module-injectors.js.map
 
/***/ }),
/* 656 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
var DEFAULT_HIGHLIGHT_COLOR = new Uint8Array([0, 255, 255, 255]);
 
var DEFAULT_MODULE_OPTIONS = {
  pickingSelectedColor: null, //  Set to a picking color to visually highlight that item
  pickingHighlightColor: DEFAULT_HIGHLIGHT_COLOR, // Color of visual highlight of "selected" item
  pickingThreshold: 1.0,
  pickingActive: false // Set to true when rendering to off-screen "picking" buffer
};
 
/* eslint-disable camelcase */
function getUniforms() {
  var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : DEFAULT_MODULE_OPTIONS;
 
  var uniforms = {};
  if (opts.pickingSelectedColor !== undefined) {
    if (opts.pickingSelectedColor === null) {
      uniforms.picking_uSelectedColorValid = 0;
    } else {
      var selectedColor = [opts.pickingSelectedColor[0], opts.pickingSelectedColor[1], opts.pickingSelectedColor[2]];
      uniforms.picking_uSelectedColorValid = 1;
      uniforms.picking_uSelectedColor = selectedColor;
    }
  }
  if (opts.pickingHighlightColor !== undefined) {
    uniforms.picking_uHighlightColor = opts.pickingHighlightColor;
  }
  // TODO - major hack - decide on normalization and remove
  if (opts.pickingThreshold !== undefined) {
    uniforms.picking_uThreshold = opts.pickingThreshold;
  }
  if (opts.pickingActive !== undefined) {
    uniforms.picking_uActive = opts.pickingActive ? 1 : 0;
  }
  return uniforms;
}
 
var vs = 'uniform vec3 picking_uSelectedColor;\nuniform float picking_uThreshold;\nuniform bool picking_uSelectedColorValid;\n\nvarying vec4 picking_vRGBcolor_Aselected;\n\nconst float COLOR_SCALE = 1. / 255.;\n\nbool isVertexPicked(vec3 vertexColor) {\n  return\n    picking_uSelectedColorValid &&\n    abs(vertexColor.r - picking_uSelectedColor.r) < picking_uThreshold &&\n    abs(vertexColor.g - picking_uSelectedColor.g) < picking_uThreshold &&\n    abs(vertexColor.b - picking_uSelectedColor.b) < picking_uThreshold;\n}\n\nvoid picking_setPickingColor(vec3 pickingColor) {\n  // Do the comparison with selected item color in vertex shader as it should mean fewer compares\n  picking_vRGBcolor_Aselected.a =\n    float(isVertexPicked(pickingColor));\n\n  // Stores the picking color so that the fragment shader can render it during picking\n  picking_vRGBcolor_Aselected.rgb = pickingColor * COLOR_SCALE;\n}\n';
 
var fs = 'uniform bool picking_uActive; // true during rendering to offscreen picking buffer\nuniform vec3 picking_uSelectedColor;\nuniform vec4 picking_uHighlightColor;\n\nvarying vec4 picking_vRGBcolor_Aselected;\n\nconst float COLOR_SCALE = 1. / 255.;\n\n/*\n * Returns highlight color if this item is selected.\n */\nvec4 picking_filterHighlightColor(vec4 color) {\n  bool selected = bool(picking_vRGBcolor_Aselected.a);\n  return selected ? (picking_uHighlightColor * COLOR_SCALE) : color;\n}\n\n/*\n * Returns picking color if picking enabled else unmodified argument.\n */\nvec4 picking_filterPickingColor(vec4 color) {\n  vec3 pickingColor = picking_vRGBcolor_Aselected.rgb;\n  return picking_uActive ? vec4(pickingColor, 1.0) : color;\n}\n';
 
/* harmony default export */ __webpack_exports__["a"] = ({
  name: 'picking',
  vs: vs,
  fs: fs,
  getUniforms: getUniforms
});
//# sourceMappingURL=picking.js.map
 
/***/ }),
/* 657 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return MODULAR_SHADERS; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__modular_vertex_glsl__ = __webpack_require__(659);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__modular_fragment_glsl__ = __webpack_require__(658);
// Default Shaders
 
// A set of base shaders that leverage the shader module system,
// dynamically enabling features depending on which modules are included
 
 
 
var MODULAR_SHADERS = {
  vs: __WEBPACK_IMPORTED_MODULE_0__modular_vertex_glsl__["a" /* default */],
  fs: __WEBPACK_IMPORTED_MODULE_1__modular_fragment_glsl__["a" /* default */],
  defaultUniforms: {}
};
//# sourceMappingURL=index.js.map
 
/***/ }),
/* 658 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony default export */ __webpack_exports__["a"] = ("#define SHADER_NAME luma-modular-fragment\n\n#ifdef GL_ES\nprecision highp float;\n#endif\n\n// varyings\nvarying vec4 vColor;\n\nvoid main(){\n  gl_FragColor = vec4(1., 0., 1., 1.);\n\n#ifdef MODULE_DIFFUSE\n  gl_FragColor = diffuse_filterColor(gl_FragColor);\n#endif\n\n#ifdef MODULE_MATERIAL\n  gl_FragColor = material_filterColor(gl_FragColor);\n#endif\n\n#ifdef MODULE_LIGHTING\n  gl_FragColor = lighting_filterColor(gl_FragColor);\n#endif\n\n#ifdef MODULE_FOG\n  gl_FragColor = fog_filterColor(gl_FragColor);\n#endif\n\n#ifdef MODULE_PICKING\n  gl_FragColor = picking_filterHighlightColor(gl_FragColor);\n  gl_FragColor = picking_filterPickingColor(gl_FragColor);\n#endif\n\n#ifdef MODULE_LOGDEPTH\n  logdepth_setFragDepth(gl_Position);\n#endif\n}\n");
//# sourceMappingURL=modular-fragment.glsl.js.map
 
/***/ }),
/* 659 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony default export */ __webpack_exports__["a"] = ("#define SHADER_NAME luma_modular_vertex\n\n// object attributes\nattribute vec3 positions;\nattribute vec3 normals;\nattribute vec4 colors;\nattribute vec2 texCoords;\nattribute vec3 pickingColors;\n\nvoid main(void) {\n\n  // Set up position\n#ifdef MODULE_GEOMETRY\n  geometry_setPosition(positions);\n  geometry_setNormal(normals);\n#endif\n\n#ifdef MODULE_PROJECT\n  project_setPositionAndNormal_Model(positions, normals);\n  gl_Position = project_model_to_clipspace(positions);\n#endif\n\n  // Set up depth\n#ifdef MODULE_LOGDEPTH\n  logdepth_adjustPosition(gl_Position);\n#endif\n\n#ifdef MODULE_DIFFUSE\n  diffuse_setTextureCoordinate(texCoords);\n#endif\n\n  // Set up color calculations\n#ifdef MODULE_MATERIAL\n  material_setDiffuseColor(colors);\n  material_setDiffuseTextureCoordinates(texCoords);\n#endif\n\n#ifdef MODULE_LIGHTING\n  lighting_setPositionAndNormal(positions, normals);\n  lighting_apply_light(positions);\n  lighting_apply_reflection(positions);\n#endif\n\n#ifdef MODULE_PICKING\n  picking_setPickingColor(pickingColors);\n#endif\n\n}\n");
//# sourceMappingURL=modular-vertex.glsl.js.map
 
/***/ }),
/* 660 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* unused harmony export promisify */
/**
 * Converts a function that accepts a node style (err, result) callback
 * as the last argument into a function that takes the same arguments
 * and returns a promise that resolves or rejects with the values provided
 * by the original callback
 * @param {Function} func - function to wrap
 * @return {Function} promisified function
 */
/* eslint-disable no-try-catch */
function promisify(func) {
  return function promisifiedFunction() {
    for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
      args[_key] = arguments[_key];
    }
 
    return new Promise(function (resolve, reject) {
      function callback(error, data) {
        try {
          if (error) {
            reject(error);
          } else {
            resolve(data);
          }
        } catch (e) {
          reject(e);
        }
      }
      func.apply(undefined, args.concat([callback]));
    });
  };
}
/* eslint-enable no-try-catch */
//# sourceMappingURL=promise-utils.js.map
 
/***/ }),
/* 661 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = uid;
/* harmony export (immutable) */ __webpack_exports__["b"] = isPowerOfTwo;
/* harmony export (immutable) */ __webpack_exports__["c"] = isObjectEmpty;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_assert__ = __webpack_require__(1);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_assert___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_assert__);
 
 
var uidCounters = {};
 
/**
 * Returns a UID.
 * @param {String} id= - Identifier base name
 * @return {number} uid
 **/
function uid() {
  var id = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'id';
 
  uidCounters[id] = uidCounters[id] || 1;
  var count = uidCounters[id]++;
  return id + '-' + count;
}
 
/**
 * Verifies if a given number is power of two or not.
 * @param {object} n - The number to check.
 * @return {Array} Returns true if the given number is power of 2, false otherwise.
 **/
function isPowerOfTwo(n) {
  __WEBPACK_IMPORTED_MODULE_0_assert___default()(typeof n === 'number', 'Input must be a number');
  return n && (n & n - 1) === 0;
}
 
// Returns true if given object is empty, false otherwise.
function isObjectEmpty(obj) {
  var isEmpty = true;
  /* eslint-disable no-unused-vars  */
  for (var key in obj) {
    isEmpty = false;
    break;
  }
  /* eslint-enable no-unused-vars  */
  return isEmpty;
}
//# sourceMappingURL=utils.js.map
 
/***/ }),
/* 662 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = getKeyValue;
/* harmony export (immutable) */ __webpack_exports__["b"] = getKey;
/* harmony export (immutable) */ __webpack_exports__["c"] = getKeyType;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_assert__ = __webpack_require__(1);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_assert___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_assert__);
 
 
// Resolve a WebGL enumeration name (returns itself if already a number)
function getKeyValue(gl, name) {
  // If not a string, return (assume number)
  if (typeof name !== 'string') {
    return name;
  }
 
  // If string converts to number, return number
  var number = Number(name);
  if (!isNaN(number)) {
    return number;
  }
 
  // Look up string, after removing any 'GL.' or 'gl.' prefix
  name = name.replace(/^.*\./, '');
  var value = gl[name];
  __WEBPACK_IMPORTED_MODULE_0_assert___default()(value !== undefined, 'Accessing undefined constant GL.' + name);
  return value;
}
 
function getKey(gl, value) {
  value = Number(value);
  for (var key in gl) {
    if (gl[key] === value) {
      return 'gl.' + key;
    }
  }
  return String(value);
}
 
function getKeyType(gl, value) {
  __WEBPACK_IMPORTED_MODULE_0_assert___default()(value !== undefined, 'undefined key');
  value = Number(value);
  for (var key in gl) {
    if (gl[key] === value) {
      return 'gl.' + key;
    }
  }
  return String(value);
}
//# sourceMappingURL=constants-to-keys.js.map
 
/***/ }),
/* 663 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["c"] = getPageLoadPromise;
/* harmony export (immutable) */ __webpack_exports__["a"] = createCanvas;
/* harmony export (immutable) */ __webpack_exports__["b"] = getCanvas;
/* unused harmony export getCSSSize */
/* unused harmony export getDrawingBufferSize */
/* unused harmony export calculateDrawingBufferSize */
/* unused harmony export resizeCanvas */
/* harmony export (immutable) */ __webpack_exports__["d"] = resizeDrawingBuffer;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils__ = __webpack_require__(8);
// Resizing a webgl canvas
 
/* global window, document */
 
 
var isPageLoaded = __WEBPACK_IMPORTED_MODULE_0__utils__["a" /* isBrowser */] && document.readyState === 'complete';
 
var pageLoadPromise = __WEBPACK_IMPORTED_MODULE_0__utils__["a" /* isBrowser */] ? new Promise(function (resolve, reject) {
  if (isPageLoaded) {
    resolve(document);
    return;
  }
  window.onload = function () {
    isPageLoaded = true;
    resolve(document);
  };
}) : Promise.resolve({});
 
/**
 * Returns a promise that resolves when the page is loaded
 * at this point the DOM can be manipulated, and e.g. a new canvas can be inserted
 * @return {Promise} - resolves when the page is loaded
 */
function getPageLoadPromise() {
  return pageLoadPromise;
}
 
/**
 * Create a canvas
 * @param {Number} width - set to 100%
 * @param {Number} height - set to 100%
 */
function createCanvas(_ref) {
  var _ref$width = _ref.width,
      width = _ref$width === undefined ? 800 : _ref$width,
      _ref$height = _ref.height,
      height = _ref$height === undefined ? 600 : _ref$height,
      _ref$id = _ref.id,
      id = _ref$id === undefined ? 'gl-canvas' : _ref$id,
      _ref$insert = _ref.insert,
      insert = _ref$insert === undefined ? true : _ref$insert;
 
  var canvas = document.createElement('canvas');
  canvas.id = id;
  canvas.style.width = Number.isFinite(width) ? width + 'px' : '100%';
  canvas.style.height = Number.isFinite(height) ? height + 'px' : '100%';
  // add the canvas to the body element once the page has loaded
  if (insert) {
    getPageLoadPromise().then(function (document) {
      var body = document.body;
      body.insertBefore(canvas, body.firstChild);
    });
  }
  return canvas;
}
 
/**
 * Gets an already created canvas from the DOM
 * @param {Number} id - DOM element id
 */
function getCanvas(_ref2) {
  var id = _ref2.id;
 
  if (!isPageLoaded) {
    throw new Error('createGLContext called on canvas \'' + id + '\' before page was loaded');
  }
  return document.getElementById(id);
}
 
// Gets current size of canvas in css (logical/window) coordinates
function getCSSSize(canvas) {
  return {
    width: canvas.clientWidth,
    height: canvas.clientHeight
  };
}
 
// Gets current size of canvas drawing buffer in actual pixels
// This is needed for the gl.viewport call
function getDrawingBufferSize(canvas) {
  return {
    width: canvas.width,
    height: canvas.height
  };
}
 
// Calculate the drawing buffer size that would cover current canvas size and device pixel ratio
// Intention is that every pixel in the drawing buffer will have a 1-to-1 mapping with
// actual device pixels in the hardware framebuffer, allowing us to render at the full
// resolution of the device.
function calculateDrawingBufferSize(canvas, options) {
  var _options$useDevicePix = options.useDevicePixels,
      useDevicePixels = _options$useDevicePix === undefined ? true : _options$useDevicePix;
 
  if ('useDevicePixelRatio' in options) {
    __WEBPACK_IMPORTED_MODULE_0__utils__["b" /* log */].deprecated('useDevicePixelRatio', 'useDevicePixels');
    useDevicePixels = options.useDevicePixels || options.useDevicePixelRatio;
  }
  var cssToDevicePixels = useDevicePixels ? window.devicePixelRatio || 1 : 1;
 
  // Lookup the size the browser is displaying the canvas in CSS pixels
  // and compute a size needed to make our drawingbuffer match it in
  // device pixels.
  var cssSize = getCSSSize(canvas);
  return {
    width: Math.floor(cssSize.width * cssToDevicePixels),
    height: Math.floor(cssSize.height * cssToDevicePixels),
    devicePixelRatio: cssToDevicePixels
  };
}
 
/**
 * Resizes canvas in "CSS coordinates" (note these can be very different from device coords,
 * depending on devicePixelRatio/retina screens and size of drawing buffer)
 * and can be changed separately from drawing buffer size.
 * Therefore, normally `resizeDrawingBuffer` should be called after calling `resizeCanvas`.
 *
 * See http://webgl2fundamentals.org/webgl/lessons/webgl-resizing-the-canvas.html
 *
 * @param {Number} width, height - new width and height of canvas in CSS coordinates
 */
function resizeCanvas(canvas, _ref3) {
  var width = _ref3.width,
      height = _ref3.height;
 
  canvas.style.width = width + 'px';
  canvas.style.height = height + 'px';
}
 
/**
 * Resize the canvas' drawing buffer to match the canvas CSS size,
 * and by default to also consider devicePixelRatio
 * detects if anything has changed, can be called every frame
 * for best visual results, usually set to either:
 *  canvas CSS width x canvas CSS height
 *  canvas CSS width * devicePixelRatio x canvas CSS height * devicePixelRatio
 *
 * NOTE: Regardless of size, the drawing buffer will always be scaled to the viewport
 * See http://webgl2fundamentals.org/webgl/lessons/webgl-resizing-the-canvas.html
 *
 * @param {Number} width - new width of canvas in CSS coordinates
 * @param {Number} height - new height of canvas in CSS coordinates
 */
function resizeDrawingBuffer(canvas, _ref4) {
  var _ref4$useDevicePixelR = _ref4.useDevicePixelRatio,
      useDevicePixelRatio = _ref4$useDevicePixelR === undefined ? null : _ref4$useDevicePixelR,
      _ref4$useDevicePixels = _ref4.useDevicePixels,
      useDevicePixels = _ref4$useDevicePixels === undefined ? true : _ref4$useDevicePixels;
 
  // Resize the render buffer of the canvas to match canvas client size
  if (useDevicePixelRatio !== null) {
    __WEBPACK_IMPORTED_MODULE_0__utils__["b" /* log */].deprecated('useDevicePixelRatio', 'useDevicePixels');
    useDevicePixels = useDevicePixelRatio;
  }
  // multiplying with dpr (Optionally can be turned off)
  var newBufferSize = calculateDrawingBufferSize(canvas, { useDevicePixels: useDevicePixels });
  // Only update if the canvas size has not changed
  if (newBufferSize.width !== canvas.width || newBufferSize.height !== canvas.height) {
    // Make the canvas render buffer the same size as
    canvas.width = newBufferSize.width;
    canvas.height = newBufferSize.height;
    // Always reset CSS size after setting drawing buffer size
    // canvas.style.width = `${cssSize.width}px`;
    // canvas.style.height = `${cssSize.height}px`;
  }
}
//# sourceMappingURL=create-canvas.js.map
 
/***/ }),
/* 664 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["b"] = createContext;
/* harmony export (immutable) */ __webpack_exports__["a"] = trackContextCreation;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_assert__ = __webpack_require__(1);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_assert___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_assert__);
// Create a WebGL context
 
/* global HTMLCanvasElement, WebGLRenderingContext */
 
/**
 * Create a WebGL context for a canvas
 * Note calling this multiple time on the same canvas does return the same context
 */
function createContext(_ref) {
  var canvas = _ref.canvas,
      _ref$opts = _ref.opts,
      opts = _ref$opts === undefined ? {} : _ref$opts,
      _ref$onError = _ref.onError,
      onError = _ref$onError === undefined ? function (message) {
    return null;
  } : _ref$onError;
 
  // See if we can extract any extra information about why context creation failed
  function onContextCreationError(error) {
    onError('WebGL context: ' + (error.statusMessage || 'Unknown error'));
  }
  canvas.addEventListener('webglcontextcreationerror', onContextCreationError, false);
 
  var _opts$webgl = opts.webgl1,
      webgl1 = _opts$webgl === undefined ? true : _opts$webgl,
      _opts$webgl2 = opts.webgl2,
      webgl2 = _opts$webgl2 === undefined ? true : _opts$webgl2;
 
  var gl = null;
  // Prefer webgl2 over webgl1, prefer conformant over experimental
  if (webgl2) {
    gl = gl || canvas.getContext('webgl2', opts);
    gl = gl || canvas.getContext('experimental-webgl2', opts);
  }
  if (webgl1) {
    gl = gl || canvas.getContext('webgl', opts);
    gl = gl || canvas.getContext('experimental-webgl', opts);
  }
 
  canvas.removeEventListener('webglcontextcreationerror', onContextCreationError, false);
 
  if (!gl) {
    return onError('Failed to create ' + (webgl2 && !webgl1 ? 'WebGL2' : 'WebGL') + ' context');
  }
 
  return gl;
}
 
/**
 * Installs a spy on Canvas.getContext
 * calls the provided callback with the {context}
 */
function trackContextCreation(_ref2) {
  var _ref2$onContextCreate = _ref2.onContextCreate,
      onContextCreate = _ref2$onContextCreate === undefined ? function () {
    return null;
  } : _ref2$onContextCreate,
      _ref2$onContextCreate2 = _ref2.onContextCreated,
      onContextCreated = _ref2$onContextCreate2 === undefined ? function () {} : _ref2$onContextCreate2;
 
  __WEBPACK_IMPORTED_MODULE_0_assert___default()(onContextCreate || onContextCreated);
  if (typeof HTMLCanvasElement !== 'undefined') {
    var getContext = HTMLCanvasElement.prototype.getContext;
    HTMLCanvasElement.prototype.getContext = function getContextSpy(type, opts) {
      // Let intercepter create context
      var context = void 0;
      if (type === 'webgl') {
        context = onContextCreate({ canvas: this, type: type, opts: opts, getContext: getContext.bind(this) });
      }
      // If not, create context
      context = context || getContext.call(this, type, opts);
      // Report it created
      if (context instanceof WebGLRenderingContext) {
        onContextCreated({ canvas: this, context: context, type: type, opts: opts });
      }
      return context;
    };
  }
}
//# sourceMappingURL=create-context.js.map
 
/***/ }),
/* 665 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = parseGLSLCompilerError;
/* unused harmony export default */
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__get_shader_name__ = __webpack_require__(264);
// TODO - formatGLSLCompilerError should not depend on this
 
 
/**
 * Parse a GLSL compiler error log into a string showing the source code around each error.
 * Based on https://github.com/wwwtyro/gl-format-compiler-error (public domain)
 */
/* eslint-disable no-continue, max-statements */
function parseGLSLCompilerError(errLog, src, shaderType) {
  var errorStrings = errLog.split(/\r?\n/);
  var errors = {};
  var warnings = {};
 
  var name = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__get_shader_name__["a" /* default */])(src) || '(unnamed)';
  var shaderName = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__get_shader_name__["b" /* getShaderTypeName */])(shaderType) + ' shader ' + name;
 
  // Parse the error - note: browser and driver dependent
  for (var i = 0; i < errorStrings.length; i++) {
    var errorString = errorStrings[i];
    if (errorString.length <= 1) {
      continue;
    }
    var segments = errorString.split(':');
    var type = segments[0];
    var line = parseInt(segments[2], 10);
    if (isNaN(line)) {
      throw new Error('GLSL compilation error in ' + shaderName + ': ' + errLog);
    }
    if (type !== 'WARNING') {
      errors[line] = errorString;
    } else {
      warnings[line] = errorString;
    }
  }
 
  // Format the error inline with the code
  var lines = addLineNumbers(src);
 
  return {
    shaderName: shaderName,
    errors: formatErrors(errors, lines),
    warnings: formatErrors(warnings, lines)
  };
}
 
// Formats GLSL compiler error log into single string
function formatGLSLCompilerError(errLog, src, shaderType) {
  var _parseGLSLCompilerErr = parseGLSLCompilerError(errLog, src, shaderType),
      shaderName = _parseGLSLCompilerErr.shaderName,
      errors = _parseGLSLCompilerErr.errors,
      warnings = _parseGLSLCompilerErr.warnings;
 
  return 'GLSL compilation error in ' + shaderName + '\n\n' + errors + '\n' + warnings;
}
 
// helper function, outputs annotated errors or warnings
function formatErrors(errors, lines) {
  var message = '';
  for (var i = 0; i < lines.length; i++) {
    var line = lines[i];
    if (!errors[i + 3] && !errors[i + 2] && !errors[i + 1]) {
      continue;
    }
    message += line + '\n';
    if (errors[i + 1]) {
      var error = errors[i + 1];
      var segments = error.split(':', 3);
      var type = segments[0];
      var column = parseInt(segments[1], 10) || 0;
      var err = error.substring(segments.join(':').length + 1).trim();
      message += padLeft('^^^ ' + type + ': ' + err + '\n\n', column);
    }
  }
  return message;
}
 
/**
 * Prepends line numbers to each line of a string.
 * The line numbers will be left-padded with spaces to ensure an
 * aligned layout when rendered using monospace fonts.
 * @param {String} string - multi-line string to add line numbers to
 * @param {Number} start=1 - number of spaces to add
 * @param {String} delim =': ' - injected between line number and original line
 * @return {String[]} strings - array of string, one per line, with line numbers added
 */
function addLineNumbers(string) {
  var start = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
  var delim = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : ': ';
 
  var lines = string.split(/\r?\n/);
  var maxDigits = String(lines.length + start - 1).length;
  return lines.map(function (line, i) {
    var lineNumber = i + start;
    var digits = String(lineNumber).length;
    var prefix = padLeft(lineNumber, maxDigits - digits);
    return prefix + delim + line;
  });
}
 
/**
 * Pads a string with a number of spaces (space characters) to the left
 * @param {String} string - string to pad
 * @param {Number} digits - number of spaces to add
 * @return {String} string - The padded string
 */
function padLeft(string, digits) {
  var result = '';
  for (var i = 0; i < digits; ++i) {
    result += ' ';
  }
  return '' + result + string;
}
//# sourceMappingURL=format-glsl-error.js.map
 
/***/ }),
/* 666 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = getParameterPolyfill;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__constants__ = __webpack_require__(46);
var _WEBGL_PARAMETERS;
 
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
 
/* eslint-disable no-inline-comments, max-len, camelcase */
 
 
var OES_element_index = 'OES_element_index';
var WEBGL_draw_buffers = 'WEBGL_draw_buffers';
var EXT_disjoint_timer_query = 'EXT_disjoint_timer_query';
var EXT_disjoint_timer_query_webgl2 = 'EXT_disjoint_timer_query_webgl2';
var EXT_texture_filter_anisotropic = 'EXT_texture_filter_anisotropic';
var WEBGL_debug_renderer_info = 'WEBGL_debug_renderer_info';
 
var GL_FRAGMENT_SHADER_DERIVATIVE_HINT = 0x8B8B;
var GL_DONT_CARE = 0x1100;
var GL_GPU_DISJOINT_EXT = 0x8FBB;
var GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT = 0x84FF;
var GL_UNMASKED_VENDOR_WEBGL = 0x9245; // vendor string of the graphics driver.
var GL_UNMASKED_RENDERER_WEBGL = 0x9246; // renderer string of the graphics driver.
 
var getWebGL2ValueOrZero = function getWebGL2ValueOrZero(gl) {
  return !isWebGL2(gl) ? 0 : undefined;
};
 
// if a function returns undefined in this table,
// the original getParameter will be called, defeating the override
var WEBGL_PARAMETERS = (_WEBGL_PARAMETERS = {}, _defineProperty(_WEBGL_PARAMETERS, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].READ_BUFFER, function (gl) {
  return !isWebGL2(gl) ? __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].COLOR_ATTACHMENT0 : undefined;
}), _defineProperty(_WEBGL_PARAMETERS, GL_FRAGMENT_SHADER_DERIVATIVE_HINT, function (gl) {
  return !isWebGL2(gl) ? GL_DONT_CARE : undefined;
}), _defineProperty(_WEBGL_PARAMETERS, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].RASTERIZER_DISCARD, getWebGL2ValueOrZero), _defineProperty(_WEBGL_PARAMETERS, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].SAMPLES, getWebGL2ValueOrZero), _defineProperty(_WEBGL_PARAMETERS, GL_GPU_DISJOINT_EXT, function (gl, getParameter) {
  var ext = isWebGL2(gl) ? gl.getExtension(EXT_disjoint_timer_query_webgl2) : gl.getExtension(EXT_disjoint_timer_query);
  return ext && ext.GPU_DISJOINT_EXT ? getParameter(ext.GPU_DISJOINT_EXT) : 0;
}), _defineProperty(_WEBGL_PARAMETERS, GL_UNMASKED_VENDOR_WEBGL, function (gl, getParameter) {
  var ext = gl.getExtension(WEBGL_debug_renderer_info);
  return getParameter(ext && ext.UNMASKED_VENDOR_WEBGL || __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].VENDOR);
}), _defineProperty(_WEBGL_PARAMETERS, GL_UNMASKED_RENDERER_WEBGL, function (gl, getParameter) {
  var ext = gl.getExtension(WEBGL_debug_renderer_info);
  return getParameter(ext && ext.UNMASKED_RENDERER_WEBGL || __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].RENDERER);
}), _defineProperty(_WEBGL_PARAMETERS, GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, function (gl, getParameter) {
  var ext = gl.luma.extensions[EXT_texture_filter_anisotropic];
  return ext ? getParameter(ext.MAX_TEXTURE_MAX_ANISOTROPY_EXT) : 1.0;
}), _defineProperty(_WEBGL_PARAMETERS, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].MAX_3D_TEXTURE_SIZE, getWebGL2ValueOrZero), _defineProperty(_WEBGL_PARAMETERS, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].MAX_ARRAY_TEXTURE_LAYERS, getWebGL2ValueOrZero), _defineProperty(_WEBGL_PARAMETERS, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].MAX_CLIENT_WAIT_TIMEOUT_WEBGL, getWebGL2ValueOrZero), _defineProperty(_WEBGL_PARAMETERS, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].MAX_COLOR_ATTACHMENTS, function (gl, getParameter) {
  if (!isWebGL2(gl)) {
    var ext = gl.getExtension(WEBGL_draw_buffers);
    return ext ? getParameter(ext.MAX_COLOR_ATTACHMENTS_WEBGL) : 0;
  }
  return undefined;
}), _defineProperty(_WEBGL_PARAMETERS, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS, getWebGL2ValueOrZero), _defineProperty(_WEBGL_PARAMETERS, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].MAX_COMBINED_UNIFORM_BLOCKS, getWebGL2ValueOrZero), _defineProperty(_WEBGL_PARAMETERS, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS, getWebGL2ValueOrZero), _defineProperty(_WEBGL_PARAMETERS, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].MAX_DRAW_BUFFERS, function (gl) {
  if (!isWebGL2(gl)) {
    var ext = gl.getExtension(WEBGL_draw_buffers);
    return ext ? ext.MAX_DRAW_BUFFERS_WEBGL : 0;
  }
  return undefined;
}), _defineProperty(_WEBGL_PARAMETERS, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].MAX_ELEMENT_INDEX,
// Guess: per webglstats.com 99.6% of webgl2 supports 2147483647
function (gl) {
  return gl.getExtension(OES_element_index) ? 2147483647 : 65535;
}), _defineProperty(_WEBGL_PARAMETERS, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].MAX_ELEMENTS_INDICES,
// Guess: "Reasonably safe" per webglstats.com - could be higher/lower (on some mobile devices)
function (gl) {
  return gl.getExtension(OES_element_index) ? 16777216 : 65535;
}), _defineProperty(_WEBGL_PARAMETERS, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].MAX_ELEMENTS_VERTICES,
// Guess: "Reasonably safe" per webglstats.com - could be higher/lower (on some mobile devices)
function (gl) {
  return 16777216;
}), _defineProperty(_WEBGL_PARAMETERS, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].MAX_FRAGMENT_INPUT_COMPONENTS, getWebGL2ValueOrZero), _defineProperty(_WEBGL_PARAMETERS, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].MAX_FRAGMENT_UNIFORM_BLOCKS, getWebGL2ValueOrZero), _defineProperty(_WEBGL_PARAMETERS, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].MAX_FRAGMENT_UNIFORM_COMPONENTS, getWebGL2ValueOrZero), _defineProperty(_WEBGL_PARAMETERS, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].MAX_SAMPLES, getWebGL2ValueOrZero), _defineProperty(_WEBGL_PARAMETERS, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].MAX_SERVER_WAIT_TIMEOUT, getWebGL2ValueOrZero), _defineProperty(_WEBGL_PARAMETERS, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].MAX_TEXTURE_LOD_BIAS, getWebGL2ValueOrZero), _defineProperty(_WEBGL_PARAMETERS, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS, getWebGL2ValueOrZero), _defineProperty(_WEBGL_PARAMETERS, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS, getWebGL2ValueOrZero), _defineProperty(_WEBGL_PARAMETERS, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS, getWebGL2ValueOrZero), _defineProperty(_WEBGL_PARAMETERS, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].MAX_UNIFORM_BLOCK_SIZE, getWebGL2ValueOrZero), _defineProperty(_WEBGL_PARAMETERS, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].MAX_UNIFORM_BUFFER_BINDINGS, getWebGL2ValueOrZero), _defineProperty(_WEBGL_PARAMETERS, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].MAX_VARYING_COMPONENTS, getWebGL2ValueOrZero), _defineProperty(_WEBGL_PARAMETERS, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].MAX_VERTEX_OUTPUT_COMPONENTS, getWebGL2ValueOrZero), _defineProperty(_WEBGL_PARAMETERS, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].MAX_VERTEX_UNIFORM_BLOCKS, getWebGL2ValueOrZero), _defineProperty(_WEBGL_PARAMETERS, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].MAX_VERTEX_UNIFORM_COMPONENTS, getWebGL2ValueOrZero), _defineProperty(_WEBGL_PARAMETERS, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].MIN_PROGRAM_TEXEL_OFFSET, getWebGL2ValueOrZero), _defineProperty(_WEBGL_PARAMETERS, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].MAX_PROGRAM_TEXEL_OFFSET, getWebGL2ValueOrZero), _defineProperty(_WEBGL_PARAMETERS, __WEBPACK_IMPORTED_MODULE_0__constants__["a" /* default */].UNIFORM_BUFFER_OFFSET_ALIGNMENT, getWebGL2ValueOrZero), _WEBGL_PARAMETERS);
 
// Return true if WebGL2 context
function isWebGL2(gl) {
  var GL_TEXTURE_BINDING_3D = 0x806A;
  return gl && gl.TEXTURE_BINDING_3D === GL_TEXTURE_BINDING_3D;
}
 
// A "replacement" gl.getParameter that accepts "enums" from extensions and WebGL2
// and returns reasonably safe defaults
function getParameterPolyfill(gl, originalGetParameter, pname) {
 
  // Return mock limits (usually 0) for WebGL2 constants to ensure these
  // can be queries without error
  var limit = WEBGL_PARAMETERS[pname];
  var value = typeof limit === 'function' ? limit(gl, originalGetParameter, pname) : limit;
  var result = value !== undefined ? value : originalGetParameter(pname);
  return result;
}
//# sourceMappingURL=polyfill-get-parameter.js.map
 
/***/ }),
/* 667 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__context__ = __webpack_require__(7);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__webgl_texture__ = __webpack_require__(62);
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
 
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
 
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
 
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
 
// import GL from './api';
 
// import {isWebGl2Context, assertWebGL2Context, withParameters} from './context';
 
// import Buffer from './buffer';
 
var Texture2DArray = /*#__PURE__*/function (_Texture) {
  _inherits(Texture2DArray, _Texture);
 
  _createClass(Texture2DArray, null, [{
    key: 'isSupported',
    value: function isSupported(gl) {
      return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__context__["b" /* isWebGL2 */])(gl);
    }
  }]);
 
  function Texture2DArray(gl) {
    var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
 
    _classCallCheck(this, Texture2DArray);
 
    var _this = _possibleConstructorReturn(this, (Texture2DArray.__proto__ || Object.getPrototypeOf(Texture2DArray)).call(this, gl, opts));
 
    throw new Error('Texture2DArray not yet implemented');
    return _this;
  }
 
  return Texture2DArray;
}(__WEBPACK_IMPORTED_MODULE_1__webgl_texture__["a" /* default */]);
 
/* harmony default export */ __webpack_exports__["a"] = (Texture2DArray);
//# sourceMappingURL=texture-2d-array.js.map
 
/***/ }),
/* 668 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__api__ = __webpack_require__(38);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__context__ = __webpack_require__(7);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__context_state__ = __webpack_require__(68);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__webgl_texture__ = __webpack_require__(62);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__buffer__ = __webpack_require__(67);
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
 
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
 
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
 
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
 
 
 
 
 
 
 
var Texture3D = /*#__PURE__*/function (_Texture) {
  _inherits(Texture3D, _Texture);
 
  _createClass(Texture3D, null, [{
    key: 'isSupported',
    value: function isSupported(gl) {
      return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__context__["b" /* isWebGL2 */])(gl);
    }
 
    /**
     * @classdesc
     * 3D WebGL Texture
     * Note: Constructor will initialize your texture.
     *
     * @class
     * @param {WebGLRenderingContext} gl - gl context
     * @param {Image|ArrayBuffer|null} opts= - named options
     * @param {Image|ArrayBuffer|null} opts.data= - buffer
     * @param {GLint} width - width of texture
     * @param {GLint} height - height of texture
     */
 
  }]);
 
  function Texture3D(gl) {
    var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
 
    _classCallCheck(this, Texture3D);
 
    __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__context__["g" /* assertWebGL2Context */])(gl);
 
    var _this = _possibleConstructorReturn(this, (Texture3D.__proto__ || Object.getPrototypeOf(Texture3D)).call(this, gl, Object.assign({}, opts, { target: opts.target || __WEBPACK_IMPORTED_MODULE_0__api__["a" /* default */].TEXTURE_3D })));
 
    _this.width = null;
    _this.height = null;
    _this.depth = null;
    Object.seal(_this);
 
    _this.setImageData(opts);
    if (opts.generateMipmap) {
      _this.generateMipmap();
    }
    return _this;
  }
 
  _createClass(Texture3D, [{
    key: 'initialize',
    value: function initialize() {
      var _this2 = this;
 
      var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
 
      this.opts = Object.assign({}, this.opts, opts);
      var _opts = this.opts,
          pixels = _opts.pixels,
          settings = _opts.settings;
 
      if (settings) {
        __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__context_state__["f" /* withParameters */])(settings, function () {
          if (pixels) {
            _this2.setImage3D(_this2.opts);
          }
        });
        this.setParameters(opts);
      }
    }
 
    // WebGL2
 
    // Image 3D copies from Typed Array or WebGLBuffer
 
  }, {
    key: 'setImage3D',
    value: function setImage3D(_ref) {
      var _ref$level = _ref.level,
          level = _ref$level === undefined ? 0 : _ref$level,
          _ref$internalformat = _ref.internalformat,
          internalformat = _ref$internalformat === undefined ? __WEBPACK_IMPORTED_MODULE_0__api__["a" /* default */].RGBA : _ref$internalformat,
          width = _ref.width,
          height = _ref.height,
          _ref$depth = _ref.depth,
          depth = _ref$depth === undefined ? 1 : _ref$depth,
          _ref$border = _ref.border,
          border = _ref$border === undefined ? 0 : _ref$border,
          format = _ref.format,
          _ref$type = _ref.type,
          type = _ref$type === undefined ? __WEBPACK_IMPORTED_MODULE_0__api__["a" /* default */].UNSIGNED_BYTE : _ref$type,
          _ref$offset = _ref.offset,
          offset = _ref$offset === undefined ? 0 : _ref$offset,
          pixels = _ref.pixels;
 
      if (ArrayBuffer.isView(pixels)) {
        this.gl.texImage3D(this.target, level, internalformat, width, height, depth, border, format, type, pixels);
        return;
      }
      if (pixels instanceof __WEBPACK_IMPORTED_MODULE_4__buffer__["a" /* default */]) {
        this.gl.bindBuffer(__WEBPACK_IMPORTED_MODULE_0__api__["a" /* default */].PIXEL_UNPACK_BUFFER, pixels.handle);
        this.gl.texImage3D(this.target, level, internalformat, width, height, depth, border, format, type, offset);
        this.gl.bindBuffer(__WEBPACK_IMPORTED_MODULE_0__api__["a" /* default */].PIXEL_UNPACK_BUFFER, pixels.handle);
      }
    }
  }]);
 
  return Texture3D;
}(__WEBPACK_IMPORTED_MODULE_3__webgl_texture__["a" /* default */]);
 
/* harmony default export */ __webpack_exports__["a"] = (Texture3D);
//# sourceMappingURL=texture-3d.js.map
 
/***/ }),
/* 669 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_assert__ = __webpack_require__(1);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_assert___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_assert__);
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
 
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
 
var _UNIFORM_TYPES;
 
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
 
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
 
/* eslint-disable camelcase */
 
 
var ERR_ARGUMENT = 'UniformBufferLayout illegal argument';
 
// Local constants - these will "collapse" during minification
var GL_INT = 0x1404;
var GL_INT_VEC2 = 0x8B53;
var GL_INT_VEC3 = 0x8B54;
var GL_INT_VEC4 = 0x8B55;
 
var GL_FLOAT = 0x1406;
var GL_FLOAT_VEC2 = 0x8B50;
var GL_FLOAT_VEC3 = 0x8B51;
var GL_FLOAT_VEC4 = 0x8B52;
 
var GL_BOOL = 0x8B56;
var GL_BOOL_VEC2 = 0x8B57;
var GL_BOOL_VEC3 = 0x8B58;
var GL_BOOL_VEC4 = 0x8B59;
 
var GL_UNSIGNED_INT = 0x1405;
var GL_UNSIGNED_INT_VEC2 = 0x8DC6;
var GL_UNSIGNED_INT_VEC3 = 0x8DC7;
var GL_UNSIGNED_INT_VEC4 = 0x8DC8;
 
var GL_FLOAT_MAT2 = 0x8B5A;
var GL_FLOAT_MAT3 = 0x8B5B;
var GL_FLOAT_MAT4 = 0x8B5C;
 
var GL_FLOAT_MAT2x3 = 0x8B65;
var GL_FLOAT_MAT2x4 = 0x8B66;
var GL_FLOAT_MAT3x2 = 0x8B67;
var GL_FLOAT_MAT3x4 = 0x8B68;
var GL_FLOAT_MAT4x2 = 0x8B69;
var GL_FLOAT_MAT4x3 = 0x8B6A;
 
// Uniform table for std140
var UNIFORM_TYPES = (_UNIFORM_TYPES = {}, _defineProperty(_UNIFORM_TYPES, GL_FLOAT, [GL_FLOAT, 1]), _defineProperty(_UNIFORM_TYPES, GL_FLOAT_VEC2, [GL_FLOAT, 2]), _defineProperty(_UNIFORM_TYPES, GL_FLOAT_VEC3, [GL_FLOAT, 3]), _defineProperty(_UNIFORM_TYPES, GL_FLOAT_VEC4, [GL_FLOAT, 4]), _defineProperty(_UNIFORM_TYPES, GL_INT, [GL_INT, 1]), _defineProperty(_UNIFORM_TYPES, GL_INT_VEC2, [GL_INT, 2]), _defineProperty(_UNIFORM_TYPES, GL_INT_VEC3, [GL_INT, 3]), _defineProperty(_UNIFORM_TYPES, GL_INT_VEC4, [GL_INT, 4]), _defineProperty(_UNIFORM_TYPES, GL_UNSIGNED_INT, [GL_UNSIGNED_INT, 1]), _defineProperty(_UNIFORM_TYPES, GL_UNSIGNED_INT_VEC2, [GL_UNSIGNED_INT, 2]), _defineProperty(_UNIFORM_TYPES, GL_UNSIGNED_INT_VEC3, [GL_UNSIGNED_INT, 3]), _defineProperty(_UNIFORM_TYPES, GL_UNSIGNED_INT_VEC4, [GL_UNSIGNED_INT, 4]), _defineProperty(_UNIFORM_TYPES, GL_BOOL, [GL_FLOAT, 1]), _defineProperty(_UNIFORM_TYPES, GL_BOOL_VEC2, [GL_FLOAT, 2]), _defineProperty(_UNIFORM_TYPES, GL_BOOL_VEC3, [GL_FLOAT, 3]), _defineProperty(_UNIFORM_TYPES, GL_BOOL_VEC4, [GL_FLOAT, 4]), _defineProperty(_UNIFORM_TYPES, GL_FLOAT_MAT2, [GL_FLOAT, 8]), _defineProperty(_UNIFORM_TYPES, GL_FLOAT_MAT2x3, [GL_FLOAT, 8]), _defineProperty(_UNIFORM_TYPES, GL_FLOAT_MAT2x4, [GL_FLOAT, 8]), _defineProperty(_UNIFORM_TYPES, GL_FLOAT_MAT3, [GL_FLOAT, 12]), _defineProperty(_UNIFORM_TYPES, GL_FLOAT_MAT3x2, [GL_FLOAT, 12]), _defineProperty(_UNIFORM_TYPES, GL_FLOAT_MAT3x4, [GL_FLOAT, 12]), _defineProperty(_UNIFORM_TYPES, GL_FLOAT_MAT4, [GL_FLOAT, 16]), _defineProperty(_UNIFORM_TYPES, GL_FLOAT_MAT4x2, [GL_FLOAT, 16]), _defineProperty(_UNIFORM_TYPES, GL_FLOAT_MAT4x3, [GL_FLOAT, 16]), _UNIFORM_TYPES);
 
// Std140 layout for uniforms
 
var UniformBufferLayout = /*#__PURE__*/function () {
  function UniformBufferLayout(layout) {
    var _typedArray;
 
    _classCallCheck(this, UniformBufferLayout);
 
    this.layout = {};
    this.size = 0;
 
    // Add layout (type, size and offset) definitions for each uniform in the layout
    for (var key in layout) {
      this._addUniform(key, layout[key]);
    }
 
    // Allocate three typed arrays pointing at same memory
    var data = new Float32Array(this.size);
    this.typedArray = (_typedArray = {}, _defineProperty(_typedArray, GL_FLOAT, data), _defineProperty(_typedArray, GL_INT, new Int32Array(data.buffer)), _defineProperty(_typedArray, GL_UNSIGNED_INT, new Uint32Array(data.buffer)), _typedArray);
  }
 
  // Get number of bytes needed for buffer allocation
 
 
  _createClass(UniformBufferLayout, [{
    key: 'getBytes',
    value: function getBytes() {
      return this.size * 4;
    }
 
    // Get the current data as Float32Array, for bufferSubData
 
  }, {
    key: 'getData',
    value: function getData() {
      return this.typedArray[GL_FLOAT];
    }
 
    // Get offset and data for one object (for bufferSubData)
 
  }, {
    key: 'getSubData',
    value: function getSubData(index) {
      var data = void 0;
      var offset = void 0;
      if (index === undefined) {
        data = this.data;
        offset = 0;
      } else {
        var begin = this.offsets[index];
        var end = begin + this.sizes[index];
        data = this.data.subarray(begin, end);
        offset = begin * 4;
      }
      return { data: data, offset: offset };
    }
 
    // Set a map of values
 
  }, {
    key: 'setUniforms',
    value: function setUniforms(values) {
      for (var key in values) {
        this._setValue(key, values[key]);
      }
      return this;
    }
  }, {
    key: '_setValue',
    value: function _setValue(key, value) {
      var layout = this.layout[key];
      __WEBPACK_IMPORTED_MODULE_0_assert___default()(layout, 'UniformLayoutStd140 illegal argument');
      var typedArray = this.typedArray[layout.type];
      if (layout.size === 1) {
        // single value -> just set it
        typedArray[layout.offset] = value;
      } else {
        // vector/matrix -> copy the supplied (typed) array, starting from offset
        typedArray.set(value, layout.offset);
      }
    }
  }, {
    key: '_addUniform',
    value: function _addUniform(key, uniformType) {
      var definition = UNIFORM_TYPES[uniformType];
      __WEBPACK_IMPORTED_MODULE_0_assert___default()(definition, ERR_ARGUMENT);
 
      var _definition = _slicedToArray(definition, 2),
          type = _definition[0],
          count = _definition[1];
 
      // Get the current offset and calculate the next offset based on aligned size of this element
 
 
      var offset = this.size;
      // First, align (bump) current offset to an even multiple of current object (1, 2, 4)
      this.size = this._alignTo(this.size, count);
      // Then, add our object's padded size ((1, 2, multiple of 4) to the current offset
      this.size += count;
 
      this.layout[key] = { type: type, size: count, offset: offset };
    }
 
    // Align offset to 1, 2 or 4 elements (4, 8 or 16 bytes)
 
  }, {
    key: '_alignTo',
    value: function _alignTo(size, count) {
      switch (count) {
        case 1:
          return size; // Pad upwards to even multiple of 2
        case 2:
          return size + size % 2; // Pad upwards to even multiple of 2
        default:
          return size + (4 - size % 4) % 4; // Pad upwards to even multiple of 4
      }
    }
  }]);
 
  return UniformBufferLayout;
}();
 
/* harmony default export */ __webpack_exports__["a"] = (UniformBufferLayout);
//# sourceMappingURL=uniform-buffer-layout.js.map
 
/***/ }),
/* 670 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__math_array__ = __webpack_require__(112);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__common__ = __webpack_require__(31);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__matrix4__ = __webpack_require__(278);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__quaternion__ = __webpack_require__(279);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__vector3__ = __webpack_require__(113);
var _createClass=function(){function defineProperties(target,props){for(var descriptor,i=0;i<props.length;i++)descriptor=props[i],descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,'value'in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}();function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError('Cannot call a class as a function')}function _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError('this hasn\'t been initialised - super() hasn\'t been called');return call&&('object'==typeof call||'function'==typeof call)?call:self}function _inherits(subClass,superClass){if('function'!=typeof superClass&&null!==superClass)throw new TypeError('Super expression must either be null or a function, not '+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass)}var ERR_UNKNOWN_ORDER='Unknown Euler angle order',ALMOST_ONE=.99999;function validateOrder(value){return 0<=value&&6>value}function checkOrder(value){if(0>value&&6<=value)throw new Error(ERR_UNKNOWN_ORDER);return value}var Euler=function(_MathArray){function Euler(){var x=0<arguments.length&&void 0!==arguments[0]?arguments[0]:0,y=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,z=2<arguments.length&&void 0!==arguments[2]?arguments[2]:0,order=3<arguments.length&&void 0!==arguments[3]?arguments[3]:Euler.DefaultOrder;_classCallCheck(this,Euler);var _this=_possibleConstructorReturn(this,(Euler.__proto__||Object.getPrototypeOf(Euler)).call(this));return 0<arguments.length&&Array.isArray(arguments[0])?_this.fromVector3.apply(_this,arguments):_this.set(x,y,z,order),_this}var _NumberisFinite=Number.isFinite;return _inherits(Euler,_MathArray),_createClass(Euler,[{key:'ELEMENTS',get:function get(){return 4}}],[{key:'rotationOrder',value:function rotationOrder(order){return Euler.RotationOrders[order]}},{key:'ZYX',get:function get(){return 0}},{key:'YXZ',get:function get(){return 1}},{key:'XZY',get:function get(){return 2}},{key:'ZXY',get:function get(){return 3}},{key:'YZX',get:function get(){return 4}},{key:'XYZ',get:function get(){return 5}},{key:'RollPitchYaw',get:function get(){return 0}},{key:'DefaultOrder',get:function get(){return Euler.ZYX}},{key:'RotationOrders',get:function get(){return['ZYX','YXZ','XZY','ZXY','YZX','XYZ']}}]),_createClass(Euler,[{key:'copy',value:function copy(array){for(var i=0;3>i;++i)this[i]=array[i];return this[3]=_NumberisFinite(array[3])||this.order,this.check(),this}},{key:'set',value:function set(){var x=0<arguments.length&&void 0!==arguments[0]?arguments[0]:0,y=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,z=2<arguments.length&&void 0!==arguments[2]?arguments[2]:0,order=arguments[3];return this[0]=x,this[1]=y,this[2]=z,this[3]=_NumberisFinite(order)?order:this[3],this.check(),this}},{key:'validate',value:function validate(){return validateOrder(this[3])&&_NumberisFinite(this[0])&&_NumberisFinite(this[1])&&_NumberisFinite(this[2])}},{key:'toArray',value:function toArray(){var array=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[],offset=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0;return array[offset]=this[0],array[offset+1]=this[1],array[offset+2]=this[2],array}},{key:'toArray4',value:function toArray4(){var array=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[],offset=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0;return array[offset]=this[0],array[offset+1]=this[1],array[offset+2]=this[2],array[offset+3]=this[3],array}},{key:'toVector3',value:function toVector3(optionalResult){return optionalResult?optionalResult.set(this[0],this[1],this[2]):new __WEBPACK_IMPORTED_MODULE_4__vector3__["a" /* default */](this[0],this[1],this[2])}},{key:'fromVector3',value:function fromVector3(v,order){return this.set(v[0],v[1],v[2],_NumberisFinite(order)?order:this[3])}},{key:'fromArray',value:function fromArray(array){var offset=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0;return this[0]=array[0+offset],this[1]=array[1+offset],this[2]=array[2+offset],void 0!==array[3]&&(this[3]=array[3]),this.check(),this}},{key:'fromRollPitchYaw',value:function fromRollPitchYaw(roll,pitch,yaw){return this.set(roll,pitch,yaw,Euler.ZYX)}},{key:'fromQuaternion',value:function fromQuaternion(q,order){return this._fromRotationMatrix(__WEBPACK_IMPORTED_MODULE_2__matrix4__["a" /* default */].fromQuaternion(q),order),this.check(),this}},{key:'fromRotationMatrix',value:function fromRotationMatrix(m){var order=1<arguments.length&&void 0!==arguments[1]?arguments[1]:Euler.DefaultOrder;return this._fromRotationMatrix(m,order),this.check(),this}},{key:'getRotationMatrix',value:function getRotationMatrix(){var m=0<arguments.length&&void 0!==arguments[0]?arguments[0]:new __WEBPACK_IMPORTED_MODULE_2__matrix4__["a" /* default */];return this._getRotationMatrix(m),m}},{key:'getQuaternion',value:function getQuaternion(){var q=new __WEBPACK_IMPORTED_MODULE_3__quaternion__["a" /* default */];switch(this[4]){case Euler.XYZ:return q.rotateX(this[0]).rotateY(this[1]).rotateZ(this[2]);case Euler.YXZ:return q.rotateY(this[0]).rotateX(this[1]).rotateZ(this[2]);case Euler.ZXY:return q.rotateZ(this[0]).rotateX(this[1]).rotateY(this[2]);case Euler.ZYX:return q.rotateZ(this[0]).rotateY(this[1]).rotateX(this[2]);case Euler.YZX:return q.rotateY(this[0]).rotateZ(this[1]).rotateX(this[2]);case Euler.XZY:return q.rotateX(this[0]).rotateZ(this[1]).rotateY(this[2]);default:throw new Error(ERR_UNKNOWN_ORDER);}}},{key:'_fromRotationMatrix',value:function _fromRotationMatrix(m){var _Mathatan=Math.atan2,_Mathabs=Math.abs,_Mathasin=Math.asin,order=1<arguments.length&&void 0!==arguments[1]?arguments[1]:Euler.DefaultOrder,te=m.elements,m11=te[0],m12=te[4],m13=te[8],m21=te[1],m22=te[5],m23=te[9],m31=te[2],m32=te[6],m33=te[10];switch(order=order||this[3],order){case Euler.XYZ:this[1]=_Mathasin(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__common__["e" /* clamp */])(m13,-1,1)),_Mathabs(m13)<ALMOST_ONE?(this[0]=_Mathatan(-m23,m33),this[2]=_Mathatan(-m12,m11)):(this[0]=_Mathatan(m32,m22),this[2]=0);break;case Euler.YXZ:this[0]=_Mathasin(-__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__common__["e" /* clamp */])(m23,-1,1)),_Mathabs(m23)<ALMOST_ONE?(this[1]=_Mathatan(m13,m33),this[2]=_Mathatan(m21,m22)):(this[1]=_Mathatan(-m31,m11),this[2]=0);break;case Euler.ZXY:this[0]=_Mathasin(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__common__["e" /* clamp */])(m32,-1,1)),_Mathabs(m32)<ALMOST_ONE?(this[1]=_Mathatan(-m31,m33),this[2]=_Mathatan(-m12,m22)):(this[1]=0,this[2]=_Mathatan(m21,m11));break;case Euler.ZYX:this[1]=_Mathasin(-__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__common__["e" /* clamp */])(m31,-1,1)),_Mathabs(m31)<ALMOST_ONE?(this[0]=_Mathatan(m32,m33),this[2]=_Mathatan(m21,m11)):(this[0]=0,this[2]=_Mathatan(-m12,m22));break;case Euler.YZX:this[2]=_Mathasin(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__common__["e" /* clamp */])(m21,-1,1)),_Mathabs(m21)<ALMOST_ONE?(this[0]=_Mathatan(-m23,m22),this[1]=_Mathatan(-m31,m11)):(this[0]=0,this[1]=_Mathatan(m13,m33));break;case Euler.XZY:this[2]=_Mathasin(-__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__common__["e" /* clamp */])(m12,-1,1)),_Mathabs(m12)<ALMOST_ONE?(this[0]=_Mathatan(m32,m22),this[1]=_Mathatan(m13,m11)):(this[0]=_Mathatan(-m23,m33),this[1]=0);break;default:throw new Error(ERR_UNKNOWN_ORDER);}return this[3]=order,this}},{key:'_getRotationMatrix',value:function _getRotationMatrix(){var _Mathsin=Math.sin,_Mathcos=Math.cos,te=new __WEBPACK_IMPORTED_MODULE_2__matrix4__["a" /* default */],x=this.x,y=this.y,z=this.z,a=_Mathcos(x),c=_Mathcos(y),e=_Mathcos(z),b=_Mathsin(x),d=_Mathsin(y),f=_Mathsin(z);switch(this[3]){case Euler.XYZ:{var ae=a*e,af=a*f,be=b*e,bf=b*f;te[0]=c*e,te[4]=-c*f,te[8]=d,te[1]=af+be*d,te[5]=ae-bf*d,te[9]=-b*c,te[2]=bf-ae*d,te[6]=be+af*d,te[10]=a*c;break}case Euler.YXZ:{var ce=c*e,cf=c*f,de=d*e,df=d*f;te[0]=ce+df*b,te[4]=de*b-cf,te[8]=a*d,te[1]=a*f,te[5]=a*e,te[9]=-b,te[2]=cf*b-de,te[6]=df+ce*b,te[10]=a*c;break}case Euler.ZXY:{var _ce=c*e,_cf=c*f,_de=d*e,_df=d*f;te[0]=_ce-_df*b,te[4]=-a*f,te[8]=_de+_cf*b,te[1]=_cf+_de*b,te[5]=a*e,te[9]=_df-_ce*b,te[2]=-a*d,te[6]=b,te[10]=a*c;break}case Euler.ZYX:{var _ae=a*e,_af=a*f,_be=b*e,_bf=b*f;te[0]=c*e,te[4]=_be*d-_af,te[8]=_ae*d+_bf,te[1]=c*f,te[5]=_bf*d+_ae,te[9]=_af*d-_be,te[2]=-d,te[6]=b*c,te[10]=a*c;break}case Euler.YZX:{var ac=a*c,ad=a*d,bc=b*c,bd=b*d;te[0]=c*e,te[4]=bd-ac*f,te[8]=bc*f+ad,te[1]=f,te[5]=a*e,te[9]=-b*e,te[2]=-d*e,te[6]=ad*f+bc,te[10]=ac-bd*f;break}case Euler.XZY:{var _ac=a*c,_ad=a*d,_bc=b*c,_bd=b*d;te[0]=c*e,te[4]=-f,te[8]=d*e,te[1]=_ac*f+_bd,te[5]=a*e,te[9]=_ad*f-_bc,te[2]=_bc*f-_ad,te[6]=b*e,te[10]=_bd*f+_ac;break}default:throw new Error(ERR_UNKNOWN_ORDER);}return te[3]=0,te[7]=0,te[11]=0,te[12]=0,te[13]=0,te[14]=0,te[15]=1,this}},{key:'x',get:function get(){return this[0]},set:function set(value){return this[0]=__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__common__["g" /* checkNumber */])(value)}},{key:'y',get:function get(){return this[1]},set:function set(value){return this[1]=__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__common__["g" /* checkNumber */])(value)}},{key:'z',get:function get(){return this[2]},set:function set(value){return this[2]=__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__common__["g" /* checkNumber */])(value)}},{key:'alpha',get:function get(){return this[0]},set:function set(value){return this[0]=__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__common__["g" /* checkNumber */])(value)}},{key:'beta',get:function get(){return this[1]},set:function set(value){return this[1]=__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__common__["g" /* checkNumber */])(value)}},{key:'gamma',get:function get(){return this[2]},set:function set(value){return this[2]=__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__common__["g" /* checkNumber */])(value)}},{key:'phi',get:function get(){return this[0]},set:function set(value){return this[0]=__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__common__["g" /* checkNumber */])(value)}},{key:'theta',get:function get(){return this[1]},set:function set(value){return this[1]=__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__common__["g" /* checkNumber */])(value)}},{key:'psi',get:function get(){return this[2]},set:function set(value){return this[2]=__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__common__["g" /* checkNumber */])(value)}},{key:'roll',get:function get(){return this[0]},set:function set(value){return this[0]=__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__common__["g" /* checkNumber */])(value)}},{key:'pitch',get:function get(){return this[1]},set:function set(value){return this[1]=__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__common__["g" /* checkNumber */])(value)}},{key:'yaw',get:function get(){return this[2]},set:function set(value){return this[2]=__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__common__["g" /* checkNumber */])(value)}},{key:'order',get:function get(){return this[3]},set:function set(value){return this[3]=checkOrder(value)}}]),Euler}(__WEBPACK_IMPORTED_MODULE_0__math_array__["a" /* default */]);/* harmony default export */ __webpack_exports__["a"] = (Euler);
//# sourceMappingURL=euler.js.map
 
/***/ }),
/* 671 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__common__ = __webpack_require__(31);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__vector3__ = __webpack_require__(113);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_gl_vec3_length__ = __webpack_require__(241);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_gl_vec3_length___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_gl_vec3_length__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__lib_assert__ = __webpack_require__(277);
var _slicedToArray=function(){function sliceIterator(arr,i){var _arr=[],_n=!0,_d=!1,_e=void 0;try{for(var _s,_i=arr[Symbol.iterator]();!(_n=(_s=_i.next()).done)&&(_arr.push(_s.value),!(i&&_arr.length===i));_n=!0);}catch(err){_d=!0,_e=err}finally{try{!_n&&_i['return']&&_i['return']()}finally{if(_d)throw _e}}return _arr}return function(arr,i){if(Array.isArray(arr))return arr;if(Symbol.iterator in Object(arr))return sliceIterator(arr,i);throw new TypeError('Invalid attempt to destructure non-iterable instance')}}(),_createClass=function(){function defineProperties(target,props){for(var descriptor,i=0;i<props.length;i++)descriptor=props[i],descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,'value'in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}();function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError('Cannot call a class as a function')}var EPSILON=1e-6,EARTH_RADIUS_METERS=6371e3,SphericalCoordinates=function(){function SphericalCoordinates(){var _ref=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},phi=_ref.phi,theta=_ref.theta,radius=_ref.radius,bearing=_ref.bearing,pitch=_ref.pitch,altitude=_ref.altitude,_ref$radiusScale=_ref.radiusScale,radiusScale=void 0===_ref$radiusScale?EARTH_RADIUS_METERS:_ref$radiusScale;_classCallCheck(this,SphericalCoordinates),0===arguments.length?(this.phi=0,this.theta=0,this.radius=1):_NumberisFinite(phi)||_NumberisFinite(theta)?(this.phi=phi||0,this.theta=theta||0):(_NumberisFinite(bearing)||_NumberisFinite(pitch))&&(this.bearing=bearing||0,this.pitch=pitch||0),this.radius=radius||1,this.radiusScale=radiusScale||1,this.check()}var _MathPI=Math.PI,_NumberisFinite=Number.isFinite;return _createClass(SphericalCoordinates,[{key:'toString',value:function toString(){return this.formatString(__WEBPACK_IMPORTED_MODULE_0__common__["a" /* config */])}},{key:'formatString',value:function formatString(_ref2){var printTypes=_ref2.printTypes,printDegrees=_ref2.printDegrees,f=__WEBPACK_IMPORTED_MODULE_0__common__["b" /* formatValue */];return(printTypes?'Spherical':'')+'[rho:'+f(this.radius)+',theta:'+f(this.theta)+',phi:'+f(this.phi)+']'}},{key:'equals',value:function equals(other){return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__common__["c" /* equals */])(this.radius,other.radius)&&__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__common__["c" /* equals */])(this.theta,other.theta)&&__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__common__["c" /* equals */])(this.phi,other.phi)}},{key:'exactEquals',value:function exactEquals(other){return this.radius===other.radius&&this.theta===other.theta&&this.phi===other.phi}},{key:'set',value:function set(radius,phi,theta){return this.radius=radius,this.phi=phi,this.theta=theta,this.check()}},{key:'clone',value:function clone(){return new this.constructor().copy(this)}},{key:'copy',value:function copy(other){return this.radius=other.radius,this.phi=other.phi,this.theta=other.theta,this.check()}},{key:'fromLngLatZ',value:function fromLngLatZ(_ref3){var _ref4=_slicedToArray(_ref3,3),lng=_ref4[0],lat=_ref4[1],z=_ref4[2];this.radius=1+z/this.radiusScale,this.phi=__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__common__["d" /* radians */])(lat),this.theta=__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__common__["d" /* radians */])(lng)}},{key:'fromVector3',value:function fromVector3(v){return this.radius=__WEBPACK_IMPORTED_MODULE_2_gl_vec3_length___default()(v),0===this.radius?(this.theta=0,this.phi=0):(this.theta=Math.atan2(v[0],v[1]),this.phi=Math.acos(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__common__["e" /* clamp */])(v[2]/this.radius,-1,1))),this.check()}},{key:'toVector3',value:function toVector3(){return new __WEBPACK_IMPORTED_MODULE_1__vector3__["a" /* default */](0,0,this.radius).rotateX({radians:this.theta}).rotateZ({radians:this.phi})}},{key:'makeSafe',value:function makeSafe(){this.phi=Math.max(EPSILON,Math.min(_MathPI-EPSILON,this.phi))}},{key:'check',value:function check(){return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__lib_assert__["a" /* default */])(_NumberisFinite(this.phi)&&_NumberisFinite(this.theta)&&0<this.radius),this}},{key:'bearing',get:function get(){return 180-__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__common__["f" /* degrees */])(this.phi)},set:function set(v){this.phi=_MathPI-__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__common__["d" /* radians */])(v)}},{key:'pitch',get:function get(){return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__common__["f" /* degrees */])(this.theta)},set:function set(v){this.theta=__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__common__["d" /* radians */])(v)}},{key:'longitude',get:function get(){return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__common__["f" /* degrees */])(this.phi)}},{key:'latitude',get:function get(){return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__common__["f" /* degrees */])(this.theta)}},{key:'lng',get:function get(){return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__common__["f" /* degrees */])(this.phi)}},{key:'lat',get:function get(){return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__common__["f" /* degrees */])(this.theta)}},{key:'z',get:function get(){return(this.radius-1)*this.radiusScale}}]),SphericalCoordinates}();/* harmony default export */ __webpack_exports__["a"] = (SphericalCoordinates);
//# sourceMappingURL=spherical-coordinates.js.map
 
/***/ }),
/* 672 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils_hammer__ = __webpack_require__(283);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__inputs_wheel_input__ = __webpack_require__(675);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__inputs_move_input__ = __webpack_require__(674);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__inputs_key_input__ = __webpack_require__(673);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__constants__ = __webpack_require__(114);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__utils_event_utils__ = __webpack_require__(676);
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
 
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
 
// Copyright (c) 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
 
 
 
 
 
 
 
 
 
 
 
function preventDefault(evt) {
  evt.preventDefault();
}
 
// Unified API for subscribing to events about both
// basic input events (e.g. 'mousemove', 'touchstart', 'wheel')
// and gestural input (e.g. 'click', 'tap', 'panstart').
// Delegates gesture related event registration and handling to Hammer.js.
 
var EventManager = function () {
  function EventManager() {
    var element = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
    var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
 
    _classCallCheck(this, EventManager);
 
    this.options = options;
    this.eventHandlers = [];
 
    this._onBasicInput = this._onBasicInput.bind(this);
    this._onOtherEvent = this._onOtherEvent.bind(this);
 
    this.setElement(element);
 
    // Register all passed events.
    var events = options.events;
 
    if (events) {
      this.on(events);
    }
  }
 
  _createClass(EventManager, [{
    key: 'setElement',
    value: function setElement(element) {
      var _this = this;
 
      if (this.element) {
        // unregister all events
        this.destroy();
      }
      this.element = element;
      if (!element) {
        return;
      }
 
      var options = this.options;
 
      var ManagerClass = options.Manager || __WEBPACK_IMPORTED_MODULE_0__utils_hammer__["a" /* Manager */];
 
      this.manager = new ManagerClass(element, { recognizers: options.recognizers || __WEBPACK_IMPORTED_MODULE_4__constants__["a" /* RECOGNIZERS */] }).on('hammer.input', this._onBasicInput);
 
      if (!options.recognizers) {
        // Set default recognize withs
        // http://hammerjs.github.io/recognize-with/
        Object.keys(__WEBPACK_IMPORTED_MODULE_4__constants__["b" /* RECOGNIZER_COMPATIBLE_MAP */]).forEach(function (name) {
          var recognizer = _this.manager.get(name);
          if (recognizer) {
            __WEBPACK_IMPORTED_MODULE_4__constants__["b" /* RECOGNIZER_COMPATIBLE_MAP */][name].forEach(function (otherName) {
              recognizer.recognizeWith(otherName);
            });
          }
        });
      }
 
      // Handle events not handled by Hammer.js:
      // - mouse wheel
      // - pointer/touch/mouse move
      this.wheelInput = new __WEBPACK_IMPORTED_MODULE_1__inputs_wheel_input__["a" /* default */](element, this._onOtherEvent, { enable: false });
      this.moveInput = new __WEBPACK_IMPORTED_MODULE_2__inputs_move_input__["a" /* default */](element, this._onOtherEvent, { enable: false });
      this.keyInput = new __WEBPACK_IMPORTED_MODULE_3__inputs_key_input__["a" /* default */](element, this._onOtherEvent, { enable: false });
 
      if (options.rightButton) {
        // Block right click
        element.addEventListener('contextmenu', preventDefault);
      }
 
      // Register all existing events
      this.eventHandlers.forEach(function (_ref) {
        var recognizerName = _ref.recognizerName,
            eventAlias = _ref.eventAlias,
            wrappedHandler = _ref.wrappedHandler;
 
        // Enable recognizer for this event.
        _this._toggleRecognizer(recognizerName, true);
        _this.manager.on(eventAlias, wrappedHandler);
      });
    }
 
    // Tear down internal event management implementations.
 
  }, {
    key: 'destroy',
    value: function destroy() {
      if (this.element) {
        this.element.removeEventListener('contextmenu', preventDefault);
 
        // wheelInput etc. are created in setElement() and therefore
        // cannot exist if there is no element
        this.wheelInput.destroy();
        this.moveInput.destroy();
        this.keyInput.destroy();
        this.manager.destroy();
 
        this.wheelInput = null;
        this.moveInput = null;
        this.keyInput = null;
        this.manager = null;
        this.element = null;
      }
    }
 
    // Register an event handler function to be called on `event`.
 
  }, {
    key: 'on',
    value: function on(event, handler, srcElement) {
      if (typeof event === 'string') {
        this._addEventHandler(event, handler, srcElement);
      } else {
        srcElement = handler;
        // If `event` is a map, call `on()` for each entry.
        for (var eventName in event) {
          this._addEventHandler(eventName, event[eventName], srcElement);
        }
      }
    }
 
    /**
     * Deregister a previously-registered event handler.
     * @param {string|Object} event   An event name (String) or map of event names to handlers
     * @param {Function} [handler]    The function to be called on `event`.
     */
 
  }, {
    key: 'off',
    value: function off(event, handler) {
      if (typeof event === 'string') {
        this._removeEventHandler(event, handler);
      } else {
        // If `event` is a map, call `off()` for each entry.
        for (var eventName in event) {
          this._removeEventHandler(eventName, event[eventName]);
        }
      }
    }
 
    /*
     * Enable/disable recognizer for the given event
     */
 
  }, {
    key: '_toggleRecognizer',
    value: function _toggleRecognizer(name, enabled) {
      var manager = this.manager;
 
      if (!manager) {
        return;
      }
      var recognizer = manager.get(name);
      if (recognizer) {
        recognizer.set({ enable: enabled });
 
        var fallbackRecognizers = __WEBPACK_IMPORTED_MODULE_4__constants__["c" /* RECOGNIZER_FALLBACK_MAP */][name];
        if (fallbackRecognizers && !this.options.recognizers) {
          // Set default require failures
          // http://hammerjs.github.io/require-failure/
          fallbackRecognizers.forEach(function (otherName) {
            var otherRecognizer = manager.get(otherName);
            if (enabled) {
              // Wait for this recognizer to fail
              otherRecognizer.requireFailure(name);
            } else {
              // Do not wait for this recognizer to fail
              otherRecognizer.dropRequireFailure(name);
            }
          });
        }
      }
      this.wheelInput.enableEventType(name, enabled);
      this.moveInput.enableEventType(name, enabled);
      this.keyInput.enableEventType(name, enabled);
    }
 
    /**
     * Process the event registration for a single event + handler.
     */
 
  }, {
    key: '_addEventHandler',
    value: function _addEventHandler(event, handler) {
      var srcElement = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
      var manager = this.manager,
          eventHandlers = this.eventHandlers;
 
      var wrappedHandler = this._wrapEventHandler(event, handler, srcElement);
      // Alias to a recognized gesture as necessary.
      var eventAlias = __WEBPACK_IMPORTED_MODULE_4__constants__["d" /* GESTURE_EVENT_ALIASES */][event] || event;
      // Get recognizer for this event
      var recognizerName = __WEBPACK_IMPORTED_MODULE_4__constants__["e" /* EVENT_RECOGNIZER_MAP */][eventAlias] || eventAlias;
      // Enable recognizer for this event.
      this._toggleRecognizer(recognizerName, true);
 
      // Find ancestors
      var ancestorEventHandlers = eventHandlers.filter(function (entry) {
        return entry.eventAlias === eventAlias && entry.srcElement !== srcElement && (!entry.srcElement || entry.srcElement.contains(srcElement));
      });
 
      // Save wrapped handler
      eventHandlers.push({ event: event, eventAlias: eventAlias, recognizerName: recognizerName, srcElement: srcElement,
        handler: handler, wrappedHandler: wrappedHandler });
 
      // Sort handlers by DOM hierarchy
      // So the event will always fire first on child nodes
      ancestorEventHandlers.forEach(function (entry) {
        return manager.off(eventAlias, entry.wrappedHandler);
      });
      if (manager) {
        manager.on(eventAlias, wrappedHandler);
      }
      ancestorEventHandlers.forEach(function (entry) {
        return manager.on(eventAlias, entry.wrappedHandler);
      });
    }
 
    /**
     * Process the event deregistration for a single event + handler.
     */
 
  }, {
    key: '_removeEventHandler',
    value: function _removeEventHandler(event, handler) {
      var manager = this.manager,
          eventHandlers = this.eventHandlers;
 
      var eventHandlerRemoved = false;
 
      // Find saved handler if any.
      for (var i = eventHandlers.length; i--;) {
        var entry = eventHandlers[i];
        if (entry.event === event && entry.handler === handler) {
          // Deregister event handler.
          if (manager) {
            manager.off(entry.eventAlias, entry.wrappedHandler);
          }
          // Delete saved handler
          eventHandlers.splice(i, 1);
          eventHandlerRemoved = true;
        }
      }
 
      if (eventHandlerRemoved) {
        // Alias to a recognized gesture as necessary.
        var eventAlias = __WEBPACK_IMPORTED_MODULE_4__constants__["d" /* GESTURE_EVENT_ALIASES */][event] || event;
        // Get recognizer for this event
        var recognizerName = __WEBPACK_IMPORTED_MODULE_4__constants__["e" /* EVENT_RECOGNIZER_MAP */][eventAlias] || eventAlias;
        // Disable recognizer if no more handlers are attached to its events
        var isRecognizerUsed = eventHandlers.find(function (entry) {
          return entry.recognizerName === recognizerName;
        });
        if (!isRecognizerUsed) {
          this._toggleRecognizer(recognizerName, false);
        }
      }
    }
 
    /**
     * Returns an event handler that aliases events and add props before passing
     * to the real handler.
     */
 
  }, {
    key: '_wrapEventHandler',
    value: function _wrapEventHandler(type, handler, srcElement) {
      var _this2 = this;
 
      return function (event) {
        var mjolnirEvent = event.mjolnirEvent;
 
 
        if (!mjolnirEvent) {
          mjolnirEvent = _this2._normalizeEvent(event);
          event.mjolnirEvent = mjolnirEvent;
        }
 
        var isStopped = mjolnirEvent.handled && mjolnirEvent.handled !== srcElement;
 
        if (!isStopped) {
          var isFromDecendant = !srcElement || srcElement.contains(event.srcEvent.target);
          if (isFromDecendant) {
            handler(Object.assign({}, mjolnirEvent, {
              type: type,
              stopPropagation: function stopPropagation() {
                if (!mjolnirEvent.handled) {
                  mjolnirEvent.handled = srcElement;
                }
              }
            }));
          }
        }
      };
    }
 
    /**
     * Normalizes hammerjs and custom events to have predictable fields.
     */
 
  }, {
    key: '_normalizeEvent',
    value: function _normalizeEvent(event) {
      var element = this.element;
 
 
      return Object.assign({}, event, __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__utils_event_utils__["a" /* whichButtons */])(event), __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__utils_event_utils__["b" /* getOffsetPosition */])(event, element), {
        handled: false,
        rootElement: element
      });
    }
 
    /**
     * Handle basic events using the 'hammer.input' Hammer.js API:
     * Before running Recognizers, Hammer emits a 'hammer.input' event
     * with the basic event info. This function emits all basic events
     * aliased to the "class" of event received.
     * See constants.BASIC_EVENT_CLASSES basic event class definitions.
     */
 
  }, {
    key: '_onBasicInput',
    value: function _onBasicInput(event) {
      var srcEvent = event.srcEvent;
 
      var alias = __WEBPACK_IMPORTED_MODULE_4__constants__["f" /* BASIC_EVENT_ALIASES */][srcEvent.type];
      if (alias) {
        // fire all events aliased to srcEvent.type
        this.manager.emit(alias, event);
      }
    }
 
    /**
     * Handle events not supported by Hammer.js,
     * and pipe back out through same (Hammer) channel used by other events.
     */
 
  }, {
    key: '_onOtherEvent',
    value: function _onOtherEvent(event) {
      this.manager.emit(event.type, event);
    }
  }]);
 
  return EventManager;
}();
 
/* harmony default export */ __webpack_exports__["a"] = (EventManager);
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9ldmVudC1tYW5hZ2VyLmpzIl0sIm5hbWVzIjpbIk1hbmFnZXIiLCJXaGVlbElucHV0IiwiTW92ZUlucHV0IiwiS2V5SW5wdXQiLCJCQVNJQ19FVkVOVF9BTElBU0VTIiwiRVZFTlRfUkVDT0dOSVpFUl9NQVAiLCJHRVNUVVJFX0VWRU5UX0FMSUFTRVMiLCJSRUNPR05JWkVSUyIsIlJFQ09HTklaRVJfQ09NUEFUSUJMRV9NQVAiLCJSRUNPR05JWkVSX0ZBTExCQUNLX01BUCIsIndoaWNoQnV0dG9ucyIsImdldE9mZnNldFBvc2l0aW9uIiwicHJldmVudERlZmF1bHQiLCJldnQiLCJFdmVudE1hbmFnZXIiLCJlbGVtZW50Iiwib3B0aW9ucyIsImV2ZW50SGFuZGxlcnMiLCJfb25CYXNpY0lucHV0IiwiYmluZCIsIl9vbk90aGVyRXZlbnQiLCJzZXRFbGVtZW50IiwiZXZlbnRzIiwib24iLCJkZXN0cm95IiwiTWFuYWdlckNsYXNzIiwibWFuYWdlciIsInJlY29nbml6ZXJzIiwiT2JqZWN0Iiwia2V5cyIsImZvckVhY2giLCJyZWNvZ25pemVyIiwiZ2V0IiwibmFtZSIsInJlY29nbml6ZVdpdGgiLCJvdGhlck5hbWUiLCJ3aGVlbElucHV0IiwiZW5hYmxlIiwibW92ZUlucHV0Iiwia2V5SW5wdXQiLCJyaWdodEJ1dHRvbiIsImFkZEV2ZW50TGlzdGVuZXIiLCJyZWNvZ25pemVyTmFtZSIsImV2ZW50QWxpYXMiLCJ3cmFwcGVkSGFuZGxlciIsIl90b2dnbGVSZWNvZ25pemVyIiwicmVtb3ZlRXZlbnRMaXN0ZW5lciIsImV2ZW50IiwiaGFuZGxlciIsInNyY0VsZW1lbnQiLCJfYWRkRXZlbnRIYW5kbGVyIiwiZXZlbnROYW1lIiwiX3JlbW92ZUV2ZW50SGFuZGxlciIsImVuYWJsZWQiLCJzZXQiLCJmYWxsYmFja1JlY29nbml6ZXJzIiwib3RoZXJSZWNvZ25pemVyIiwicmVxdWlyZUZhaWx1cmUiLCJkcm9wUmVxdWlyZUZhaWx1cmUiLCJlbmFibGVFdmVudFR5cGUiLCJfd3JhcEV2ZW50SGFuZGxlciIsImFuY2VzdG9yRXZlbnRIYW5kbGVycyIsImZpbHRlciIsImVudHJ5IiwiY29udGFpbnMiLCJwdXNoIiwib2ZmIiwiZXZlbnRIYW5kbGVyUmVtb3ZlZCIsImkiLCJsZW5ndGgiLCJzcGxpY2UiLCJpc1JlY29nbml6ZXJVc2VkIiwiZmluZCIsInR5cGUiLCJtam9sbmlyRXZlbnQiLCJfbm9ybWFsaXplRXZlbnQiLCJpc1N0b3BwZWQiLCJoYW5kbGVkIiwiaXNGcm9tRGVjZW5kYW50Iiwic3JjRXZlbnQiLCJ0YXJnZXQiLCJhc3NpZ24iLCJzdG9wUHJvcGFnYXRpb24iLCJyb290RWxlbWVudCIsImFsaWFzIiwiZW1pdCJdLCJtYXBwaW5ncyI6Ijs7OztBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBLFNBQVFBLE9BQVIsUUFBc0IsZ0JBQXRCOztBQUVBLE9BQU9DLFVBQVAsTUFBdUIsc0JBQXZCO0FBQ0EsT0FBT0MsU0FBUCxNQUFzQixxQkFBdEI7QUFDQSxPQUFPQyxRQUFQLE1BQXFCLG9CQUFyQjs7QUFFQSxTQUNFQyxtQkFERixFQUVFQyxvQkFGRixFQUdFQyxxQkFIRixFQUlFQyxXQUpGLEVBS0VDLHlCQUxGLEVBTUVDLHVCQU5GLFFBT08sYUFQUDs7QUFTQSxTQUFRQyxZQUFSLEVBQXNCQyxpQkFBdEIsUUFBOEMscUJBQTlDOztBQUVBLFNBQVNDLGNBQVQsQ0FBd0JDLEdBQXhCLEVBQTZCO0FBQzNCQSxNQUFJRCxjQUFKO0FBQ0Q7O0FBRUQ7QUFDQTtBQUNBO0FBQ0E7O0lBQ3FCRSxZO0FBQ25CLDBCQUEwQztBQUFBLFFBQTlCQyxPQUE4Qix1RUFBcEIsSUFBb0I7QUFBQSxRQUFkQyxPQUFjLHVFQUFKLEVBQUk7O0FBQUE7O0FBQ3hDLFNBQUtBLE9BQUwsR0FBZUEsT0FBZjtBQUNBLFNBQUtDLGFBQUwsR0FBcUIsRUFBckI7O0FBRUEsU0FBS0MsYUFBTCxHQUFxQixLQUFLQSxhQUFMLENBQW1CQyxJQUFuQixDQUF3QixJQUF4QixDQUFyQjtBQUNBLFNBQUtDLGFBQUwsR0FBcUIsS0FBS0EsYUFBTCxDQUFtQkQsSUFBbkIsQ0FBd0IsSUFBeEIsQ0FBckI7O0FBRUEsU0FBS0UsVUFBTCxDQUFnQk4sT0FBaEI7O0FBRUE7QUFUd0MsUUFVakNPLE1BVmlDLEdBVXZCTixPQVZ1QixDQVVqQ00sTUFWaUM7O0FBV3hDLFFBQUlBLE1BQUosRUFBWTtBQUNWLFdBQUtDLEVBQUwsQ0FBUUQsTUFBUjtBQUNEO0FBQ0Y7Ozs7K0JBRVVQLE8sRUFBUztBQUFBOztBQUNsQixVQUFJLEtBQUtBLE9BQVQsRUFBa0I7QUFDaEI7QUFDQSxhQUFLUyxPQUFMO0FBQ0Q7QUFDRCxXQUFLVCxPQUFMLEdBQWVBLE9BQWY7QUFDQSxVQUFJLENBQUNBLE9BQUwsRUFBYztBQUNaO0FBQ0Q7O0FBUmlCLFVBVVhDLE9BVlcsR0FVQSxJQVZBLENBVVhBLE9BVlc7O0FBV2xCLFVBQU1TLGVBQWVULFFBQVFoQixPQUFSLElBQW1CQSxPQUF4Qzs7QUFFQSxXQUFLMEIsT0FBTCxHQUFlLElBQUlELFlBQUosQ0FBaUJWLE9BQWpCLEVBQTBCLEVBQUNZLGFBQWFYLFFBQVFXLFdBQVIsSUFBdUJwQixXQUFyQyxFQUExQixFQUNaZ0IsRUFEWSxDQUNULGNBRFMsRUFDTyxLQUFLTCxhQURaLENBQWY7O0FBR0EsVUFBSSxDQUFDRixRQUFRVyxXQUFiLEVBQTBCO0FBQ3hCO0FBQ0E7QUFDQUMsZUFBT0MsSUFBUCxDQUFZckIseUJBQVosRUFBdUNzQixPQUF2QyxDQUErQyxnQkFBUTtBQUNyRCxjQUFNQyxhQUFhLE1BQUtMLE9BQUwsQ0FBYU0sR0FBYixDQUFpQkMsSUFBakIsQ0FBbkI7QUFDQSxjQUFJRixVQUFKLEVBQWdCO0FBQ2R2QixzQ0FBMEJ5QixJQUExQixFQUFnQ0gsT0FBaEMsQ0FBd0MscUJBQWE7QUFDbkRDLHlCQUFXRyxhQUFYLENBQXlCQyxTQUF6QjtBQUNELGFBRkQ7QUFHRDtBQUNGLFNBUEQ7QUFRRDs7QUFFRDtBQUNBO0FBQ0E7QUFDQSxXQUFLQyxVQUFMLEdBQWtCLElBQUluQyxVQUFKLENBQWVjLE9BQWYsRUFBd0IsS0FBS0ssYUFBN0IsRUFBNEMsRUFBQ2lCLFFBQVEsS0FBVCxFQUE1QyxDQUFsQjtBQUNBLFdBQUtDLFNBQUwsR0FBaUIsSUFBSXBDLFNBQUosQ0FBY2EsT0FBZCxFQUF1QixLQUFLSyxhQUE1QixFQUEyQyxFQUFDaUIsUUFBUSxLQUFULEVBQTNDLENBQWpCO0FBQ0EsV0FBS0UsUUFBTCxHQUFnQixJQUFJcEMsUUFBSixDQUFhWSxPQUFiLEVBQXNCLEtBQUtLLGFBQTNCLEVBQTBDLEVBQUNpQixRQUFRLEtBQVQsRUFBMUMsQ0FBaEI7O0FBRUEsVUFBSXJCLFFBQVF3QixXQUFaLEVBQXlCO0FBQ3ZCO0FBQ0F6QixnQkFBUTBCLGdCQUFSLENBQXlCLGFBQXpCLEVBQXdDN0IsY0FBeEM7QUFDRDs7QUFFRDtBQUNBLFdBQUtLLGFBQUwsQ0FBbUJhLE9BQW5CLENBQTJCLGdCQUFrRDtBQUFBLFlBQWhEWSxjQUFnRCxRQUFoREEsY0FBZ0Q7QUFBQSxZQUFoQ0MsVUFBZ0MsUUFBaENBLFVBQWdDO0FBQUEsWUFBcEJDLGNBQW9CLFFBQXBCQSxjQUFvQjs7QUFDM0U7QUFDQSxjQUFLQyxpQkFBTCxDQUF1QkgsY0FBdkIsRUFBdUMsSUFBdkM7QUFDQSxjQUFLaEIsT0FBTCxDQUFhSCxFQUFiLENBQWdCb0IsVUFBaEIsRUFBNEJDLGNBQTVCO0FBQ0QsT0FKRDtBQUtEOztBQUVEOzs7OzhCQUNVO0FBQ1IsVUFBSSxLQUFLN0IsT0FBVCxFQUFrQjtBQUNoQixhQUFLQSxPQUFMLENBQWErQixtQkFBYixDQUFpQyxhQUFqQyxFQUFnRGxDLGNBQWhEOztBQUVBO0FBQ0E7QUFDQSxhQUFLd0IsVUFBTCxDQUFnQlosT0FBaEI7QUFDQSxhQUFLYyxTQUFMLENBQWVkLE9BQWY7QUFDQSxhQUFLZSxRQUFMLENBQWNmLE9BQWQ7QUFDQSxhQUFLRSxPQUFMLENBQWFGLE9BQWI7O0FBRUEsYUFBS1ksVUFBTCxHQUFrQixJQUFsQjtBQUNBLGFBQUtFLFNBQUwsR0FBaUIsSUFBakI7QUFDQSxhQUFLQyxRQUFMLEdBQWdCLElBQWhCO0FBQ0EsYUFBS2IsT0FBTCxHQUFlLElBQWY7QUFDQSxhQUFLWCxPQUFMLEdBQWUsSUFBZjtBQUNEO0FBQ0Y7O0FBRUQ7Ozs7dUJBQ0dnQyxLLEVBQU9DLE8sRUFBU0MsVSxFQUFZO0FBQzdCLFVBQUksT0FBT0YsS0FBUCxLQUFpQixRQUFyQixFQUErQjtBQUM3QixhQUFLRyxnQkFBTCxDQUFzQkgsS0FBdEIsRUFBNkJDLE9BQTdCLEVBQXNDQyxVQUF0QztBQUNELE9BRkQsTUFFTztBQUNMQSxxQkFBYUQsT0FBYjtBQUNBO0FBQ0EsYUFBSyxJQUFNRyxTQUFYLElBQXdCSixLQUF4QixFQUErQjtBQUM3QixlQUFLRyxnQkFBTCxDQUFzQkMsU0FBdEIsRUFBaUNKLE1BQU1JLFNBQU4sQ0FBakMsRUFBbURGLFVBQW5EO0FBQ0Q7QUFDRjtBQUNGOztBQUVEOzs7Ozs7Ozt3QkFLSUYsSyxFQUFPQyxPLEVBQVM7QUFDbEIsVUFBSSxPQUFPRCxLQUFQLEtBQWlCLFFBQXJCLEVBQStCO0FBQzdCLGFBQUtLLG1CQUFMLENBQXlCTCxLQUF6QixFQUFnQ0MsT0FBaEM7QUFDRCxPQUZELE1BRU87QUFDTDtBQUNBLGFBQUssSUFBTUcsU0FBWCxJQUF3QkosS0FBeEIsRUFBK0I7QUFDN0IsZUFBS0ssbUJBQUwsQ0FBeUJELFNBQXpCLEVBQW9DSixNQUFNSSxTQUFOLENBQXBDO0FBQ0Q7QUFDRjtBQUNGOztBQUVEOzs7Ozs7c0NBR2tCbEIsSSxFQUFNb0IsTyxFQUFTO0FBQUEsVUFDeEIzQixPQUR3QixHQUNiLElBRGEsQ0FDeEJBLE9BRHdCOztBQUUvQixVQUFJLENBQUNBLE9BQUwsRUFBYztBQUNaO0FBQ0Q7QUFDRCxVQUFNSyxhQUFhTCxRQUFRTSxHQUFSLENBQVlDLElBQVosQ0FBbkI7QUFDQSxVQUFJRixVQUFKLEVBQWdCO0FBQ2RBLG1CQUFXdUIsR0FBWCxDQUFlLEVBQUNqQixRQUFRZ0IsT0FBVCxFQUFmOztBQUVBLFlBQU1FLHNCQUFzQjlDLHdCQUF3QndCLElBQXhCLENBQTVCO0FBQ0EsWUFBSXNCLHVCQUF1QixDQUFDLEtBQUt2QyxPQUFMLENBQWFXLFdBQXpDLEVBQXNEO0FBQ3BEO0FBQ0E7QUFDQTRCLDhCQUFvQnpCLE9BQXBCLENBQTRCLHFCQUFhO0FBQ3ZDLGdCQUFNMEIsa0JBQWtCOUIsUUFBUU0sR0FBUixDQUFZRyxTQUFaLENBQXhCO0FBQ0EsZ0JBQUlrQixPQUFKLEVBQWE7QUFDWDtBQUNBRyw4QkFBZ0JDLGNBQWhCLENBQStCeEIsSUFBL0I7QUFDRCxhQUhELE1BR087QUFDTDtBQUNBdUIsOEJBQWdCRSxrQkFBaEIsQ0FBbUN6QixJQUFuQztBQUNEO0FBQ0YsV0FURDtBQVVEO0FBQ0Y7QUFDRCxXQUFLRyxVQUFMLENBQWdCdUIsZUFBaEIsQ0FBZ0MxQixJQUFoQyxFQUFzQ29CLE9BQXRDO0FBQ0EsV0FBS2YsU0FBTCxDQUFlcUIsZUFBZixDQUErQjFCLElBQS9CLEVBQXFDb0IsT0FBckM7QUFDQSxXQUFLZCxRQUFMLENBQWNvQixlQUFkLENBQThCMUIsSUFBOUIsRUFBb0NvQixPQUFwQztBQUNEOztBQUVEOzs7Ozs7cUNBR2lCTixLLEVBQU9DLE8sRUFBNEI7QUFBQSxVQUFuQkMsVUFBbUIsdUVBQU4sSUFBTTtBQUFBLFVBQzNDdkIsT0FEMkMsR0FDakIsSUFEaUIsQ0FDM0NBLE9BRDJDO0FBQUEsVUFDbENULGFBRGtDLEdBQ2pCLElBRGlCLENBQ2xDQSxhQURrQzs7QUFFbEQsVUFBTTJCLGlCQUFpQixLQUFLZ0IsaUJBQUwsQ0FBdUJiLEtBQXZCLEVBQThCQyxPQUE5QixFQUF1Q0MsVUFBdkMsQ0FBdkI7QUFDQTtBQUNBLFVBQU1OLGFBQWFyQyxzQkFBc0J5QyxLQUF0QixLQUFnQ0EsS0FBbkQ7QUFDQTtBQUNBLFVBQU1MLGlCQUFpQnJDLHFCQUFxQnNDLFVBQXJCLEtBQW9DQSxVQUEzRDtBQUNBO0FBQ0EsV0FBS0UsaUJBQUwsQ0FBdUJILGNBQXZCLEVBQXVDLElBQXZDOztBQUVBO0FBQ0EsVUFBTW1CLHdCQUF3QjVDLGNBQWM2QyxNQUFkLENBQXFCLGlCQUFTO0FBQzFELGVBQU9DLE1BQU1wQixVQUFOLEtBQXFCQSxVQUFyQixJQUNMb0IsTUFBTWQsVUFBTixLQUFxQkEsVUFEaEIsS0FFSixDQUFDYyxNQUFNZCxVQUFQLElBQXFCYyxNQUFNZCxVQUFOLENBQWlCZSxRQUFqQixDQUEwQmYsVUFBMUIsQ0FGakIsQ0FBUDtBQUdELE9BSjZCLENBQTlCOztBQU1BO0FBQ0FoQyxvQkFBY2dELElBQWQsQ0FBbUIsRUFBQ2xCLFlBQUQsRUFBUUosc0JBQVIsRUFBb0JELDhCQUFwQixFQUFvQ08sc0JBQXBDO0FBQ2pCRCx3QkFEaUIsRUFDUkosOEJBRFEsRUFBbkI7O0FBR0E7QUFDQTtBQUNBaUIsNEJBQXNCL0IsT0FBdEIsQ0FBOEI7QUFBQSxlQUFTSixRQUFRd0MsR0FBUixDQUFZdkIsVUFBWixFQUF3Qm9CLE1BQU1uQixjQUE5QixDQUFUO0FBQUEsT0FBOUI7QUFDQSxVQUFJbEIsT0FBSixFQUFhO0FBQ1hBLGdCQUFRSCxFQUFSLENBQVdvQixVQUFYLEVBQXVCQyxjQUF2QjtBQUNEO0FBQ0RpQiw0QkFBc0IvQixPQUF0QixDQUE4QjtBQUFBLGVBQVNKLFFBQVFILEVBQVIsQ0FBV29CLFVBQVgsRUFBdUJvQixNQUFNbkIsY0FBN0IsQ0FBVDtBQUFBLE9BQTlCO0FBQ0Q7O0FBRUQ7Ozs7Ozt3Q0FHb0JHLEssRUFBT0MsTyxFQUFTO0FBQUEsVUFDM0J0QixPQUQyQixHQUNELElBREMsQ0FDM0JBLE9BRDJCO0FBQUEsVUFDbEJULGFBRGtCLEdBQ0QsSUFEQyxDQUNsQkEsYUFEa0I7O0FBRWxDLFVBQUlrRCxzQkFBc0IsS0FBMUI7O0FBRUE7QUFDQSxXQUFLLElBQUlDLElBQUluRCxjQUFjb0QsTUFBM0IsRUFBbUNELEdBQW5DLEdBQXlDO0FBQ3ZDLFlBQU1MLFFBQVE5QyxjQUFjbUQsQ0FBZCxDQUFkO0FBQ0EsWUFBSUwsTUFBTWhCLEtBQU4sS0FBZ0JBLEtBQWhCLElBQXlCZ0IsTUFBTWYsT0FBTixLQUFrQkEsT0FBL0MsRUFBd0Q7QUFDdEQ7QUFDQSxjQUFJdEIsT0FBSixFQUFhO0FBQ1hBLG9CQUFRd0MsR0FBUixDQUFZSCxNQUFNcEIsVUFBbEIsRUFBOEJvQixNQUFNbkIsY0FBcEM7QUFDRDtBQUNEO0FBQ0EzQix3QkFBY3FELE1BQWQsQ0FBcUJGLENBQXJCLEVBQXdCLENBQXhCO0FBQ0FELGdDQUFzQixJQUF0QjtBQUNEO0FBQ0Y7O0FBRUQsVUFBSUEsbUJBQUosRUFBeUI7QUFDdkI7QUFDQSxZQUFNeEIsYUFBYXJDLHNCQUFzQnlDLEtBQXRCLEtBQWdDQSxLQUFuRDtBQUNBO0FBQ0EsWUFBTUwsaUJBQWlCckMscUJBQXFCc0MsVUFBckIsS0FBb0NBLFVBQTNEO0FBQ0E7QUFDQSxZQUFNNEIsbUJBQW1CdEQsY0FBY3VELElBQWQsQ0FDdkI7QUFBQSxpQkFBU1QsTUFBTXJCLGNBQU4sS0FBeUJBLGNBQWxDO0FBQUEsU0FEdUIsQ0FBekI7QUFHQSxZQUFJLENBQUM2QixnQkFBTCxFQUF1QjtBQUNyQixlQUFLMUIsaUJBQUwsQ0FBdUJILGNBQXZCLEVBQXVDLEtBQXZDO0FBQ0Q7QUFDRjtBQUNGOztBQUVEOzs7Ozs7O3NDQUlrQitCLEksRUFBTXpCLE8sRUFBU0MsVSxFQUFZO0FBQUE7O0FBQzNDLGFBQU8saUJBQVM7QUFBQSxZQUNUeUIsWUFEUyxHQUNPM0IsS0FEUCxDQUNUMkIsWUFEUzs7O0FBR2QsWUFBSSxDQUFDQSxZQUFMLEVBQW1CO0FBQ2pCQSx5QkFBZSxPQUFLQyxlQUFMLENBQXFCNUIsS0FBckIsQ0FBZjtBQUNBQSxnQkFBTTJCLFlBQU4sR0FBcUJBLFlBQXJCO0FBQ0Q7O0FBRUQsWUFBTUUsWUFBWUYsYUFBYUcsT0FBYixJQUF3QkgsYUFBYUcsT0FBYixLQUF5QjVCLFVBQW5FOztBQUVBLFlBQUksQ0FBQzJCLFNBQUwsRUFBZ0I7QUFDZCxjQUFNRSxrQkFBa0IsQ0FBQzdCLFVBQUQsSUFBZUEsV0FBV2UsUUFBWCxDQUFvQmpCLE1BQU1nQyxRQUFOLENBQWVDLE1BQW5DLENBQXZDO0FBQ0EsY0FBSUYsZUFBSixFQUFxQjtBQUNuQjlCLG9CQUFRcEIsT0FBT3FELE1BQVAsQ0FBYyxFQUFkLEVBQWtCUCxZQUFsQixFQUFnQztBQUN0Q0Qsd0JBRHNDO0FBRXRDUywrQkFBaUIsMkJBQU07QUFDckIsb0JBQUksQ0FBQ1IsYUFBYUcsT0FBbEIsRUFBMkI7QUFDekJILCtCQUFhRyxPQUFiLEdBQXVCNUIsVUFBdkI7QUFDRDtBQUNGO0FBTnFDLGFBQWhDLENBQVI7QUFRRDtBQUNGO0FBQ0YsT0F2QkQ7QUF3QkQ7O0FBRUQ7Ozs7OztvQ0FHZ0JGLEssRUFBTztBQUFBLFVBQ2RoQyxPQURjLEdBQ0gsSUFERyxDQUNkQSxPQURjOzs7QUFHckIsYUFBT2EsT0FBT3FELE1BQVAsQ0FBYyxFQUFkLEVBQWtCbEMsS0FBbEIsRUFDTHJDLGFBQWFxQyxLQUFiLENBREssRUFFTHBDLGtCQUFrQm9DLEtBQWxCLEVBQXlCaEMsT0FBekIsQ0FGSyxFQUdMO0FBQ0U4RCxpQkFBUyxLQURYO0FBRUVNLHFCQUFhcEU7QUFGZixPQUhLLENBQVA7QUFPRDs7QUFFRDs7Ozs7Ozs7OztrQ0FPY2dDLEssRUFBTztBQUFBLFVBQ1pnQyxRQURZLEdBQ0FoQyxLQURBLENBQ1pnQyxRQURZOztBQUVuQixVQUFNSyxRQUFRaEYsb0JBQW9CMkUsU0FBU04sSUFBN0IsQ0FBZDtBQUNBLFVBQUlXLEtBQUosRUFBVztBQUNUO0FBQ0EsYUFBSzFELE9BQUwsQ0FBYTJELElBQWIsQ0FBa0JELEtBQWxCLEVBQXlCckMsS0FBekI7QUFDRDtBQUNGOztBQUVEOzs7Ozs7O2tDQUljQSxLLEVBQU87QUFDbkIsV0FBS3JCLE9BQUwsQ0FBYTJELElBQWIsQ0FBa0J0QyxNQUFNMEIsSUFBeEIsRUFBOEIxQixLQUE5QjtBQUNEOzs7Ozs7ZUE3UmtCakMsWSIsImZpbGUiOiJldmVudC1tYW5hZ2VyLmpzIiwic291cmNlc0NvbnRlbnQiOlsiLy8gQ29weXJpZ2h0IChjKSAyMDE3IFViZXIgVGVjaG5vbG9naWVzLCBJbmMuXG4vL1xuLy8gUGVybWlzc2lvbiBpcyBoZXJlYnkgZ3JhbnRlZCwgZnJlZSBvZiBjaGFyZ2UsIHRvIGFueSBwZXJzb24gb2J0YWluaW5nIGEgY29weVxuLy8gb2YgdGhpcyBzb2Z0d2FyZSBhbmQgYXNzb2NpYXRlZCBkb2N1bWVudGF0aW9uIGZpbGVzICh0aGUgXCJTb2Z0d2FyZVwiKSwgdG8gZGVhbFxuLy8gaW4gdGhlIFNvZnR3YXJlIHdpdGhvdXQgcmVzdHJpY3Rpb24sIGluY2x1ZGluZyB3aXRob3V0IGxpbWl0YXRpb24gdGhlIHJpZ2h0c1xuLy8gdG8gdXNlLCBjb3B5LCBtb2RpZnksIG1lcmdlLCBwdWJsaXNoLCBkaXN0cmlidXRlLCBzdWJsaWNlbnNlLCBhbmQvb3Igc2VsbFxuLy8gY29waWVzIG9mIHRoZSBTb2Z0d2FyZSwgYW5kIHRvIHBlcm1pdCBwZXJzb25zIHRvIHdob20gdGhlIFNvZnR3YXJlIGlzXG4vLyBmdXJuaXNoZWQgdG8gZG8gc28sIHN1YmplY3QgdG8gdGhlIGZvbGxvd2luZyBjb25kaXRpb25zOlxuLy9cbi8vIFRoZSBhYm92ZSBjb3B5cmlnaHQgbm90aWNlIGFuZCB0aGlzIHBlcm1pc3Npb24gbm90aWNlIHNoYWxsIGJlIGluY2x1ZGVkIGluXG4vLyBhbGwgY29waWVzIG9yIHN1YnN0YW50aWFsIHBvcnRpb25zIG9mIHRoZSBTb2Z0d2FyZS5cbi8vXG4vLyBUSEUgU09GVFdBUkUgSVMgUFJPVklERUQgXCJBUyBJU1wiLCBXSVRIT1VUIFdBUlJBTlRZIE9GIEFOWSBLSU5ELCBFWFBSRVNTIE9SXG4vLyBJTVBMSUVELCBJTkNMVURJTkcgQlVUIE5PVCBMSU1JVEVEIFRPIFRIRSBXQVJSQU5USUVTIE9GIE1FUkNIQU5UQUJJTElUWSxcbi8vIEZJVE5FU1MgRk9SIEEgUEFSVElDVUxBUiBQVVJQT1NFIEFORCBOT05JTkZSSU5HRU1FTlQuIElOIE5PIEVWRU5UIFNIQUxMIFRIRVxuLy8gQVVUSE9SUyBPUiBDT1BZUklHSFQgSE9MREVSUyBCRSBMSUFCTEUgRk9SIEFOWSBDTEFJTSwgREFNQUdFUyBPUiBPVEhFUlxuLy8gTElBQklMSVRZLCBXSEVUSEVSIElOIEFOIEFDVElPTiBPRiBDT05UUkFDVCwgVE9SVCBPUiBPVEhFUldJU0UsIEFSSVNJTkcgRlJPTSxcbi8vIE9VVCBPRiBPUiBJTiBDT05ORUNUSU9OIFdJVEggVEhFIFNPRlRXQVJFIE9SIFRIRSBVU0UgT1IgT1RIRVIgREVBTElOR1MgSU5cbi8vIFRIRSBTT0ZUV0FSRS5cblxuaW1wb3J0IHtNYW5hZ2VyfSBmcm9tICcuL3V0aWxzL2hhbW1lcic7XG5cbmltcG9ydCBXaGVlbElucHV0IGZyb20gJy4vaW5wdXRzL3doZWVsLWlucHV0JztcbmltcG9ydCBNb3ZlSW5wdXQgZnJvbSAnLi9pbnB1dHMvbW92ZS1pbnB1dCc7XG5pbXBvcnQgS2V5SW5wdXQgZnJvbSAnLi9pbnB1dHMva2V5LWlucHV0JztcblxuaW1wb3J0IHtcbiAgQkFTSUNfRVZFTlRfQUxJQVNFUyxcbiAgRVZFTlRfUkVDT0dOSVpFUl9NQVAsXG4gIEdFU1RVUkVfRVZFTlRfQUxJQVNFUyxcbiAgUkVDT0dOSVpFUlMsXG4gIFJFQ09HTklaRVJfQ09NUEFUSUJMRV9NQVAsXG4gIFJFQ09HTklaRVJfRkFMTEJBQ0tfTUFQXG59IGZyb20gJy4vY29uc3RhbnRzJztcblxuaW1wb3J0IHt3aGljaEJ1dHRvbnMsIGdldE9mZnNldFBvc2l0aW9ufSBmcm9tICcuL3V0aWxzL2V2ZW50LXV0aWxzJztcblxuZnVuY3Rpb24gcHJldmVudERlZmF1bHQoZXZ0KSB7XG4gIGV2dC5wcmV2ZW50RGVmYXVsdCgpO1xufVxuXG4vLyBVbmlmaWVkIEFQSSBmb3Igc3Vic2NyaWJpbmcgdG8gZXZlbnRzIGFib3V0IGJvdGhcbi8vIGJhc2ljIGlucHV0IGV2ZW50cyAoZS5nLiAnbW91c2Vtb3ZlJywgJ3RvdWNoc3RhcnQnLCAnd2hlZWwnKVxuLy8gYW5kIGdlc3R1cmFsIGlucHV0IChlLmcuICdjbGljaycsICd0YXAnLCAncGFuc3RhcnQnKS5cbi8vIERlbGVnYXRlcyBnZXN0dXJlIHJlbGF0ZWQgZXZlbnQgcmVnaXN0cmF0aW9uIGFuZCBoYW5kbGluZyB0byBIYW1tZXIuanMuXG5leHBvcnQgZGVmYXVsdCBjbGFzcyBFdmVudE1hbmFnZXIge1xuICBjb25zdHJ1Y3RvcihlbGVtZW50ID0gbnVsbCwgb3B0aW9ucyA9IHt9KSB7XG4gICAgdGhpcy5vcHRpb25zID0gb3B0aW9ucztcbiAgICB0aGlzLmV2ZW50SGFuZGxlcnMgPSBbXTtcblxuICAgIHRoaXMuX29uQmFzaWNJbnB1dCA9IHRoaXMuX29uQmFzaWNJbnB1dC5iaW5kKHRoaXMpO1xuICAgIHRoaXMuX29uT3RoZXJFdmVudCA9IHRoaXMuX29uT3RoZXJFdmVudC5iaW5kKHRoaXMpO1xuXG4gICAgdGhpcy5zZXRFbGVtZW50KGVsZW1lbnQpO1xuXG4gICAgLy8gUmVnaXN0ZXIgYWxsIHBhc3NlZCBldmVudHMuXG4gICAgY29uc3Qge2V2ZW50c30gPSBvcHRpb25zO1xuICAgIGlmIChldmVudHMpIHtcbiAgICAgIHRoaXMub24oZXZlbnRzKTtcbiAgICB9XG4gIH1cblxuICBzZXRFbGVtZW50KGVsZW1lbnQpIHtcbiAgICBpZiAodGhpcy5lbGVtZW50KSB7XG4gICAgICAvLyB1bnJlZ2lzdGVyIGFsbCBldmVudHNcbiAgICAgIHRoaXMuZGVzdHJveSgpO1xuICAgIH1cbiAgICB0aGlzLmVsZW1lbnQgPSBlbGVtZW50O1xuICAgIGlmICghZWxlbWVudCkge1xuICAgICAgcmV0dXJuO1xuICAgIH1cblxuICAgIGNvbnN0IHtvcHRpb25zfSA9IHRoaXM7XG4gICAgY29uc3QgTWFuYWdlckNsYXNzID0gb3B0aW9ucy5NYW5hZ2VyIHx8IE1hbmFnZXI7XG5cbiAgICB0aGlzLm1hbmFnZXIgPSBuZXcgTWFuYWdlckNsYXNzKGVsZW1lbnQsIHtyZWNvZ25pemVyczogb3B0aW9ucy5yZWNvZ25pemVycyB8fCBSRUNPR05JWkVSU30pXG4gICAgICAub24oJ2hhbW1lci5pbnB1dCcsIHRoaXMuX29uQmFzaWNJbnB1dCk7XG5cbiAgICBpZiAoIW9wdGlvbnMucmVjb2duaXplcnMpIHtcbiAgICAgIC8vIFNldCBkZWZhdWx0IHJlY29nbml6ZSB3aXRoc1xuICAgICAgLy8gaHR0cDovL2hhbW1lcmpzLmdpdGh1Yi5pby9yZWNvZ25pemUtd2l0aC9cbiAgICAgIE9iamVjdC5rZXlzKFJFQ09HTklaRVJfQ09NUEFUSUJMRV9NQVApLmZvckVhY2gobmFtZSA9PiB7XG4gICAgICAgIGNvbnN0IHJlY29nbml6ZXIgPSB0aGlzLm1hbmFnZXIuZ2V0KG5hbWUpO1xuICAgICAgICBpZiAocmVjb2duaXplcikge1xuICAgICAgICAgIFJFQ09HTklaRVJfQ09NUEFUSUJMRV9NQVBbbmFtZV0uZm9yRWFjaChvdGhlck5hbWUgPT4ge1xuICAgICAgICAgICAgcmVjb2duaXplci5yZWNvZ25pemVXaXRoKG90aGVyTmFtZSk7XG4gICAgICAgICAgfSk7XG4gICAgICAgIH1cbiAgICAgIH0pO1xuICAgIH1cblxuICAgIC8vIEhhbmRsZSBldmVudHMgbm90IGhhbmRsZWQgYnkgSGFtbWVyLmpzOlxuICAgIC8vIC0gbW91c2Ugd2hlZWxcbiAgICAvLyAtIHBvaW50ZXIvdG91Y2gvbW91c2UgbW92ZVxuICAgIHRoaXMud2hlZWxJbnB1dCA9IG5ldyBXaGVlbElucHV0KGVsZW1lbnQsIHRoaXMuX29uT3RoZXJFdmVudCwge2VuYWJsZTogZmFsc2V9KTtcbiAgICB0aGlzLm1vdmVJbnB1dCA9IG5ldyBNb3ZlSW5wdXQoZWxlbWVudCwgdGhpcy5fb25PdGhlckV2ZW50LCB7ZW5hYmxlOiBmYWxzZX0pO1xuICAgIHRoaXMua2V5SW5wdXQgPSBuZXcgS2V5SW5wdXQoZWxlbWVudCwgdGhpcy5fb25PdGhlckV2ZW50LCB7ZW5hYmxlOiBmYWxzZX0pO1xuXG4gICAgaWYgKG9wdGlvbnMucmlnaHRCdXR0b24pIHtcbiAgICAgIC8vIEJsb2NrIHJpZ2h0IGNsaWNrXG4gICAgICBlbGVtZW50LmFkZEV2ZW50TGlzdGVuZXIoJ2NvbnRleHRtZW51JywgcHJldmVudERlZmF1bHQpO1xuICAgIH1cblxuICAgIC8vIFJlZ2lzdGVyIGFsbCBleGlzdGluZyBldmVudHNcbiAgICB0aGlzLmV2ZW50SGFuZGxlcnMuZm9yRWFjaCgoe3JlY29nbml6ZXJOYW1lLCBldmVudEFsaWFzLCB3cmFwcGVkSGFuZGxlcn0pID0+IHtcbiAgICAgIC8vIEVuYWJsZSByZWNvZ25pemVyIGZvciB0aGlzIGV2ZW50LlxuICAgICAgdGhpcy5fdG9nZ2xlUmVjb2duaXplcihyZWNvZ25pemVyTmFtZSwgdHJ1ZSk7XG4gICAgICB0aGlzLm1hbmFnZXIub24oZXZlbnRBbGlhcywgd3JhcHBlZEhhbmRsZXIpO1xuICAgIH0pO1xuICB9XG5cbiAgLy8gVGVhciBkb3duIGludGVybmFsIGV2ZW50IG1hbmFnZW1lbnQgaW1wbGVtZW50YXRpb25zLlxuICBkZXN0cm95KCkge1xuICAgIGlmICh0aGlzLmVsZW1lbnQpIHtcbiAgICAgIHRoaXMuZWxlbWVudC5yZW1vdmVFdmVudExpc3RlbmVyKCdjb250ZXh0bWVudScsIHByZXZlbnREZWZhdWx0KTtcblxuICAgICAgLy8gd2hlZWxJbnB1dCBldGMuIGFyZSBjcmVhdGVkIGluIHNldEVsZW1lbnQoKSBhbmQgdGhlcmVmb3JlXG4gICAgICAvLyBjYW5ub3QgZXhpc3QgaWYgdGhlcmUgaXMgbm8gZWxlbWVudFxuICAgICAgdGhpcy53aGVlbElucHV0LmRlc3Ryb3koKTtcbiAgICAgIHRoaXMubW92ZUlucHV0LmRlc3Ryb3koKTtcbiAgICAgIHRoaXMua2V5SW5wdXQuZGVzdHJveSgpO1xuICAgICAgdGhpcy5tYW5hZ2VyLmRlc3Ryb3koKTtcblxuICAgICAgdGhpcy53aGVlbElucHV0ID0gbnVsbDtcbiAgICAgIHRoaXMubW92ZUlucHV0ID0gbnVsbDtcbiAgICAgIHRoaXMua2V5SW5wdXQgPSBudWxsO1xuICAgICAgdGhpcy5tYW5hZ2VyID0gbnVsbDtcbiAgICAgIHRoaXMuZWxlbWVudCA9IG51bGw7XG4gICAgfVxuICB9XG5cbiAgLy8gUmVnaXN0ZXIgYW4gZXZlbnQgaGFuZGxlciBmdW5jdGlvbiB0byBiZSBjYWxsZWQgb24gYGV2ZW50YC5cbiAgb24oZXZlbnQsIGhhbmRsZXIsIHNyY0VsZW1lbnQpIHtcbiAgICBpZiAodHlwZW9mIGV2ZW50ID09PSAnc3RyaW5nJykge1xuICAgICAgdGhpcy5fYWRkRXZlbnRIYW5kbGVyKGV2ZW50LCBoYW5kbGVyLCBzcmNFbGVtZW50KTtcbiAgICB9IGVsc2Uge1xuICAgICAgc3JjRWxlbWVudCA9IGhhbmRsZXI7XG4gICAgICAvLyBJZiBgZXZlbnRgIGlzIGEgbWFwLCBjYWxsIGBvbigpYCBmb3IgZWFjaCBlbnRyeS5cbiAgICAgIGZvciAoY29uc3QgZXZlbnROYW1lIGluIGV2ZW50KSB7XG4gICAgICAgIHRoaXMuX2FkZEV2ZW50SGFuZGxlcihldmVudE5hbWUsIGV2ZW50W2V2ZW50TmFtZV0sIHNyY0VsZW1lbnQpO1xuICAgICAgfVxuICAgIH1cbiAgfVxuXG4gIC8qKlxuICAgKiBEZXJlZ2lzdGVyIGEgcHJldmlvdXNseS1yZWdpc3RlcmVkIGV2ZW50IGhhbmRsZXIuXG4gICAqIEBwYXJhbSB7c3RyaW5nfE9iamVjdH0gZXZlbnQgICBBbiBldmVudCBuYW1lIChTdHJpbmcpIG9yIG1hcCBvZiBldmVudCBuYW1lcyB0byBoYW5kbGVyc1xuICAgKiBAcGFyYW0ge0Z1bmN0aW9ufSBbaGFuZGxlcl0gICAgVGhlIGZ1bmN0aW9uIHRvIGJlIGNhbGxlZCBvbiBgZXZlbnRgLlxuICAgKi9cbiAgb2ZmKGV2ZW50LCBoYW5kbGVyKSB7XG4gICAgaWYgKHR5cGVvZiBldmVudCA9PT0gJ3N0cmluZycpIHtcbiAgICAgIHRoaXMuX3JlbW92ZUV2ZW50SGFuZGxlcihldmVudCwgaGFuZGxlcik7XG4gICAgfSBlbHNlIHtcbiAgICAgIC8vIElmIGBldmVudGAgaXMgYSBtYXAsIGNhbGwgYG9mZigpYCBmb3IgZWFjaCBlbnRyeS5cbiAgICAgIGZvciAoY29uc3QgZXZlbnROYW1lIGluIGV2ZW50KSB7XG4gICAgICAgIHRoaXMuX3JlbW92ZUV2ZW50SGFuZGxlcihldmVudE5hbWUsIGV2ZW50W2V2ZW50TmFtZV0pO1xuICAgICAgfVxuICAgIH1cbiAgfVxuXG4gIC8qXG4gICAqIEVuYWJsZS9kaXNhYmxlIHJlY29nbml6ZXIgZm9yIHRoZSBnaXZlbiBldmVudFxuICAgKi9cbiAgX3RvZ2dsZVJlY29nbml6ZXIobmFtZSwgZW5hYmxlZCkge1xuICAgIGNvbnN0IHttYW5hZ2VyfSA9IHRoaXM7XG4gICAgaWYgKCFtYW5hZ2VyKSB7XG4gICAgICByZXR1cm47XG4gICAgfVxuICAgIGNvbnN0IHJlY29nbml6ZXIgPSBtYW5hZ2VyLmdldChuYW1lKTtcbiAgICBpZiAocmVjb2duaXplcikge1xuICAgICAgcmVjb2duaXplci5zZXQoe2VuYWJsZTogZW5hYmxlZH0pO1xuXG4gICAgICBjb25zdCBmYWxsYmFja1JlY29nbml6ZXJzID0gUkVDT0dOSVpFUl9GQUxMQkFDS19NQVBbbmFtZV07XG4gICAgICBpZiAoZmFsbGJhY2tSZWNvZ25pemVycyAmJiAhdGhpcy5vcHRpb25zLnJlY29nbml6ZXJzKSB7XG4gICAgICAgIC8vIFNldCBkZWZhdWx0IHJlcXVpcmUgZmFpbHVyZXNcbiAgICAgICAgLy8gaHR0cDovL2hhbW1lcmpzLmdpdGh1Yi5pby9yZXF1aXJlLWZhaWx1cmUvXG4gICAgICAgIGZhbGxiYWNrUmVjb2duaXplcnMuZm9yRWFjaChvdGhlck5hbWUgPT4ge1xuICAgICAgICAgIGNvbnN0IG90aGVyUmVjb2duaXplciA9IG1hbmFnZXIuZ2V0KG90aGVyTmFtZSk7XG4gICAgICAgICAgaWYgKGVuYWJsZWQpIHtcbiAgICAgICAgICAgIC8vIFdhaXQgZm9yIHRoaXMgcmVjb2duaXplciB0byBmYWlsXG4gICAgICAgICAgICBvdGhlclJlY29nbml6ZXIucmVxdWlyZUZhaWx1cmUobmFtZSk7XG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIC8vIERvIG5vdCB3YWl0IGZvciB0aGlzIHJlY29nbml6ZXIgdG8gZmFpbFxuICAgICAgICAgICAgb3RoZXJSZWNvZ25pemVyLmRyb3BSZXF1aXJlRmFpbHVyZShuYW1lKTtcbiAgICAgICAgICB9XG4gICAgICAgIH0pO1xuICAgICAgfVxuICAgIH1cbiAgICB0aGlzLndoZWVsSW5wdXQuZW5hYmxlRXZlbnRUeXBlKG5hbWUsIGVuYWJsZWQpO1xuICAgIHRoaXMubW92ZUlucHV0LmVuYWJsZUV2ZW50VHlwZShuYW1lLCBlbmFibGVkKTtcbiAgICB0aGlzLmtleUlucHV0LmVuYWJsZUV2ZW50VHlwZShuYW1lLCBlbmFibGVkKTtcbiAgfVxuXG4gIC8qKlxuICAgKiBQcm9jZXNzIHRoZSBldmVudCByZWdpc3RyYXRpb24gZm9yIGEgc2luZ2xlIGV2ZW50ICsgaGFuZGxlci5cbiAgICovXG4gIF9hZGRFdmVudEhhbmRsZXIoZXZlbnQsIGhhbmRsZXIsIHNyY0VsZW1lbnQgPSBudWxsKSB7XG4gICAgY29uc3Qge21hbmFnZXIsIGV2ZW50SGFuZGxlcnN9ID0gdGhpcztcbiAgICBjb25zdCB3cmFwcGVkSGFuZGxlciA9IHRoaXMuX3dyYXBFdmVudEhhbmRsZXIoZXZlbnQsIGhhbmRsZXIsIHNyY0VsZW1lbnQpO1xuICAgIC8vIEFsaWFzIHRvIGEgcmVjb2duaXplZCBnZXN0dXJlIGFzIG5lY2Vzc2FyeS5cbiAgICBjb25zdCBldmVudEFsaWFzID0gR0VTVFVSRV9FVkVOVF9BTElBU0VTW2V2ZW50XSB8fCBldmVudDtcbiAgICAvLyBHZXQgcmVjb2duaXplciBmb3IgdGhpcyBldmVudFxuICAgIGNvbnN0IHJlY29nbml6ZXJOYW1lID0gRVZFTlRfUkVDT0dOSVpFUl9NQVBbZXZlbnRBbGlhc10gfHwgZXZlbnRBbGlhcztcbiAgICAvLyBFbmFibGUgcmVjb2duaXplciBmb3IgdGhpcyBldmVudC5cbiAgICB0aGlzLl90b2dnbGVSZWNvZ25pemVyKHJlY29nbml6ZXJOYW1lLCB0cnVlKTtcblxuICAgIC8vIEZpbmQgYW5jZXN0b3JzXG4gICAgY29uc3QgYW5jZXN0b3JFdmVudEhhbmRsZXJzID0gZXZlbnRIYW5kbGVycy5maWx0ZXIoZW50cnkgPT4ge1xuICAgICAgcmV0dXJuIGVudHJ5LmV2ZW50QWxpYXMgPT09IGV2ZW50QWxpYXMgJiZcbiAgICAgICAgZW50cnkuc3JjRWxlbWVudCAhPT0gc3JjRWxlbWVudCAmJlxuICAgICAgICAoIWVudHJ5LnNyY0VsZW1lbnQgfHwgZW50cnkuc3JjRWxlbWVudC5jb250YWlucyhzcmNFbGVtZW50KSk7XG4gICAgfSk7XG5cbiAgICAvLyBTYXZlIHdyYXBwZWQgaGFuZGxlclxuICAgIGV2ZW50SGFuZGxlcnMucHVzaCh7ZXZlbnQsIGV2ZW50QWxpYXMsIHJlY29nbml6ZXJOYW1lLCBzcmNFbGVtZW50LFxuICAgICAgaGFuZGxlciwgd3JhcHBlZEhhbmRsZXJ9KTtcblxuICAgIC8vIFNvcnQgaGFuZGxlcnMgYnkgRE9NIGhpZXJhcmNoeVxuICAgIC8vIFNvIHRoZSBldmVudCB3aWxsIGFsd2F5cyBmaXJlIGZpcnN0IG9uIGNoaWxkIG5vZGVzXG4gICAgYW5jZXN0b3JFdmVudEhhbmRsZXJzLmZvckVhY2goZW50cnkgPT4gbWFuYWdlci5vZmYoZXZlbnRBbGlhcywgZW50cnkud3JhcHBlZEhhbmRsZXIpKTtcbiAgICBpZiAobWFuYWdlcikge1xuICAgICAgbWFuYWdlci5vbihldmVudEFsaWFzLCB3cmFwcGVkSGFuZGxlcik7XG4gICAgfVxuICAgIGFuY2VzdG9yRXZlbnRIYW5kbGVycy5mb3JFYWNoKGVudHJ5ID0+IG1hbmFnZXIub24oZXZlbnRBbGlhcywgZW50cnkud3JhcHBlZEhhbmRsZXIpKTtcbiAgfVxuXG4gIC8qKlxuICAgKiBQcm9jZXNzIHRoZSBldmVudCBkZXJlZ2lzdHJhdGlvbiBmb3IgYSBzaW5nbGUgZXZlbnQgKyBoYW5kbGVyLlxuICAgKi9cbiAgX3JlbW92ZUV2ZW50SGFuZGxlcihldmVudCwgaGFuZGxlcikge1xuICAgIGNvbnN0IHttYW5hZ2VyLCBldmVudEhhbmRsZXJzfSA9IHRoaXM7XG4gICAgbGV0IGV2ZW50SGFuZGxlclJlbW92ZWQgPSBmYWxzZTtcblxuICAgIC8vIEZpbmQgc2F2ZWQgaGFuZGxlciBpZiBhbnkuXG4gICAgZm9yIChsZXQgaSA9IGV2ZW50SGFuZGxlcnMubGVuZ3RoOyBpLS07KSB7XG4gICAgICBjb25zdCBlbnRyeSA9IGV2ZW50SGFuZGxlcnNbaV07XG4gICAgICBpZiAoZW50cnkuZXZlbnQgPT09IGV2ZW50ICYmIGVudHJ5LmhhbmRsZXIgPT09IGhhbmRsZXIpIHtcbiAgICAgICAgLy8gRGVyZWdpc3RlciBldmVudCBoYW5kbGVyLlxuICAgICAgICBpZiAobWFuYWdlcikge1xuICAgICAgICAgIG1hbmFnZXIub2ZmKGVudHJ5LmV2ZW50QWxpYXMsIGVudHJ5LndyYXBwZWRIYW5kbGVyKTtcbiAgICAgICAgfVxuICAgICAgICAvLyBEZWxldGUgc2F2ZWQgaGFuZGxlclxuICAgICAgICBldmVudEhhbmRsZXJzLnNwbGljZShpLCAxKTtcbiAgICAgICAgZXZlbnRIYW5kbGVyUmVtb3ZlZCA9IHRydWU7XG4gICAgICB9XG4gICAgfVxuXG4gICAgaWYgKGV2ZW50SGFuZGxlclJlbW92ZWQpIHtcbiAgICAgIC8vIEFsaWFzIHRvIGEgcmVjb2duaXplZCBnZXN0dXJlIGFzIG5lY2Vzc2FyeS5cbiAgICAgIGNvbnN0IGV2ZW50QWxpYXMgPSBHRVNUVVJFX0VWRU5UX0FMSUFTRVNbZXZlbnRdIHx8IGV2ZW50O1xuICAgICAgLy8gR2V0IHJlY29nbml6ZXIgZm9yIHRoaXMgZXZlbnRcbiAgICAgIGNvbnN0IHJlY29nbml6ZXJOYW1lID0gRVZFTlRfUkVDT0dOSVpFUl9NQVBbZXZlbnRBbGlhc10gfHwgZXZlbnRBbGlhcztcbiAgICAgIC8vIERpc2FibGUgcmVjb2duaXplciBpZiBubyBtb3JlIGhhbmRsZXJzIGFyZSBhdHRhY2hlZCB0byBpdHMgZXZlbnRzXG4gICAgICBjb25zdCBpc1JlY29nbml6ZXJVc2VkID0gZXZlbnRIYW5kbGVycy5maW5kKFxuICAgICAgICBlbnRyeSA9PiBlbnRyeS5yZWNvZ25pemVyTmFtZSA9PT0gcmVjb2duaXplck5hbWVcbiAgICAgICk7XG4gICAgICBpZiAoIWlzUmVjb2duaXplclVzZWQpIHtcbiAgICAgICAgdGhpcy5fdG9nZ2xlUmVjb2duaXplcihyZWNvZ25pemVyTmFtZSwgZmFsc2UpO1xuICAgICAgfVxuICAgIH1cbiAgfVxuXG4gIC8qKlxuICAgKiBSZXR1cm5zIGFuIGV2ZW50IGhhbmRsZXIgdGhhdCBhbGlhc2VzIGV2ZW50cyBhbmQgYWRkIHByb3BzIGJlZm9yZSBwYXNzaW5nXG4gICAqIHRvIHRoZSByZWFsIGhhbmRsZXIuXG4gICAqL1xuICBfd3JhcEV2ZW50SGFuZGxlcih0eXBlLCBoYW5kbGVyLCBzcmNFbGVtZW50KSB7XG4gICAgcmV0dXJuIGV2ZW50ID0+IHtcbiAgICAgIGxldCB7bWpvbG5pckV2ZW50fSA9IGV2ZW50O1xuXG4gICAgICBpZiAoIW1qb2xuaXJFdmVudCkge1xuICAgICAgICBtam9sbmlyRXZlbnQgPSB0aGlzLl9ub3JtYWxpemVFdmVudChldmVudCk7XG4gICAgICAgIGV2ZW50Lm1qb2xuaXJFdmVudCA9IG1qb2xuaXJFdmVudDtcbiAgICAgIH1cblxuICAgICAgY29uc3QgaXNTdG9wcGVkID0gbWpvbG5pckV2ZW50LmhhbmRsZWQgJiYgbWpvbG5pckV2ZW50LmhhbmRsZWQgIT09IHNyY0VsZW1lbnQ7XG5cbiAgICAgIGlmICghaXNTdG9wcGVkKSB7XG4gICAgICAgIGNvbnN0IGlzRnJvbURlY2VuZGFudCA9ICFzcmNFbGVtZW50IHx8IHNyY0VsZW1lbnQuY29udGFpbnMoZXZlbnQuc3JjRXZlbnQudGFyZ2V0KTtcbiAgICAgICAgaWYgKGlzRnJvbURlY2VuZGFudCkge1xuICAgICAgICAgIGhhbmRsZXIoT2JqZWN0LmFzc2lnbih7fSwgbWpvbG5pckV2ZW50LCB7XG4gICAgICAgICAgICB0eXBlLFxuICAgICAgICAgICAgc3RvcFByb3BhZ2F0aW9uOiAoKSA9PiB7XG4gICAgICAgICAgICAgIGlmICghbWpvbG5pckV2ZW50LmhhbmRsZWQpIHtcbiAgICAgICAgICAgICAgICBtam9sbmlyRXZlbnQuaGFuZGxlZCA9IHNyY0VsZW1lbnQ7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9KSk7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9O1xuICB9XG5cbiAgLyoqXG4gICAqIE5vcm1hbGl6ZXMgaGFtbWVyanMgYW5kIGN1c3RvbSBldmVudHMgdG8gaGF2ZSBwcmVkaWN0YWJsZSBmaWVsZHMuXG4gICAqL1xuICBfbm9ybWFsaXplRXZlbnQoZXZlbnQpIHtcbiAgICBjb25zdCB7ZWxlbWVudH0gPSB0aGlzO1xuXG4gICAgcmV0dXJuIE9iamVjdC5hc3NpZ24oe30sIGV2ZW50LFxuICAgICAgd2hpY2hCdXR0b25zKGV2ZW50KSxcbiAgICAgIGdldE9mZnNldFBvc2l0aW9uKGV2ZW50LCBlbGVtZW50KSxcbiAgICAgIHtcbiAgICAgICAgaGFuZGxlZDogZmFsc2UsXG4gICAgICAgIHJvb3RFbGVtZW50OiBlbGVtZW50XG4gICAgICB9KTtcbiAgfVxuXG4gIC8qKlxuICAgKiBIYW5kbGUgYmFzaWMgZXZlbnRzIHVzaW5nIHRoZSAnaGFtbWVyLmlucHV0JyBIYW1tZXIuanMgQVBJOlxuICAgKiBCZWZvcmUgcnVubmluZyBSZWNvZ25pemVycywgSGFtbWVyIGVtaXRzIGEgJ2hhbW1lci5pbnB1dCcgZXZlbnRcbiAgICogd2l0aCB0aGUgYmFzaWMgZXZlbnQgaW5mby4gVGhpcyBmdW5jdGlvbiBlbWl0cyBhbGwgYmFzaWMgZXZlbnRzXG4gICAqIGFsaWFzZWQgdG8gdGhlIFwiY2xhc3NcIiBvZiBldmVudCByZWNlaXZlZC5cbiAgICogU2VlIGNvbnN0YW50cy5CQVNJQ19FVkVOVF9DTEFTU0VTIGJhc2ljIGV2ZW50IGNsYXNzIGRlZmluaXRpb25zLlxuICAgKi9cbiAgX29uQmFzaWNJbnB1dChldmVudCkge1xuICAgIGNvbnN0IHtzcmNFdmVudH0gPSBldmVudDtcbiAgICBjb25zdCBhbGlhcyA9IEJBU0lDX0VWRU5UX0FMSUFTRVNbc3JjRXZlbnQudHlwZV07XG4gICAgaWYgKGFsaWFzKSB7XG4gICAgICAvLyBmaXJlIGFsbCBldmVudHMgYWxpYXNlZCB0byBzcmNFdmVudC50eXBlXG4gICAgICB0aGlzLm1hbmFnZXIuZW1pdChhbGlhcywgZXZlbnQpO1xuICAgIH1cbiAgfVxuXG4gIC8qKlxuICAgKiBIYW5kbGUgZXZlbnRzIG5vdCBzdXBwb3J0ZWQgYnkgSGFtbWVyLmpzLFxuICAgKiBhbmQgcGlwZSBiYWNrIG91dCB0aHJvdWdoIHNhbWUgKEhhbW1lcikgY2hhbm5lbCB1c2VkIGJ5IG90aGVyIGV2ZW50cy5cbiAgICovXG4gIF9vbk90aGVyRXZlbnQoZXZlbnQpIHtcbiAgICB0aGlzLm1hbmFnZXIuZW1pdChldmVudC50eXBlLCBldmVudCk7XG4gIH1cbn1cbiJdfQ==
 
/***/ }),
/* 673 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__constants__ = __webpack_require__(114);
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
 
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
 
// Copyright (c) 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
 
 
 
var KEY_EVENTS = __WEBPACK_IMPORTED_MODULE_0__constants__["g" /* INPUT_EVENT_TYPES */].KEY_EVENTS;
 
var DOWN_EVENT_TYPE = 'keydown';
var UP_EVENT_TYPE = 'keyup';
 
var KeyInput = function () {
  function KeyInput(element, callback) {
    var _this = this;
 
    var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
 
    _classCallCheck(this, KeyInput);
 
    this.element = element;
    this.callback = callback;
 
    this.options = Object.assign({ enable: true }, options);
    this.enableDownEvent = this.options.enable;
    this.enableUpEvent = this.options.enable;
 
    this.events = KEY_EVENTS.concat(options.events || []);
 
    this.handleEvent = this.handleEvent.bind(this);
 
    element.tabIndex = 1;
    element.style.outline = 'none';
    this.events.forEach(function (event) {
      return element.addEventListener(event, _this.handleEvent);
    });
  }
 
  _createClass(KeyInput, [{
    key: 'destroy',
    value: function destroy() {
      var _this2 = this;
 
      this.events.forEach(function (event) {
        return _this2.element.removeEventListener(event, _this2.handleEvent);
      });
    }
 
    /**
     * Enable this input (begin processing events)
     * if the specified event type is among those handled by this input.
     */
 
  }, {
    key: 'enableEventType',
    value: function enableEventType(eventType, enabled) {
      if (eventType === DOWN_EVENT_TYPE) {
        this.enableDownEvent = enabled;
      }
      if (eventType === UP_EVENT_TYPE) {
        this.enableUpEvent = enabled;
      }
    }
  }, {
    key: 'handleEvent',
    value: function handleEvent(event) {
      // Ignore if focused on text input
      var targetElement = event.target || event.srcElement;
      if (targetElement.tagName === 'INPUT' && targetElement.type === 'text' || targetElement.tagName === 'TEXTAREA') {
        return;
      }
 
      if (this.enableDownEvent && event.type === 'keydown') {
        this.callback({
          type: DOWN_EVENT_TYPE,
          srcEvent: event,
          key: event.key,
          target: event.target
        });
      }
 
      if (this.enableUpEvent && event.type === 'keyup') {
        this.callback({
          type: UP_EVENT_TYPE,
          srcEvent: event,
          key: event.key,
          target: event.target
        });
      }
    }
  }]);
 
  return KeyInput;
}();
 
/* harmony default export */ __webpack_exports__["a"] = (KeyInput);
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9pbnB1dHMva2V5LWlucHV0LmpzIl0sIm5hbWVzIjpbIklOUFVUX0VWRU5UX1RZUEVTIiwiS0VZX0VWRU5UUyIsIkRPV05fRVZFTlRfVFlQRSIsIlVQX0VWRU5UX1RZUEUiLCJLZXlJbnB1dCIsImVsZW1lbnQiLCJjYWxsYmFjayIsIm9wdGlvbnMiLCJPYmplY3QiLCJhc3NpZ24iLCJlbmFibGUiLCJlbmFibGVEb3duRXZlbnQiLCJlbmFibGVVcEV2ZW50IiwiZXZlbnRzIiwiY29uY2F0IiwiaGFuZGxlRXZlbnQiLCJiaW5kIiwidGFiSW5kZXgiLCJzdHlsZSIsIm91dGxpbmUiLCJmb3JFYWNoIiwiYWRkRXZlbnRMaXN0ZW5lciIsImV2ZW50IiwicmVtb3ZlRXZlbnRMaXN0ZW5lciIsImV2ZW50VHlwZSIsImVuYWJsZWQiLCJ0YXJnZXRFbGVtZW50IiwidGFyZ2V0Iiwic3JjRWxlbWVudCIsInRhZ05hbWUiLCJ0eXBlIiwic3JjRXZlbnQiLCJrZXkiXSwibWFwcGluZ3MiOiI7Ozs7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQSxTQUFRQSxpQkFBUixRQUFnQyxjQUFoQzs7SUFFT0MsVSxHQUFjRCxpQixDQUFkQyxVOztBQUNQLElBQU1DLGtCQUFrQixTQUF4QjtBQUNBLElBQU1DLGdCQUFnQixPQUF0Qjs7SUFFcUJDLFE7QUFDbkIsb0JBQVlDLE9BQVosRUFBcUJDLFFBQXJCLEVBQTZDO0FBQUE7O0FBQUEsUUFBZEMsT0FBYyx1RUFBSixFQUFJOztBQUFBOztBQUMzQyxTQUFLRixPQUFMLEdBQWVBLE9BQWY7QUFDQSxTQUFLQyxRQUFMLEdBQWdCQSxRQUFoQjs7QUFFQSxTQUFLQyxPQUFMLEdBQWVDLE9BQU9DLE1BQVAsQ0FBYyxFQUFDQyxRQUFRLElBQVQsRUFBZCxFQUE4QkgsT0FBOUIsQ0FBZjtBQUNBLFNBQUtJLGVBQUwsR0FBdUIsS0FBS0osT0FBTCxDQUFhRyxNQUFwQztBQUNBLFNBQUtFLGFBQUwsR0FBcUIsS0FBS0wsT0FBTCxDQUFhRyxNQUFsQzs7QUFFQSxTQUFLRyxNQUFMLEdBQWNaLFdBQVdhLE1BQVgsQ0FBa0JQLFFBQVFNLE1BQVIsSUFBa0IsRUFBcEMsQ0FBZDs7QUFFQSxTQUFLRSxXQUFMLEdBQW1CLEtBQUtBLFdBQUwsQ0FBaUJDLElBQWpCLENBQXNCLElBQXRCLENBQW5COztBQUVBWCxZQUFRWSxRQUFSLEdBQW1CLENBQW5CO0FBQ0FaLFlBQVFhLEtBQVIsQ0FBY0MsT0FBZCxHQUF3QixNQUF4QjtBQUNBLFNBQUtOLE1BQUwsQ0FBWU8sT0FBWixDQUFvQjtBQUFBLGFBQVNmLFFBQVFnQixnQkFBUixDQUF5QkMsS0FBekIsRUFBZ0MsTUFBS1AsV0FBckMsQ0FBVDtBQUFBLEtBQXBCO0FBQ0Q7Ozs7OEJBRVM7QUFBQTs7QUFDUixXQUFLRixNQUFMLENBQVlPLE9BQVosQ0FBb0I7QUFBQSxlQUFTLE9BQUtmLE9BQUwsQ0FBYWtCLG1CQUFiLENBQWlDRCxLQUFqQyxFQUF3QyxPQUFLUCxXQUE3QyxDQUFUO0FBQUEsT0FBcEI7QUFDRDs7QUFFRDs7Ozs7OztvQ0FJZ0JTLFMsRUFBV0MsTyxFQUFTO0FBQ2xDLFVBQUlELGNBQWN0QixlQUFsQixFQUFtQztBQUNqQyxhQUFLUyxlQUFMLEdBQXVCYyxPQUF2QjtBQUNEO0FBQ0QsVUFBSUQsY0FBY3JCLGFBQWxCLEVBQWlDO0FBQy9CLGFBQUtTLGFBQUwsR0FBcUJhLE9BQXJCO0FBQ0Q7QUFDRjs7O2dDQUVXSCxLLEVBQU87QUFDakI7QUFDQSxVQUFNSSxnQkFBZ0JKLE1BQU1LLE1BQU4sSUFBZ0JMLE1BQU1NLFVBQTVDO0FBQ0EsVUFBS0YsY0FBY0csT0FBZCxLQUEwQixPQUExQixJQUFxQ0gsY0FBY0ksSUFBZCxLQUF1QixNQUE3RCxJQUNGSixjQUFjRyxPQUFkLEtBQTBCLFVBRDVCLEVBQ3dDO0FBQ3RDO0FBQ0Q7O0FBRUQsVUFBSSxLQUFLbEIsZUFBTCxJQUF3QlcsTUFBTVEsSUFBTixLQUFlLFNBQTNDLEVBQXNEO0FBQ3BELGFBQUt4QixRQUFMLENBQWM7QUFDWndCLGdCQUFNNUIsZUFETTtBQUVaNkIsb0JBQVVULEtBRkU7QUFHWlUsZUFBS1YsTUFBTVUsR0FIQztBQUlaTCxrQkFBUUwsTUFBTUs7QUFKRixTQUFkO0FBTUQ7O0FBRUQsVUFBSSxLQUFLZixhQUFMLElBQXNCVSxNQUFNUSxJQUFOLEtBQWUsT0FBekMsRUFBa0Q7QUFDaEQsYUFBS3hCLFFBQUwsQ0FBYztBQUNad0IsZ0JBQU0zQixhQURNO0FBRVo0QixvQkFBVVQsS0FGRTtBQUdaVSxlQUFLVixNQUFNVSxHQUhDO0FBSVpMLGtCQUFRTCxNQUFNSztBQUpGLFNBQWQ7QUFNRDtBQUNGOzs7Ozs7ZUE1RGtCdkIsUSIsImZpbGUiOiJrZXktaW5wdXQuanMiLCJzb3VyY2VzQ29udGVudCI6WyIvLyBDb3B5cmlnaHQgKGMpIDIwMTcgVWJlciBUZWNobm9sb2dpZXMsIEluYy5cbi8vXG4vLyBQZXJtaXNzaW9uIGlzIGhlcmVieSBncmFudGVkLCBmcmVlIG9mIGNoYXJnZSwgdG8gYW55IHBlcnNvbiBvYnRhaW5pbmcgYSBjb3B5XG4vLyBvZiB0aGlzIHNvZnR3YXJlIGFuZCBhc3NvY2lhdGVkIGRvY3VtZW50YXRpb24gZmlsZXMgKHRoZSBcIlNvZnR3YXJlXCIpLCB0byBkZWFsXG4vLyBpbiB0aGUgU29mdHdhcmUgd2l0aG91dCByZXN0cmljdGlvbiwgaW5jbHVkaW5nIHdpdGhvdXQgbGltaXRhdGlvbiB0aGUgcmlnaHRzXG4vLyB0byB1c2UsIGNvcHksIG1vZGlmeSwgbWVyZ2UsIHB1Ymxpc2gsIGRpc3RyaWJ1dGUsIHN1YmxpY2Vuc2UsIGFuZC9vciBzZWxsXG4vLyBjb3BpZXMgb2YgdGhlIFNvZnR3YXJlLCBhbmQgdG8gcGVybWl0IHBlcnNvbnMgdG8gd2hvbSB0aGUgU29mdHdhcmUgaXNcbi8vIGZ1cm5pc2hlZCB0byBkbyBzbywgc3ViamVjdCB0byB0aGUgZm9sbG93aW5nIGNvbmRpdGlvbnM6XG4vL1xuLy8gVGhlIGFib3ZlIGNvcHlyaWdodCBub3RpY2UgYW5kIHRoaXMgcGVybWlzc2lvbiBub3RpY2Ugc2hhbGwgYmUgaW5jbHVkZWQgaW5cbi8vIGFsbCBjb3BpZXMgb3Igc3Vic3RhbnRpYWwgcG9ydGlvbnMgb2YgdGhlIFNvZnR3YXJlLlxuLy9cbi8vIFRIRSBTT0ZUV0FSRSBJUyBQUk9WSURFRCBcIkFTIElTXCIsIFdJVEhPVVQgV0FSUkFOVFkgT0YgQU5ZIEtJTkQsIEVYUFJFU1MgT1Jcbi8vIElNUExJRUQsIElOQ0xVRElORyBCVVQgTk9UIExJTUlURUQgVE8gVEhFIFdBUlJBTlRJRVMgT0YgTUVSQ0hBTlRBQklMSVRZLFxuLy8gRklUTkVTUyBGT1IgQSBQQVJUSUNVTEFSIFBVUlBPU0UgQU5EIE5PTklORlJJTkdFTUVOVC4gSU4gTk8gRVZFTlQgU0hBTEwgVEhFXG4vLyBBVVRIT1JTIE9SIENPUFlSSUdIVCBIT0xERVJTIEJFIExJQUJMRSBGT1IgQU5ZIENMQUlNLCBEQU1BR0VTIE9SIE9USEVSXG4vLyBMSUFCSUxJVFksIFdIRVRIRVIgSU4gQU4gQUNUSU9OIE9GIENPTlRSQUNULCBUT1JUIE9SIE9USEVSV0lTRSwgQVJJU0lORyBGUk9NLFxuLy8gT1VUIE9GIE9SIElOIENPTk5FQ1RJT04gV0lUSCBUSEUgU09GVFdBUkUgT1IgVEhFIFVTRSBPUiBPVEhFUiBERUFMSU5HUyBJTlxuLy8gVEhFIFNPRlRXQVJFLlxuXG5pbXBvcnQge0lOUFVUX0VWRU5UX1RZUEVTfSBmcm9tICcuLi9jb25zdGFudHMnO1xuXG5jb25zdCB7S0VZX0VWRU5UU30gPSBJTlBVVF9FVkVOVF9UWVBFUztcbmNvbnN0IERPV05fRVZFTlRfVFlQRSA9ICdrZXlkb3duJztcbmNvbnN0IFVQX0VWRU5UX1RZUEUgPSAna2V5dXAnO1xuXG5leHBvcnQgZGVmYXVsdCBjbGFzcyBLZXlJbnB1dCB7XG4gIGNvbnN0cnVjdG9yKGVsZW1lbnQsIGNhbGxiYWNrLCBvcHRpb25zID0ge30pIHtcbiAgICB0aGlzLmVsZW1lbnQgPSBlbGVtZW50O1xuICAgIHRoaXMuY2FsbGJhY2sgPSBjYWxsYmFjaztcblxuICAgIHRoaXMub3B0aW9ucyA9IE9iamVjdC5hc3NpZ24oe2VuYWJsZTogdHJ1ZX0sIG9wdGlvbnMpO1xuICAgIHRoaXMuZW5hYmxlRG93bkV2ZW50ID0gdGhpcy5vcHRpb25zLmVuYWJsZTtcbiAgICB0aGlzLmVuYWJsZVVwRXZlbnQgPSB0aGlzLm9wdGlvbnMuZW5hYmxlO1xuXG4gICAgdGhpcy5ldmVudHMgPSBLRVlfRVZFTlRTLmNvbmNhdChvcHRpb25zLmV2ZW50cyB8fCBbXSk7XG5cbiAgICB0aGlzLmhhbmRsZUV2ZW50ID0gdGhpcy5oYW5kbGVFdmVudC5iaW5kKHRoaXMpO1xuXG4gICAgZWxlbWVudC50YWJJbmRleCA9IDE7XG4gICAgZWxlbWVudC5zdHlsZS5vdXRsaW5lID0gJ25vbmUnO1xuICAgIHRoaXMuZXZlbnRzLmZvckVhY2goZXZlbnQgPT4gZWxlbWVudC5hZGRFdmVudExpc3RlbmVyKGV2ZW50LCB0aGlzLmhhbmRsZUV2ZW50KSk7XG4gIH1cblxuICBkZXN0cm95KCkge1xuICAgIHRoaXMuZXZlbnRzLmZvckVhY2goZXZlbnQgPT4gdGhpcy5lbGVtZW50LnJlbW92ZUV2ZW50TGlzdGVuZXIoZXZlbnQsIHRoaXMuaGFuZGxlRXZlbnQpKTtcbiAgfVxuXG4gIC8qKlxuICAgKiBFbmFibGUgdGhpcyBpbnB1dCAoYmVnaW4gcHJvY2Vzc2luZyBldmVudHMpXG4gICAqIGlmIHRoZSBzcGVjaWZpZWQgZXZlbnQgdHlwZSBpcyBhbW9uZyB0aG9zZSBoYW5kbGVkIGJ5IHRoaXMgaW5wdXQuXG4gICAqL1xuICBlbmFibGVFdmVudFR5cGUoZXZlbnRUeXBlLCBlbmFibGVkKSB7XG4gICAgaWYgKGV2ZW50VHlwZSA9PT0gRE9XTl9FVkVOVF9UWVBFKSB7XG4gICAgICB0aGlzLmVuYWJsZURvd25FdmVudCA9IGVuYWJsZWQ7XG4gICAgfVxuICAgIGlmIChldmVudFR5cGUgPT09IFVQX0VWRU5UX1RZUEUpIHtcbiAgICAgIHRoaXMuZW5hYmxlVXBFdmVudCA9IGVuYWJsZWQ7XG4gICAgfVxuICB9XG5cbiAgaGFuZGxlRXZlbnQoZXZlbnQpIHtcbiAgICAvLyBJZ25vcmUgaWYgZm9jdXNlZCBvbiB0ZXh0IGlucHV0XG4gICAgY29uc3QgdGFyZ2V0RWxlbWVudCA9IGV2ZW50LnRhcmdldCB8fCBldmVudC5zcmNFbGVtZW50O1xuICAgIGlmICgodGFyZ2V0RWxlbWVudC50YWdOYW1lID09PSAnSU5QVVQnICYmIHRhcmdldEVsZW1lbnQudHlwZSA9PT0gJ3RleHQnKSB8fFxuICAgICAgdGFyZ2V0RWxlbWVudC50YWdOYW1lID09PSAnVEVYVEFSRUEnKSB7XG4gICAgICByZXR1cm47XG4gICAgfVxuXG4gICAgaWYgKHRoaXMuZW5hYmxlRG93bkV2ZW50ICYmIGV2ZW50LnR5cGUgPT09ICdrZXlkb3duJykge1xuICAgICAgdGhpcy5jYWxsYmFjayh7XG4gICAgICAgIHR5cGU6IERPV05fRVZFTlRfVFlQRSxcbiAgICAgICAgc3JjRXZlbnQ6IGV2ZW50LFxuICAgICAgICBrZXk6IGV2ZW50LmtleSxcbiAgICAgICAgdGFyZ2V0OiBldmVudC50YXJnZXRcbiAgICAgIH0pO1xuICAgIH1cblxuICAgIGlmICh0aGlzLmVuYWJsZVVwRXZlbnQgJiYgZXZlbnQudHlwZSA9PT0gJ2tleXVwJykge1xuICAgICAgdGhpcy5jYWxsYmFjayh7XG4gICAgICAgIHR5cGU6IFVQX0VWRU5UX1RZUEUsXG4gICAgICAgIHNyY0V2ZW50OiBldmVudCxcbiAgICAgICAga2V5OiBldmVudC5rZXksXG4gICAgICAgIHRhcmdldDogZXZlbnQudGFyZ2V0XG4gICAgICB9KTtcbiAgICB9XG4gIH1cbn1cbiJdfQ==
 
/***/ }),
/* 674 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__constants__ = __webpack_require__(114);
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
 
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
 
// Copyright (c) 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
 
 
 
var MOUSE_EVENTS = __WEBPACK_IMPORTED_MODULE_0__constants__["g" /* INPUT_EVENT_TYPES */].MOUSE_EVENTS;
 
var MOVE_EVENT_TYPE = 'pointermove';
var LEAVE_EVENT_TYPE = 'pointerleave';
 
/**
 * Hammer.js swallows 'move' events (for pointer/touch/mouse)
 * when the pointer is not down. This class sets up a handler
 * specifically for these events to work around this limitation.
 * Note that this could be extended to more intelligently handle
 * move events across input types, e.g. storing multiple simultaneous
 * pointer/touch events, calculating speed/direction, etc.
 */
 
var MoveInput = function () {
  function MoveInput(element, callback) {
    var _this = this;
 
    var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
 
    _classCallCheck(this, MoveInput);
 
    this.element = element;
    this.callback = callback;
    this.pressed = false;
 
    this.options = Object.assign({ enable: true }, options);
    this.enableMoveEvent = this.options.enable;
    this.enableLeaveEvent = this.options.enable;
 
    this.events = MOUSE_EVENTS.concat(options.events || []);
 
    this.handleEvent = this.handleEvent.bind(this);
    this.events.forEach(function (event) {
      return element.addEventListener(event, _this.handleEvent);
    });
  }
 
  _createClass(MoveInput, [{
    key: 'destroy',
    value: function destroy() {
      var _this2 = this;
 
      this.events.forEach(function (event) {
        return _this2.element.removeEventListener(event, _this2.handleEvent);
      });
    }
 
    /**
     * Enable this input (begin processing events)
     * if the specified event type is among those handled by this input.
     */
 
  }, {
    key: 'enableEventType',
    value: function enableEventType(eventType, enabled) {
      if (eventType === MOVE_EVENT_TYPE) {
        this.enableMoveEvent = enabled;
      }
      if (eventType === LEAVE_EVENT_TYPE) {
        this.enableLeaveEvent = enabled;
      }
    }
  }, {
    key: 'handleEvent',
    value: function handleEvent(event) {
      if (this.enableLeaveEvent) {
        if (event.type === 'mouseleave') {
          this.callback({
            type: LEAVE_EVENT_TYPE,
            srcEvent: event,
            pointerType: 'mouse',
            target: event.target
          });
        }
      }
 
      if (this.enableMoveEvent) {
        switch (event.type) {
          case 'mousedown':
            if (event.button >= 0) {
              // Button is down
              this.pressed = true;
            }
            break;
          case 'mousemove':
            // Move events use `which` to track the button being pressed
            if (event.which === 0) {
              // Button is not down
              this.pressed = false;
            }
            if (!this.pressed) {
              // Drag events are emitted by hammer already
              // we just need to emit the move event on hover
              this.callback({
                type: MOVE_EVENT_TYPE,
                srcEvent: event,
                pointerType: 'mouse',
                target: event.target
              });
            }
            break;
          case 'mouseup':
            this.pressed = false;
            break;
          default:
        }
      }
    }
  }]);
 
  return MoveInput;
}();
 
/* harmony default export */ __webpack_exports__["a"] = (MoveInput);
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9pbnB1dHMvbW92ZS1pbnB1dC5qcyJdLCJuYW1lcyI6WyJJTlBVVF9FVkVOVF9UWVBFUyIsIk1PVVNFX0VWRU5UUyIsIk1PVkVfRVZFTlRfVFlQRSIsIkxFQVZFX0VWRU5UX1RZUEUiLCJNb3ZlSW5wdXQiLCJlbGVtZW50IiwiY2FsbGJhY2siLCJvcHRpb25zIiwicHJlc3NlZCIsIk9iamVjdCIsImFzc2lnbiIsImVuYWJsZSIsImVuYWJsZU1vdmVFdmVudCIsImVuYWJsZUxlYXZlRXZlbnQiLCJldmVudHMiLCJjb25jYXQiLCJoYW5kbGVFdmVudCIsImJpbmQiLCJmb3JFYWNoIiwiYWRkRXZlbnRMaXN0ZW5lciIsImV2ZW50IiwicmVtb3ZlRXZlbnRMaXN0ZW5lciIsImV2ZW50VHlwZSIsImVuYWJsZWQiLCJ0eXBlIiwic3JjRXZlbnQiLCJwb2ludGVyVHlwZSIsInRhcmdldCIsImJ1dHRvbiIsIndoaWNoIl0sIm1hcHBpbmdzIjoiOzs7O0FBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUEsU0FBUUEsaUJBQVIsUUFBZ0MsY0FBaEM7O0lBRU9DLFksR0FBZ0JELGlCLENBQWhCQyxZOztBQUNQLElBQU1DLGtCQUFrQixhQUF4QjtBQUNBLElBQU1DLG1CQUFtQixjQUF6Qjs7QUFFQTs7Ozs7Ozs7O0lBUXFCQyxTO0FBRW5CLHFCQUFZQyxPQUFaLEVBQXFCQyxRQUFyQixFQUE2QztBQUFBOztBQUFBLFFBQWRDLE9BQWMsdUVBQUosRUFBSTs7QUFBQTs7QUFDM0MsU0FBS0YsT0FBTCxHQUFlQSxPQUFmO0FBQ0EsU0FBS0MsUUFBTCxHQUFnQkEsUUFBaEI7QUFDQSxTQUFLRSxPQUFMLEdBQWUsS0FBZjs7QUFFQSxTQUFLRCxPQUFMLEdBQWVFLE9BQU9DLE1BQVAsQ0FBYyxFQUFDQyxRQUFRLElBQVQsRUFBZCxFQUE4QkosT0FBOUIsQ0FBZjtBQUNBLFNBQUtLLGVBQUwsR0FBdUIsS0FBS0wsT0FBTCxDQUFhSSxNQUFwQztBQUNBLFNBQUtFLGdCQUFMLEdBQXdCLEtBQUtOLE9BQUwsQ0FBYUksTUFBckM7O0FBRUEsU0FBS0csTUFBTCxHQUFjYixhQUFhYyxNQUFiLENBQW9CUixRQUFRTyxNQUFSLElBQWtCLEVBQXRDLENBQWQ7O0FBRUEsU0FBS0UsV0FBTCxHQUFtQixLQUFLQSxXQUFMLENBQWlCQyxJQUFqQixDQUFzQixJQUF0QixDQUFuQjtBQUNBLFNBQUtILE1BQUwsQ0FBWUksT0FBWixDQUFvQjtBQUFBLGFBQVNiLFFBQVFjLGdCQUFSLENBQXlCQyxLQUF6QixFQUFnQyxNQUFLSixXQUFyQyxDQUFUO0FBQUEsS0FBcEI7QUFDRDs7Ozs4QkFFUztBQUFBOztBQUNSLFdBQUtGLE1BQUwsQ0FBWUksT0FBWixDQUFvQjtBQUFBLGVBQVMsT0FBS2IsT0FBTCxDQUFhZ0IsbUJBQWIsQ0FBaUNELEtBQWpDLEVBQXdDLE9BQUtKLFdBQTdDLENBQVQ7QUFBQSxPQUFwQjtBQUNEOztBQUVEOzs7Ozs7O29DQUlnQk0sUyxFQUFXQyxPLEVBQVM7QUFDbEMsVUFBSUQsY0FBY3BCLGVBQWxCLEVBQW1DO0FBQ2pDLGFBQUtVLGVBQUwsR0FBdUJXLE9BQXZCO0FBQ0Q7QUFDRCxVQUFJRCxjQUFjbkIsZ0JBQWxCLEVBQW9DO0FBQ2xDLGFBQUtVLGdCQUFMLEdBQXdCVSxPQUF4QjtBQUNEO0FBQ0Y7OztnQ0FFV0gsSyxFQUFPO0FBQ2pCLFVBQUksS0FBS1AsZ0JBQVQsRUFBMkI7QUFDekIsWUFBSU8sTUFBTUksSUFBTixLQUFlLFlBQW5CLEVBQWlDO0FBQy9CLGVBQUtsQixRQUFMLENBQWM7QUFDWmtCLGtCQUFNckIsZ0JBRE07QUFFWnNCLHNCQUFVTCxLQUZFO0FBR1pNLHlCQUFhLE9BSEQ7QUFJWkMsb0JBQVFQLE1BQU1PO0FBSkYsV0FBZDtBQU1EO0FBQ0Y7O0FBRUQsVUFBSSxLQUFLZixlQUFULEVBQTBCO0FBQ3hCLGdCQUFRUSxNQUFNSSxJQUFkO0FBQ0EsZUFBSyxXQUFMO0FBQ0UsZ0JBQUlKLE1BQU1RLE1BQU4sSUFBZ0IsQ0FBcEIsRUFBdUI7QUFDckI7QUFDQSxtQkFBS3BCLE9BQUwsR0FBZSxJQUFmO0FBQ0Q7QUFDRDtBQUNGLGVBQUssV0FBTDtBQUNFO0FBQ0EsZ0JBQUlZLE1BQU1TLEtBQU4sS0FBZ0IsQ0FBcEIsRUFBdUI7QUFDckI7QUFDQSxtQkFBS3JCLE9BQUwsR0FBZSxLQUFmO0FBQ0Q7QUFDRCxnQkFBSSxDQUFDLEtBQUtBLE9BQVYsRUFBbUI7QUFDakI7QUFDQTtBQUNBLG1CQUFLRixRQUFMLENBQWM7QUFDWmtCLHNCQUFNdEIsZUFETTtBQUVadUIsMEJBQVVMLEtBRkU7QUFHWk0sNkJBQWEsT0FIRDtBQUlaQyx3QkFBUVAsTUFBTU87QUFKRixlQUFkO0FBTUQ7QUFDRDtBQUNGLGVBQUssU0FBTDtBQUNFLGlCQUFLbkIsT0FBTCxHQUFlLEtBQWY7QUFDQTtBQUNGO0FBM0JBO0FBNkJEO0FBRUY7Ozs7OztlQTlFa0JKLFMiLCJmaWxlIjoibW92ZS1pbnB1dC5qcyIsInNvdXJjZXNDb250ZW50IjpbIi8vIENvcHlyaWdodCAoYykgMjAxNyBVYmVyIFRlY2hub2xvZ2llcywgSW5jLlxuLy9cbi8vIFBlcm1pc3Npb24gaXMgaGVyZWJ5IGdyYW50ZWQsIGZyZWUgb2YgY2hhcmdlLCB0byBhbnkgcGVyc29uIG9idGFpbmluZyBhIGNvcHlcbi8vIG9mIHRoaXMgc29mdHdhcmUgYW5kIGFzc29jaWF0ZWQgZG9jdW1lbnRhdGlvbiBmaWxlcyAodGhlIFwiU29mdHdhcmVcIiksIHRvIGRlYWxcbi8vIGluIHRoZSBTb2Z0d2FyZSB3aXRob3V0IHJlc3RyaWN0aW9uLCBpbmNsdWRpbmcgd2l0aG91dCBsaW1pdGF0aW9uIHRoZSByaWdodHNcbi8vIHRvIHVzZSwgY29weSwgbW9kaWZ5LCBtZXJnZSwgcHVibGlzaCwgZGlzdHJpYnV0ZSwgc3VibGljZW5zZSwgYW5kL29yIHNlbGxcbi8vIGNvcGllcyBvZiB0aGUgU29mdHdhcmUsIGFuZCB0byBwZXJtaXQgcGVyc29ucyB0byB3aG9tIHRoZSBTb2Z0d2FyZSBpc1xuLy8gZnVybmlzaGVkIHRvIGRvIHNvLCBzdWJqZWN0IHRvIHRoZSBmb2xsb3dpbmcgY29uZGl0aW9uczpcbi8vXG4vLyBUaGUgYWJvdmUgY29weXJpZ2h0IG5vdGljZSBhbmQgdGhpcyBwZXJtaXNzaW9uIG5vdGljZSBzaGFsbCBiZSBpbmNsdWRlZCBpblxuLy8gYWxsIGNvcGllcyBvciBzdWJzdGFudGlhbCBwb3J0aW9ucyBvZiB0aGUgU29mdHdhcmUuXG4vL1xuLy8gVEhFIFNPRlRXQVJFIElTIFBST1ZJREVEIFwiQVMgSVNcIiwgV0lUSE9VVCBXQVJSQU5UWSBPRiBBTlkgS0lORCwgRVhQUkVTUyBPUlxuLy8gSU1QTElFRCwgSU5DTFVESU5HIEJVVCBOT1QgTElNSVRFRCBUTyBUSEUgV0FSUkFOVElFUyBPRiBNRVJDSEFOVEFCSUxJVFksXG4vLyBGSVRORVNTIEZPUiBBIFBBUlRJQ1VMQVIgUFVSUE9TRSBBTkQgTk9OSU5GUklOR0VNRU5ULiBJTiBOTyBFVkVOVCBTSEFMTCBUSEVcbi8vIEFVVEhPUlMgT1IgQ09QWVJJR0hUIEhPTERFUlMgQkUgTElBQkxFIEZPUiBBTlkgQ0xBSU0sIERBTUFHRVMgT1IgT1RIRVJcbi8vIExJQUJJTElUWSwgV0hFVEhFUiBJTiBBTiBBQ1RJT04gT0YgQ09OVFJBQ1QsIFRPUlQgT1IgT1RIRVJXSVNFLCBBUklTSU5HIEZST00sXG4vLyBPVVQgT0YgT1IgSU4gQ09OTkVDVElPTiBXSVRIIFRIRSBTT0ZUV0FSRSBPUiBUSEUgVVNFIE9SIE9USEVSIERFQUxJTkdTIElOXG4vLyBUSEUgU09GVFdBUkUuXG5cbmltcG9ydCB7SU5QVVRfRVZFTlRfVFlQRVN9IGZyb20gJy4uL2NvbnN0YW50cyc7XG5cbmNvbnN0IHtNT1VTRV9FVkVOVFN9ID0gSU5QVVRfRVZFTlRfVFlQRVM7XG5jb25zdCBNT1ZFX0VWRU5UX1RZUEUgPSAncG9pbnRlcm1vdmUnO1xuY29uc3QgTEVBVkVfRVZFTlRfVFlQRSA9ICdwb2ludGVybGVhdmUnO1xuXG4vKipcbiAqIEhhbW1lci5qcyBzd2FsbG93cyAnbW92ZScgZXZlbnRzIChmb3IgcG9pbnRlci90b3VjaC9tb3VzZSlcbiAqIHdoZW4gdGhlIHBvaW50ZXIgaXMgbm90IGRvd24uIFRoaXMgY2xhc3Mgc2V0cyB1cCBhIGhhbmRsZXJcbiAqIHNwZWNpZmljYWxseSBmb3IgdGhlc2UgZXZlbnRzIHRvIHdvcmsgYXJvdW5kIHRoaXMgbGltaXRhdGlvbi5cbiAqIE5vdGUgdGhhdCB0aGlzIGNvdWxkIGJlIGV4dGVuZGVkIHRvIG1vcmUgaW50ZWxsaWdlbnRseSBoYW5kbGVcbiAqIG1vdmUgZXZlbnRzIGFjcm9zcyBpbnB1dCB0eXBlcywgZS5nLiBzdG9yaW5nIG11bHRpcGxlIHNpbXVsdGFuZW91c1xuICogcG9pbnRlci90b3VjaCBldmVudHMsIGNhbGN1bGF0aW5nIHNwZWVkL2RpcmVjdGlvbiwgZXRjLlxuICovXG5leHBvcnQgZGVmYXVsdCBjbGFzcyBNb3ZlSW5wdXQge1xuXG4gIGNvbnN0cnVjdG9yKGVsZW1lbnQsIGNhbGxiYWNrLCBvcHRpb25zID0ge30pIHtcbiAgICB0aGlzLmVsZW1lbnQgPSBlbGVtZW50O1xuICAgIHRoaXMuY2FsbGJhY2sgPSBjYWxsYmFjaztcbiAgICB0aGlzLnByZXNzZWQgPSBmYWxzZTtcblxuICAgIHRoaXMub3B0aW9ucyA9IE9iamVjdC5hc3NpZ24oe2VuYWJsZTogdHJ1ZX0sIG9wdGlvbnMpO1xuICAgIHRoaXMuZW5hYmxlTW92ZUV2ZW50ID0gdGhpcy5vcHRpb25zLmVuYWJsZTtcbiAgICB0aGlzLmVuYWJsZUxlYXZlRXZlbnQgPSB0aGlzLm9wdGlvbnMuZW5hYmxlO1xuXG4gICAgdGhpcy5ldmVudHMgPSBNT1VTRV9FVkVOVFMuY29uY2F0KG9wdGlvbnMuZXZlbnRzIHx8IFtdKTtcblxuICAgIHRoaXMuaGFuZGxlRXZlbnQgPSB0aGlzLmhhbmRsZUV2ZW50LmJpbmQodGhpcyk7XG4gICAgdGhpcy5ldmVudHMuZm9yRWFjaChldmVudCA9PiBlbGVtZW50LmFkZEV2ZW50TGlzdGVuZXIoZXZlbnQsIHRoaXMuaGFuZGxlRXZlbnQpKTtcbiAgfVxuXG4gIGRlc3Ryb3koKSB7XG4gICAgdGhpcy5ldmVudHMuZm9yRWFjaChldmVudCA9PiB0aGlzLmVsZW1lbnQucmVtb3ZlRXZlbnRMaXN0ZW5lcihldmVudCwgdGhpcy5oYW5kbGVFdmVudCkpO1xuICB9XG5cbiAgLyoqXG4gICAqIEVuYWJsZSB0aGlzIGlucHV0IChiZWdpbiBwcm9jZXNzaW5nIGV2ZW50cylcbiAgICogaWYgdGhlIHNwZWNpZmllZCBldmVudCB0eXBlIGlzIGFtb25nIHRob3NlIGhhbmRsZWQgYnkgdGhpcyBpbnB1dC5cbiAgICovXG4gIGVuYWJsZUV2ZW50VHlwZShldmVudFR5cGUsIGVuYWJsZWQpIHtcbiAgICBpZiAoZXZlbnRUeXBlID09PSBNT1ZFX0VWRU5UX1RZUEUpIHtcbiAgICAgIHRoaXMuZW5hYmxlTW92ZUV2ZW50ID0gZW5hYmxlZDtcbiAgICB9XG4gICAgaWYgKGV2ZW50VHlwZSA9PT0gTEVBVkVfRVZFTlRfVFlQRSkge1xuICAgICAgdGhpcy5lbmFibGVMZWF2ZUV2ZW50ID0gZW5hYmxlZDtcbiAgICB9XG4gIH1cblxuICBoYW5kbGVFdmVudChldmVudCkge1xuICAgIGlmICh0aGlzLmVuYWJsZUxlYXZlRXZlbnQpIHtcbiAgICAgIGlmIChldmVudC50eXBlID09PSAnbW91c2VsZWF2ZScpIHtcbiAgICAgICAgdGhpcy5jYWxsYmFjayh7XG4gICAgICAgICAgdHlwZTogTEVBVkVfRVZFTlRfVFlQRSxcbiAgICAgICAgICBzcmNFdmVudDogZXZlbnQsXG4gICAgICAgICAgcG9pbnRlclR5cGU6ICdtb3VzZScsXG4gICAgICAgICAgdGFyZ2V0OiBldmVudC50YXJnZXRcbiAgICAgICAgfSk7XG4gICAgICB9XG4gICAgfVxuXG4gICAgaWYgKHRoaXMuZW5hYmxlTW92ZUV2ZW50KSB7XG4gICAgICBzd2l0Y2ggKGV2ZW50LnR5cGUpIHtcbiAgICAgIGNhc2UgJ21vdXNlZG93bic6XG4gICAgICAgIGlmIChldmVudC5idXR0b24gPj0gMCkge1xuICAgICAgICAgIC8vIEJ1dHRvbiBpcyBkb3duXG4gICAgICAgICAgdGhpcy5wcmVzc2VkID0gdHJ1ZTtcbiAgICAgICAgfVxuICAgICAgICBicmVhaztcbiAgICAgIGNhc2UgJ21vdXNlbW92ZSc6XG4gICAgICAgIC8vIE1vdmUgZXZlbnRzIHVzZSBgd2hpY2hgIHRvIHRyYWNrIHRoZSBidXR0b24gYmVpbmcgcHJlc3NlZFxuICAgICAgICBpZiAoZXZlbnQud2hpY2ggPT09IDApIHtcbiAgICAgICAgICAvLyBCdXR0b24gaXMgbm90IGRvd25cbiAgICAgICAgICB0aGlzLnByZXNzZWQgPSBmYWxzZTtcbiAgICAgICAgfVxuICAgICAgICBpZiAoIXRoaXMucHJlc3NlZCkge1xuICAgICAgICAgIC8vIERyYWcgZXZlbnRzIGFyZSBlbWl0dGVkIGJ5IGhhbW1lciBhbHJlYWR5XG4gICAgICAgICAgLy8gd2UganVzdCBuZWVkIHRvIGVtaXQgdGhlIG1vdmUgZXZlbnQgb24gaG92ZXJcbiAgICAgICAgICB0aGlzLmNhbGxiYWNrKHtcbiAgICAgICAgICAgIHR5cGU6IE1PVkVfRVZFTlRfVFlQRSxcbiAgICAgICAgICAgIHNyY0V2ZW50OiBldmVudCxcbiAgICAgICAgICAgIHBvaW50ZXJUeXBlOiAnbW91c2UnLFxuICAgICAgICAgICAgdGFyZ2V0OiBldmVudC50YXJnZXRcbiAgICAgICAgICB9KTtcbiAgICAgICAgfVxuICAgICAgICBicmVhaztcbiAgICAgIGNhc2UgJ21vdXNldXAnOlxuICAgICAgICB0aGlzLnByZXNzZWQgPSBmYWxzZTtcbiAgICAgICAgYnJlYWs7XG4gICAgICBkZWZhdWx0OlxuICAgICAgfVxuICAgIH1cblxuICB9XG59XG4iXX0=
 
/***/ }),
/* 675 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__constants__ = __webpack_require__(114);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__utils_globals__ = __webpack_require__(282);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__utils_globals___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__utils_globals__);
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
 
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
 
// Copyright (c) 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
 
 
 
 
var firefox = __WEBPACK_IMPORTED_MODULE_1__utils_globals__["userAgent"].indexOf('firefox') !== -1;
 
var WHEEL_EVENTS = __WEBPACK_IMPORTED_MODULE_0__constants__["g" /* INPUT_EVENT_TYPES */].WHEEL_EVENTS;
 
var EVENT_TYPE = 'wheel';
 
// Constants for normalizing input delta
var WHEEL_DELTA_MAGIC_SCALER = 4.000244140625;
var WHEEL_DELTA_PER_LINE = 40;
var TRACKPAD_MAX_DELTA = 4;
var TRACKPAD_MAX_DELTA_PER_TIME = 200;
// Slow down zoom if shift key is held for more precise zooming
var SHIFT_MULTIPLIER = 0.25;
 
var WheelInput = function () {
  function WheelInput(element, callback) {
    var _this = this;
 
    var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
 
    _classCallCheck(this, WheelInput);
 
    this.element = element;
    this.callback = callback;
 
    this.options = Object.assign({ enable: true }, options);
 
    this.time = 0;
    this.wheelPosition = null;
    this.type = null;
    this.timeout = null;
    this.lastValue = 0;
 
    this.events = WHEEL_EVENTS.concat(options.events || []);
 
    this.handleEvent = this.handleEvent.bind(this);
    this.events.forEach(function (event) {
      return element.addEventListener(event, _this.handleEvent);
    });
  }
 
  _createClass(WheelInput, [{
    key: 'destroy',
    value: function destroy() {
      var _this2 = this;
 
      this.events.forEach(function (event) {
        return _this2.element.removeEventListener(event, _this2.handleEvent);
      });
    }
 
    /**
     * Enable this input (begin processing events)
     * if the specified event type is among those handled by this input.
     */
 
  }, {
    key: 'enableEventType',
    value: function enableEventType(eventType, enabled) {
      if (eventType === EVENT_TYPE) {
        this.options.enable = enabled;
      }
    }
 
    /* eslint-disable complexity, max-statements */
 
  }, {
    key: 'handleEvent',
    value: function handleEvent(event) {
      if (!this.options.enable) {
        return;
      }
      event.preventDefault();
 
      var value = event.deltaY;
      if (__WEBPACK_IMPORTED_MODULE_1__utils_globals__["window"].WheelEvent) {
        // Firefox doubles the values on retina screens...
        if (firefox && event.deltaMode === __WEBPACK_IMPORTED_MODULE_1__utils_globals__["window"].WheelEvent.DOM_DELTA_PIXEL) {
          value /= __WEBPACK_IMPORTED_MODULE_1__utils_globals__["window"].devicePixelRatio;
        }
        if (event.deltaMode === __WEBPACK_IMPORTED_MODULE_1__utils_globals__["window"].WheelEvent.DOM_DELTA_LINE) {
          value *= WHEEL_DELTA_PER_LINE;
        }
      }
 
      var type = this.type,
          timeout = this.timeout,
          lastValue = this.lastValue,
          time = this.time;
 
 
      var now = (__WEBPACK_IMPORTED_MODULE_1__utils_globals__["window"] && __WEBPACK_IMPORTED_MODULE_1__utils_globals__["window"].performance || Date).now();
      var timeDelta = now - (time || 0);
 
      this.wheelPosition = {
        x: event.clientX,
        y: event.clientY
      };
      time = now;
 
      if (value !== 0 && value % WHEEL_DELTA_MAGIC_SCALER === 0) {
        // This one is definitely a mouse wheel event.
        type = 'wheel';
        // Normalize this value to match trackpad.
        value = Math.floor(value / WHEEL_DELTA_MAGIC_SCALER);
      } else if (value !== 0 && Math.abs(value) < TRACKPAD_MAX_DELTA) {
        // This one is definitely a trackpad event because it is so small.
        type = 'trackpad';
      } else if (timeDelta > 400) {
        // This is likely a new scroll action.
        type = null;
        lastValue = value;
        // Start a timeout in case this was a singular event,
        // and delay it by up to 40ms.
        timeout = __WEBPACK_IMPORTED_MODULE_1__utils_globals__["window"].setTimeout(function setTimeout() {
          this._onWheel(event, -lastValue, this.wheelPosition);
          type = 'wheel';
        }.bind(this), 40);
      } else if (!type) {
        // This is a repeating event, but we don't know the type of event just yet.
        // If the delta per time is small, we assume it's a fast trackpad;
        // otherwise we switch into wheel mode.
        type = Math.abs(timeDelta * value) < TRACKPAD_MAX_DELTA_PER_TIME ? 'trackpad' : 'wheel';
 
        // Make sure our delayed event isn't fired again, because we accumulate
        // the previous event (which was less than 40ms ago) into this event.
        if (timeout) {
          __WEBPACK_IMPORTED_MODULE_1__utils_globals__["window"].clearTimeout(timeout);
          timeout = null;
          value += lastValue;
        }
      }
 
      if (event.shiftKey && value) {
        value = value * SHIFT_MULTIPLIER;
      }
 
      // Only fire the callback if we actually know
      // what type of scrolling device the user uses.
      if (type) {
        this._onWheel(event, -value, this.wheelPosition);
      }
    }
  }, {
    key: '_onWheel',
    value: function _onWheel(srcEvent, delta, position) {
      this.callback({
        type: EVENT_TYPE,
        center: position,
        delta: delta,
        srcEvent: srcEvent,
        pointerType: 'mouse',
        target: srcEvent.target
      });
    }
  }]);
 
  return WheelInput;
}();
 
/* harmony default export */ __webpack_exports__["a"] = (WheelInput);
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9pbnB1dHMvd2hlZWwtaW5wdXQuanMiXSwibmFtZXMiOlsiSU5QVVRfRVZFTlRfVFlQRVMiLCJ3aW5kb3ciLCJ1c2VyQWdlbnQiLCJmaXJlZm94IiwiaW5kZXhPZiIsIldIRUVMX0VWRU5UUyIsIkVWRU5UX1RZUEUiLCJXSEVFTF9ERUxUQV9NQUdJQ19TQ0FMRVIiLCJXSEVFTF9ERUxUQV9QRVJfTElORSIsIlRSQUNLUEFEX01BWF9ERUxUQSIsIlRSQUNLUEFEX01BWF9ERUxUQV9QRVJfVElNRSIsIlNISUZUX01VTFRJUExJRVIiLCJXaGVlbElucHV0IiwiZWxlbWVudCIsImNhbGxiYWNrIiwib3B0aW9ucyIsIk9iamVjdCIsImFzc2lnbiIsImVuYWJsZSIsInRpbWUiLCJ3aGVlbFBvc2l0aW9uIiwidHlwZSIsInRpbWVvdXQiLCJsYXN0VmFsdWUiLCJldmVudHMiLCJjb25jYXQiLCJoYW5kbGVFdmVudCIsImJpbmQiLCJmb3JFYWNoIiwiYWRkRXZlbnRMaXN0ZW5lciIsImV2ZW50IiwicmVtb3ZlRXZlbnRMaXN0ZW5lciIsImV2ZW50VHlwZSIsImVuYWJsZWQiLCJwcmV2ZW50RGVmYXVsdCIsInZhbHVlIiwiZGVsdGFZIiwiV2hlZWxFdmVudCIsImRlbHRhTW9kZSIsIkRPTV9ERUxUQV9QSVhFTCIsImRldmljZVBpeGVsUmF0aW8iLCJET01fREVMVEFfTElORSIsIm5vdyIsInBlcmZvcm1hbmNlIiwiRGF0ZSIsInRpbWVEZWx0YSIsIngiLCJjbGllbnRYIiwieSIsImNsaWVudFkiLCJNYXRoIiwiZmxvb3IiLCJhYnMiLCJzZXRUaW1lb3V0IiwiX29uV2hlZWwiLCJjbGVhclRpbWVvdXQiLCJzaGlmdEtleSIsInNyY0V2ZW50IiwiZGVsdGEiLCJwb3NpdGlvbiIsImNlbnRlciIsInBvaW50ZXJUeXBlIiwidGFyZ2V0Il0sIm1hcHBpbmdzIjoiOzs7O0FBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUEsU0FBUUEsaUJBQVIsUUFBZ0MsY0FBaEM7QUFDQSxTQUFRQyxNQUFSLEVBQWdCQyxTQUFoQixRQUFnQyxrQkFBaEM7O0FBRUEsSUFBTUMsVUFBVUQsVUFBVUUsT0FBVixDQUFrQixTQUFsQixNQUFpQyxDQUFDLENBQWxEOztJQUVPQyxZLEdBQWdCTCxpQixDQUFoQkssWTs7QUFDUCxJQUFNQyxhQUFhLE9BQW5COztBQUVBO0FBQ0EsSUFBTUMsMkJBQTJCLGNBQWpDO0FBQ0EsSUFBTUMsdUJBQXVCLEVBQTdCO0FBQ0EsSUFBTUMscUJBQXFCLENBQTNCO0FBQ0EsSUFBTUMsOEJBQThCLEdBQXBDO0FBQ0E7QUFDQSxJQUFNQyxtQkFBbUIsSUFBekI7O0lBRXFCQyxVO0FBRW5CLHNCQUFZQyxPQUFaLEVBQXFCQyxRQUFyQixFQUE2QztBQUFBOztBQUFBLFFBQWRDLE9BQWMsdUVBQUosRUFBSTs7QUFBQTs7QUFDM0MsU0FBS0YsT0FBTCxHQUFlQSxPQUFmO0FBQ0EsU0FBS0MsUUFBTCxHQUFnQkEsUUFBaEI7O0FBRUEsU0FBS0MsT0FBTCxHQUFlQyxPQUFPQyxNQUFQLENBQWMsRUFBQ0MsUUFBUSxJQUFULEVBQWQsRUFBOEJILE9BQTlCLENBQWY7O0FBRUEsU0FBS0ksSUFBTCxHQUFZLENBQVo7QUFDQSxTQUFLQyxhQUFMLEdBQXFCLElBQXJCO0FBQ0EsU0FBS0MsSUFBTCxHQUFZLElBQVo7QUFDQSxTQUFLQyxPQUFMLEdBQWUsSUFBZjtBQUNBLFNBQUtDLFNBQUwsR0FBaUIsQ0FBakI7O0FBRUEsU0FBS0MsTUFBTCxHQUFjbkIsYUFBYW9CLE1BQWIsQ0FBb0JWLFFBQVFTLE1BQVIsSUFBa0IsRUFBdEMsQ0FBZDs7QUFFQSxTQUFLRSxXQUFMLEdBQW1CLEtBQUtBLFdBQUwsQ0FBaUJDLElBQWpCLENBQXNCLElBQXRCLENBQW5CO0FBQ0EsU0FBS0gsTUFBTCxDQUFZSSxPQUFaLENBQW9CO0FBQUEsYUFBU2YsUUFBUWdCLGdCQUFSLENBQXlCQyxLQUF6QixFQUFnQyxNQUFLSixXQUFyQyxDQUFUO0FBQUEsS0FBcEI7QUFDRDs7Ozs4QkFFUztBQUFBOztBQUNSLFdBQUtGLE1BQUwsQ0FBWUksT0FBWixDQUFvQjtBQUFBLGVBQVMsT0FBS2YsT0FBTCxDQUFha0IsbUJBQWIsQ0FBaUNELEtBQWpDLEVBQXdDLE9BQUtKLFdBQTdDLENBQVQ7QUFBQSxPQUFwQjtBQUNEOztBQUVEOzs7Ozs7O29DQUlnQk0sUyxFQUFXQyxPLEVBQVM7QUFDbEMsVUFBSUQsY0FBYzFCLFVBQWxCLEVBQThCO0FBQzVCLGFBQUtTLE9BQUwsQ0FBYUcsTUFBYixHQUFzQmUsT0FBdEI7QUFDRDtBQUNGOztBQUVEOzs7O2dDQUNZSCxLLEVBQU87QUFDakIsVUFBSSxDQUFDLEtBQUtmLE9BQUwsQ0FBYUcsTUFBbEIsRUFBMEI7QUFDeEI7QUFDRDtBQUNEWSxZQUFNSSxjQUFOOztBQUVBLFVBQUlDLFFBQVFMLE1BQU1NLE1BQWxCO0FBQ0EsVUFBSW5DLE9BQU9vQyxVQUFYLEVBQXVCO0FBQ3JCO0FBQ0EsWUFBSWxDLFdBQVcyQixNQUFNUSxTQUFOLEtBQW9CckMsT0FBT29DLFVBQVAsQ0FBa0JFLGVBQXJELEVBQXNFO0FBQ3BFSixtQkFBU2xDLE9BQU91QyxnQkFBaEI7QUFDRDtBQUNELFlBQUlWLE1BQU1RLFNBQU4sS0FBb0JyQyxPQUFPb0MsVUFBUCxDQUFrQkksY0FBMUMsRUFBMEQ7QUFDeEROLG1CQUFTM0Isb0JBQVQ7QUFDRDtBQUNGOztBQWZnQixVQWtCZmEsSUFsQmUsR0FzQmIsSUF0QmEsQ0FrQmZBLElBbEJlO0FBQUEsVUFtQmZDLE9BbkJlLEdBc0JiLElBdEJhLENBbUJmQSxPQW5CZTtBQUFBLFVBb0JmQyxTQXBCZSxHQXNCYixJQXRCYSxDQW9CZkEsU0FwQmU7QUFBQSxVQXFCZkosSUFyQmUsR0FzQmIsSUF0QmEsQ0FxQmZBLElBckJlOzs7QUF3QmpCLFVBQU11QixNQUFNLENBQUV6QyxVQUFVQSxPQUFPMEMsV0FBbEIsSUFBa0NDLElBQW5DLEVBQXlDRixHQUF6QyxFQUFaO0FBQ0EsVUFBTUcsWUFBWUgsT0FBT3ZCLFFBQVEsQ0FBZixDQUFsQjs7QUFFQSxXQUFLQyxhQUFMLEdBQXFCO0FBQ25CMEIsV0FBR2hCLE1BQU1pQixPQURVO0FBRW5CQyxXQUFHbEIsTUFBTW1CO0FBRlUsT0FBckI7QUFJQTlCLGFBQU91QixHQUFQOztBQUVBLFVBQUlQLFVBQVUsQ0FBVixJQUFlQSxRQUFRNUIsd0JBQVIsS0FBcUMsQ0FBeEQsRUFBMkQ7QUFDekQ7QUFDQWMsZUFBTyxPQUFQO0FBQ0E7QUFDQWMsZ0JBQVFlLEtBQUtDLEtBQUwsQ0FBV2hCLFFBQVE1Qix3QkFBbkIsQ0FBUjtBQUNELE9BTEQsTUFLTyxJQUFJNEIsVUFBVSxDQUFWLElBQWVlLEtBQUtFLEdBQUwsQ0FBU2pCLEtBQVQsSUFBa0IxQixrQkFBckMsRUFBeUQ7QUFDOUQ7QUFDQVksZUFBTyxVQUFQO0FBQ0QsT0FITSxNQUdBLElBQUl3QixZQUFZLEdBQWhCLEVBQXFCO0FBQzFCO0FBQ0F4QixlQUFPLElBQVA7QUFDQUUsb0JBQVlZLEtBQVo7QUFDQTtBQUNBO0FBQ0FiLGtCQUFVckIsT0FBT29ELFVBQVAsQ0FBa0IsU0FBU0EsVUFBVCxHQUFzQjtBQUNoRCxlQUFLQyxRQUFMLENBQWN4QixLQUFkLEVBQXFCLENBQUNQLFNBQXRCLEVBQWlDLEtBQUtILGFBQXRDO0FBQ0FDLGlCQUFPLE9BQVA7QUFDRCxTQUgyQixDQUcxQk0sSUFIMEIsQ0FHckIsSUFIcUIsQ0FBbEIsRUFHSSxFQUhKLENBQVY7QUFJRCxPQVZNLE1BVUEsSUFBSSxDQUFDTixJQUFMLEVBQVc7QUFDaEI7QUFDQTtBQUNBO0FBQ0FBLGVBQU82QixLQUFLRSxHQUFMLENBQVNQLFlBQVlWLEtBQXJCLElBQThCekIsMkJBQTlCLEdBQTRELFVBQTVELEdBQXlFLE9BQWhGOztBQUVBO0FBQ0E7QUFDQSxZQUFJWSxPQUFKLEVBQWE7QUFDWHJCLGlCQUFPc0QsWUFBUCxDQUFvQmpDLE9BQXBCO0FBQ0FBLG9CQUFVLElBQVY7QUFDQWEsbUJBQVNaLFNBQVQ7QUFDRDtBQUNGOztBQUVELFVBQUlPLE1BQU0wQixRQUFOLElBQWtCckIsS0FBdEIsRUFBNkI7QUFDM0JBLGdCQUFRQSxRQUFReEIsZ0JBQWhCO0FBQ0Q7O0FBRUQ7QUFDQTtBQUNBLFVBQUlVLElBQUosRUFBVTtBQUNSLGFBQUtpQyxRQUFMLENBQWN4QixLQUFkLEVBQXFCLENBQUNLLEtBQXRCLEVBQTZCLEtBQUtmLGFBQWxDO0FBQ0Q7QUFDRjs7OzZCQUVRcUMsUSxFQUFVQyxLLEVBQU9DLFEsRUFBVTtBQUNsQyxXQUFLN0MsUUFBTCxDQUFjO0FBQ1pPLGNBQU1mLFVBRE07QUFFWnNELGdCQUFRRCxRQUZJO0FBR1pELG9CQUhZO0FBSVpELDBCQUpZO0FBS1pJLHFCQUFhLE9BTEQ7QUFNWkMsZ0JBQVFMLFNBQVNLO0FBTkwsT0FBZDtBQVFEOzs7Ozs7ZUF6SGtCbEQsVSIsImZpbGUiOiJ3aGVlbC1pbnB1dC5qcyIsInNvdXJjZXNDb250ZW50IjpbIi8vIENvcHlyaWdodCAoYykgMjAxNyBVYmVyIFRlY2hub2xvZ2llcywgSW5jLlxuLy9cbi8vIFBlcm1pc3Npb24gaXMgaGVyZWJ5IGdyYW50ZWQsIGZyZWUgb2YgY2hhcmdlLCB0byBhbnkgcGVyc29uIG9idGFpbmluZyBhIGNvcHlcbi8vIG9mIHRoaXMgc29mdHdhcmUgYW5kIGFzc29jaWF0ZWQgZG9jdW1lbnRhdGlvbiBmaWxlcyAodGhlIFwiU29mdHdhcmVcIiksIHRvIGRlYWxcbi8vIGluIHRoZSBTb2Z0d2FyZSB3aXRob3V0IHJlc3RyaWN0aW9uLCBpbmNsdWRpbmcgd2l0aG91dCBsaW1pdGF0aW9uIHRoZSByaWdodHNcbi8vIHRvIHVzZSwgY29weSwgbW9kaWZ5LCBtZXJnZSwgcHVibGlzaCwgZGlzdHJpYnV0ZSwgc3VibGljZW5zZSwgYW5kL29yIHNlbGxcbi8vIGNvcGllcyBvZiB0aGUgU29mdHdhcmUsIGFuZCB0byBwZXJtaXQgcGVyc29ucyB0byB3aG9tIHRoZSBTb2Z0d2FyZSBpc1xuLy8gZnVybmlzaGVkIHRvIGRvIHNvLCBzdWJqZWN0IHRvIHRoZSBmb2xsb3dpbmcgY29uZGl0aW9uczpcbi8vXG4vLyBUaGUgYWJvdmUgY29weXJpZ2h0IG5vdGljZSBhbmQgdGhpcyBwZXJtaXNzaW9uIG5vdGljZSBzaGFsbCBiZSBpbmNsdWRlZCBpblxuLy8gYWxsIGNvcGllcyBvciBzdWJzdGFudGlhbCBwb3J0aW9ucyBvZiB0aGUgU29mdHdhcmUuXG4vL1xuLy8gVEhFIFNPRlRXQVJFIElTIFBST1ZJREVEIFwiQVMgSVNcIiwgV0lUSE9VVCBXQVJSQU5UWSBPRiBBTlkgS0lORCwgRVhQUkVTUyBPUlxuLy8gSU1QTElFRCwgSU5DTFVESU5HIEJVVCBOT1QgTElNSVRFRCBUTyBUSEUgV0FSUkFOVElFUyBPRiBNRVJDSEFOVEFCSUxJVFksXG4vLyBGSVRORVNTIEZPUiBBIFBBUlRJQ1VMQVIgUFVSUE9TRSBBTkQgTk9OSU5GUklOR0VNRU5ULiBJTiBOTyBFVkVOVCBTSEFMTCBUSEVcbi8vIEFVVEhPUlMgT1IgQ09QWVJJR0hUIEhPTERFUlMgQkUgTElBQkxFIEZPUiBBTlkgQ0xBSU0sIERBTUFHRVMgT1IgT1RIRVJcbi8vIExJQUJJTElUWSwgV0hFVEhFUiBJTiBBTiBBQ1RJT04gT0YgQ09OVFJBQ1QsIFRPUlQgT1IgT1RIRVJXSVNFLCBBUklTSU5HIEZST00sXG4vLyBPVVQgT0YgT1IgSU4gQ09OTkVDVElPTiBXSVRIIFRIRSBTT0ZUV0FSRSBPUiBUSEUgVVNFIE9SIE9USEVSIERFQUxJTkdTIElOXG4vLyBUSEUgU09GVFdBUkUuXG5cbmltcG9ydCB7SU5QVVRfRVZFTlRfVFlQRVN9IGZyb20gJy4uL2NvbnN0YW50cyc7XG5pbXBvcnQge3dpbmRvdywgdXNlckFnZW50fSBmcm9tICcuLi91dGlscy9nbG9iYWxzJztcblxuY29uc3QgZmlyZWZveCA9IHVzZXJBZ2VudC5pbmRleE9mKCdmaXJlZm94JykgIT09IC0xO1xuXG5jb25zdCB7V0hFRUxfRVZFTlRTfSA9IElOUFVUX0VWRU5UX1RZUEVTO1xuY29uc3QgRVZFTlRfVFlQRSA9ICd3aGVlbCc7XG5cbi8vIENvbnN0YW50cyBmb3Igbm9ybWFsaXppbmcgaW5wdXQgZGVsdGFcbmNvbnN0IFdIRUVMX0RFTFRBX01BR0lDX1NDQUxFUiA9IDQuMDAwMjQ0MTQwNjI1O1xuY29uc3QgV0hFRUxfREVMVEFfUEVSX0xJTkUgPSA0MDtcbmNvbnN0IFRSQUNLUEFEX01BWF9ERUxUQSA9IDQ7XG5jb25zdCBUUkFDS1BBRF9NQVhfREVMVEFfUEVSX1RJTUUgPSAyMDA7XG4vLyBTbG93IGRvd24gem9vbSBpZiBzaGlmdCBrZXkgaXMgaGVsZCBmb3IgbW9yZSBwcmVjaXNlIHpvb21pbmdcbmNvbnN0IFNISUZUX01VTFRJUExJRVIgPSAwLjI1O1xuXG5leHBvcnQgZGVmYXVsdCBjbGFzcyBXaGVlbElucHV0IHtcblxuICBjb25zdHJ1Y3RvcihlbGVtZW50LCBjYWxsYmFjaywgb3B0aW9ucyA9IHt9KSB7XG4gICAgdGhpcy5lbGVtZW50ID0gZWxlbWVudDtcbiAgICB0aGlzLmNhbGxiYWNrID0gY2FsbGJhY2s7XG5cbiAgICB0aGlzLm9wdGlvbnMgPSBPYmplY3QuYXNzaWduKHtlbmFibGU6IHRydWV9LCBvcHRpb25zKTtcblxuICAgIHRoaXMudGltZSA9IDA7XG4gICAgdGhpcy53aGVlbFBvc2l0aW9uID0gbnVsbDtcbiAgICB0aGlzLnR5cGUgPSBudWxsO1xuICAgIHRoaXMudGltZW91dCA9IG51bGw7XG4gICAgdGhpcy5sYXN0VmFsdWUgPSAwO1xuXG4gICAgdGhpcy5ldmVudHMgPSBXSEVFTF9FVkVOVFMuY29uY2F0KG9wdGlvbnMuZXZlbnRzIHx8IFtdKTtcblxuICAgIHRoaXMuaGFuZGxlRXZlbnQgPSB0aGlzLmhhbmRsZUV2ZW50LmJpbmQodGhpcyk7XG4gICAgdGhpcy5ldmVudHMuZm9yRWFjaChldmVudCA9PiBlbGVtZW50LmFkZEV2ZW50TGlzdGVuZXIoZXZlbnQsIHRoaXMuaGFuZGxlRXZlbnQpKTtcbiAgfVxuXG4gIGRlc3Ryb3koKSB7XG4gICAgdGhpcy5ldmVudHMuZm9yRWFjaChldmVudCA9PiB0aGlzLmVsZW1lbnQucmVtb3ZlRXZlbnRMaXN0ZW5lcihldmVudCwgdGhpcy5oYW5kbGVFdmVudCkpO1xuICB9XG5cbiAgLyoqXG4gICAqIEVuYWJsZSB0aGlzIGlucHV0IChiZWdpbiBwcm9jZXNzaW5nIGV2ZW50cylcbiAgICogaWYgdGhlIHNwZWNpZmllZCBldmVudCB0eXBlIGlzIGFtb25nIHRob3NlIGhhbmRsZWQgYnkgdGhpcyBpbnB1dC5cbiAgICovXG4gIGVuYWJsZUV2ZW50VHlwZShldmVudFR5cGUsIGVuYWJsZWQpIHtcbiAgICBpZiAoZXZlbnRUeXBlID09PSBFVkVOVF9UWVBFKSB7XG4gICAgICB0aGlzLm9wdGlvbnMuZW5hYmxlID0gZW5hYmxlZDtcbiAgICB9XG4gIH1cblxuICAvKiBlc2xpbnQtZGlzYWJsZSBjb21wbGV4aXR5LCBtYXgtc3RhdGVtZW50cyAqL1xuICBoYW5kbGVFdmVudChldmVudCkge1xuICAgIGlmICghdGhpcy5vcHRpb25zLmVuYWJsZSkge1xuICAgICAgcmV0dXJuO1xuICAgIH1cbiAgICBldmVudC5wcmV2ZW50RGVmYXVsdCgpO1xuXG4gICAgbGV0IHZhbHVlID0gZXZlbnQuZGVsdGFZO1xuICAgIGlmICh3aW5kb3cuV2hlZWxFdmVudCkge1xuICAgICAgLy8gRmlyZWZveCBkb3VibGVzIHRoZSB2YWx1ZXMgb24gcmV0aW5hIHNjcmVlbnMuLi5cbiAgICAgIGlmIChmaXJlZm94ICYmIGV2ZW50LmRlbHRhTW9kZSA9PT0gd2luZG93LldoZWVsRXZlbnQuRE9NX0RFTFRBX1BJWEVMKSB7XG4gICAgICAgIHZhbHVlIC89IHdpbmRvdy5kZXZpY2VQaXhlbFJhdGlvO1xuICAgICAgfVxuICAgICAgaWYgKGV2ZW50LmRlbHRhTW9kZSA9PT0gd2luZG93LldoZWVsRXZlbnQuRE9NX0RFTFRBX0xJTkUpIHtcbiAgICAgICAgdmFsdWUgKj0gV0hFRUxfREVMVEFfUEVSX0xJTkU7XG4gICAgICB9XG4gICAgfVxuXG4gICAgbGV0IHtcbiAgICAgIHR5cGUsXG4gICAgICB0aW1lb3V0LFxuICAgICAgbGFzdFZhbHVlLFxuICAgICAgdGltZVxuICAgIH0gPSB0aGlzO1xuXG4gICAgY29uc3Qgbm93ID0gKCh3aW5kb3cgJiYgd2luZG93LnBlcmZvcm1hbmNlKSB8fCBEYXRlKS5ub3coKTtcbiAgICBjb25zdCB0aW1lRGVsdGEgPSBub3cgLSAodGltZSB8fCAwKTtcblxuICAgIHRoaXMud2hlZWxQb3NpdGlvbiA9IHtcbiAgICAgIHg6IGV2ZW50LmNsaWVudFgsXG4gICAgICB5OiBldmVudC5jbGllbnRZXG4gICAgfTtcbiAgICB0aW1lID0gbm93O1xuXG4gICAgaWYgKHZhbHVlICE9PSAwICYmIHZhbHVlICUgV0hFRUxfREVMVEFfTUFHSUNfU0NBTEVSID09PSAwKSB7XG4gICAgICAvLyBUaGlzIG9uZSBpcyBkZWZpbml0ZWx5IGEgbW91c2Ugd2hlZWwgZXZlbnQuXG4gICAgICB0eXBlID0gJ3doZWVsJztcbiAgICAgIC8vIE5vcm1hbGl6ZSB0aGlzIHZhbHVlIHRvIG1hdGNoIHRyYWNrcGFkLlxuICAgICAgdmFsdWUgPSBNYXRoLmZsb29yKHZhbHVlIC8gV0hFRUxfREVMVEFfTUFHSUNfU0NBTEVSKTtcbiAgICB9IGVsc2UgaWYgKHZhbHVlICE9PSAwICYmIE1hdGguYWJzKHZhbHVlKSA8IFRSQUNLUEFEX01BWF9ERUxUQSkge1xuICAgICAgLy8gVGhpcyBvbmUgaXMgZGVmaW5pdGVseSBhIHRyYWNrcGFkIGV2ZW50IGJlY2F1c2UgaXQgaXMgc28gc21hbGwuXG4gICAgICB0eXBlID0gJ3RyYWNrcGFkJztcbiAgICB9IGVsc2UgaWYgKHRpbWVEZWx0YSA+IDQwMCkge1xuICAgICAgLy8gVGhpcyBpcyBsaWtlbHkgYSBuZXcgc2Nyb2xsIGFjdGlvbi5cbiAgICAgIHR5cGUgPSBudWxsO1xuICAgICAgbGFzdFZhbHVlID0gdmFsdWU7XG4gICAgICAvLyBTdGFydCBhIHRpbWVvdXQgaW4gY2FzZSB0aGlzIHdhcyBhIHNpbmd1bGFyIGV2ZW50LFxuICAgICAgLy8gYW5kIGRlbGF5IGl0IGJ5IHVwIHRvIDQwbXMuXG4gICAgICB0aW1lb3V0ID0gd2luZG93LnNldFRpbWVvdXQoZnVuY3Rpb24gc2V0VGltZW91dCgpIHtcbiAgICAgICAgdGhpcy5fb25XaGVlbChldmVudCwgLWxhc3RWYWx1ZSwgdGhpcy53aGVlbFBvc2l0aW9uKTtcbiAgICAgICAgdHlwZSA9ICd3aGVlbCc7XG4gICAgICB9LmJpbmQodGhpcyksIDQwKTtcbiAgICB9IGVsc2UgaWYgKCF0eXBlKSB7XG4gICAgICAvLyBUaGlzIGlzIGEgcmVwZWF0aW5nIGV2ZW50LCBidXQgd2UgZG9uJ3Qga25vdyB0aGUgdHlwZSBvZiBldmVudCBqdXN0IHlldC5cbiAgICAgIC8vIElmIHRoZSBkZWx0YSBwZXIgdGltZSBpcyBzbWFsbCwgd2UgYXNzdW1lIGl0J3MgYSBmYXN0IHRyYWNrcGFkO1xuICAgICAgLy8gb3RoZXJ3aXNlIHdlIHN3aXRjaCBpbnRvIHdoZWVsIG1vZGUuXG4gICAgICB0eXBlID0gTWF0aC5hYnModGltZURlbHRhICogdmFsdWUpIDwgVFJBQ0tQQURfTUFYX0RFTFRBX1BFUl9USU1FID8gJ3RyYWNrcGFkJyA6ICd3aGVlbCc7XG5cbiAgICAgIC8vIE1ha2Ugc3VyZSBvdXIgZGVsYXllZCBldmVudCBpc24ndCBmaXJlZCBhZ2FpbiwgYmVjYXVzZSB3ZSBhY2N1bXVsYXRlXG4gICAgICAvLyB0aGUgcHJldmlvdXMgZXZlbnQgKHdoaWNoIHdhcyBsZXNzIHRoYW4gNDBtcyBhZ28pIGludG8gdGhpcyBldmVudC5cbiAgICAgIGlmICh0aW1lb3V0KSB7XG4gICAgICAgIHdpbmRvdy5jbGVhclRpbWVvdXQodGltZW91dCk7XG4gICAgICAgIHRpbWVvdXQgPSBudWxsO1xuICAgICAgICB2YWx1ZSArPSBsYXN0VmFsdWU7XG4gICAgICB9XG4gICAgfVxuXG4gICAgaWYgKGV2ZW50LnNoaWZ0S2V5ICYmIHZhbHVlKSB7XG4gICAgICB2YWx1ZSA9IHZhbHVlICogU0hJRlRfTVVMVElQTElFUjtcbiAgICB9XG5cbiAgICAvLyBPbmx5IGZpcmUgdGhlIGNhbGxiYWNrIGlmIHdlIGFjdHVhbGx5IGtub3dcbiAgICAvLyB3aGF0IHR5cGUgb2Ygc2Nyb2xsaW5nIGRldmljZSB0aGUgdXNlciB1c2VzLlxuICAgIGlmICh0eXBlKSB7XG4gICAgICB0aGlzLl9vbldoZWVsKGV2ZW50LCAtdmFsdWUsIHRoaXMud2hlZWxQb3NpdGlvbik7XG4gICAgfVxuICB9XG5cbiAgX29uV2hlZWwoc3JjRXZlbnQsIGRlbHRhLCBwb3NpdGlvbikge1xuICAgIHRoaXMuY2FsbGJhY2soe1xuICAgICAgdHlwZTogRVZFTlRfVFlQRSxcbiAgICAgIGNlbnRlcjogcG9zaXRpb24sXG4gICAgICBkZWx0YSxcbiAgICAgIHNyY0V2ZW50LFxuICAgICAgcG9pbnRlclR5cGU6ICdtb3VzZScsXG4gICAgICB0YXJnZXQ6IHNyY0V2ZW50LnRhcmdldFxuICAgIH0pO1xuICB9XG59XG4iXX0=
 
/***/ }),
/* 676 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = whichButtons;
/* harmony export (immutable) */ __webpack_exports__["b"] = getOffsetPosition;
/* Constants */
var DOWN_EVENT = 1;
var MOVE_EVENT = 2;
var UP_EVENT = 4;
var MOUSE_EVENTS = {
  pointerdown: DOWN_EVENT,
  pointermove: MOVE_EVENT,
  pointerup: UP_EVENT,
  mousedown: DOWN_EVENT,
  mousemove: MOVE_EVENT,
  mouseup: UP_EVENT
};
 
// MouseEvent.which https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/which
var MOUSE_EVENT_WHICH_LEFT = 1;
var MOUSE_EVENT_WHICH_MIDDLE = 2;
var MOUSE_EVENT_WHICH_RIGHT = 3;
// MouseEvent.button https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/button
var MOUSE_EVENT_BUTTON_LEFT = 0;
var MOUSE_EVENT_BUTTON_MIDDLE = 1;
var MOUSE_EVENT_BUTTON_RIGHT = 2;
// MouseEvent.buttons https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/buttons
var MOUSE_EVENT_BUTTONS_LEFT_MASK = 1;
var MOUSE_EVENT_BUTTONS_RIGHT_MASK = 2;
var MOUSE_EVENT_BUTTONS_MIDDLE_MASK = 4;
 
/**
 * Extract the involved mouse button
 */
function whichButtons(event) {
  var eventType = MOUSE_EVENTS[event.srcEvent.type];
  if (!eventType) {
    // Not a mouse evet
    return null;
  }
 
  var _event$srcEvent = event.srcEvent,
      buttons = _event$srcEvent.buttons,
      button = _event$srcEvent.button,
      which = _event$srcEvent.which;
 
  var leftButton = false;
  var middleButton = false;
  var rightButton = false;
 
  if (
  // button is up, need to find out which one was pressed before
  eventType === UP_EVENT ||
  // moving but does not support `buttons` API
  eventType === MOVE_EVENT && !Number.isFinite(buttons)) {
    leftButton = which === MOUSE_EVENT_WHICH_LEFT;
    middleButton = which === MOUSE_EVENT_WHICH_MIDDLE;
    rightButton = which === MOUSE_EVENT_WHICH_RIGHT;
  } else if (eventType === MOVE_EVENT) {
    leftButton = Boolean(buttons & MOUSE_EVENT_BUTTONS_LEFT_MASK);
    middleButton = Boolean(buttons & MOUSE_EVENT_BUTTONS_MIDDLE_MASK);
    rightButton = Boolean(buttons & MOUSE_EVENT_BUTTONS_RIGHT_MASK);
  } else if (eventType === DOWN_EVENT) {
    leftButton = button === MOUSE_EVENT_BUTTON_LEFT;
    middleButton = button === MOUSE_EVENT_BUTTON_MIDDLE;
    rightButton = button === MOUSE_EVENT_BUTTON_RIGHT;
  }
 
  return { leftButton: leftButton, middleButton: middleButton, rightButton: rightButton };
}
 
/**
 * Calculate event position relative to the root element
 */
function getOffsetPosition(event, rootElement) {
  var srcEvent = event.srcEvent;
 
  // `center` is a hammer.js event property
 
  if (!event.center && !Number.isFinite(srcEvent.clientX)) {
    // Not a gestural event
    return null;
  }
 
  var center = event.center || {
    x: srcEvent.clientX,
    y: srcEvent.clientY
  };
 
  var rect = rootElement.getBoundingClientRect();
 
  // Fix scale for map affected by a CSS transform.
  // See https://stackoverflow.com/a/26893663/3528533
  var scaleX = rect.width / rootElement.offsetWidth;
  var scaleY = rect.height / rootElement.offsetHeight;
 
  // Calculate center relative to the root element
  var offsetCenter = {
    x: (center.x - rect.left - rootElement.clientLeft) / scaleX,
    y: (center.y - rect.top - rootElement.clientTop) / scaleY
  };
 
  return { center: center, offsetCenter: offsetCenter };
}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy91dGlscy9ldmVudC11dGlscy5qcyJdLCJuYW1lcyI6WyJET1dOX0VWRU5UIiwiTU9WRV9FVkVOVCIsIlVQX0VWRU5UIiwiTU9VU0VfRVZFTlRTIiwicG9pbnRlcmRvd24iLCJwb2ludGVybW92ZSIsInBvaW50ZXJ1cCIsIm1vdXNlZG93biIsIm1vdXNlbW92ZSIsIm1vdXNldXAiLCJNT1VTRV9FVkVOVF9XSElDSF9MRUZUIiwiTU9VU0VfRVZFTlRfV0hJQ0hfTUlERExFIiwiTU9VU0VfRVZFTlRfV0hJQ0hfUklHSFQiLCJNT1VTRV9FVkVOVF9CVVRUT05fTEVGVCIsIk1PVVNFX0VWRU5UX0JVVFRPTl9NSURETEUiLCJNT1VTRV9FVkVOVF9CVVRUT05fUklHSFQiLCJNT1VTRV9FVkVOVF9CVVRUT05TX0xFRlRfTUFTSyIsIk1PVVNFX0VWRU5UX0JVVFRPTlNfUklHSFRfTUFTSyIsIk1PVVNFX0VWRU5UX0JVVFRPTlNfTUlERExFX01BU0siLCJ3aGljaEJ1dHRvbnMiLCJldmVudCIsImV2ZW50VHlwZSIsInNyY0V2ZW50IiwidHlwZSIsImJ1dHRvbnMiLCJidXR0b24iLCJ3aGljaCIsImxlZnRCdXR0b24iLCJtaWRkbGVCdXR0b24iLCJyaWdodEJ1dHRvbiIsIk51bWJlciIsImlzRmluaXRlIiwiQm9vbGVhbiIsImdldE9mZnNldFBvc2l0aW9uIiwicm9vdEVsZW1lbnQiLCJjZW50ZXIiLCJjbGllbnRYIiwieCIsInkiLCJjbGllbnRZIiwicmVjdCIsImdldEJvdW5kaW5nQ2xpZW50UmVjdCIsInNjYWxlWCIsIndpZHRoIiwib2Zmc2V0V2lkdGgiLCJzY2FsZVkiLCJoZWlnaHQiLCJvZmZzZXRIZWlnaHQiLCJvZmZzZXRDZW50ZXIiLCJsZWZ0IiwiY2xpZW50TGVmdCIsInRvcCIsImNsaWVudFRvcCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQSxJQUFNQSxhQUFhLENBQW5CO0FBQ0EsSUFBTUMsYUFBYSxDQUFuQjtBQUNBLElBQU1DLFdBQVcsQ0FBakI7QUFDQSxJQUFNQyxlQUFlO0FBQ25CQyxlQUFhSixVQURNO0FBRW5CSyxlQUFhSixVQUZNO0FBR25CSyxhQUFXSixRQUhRO0FBSW5CSyxhQUFXUCxVQUpRO0FBS25CUSxhQUFXUCxVQUxRO0FBTW5CUSxXQUFTUDtBQU5VLENBQXJCOztBQVNBO0FBQ0EsSUFBTVEseUJBQXlCLENBQS9CO0FBQ0EsSUFBTUMsMkJBQTJCLENBQWpDO0FBQ0EsSUFBTUMsMEJBQTBCLENBQWhDO0FBQ0E7QUFDQSxJQUFNQywwQkFBMEIsQ0FBaEM7QUFDQSxJQUFNQyw0QkFBNEIsQ0FBbEM7QUFDQSxJQUFNQywyQkFBMkIsQ0FBakM7QUFDQTtBQUNBLElBQU1DLGdDQUFnQyxDQUF0QztBQUNBLElBQU1DLGlDQUFpQyxDQUF2QztBQUNBLElBQU1DLGtDQUFrQyxDQUF4Qzs7QUFFQTs7O0FBR0EsT0FBTyxTQUFTQyxZQUFULENBQXNCQyxLQUF0QixFQUE2QjtBQUNsQyxNQUFNQyxZQUFZbEIsYUFBYWlCLE1BQU1FLFFBQU4sQ0FBZUMsSUFBNUIsQ0FBbEI7QUFDQSxNQUFJLENBQUNGLFNBQUwsRUFBZ0I7QUFDZDtBQUNBLFdBQU8sSUFBUDtBQUNEOztBQUxpQyx3QkFPREQsTUFBTUUsUUFQTDtBQUFBLE1BTzNCRSxPQVAyQixtQkFPM0JBLE9BUDJCO0FBQUEsTUFPbEJDLE1BUGtCLG1CQU9sQkEsTUFQa0I7QUFBQSxNQU9WQyxLQVBVLG1CQU9WQSxLQVBVOztBQVFsQyxNQUFJQyxhQUFhLEtBQWpCO0FBQ0EsTUFBSUMsZUFBZSxLQUFuQjtBQUNBLE1BQUlDLGNBQWMsS0FBbEI7O0FBRUE7QUFDRTtBQUNBUixnQkFBY25CLFFBQWQ7QUFDQTtBQUNDbUIsZ0JBQWNwQixVQUFkLElBQTRCLENBQUM2QixPQUFPQyxRQUFQLENBQWdCUCxPQUFoQixDQUpoQyxFQUtFO0FBQ0FHLGlCQUFhRCxVQUFVaEIsc0JBQXZCO0FBQ0FrQixtQkFBZUYsVUFBVWYsd0JBQXpCO0FBQ0FrQixrQkFBY0gsVUFBVWQsdUJBQXhCO0FBQ0QsR0FURCxNQVNPLElBQUlTLGNBQWNwQixVQUFsQixFQUE4QjtBQUNuQzBCLGlCQUFhSyxRQUFRUixVQUFVUiw2QkFBbEIsQ0FBYjtBQUNBWSxtQkFBZUksUUFBUVIsVUFBVU4sK0JBQWxCLENBQWY7QUFDQVcsa0JBQWNHLFFBQVFSLFVBQVVQLDhCQUFsQixDQUFkO0FBQ0QsR0FKTSxNQUlBLElBQUlJLGNBQWNyQixVQUFsQixFQUE4QjtBQUNuQzJCLGlCQUFhRixXQUFXWix1QkFBeEI7QUFDQWUsbUJBQWVILFdBQVdYLHlCQUExQjtBQUNBZSxrQkFBY0osV0FBV1Ysd0JBQXpCO0FBQ0Q7O0FBRUQsU0FBTyxFQUFDWSxzQkFBRCxFQUFhQywwQkFBYixFQUEyQkMsd0JBQTNCLEVBQVA7QUFDRDs7QUFFRDs7O0FBR0EsT0FBTyxTQUFTSSxpQkFBVCxDQUEyQmIsS0FBM0IsRUFBa0NjLFdBQWxDLEVBQStDO0FBQUEsTUFDN0NaLFFBRDZDLEdBQ2pDRixLQURpQyxDQUM3Q0UsUUFENkM7O0FBR3BEOztBQUNBLE1BQUksQ0FBQ0YsTUFBTWUsTUFBUCxJQUFpQixDQUFDTCxPQUFPQyxRQUFQLENBQWdCVCxTQUFTYyxPQUF6QixDQUF0QixFQUF5RDtBQUN2RDtBQUNBLFdBQU8sSUFBUDtBQUNEOztBQUVELE1BQU1ELFNBQVNmLE1BQU1lLE1BQU4sSUFBZ0I7QUFDN0JFLE9BQUdmLFNBQVNjLE9BRGlCO0FBRTdCRSxPQUFHaEIsU0FBU2lCO0FBRmlCLEdBQS9COztBQUtBLE1BQU1DLE9BQU9OLFlBQVlPLHFCQUFaLEVBQWI7O0FBRUE7QUFDQTtBQUNBLE1BQU1DLFNBQVNGLEtBQUtHLEtBQUwsR0FBYVQsWUFBWVUsV0FBeEM7QUFDQSxNQUFNQyxTQUFTTCxLQUFLTSxNQUFMLEdBQWNaLFlBQVlhLFlBQXpDOztBQUVBO0FBQ0EsTUFBTUMsZUFBZTtBQUNuQlgsT0FBRyxDQUFDRixPQUFPRSxDQUFQLEdBQVdHLEtBQUtTLElBQWhCLEdBQXVCZixZQUFZZ0IsVUFBcEMsSUFBa0RSLE1BRGxDO0FBRW5CSixPQUFHLENBQUNILE9BQU9HLENBQVAsR0FBV0UsS0FBS1csR0FBaEIsR0FBc0JqQixZQUFZa0IsU0FBbkMsSUFBZ0RQO0FBRmhDLEdBQXJCOztBQUtBLFNBQU8sRUFBQ1YsY0FBRCxFQUFTYSwwQkFBVCxFQUFQO0FBQ0QiLCJmaWxlIjoiZXZlbnQtdXRpbHMuanMiLCJzb3VyY2VzQ29udGVudCI6WyIvKiBDb25zdGFudHMgKi9cbmNvbnN0IERPV05fRVZFTlQgPSAxO1xuY29uc3QgTU9WRV9FVkVOVCA9IDI7XG5jb25zdCBVUF9FVkVOVCA9IDQ7XG5jb25zdCBNT1VTRV9FVkVOVFMgPSB7XG4gIHBvaW50ZXJkb3duOiBET1dOX0VWRU5ULFxuICBwb2ludGVybW92ZTogTU9WRV9FVkVOVCxcbiAgcG9pbnRlcnVwOiBVUF9FVkVOVCxcbiAgbW91c2Vkb3duOiBET1dOX0VWRU5ULFxuICBtb3VzZW1vdmU6IE1PVkVfRVZFTlQsXG4gIG1vdXNldXA6IFVQX0VWRU5UXG59O1xuXG4vLyBNb3VzZUV2ZW50LndoaWNoIGh0dHBzOi8vZGV2ZWxvcGVyLm1vemlsbGEub3JnL2VuLVVTL2RvY3MvV2ViL0FQSS9Nb3VzZUV2ZW50L3doaWNoXG5jb25zdCBNT1VTRV9FVkVOVF9XSElDSF9MRUZUID0gMTtcbmNvbnN0IE1PVVNFX0VWRU5UX1dISUNIX01JRERMRSA9IDI7XG5jb25zdCBNT1VTRV9FVkVOVF9XSElDSF9SSUdIVCA9IDM7XG4vLyBNb3VzZUV2ZW50LmJ1dHRvbiBodHRwczovL2RldmVsb3Blci5tb3ppbGxhLm9yZy9lbi1VUy9kb2NzL1dlYi9BUEkvTW91c2VFdmVudC9idXR0b25cbmNvbnN0IE1PVVNFX0VWRU5UX0JVVFRPTl9MRUZUID0gMDtcbmNvbnN0IE1PVVNFX0VWRU5UX0JVVFRPTl9NSURETEUgPSAxO1xuY29uc3QgTU9VU0VfRVZFTlRfQlVUVE9OX1JJR0hUID0gMjtcbi8vIE1vdXNlRXZlbnQuYnV0dG9ucyBodHRwczovL2RldmVsb3Blci5tb3ppbGxhLm9yZy9lbi1VUy9kb2NzL1dlYi9BUEkvTW91c2VFdmVudC9idXR0b25zXG5jb25zdCBNT1VTRV9FVkVOVF9CVVRUT05TX0xFRlRfTUFTSyA9IDE7XG5jb25zdCBNT1VTRV9FVkVOVF9CVVRUT05TX1JJR0hUX01BU0sgPSAyO1xuY29uc3QgTU9VU0VfRVZFTlRfQlVUVE9OU19NSURETEVfTUFTSyA9IDQ7XG5cbi8qKlxuICogRXh0cmFjdCB0aGUgaW52b2x2ZWQgbW91c2UgYnV0dG9uXG4gKi9cbmV4cG9ydCBmdW5jdGlvbiB3aGljaEJ1dHRvbnMoZXZlbnQpIHtcbiAgY29uc3QgZXZlbnRUeXBlID0gTU9VU0VfRVZFTlRTW2V2ZW50LnNyY0V2ZW50LnR5cGVdO1xuICBpZiAoIWV2ZW50VHlwZSkge1xuICAgIC8vIE5vdCBhIG1vdXNlIGV2ZXRcbiAgICByZXR1cm4gbnVsbDtcbiAgfVxuXG4gIGNvbnN0IHtidXR0b25zLCBidXR0b24sIHdoaWNofSA9IGV2ZW50LnNyY0V2ZW50O1xuICBsZXQgbGVmdEJ1dHRvbiA9IGZhbHNlO1xuICBsZXQgbWlkZGxlQnV0dG9uID0gZmFsc2U7XG4gIGxldCByaWdodEJ1dHRvbiA9IGZhbHNlO1xuXG4gIGlmIChcbiAgICAvLyBidXR0b24gaXMgdXAsIG5lZWQgdG8gZmluZCBvdXQgd2hpY2ggb25lIHdhcyBwcmVzc2VkIGJlZm9yZVxuICAgIGV2ZW50VHlwZSA9PT0gVVBfRVZFTlQgfHxcbiAgICAvLyBtb3ZpbmcgYnV0IGRvZXMgbm90IHN1cHBvcnQgYGJ1dHRvbnNgIEFQSVxuICAgIChldmVudFR5cGUgPT09IE1PVkVfRVZFTlQgJiYgIU51bWJlci5pc0Zpbml0ZShidXR0b25zKSlcbiAgKSB7XG4gICAgbGVmdEJ1dHRvbiA9IHdoaWNoID09PSBNT1VTRV9FVkVOVF9XSElDSF9MRUZUO1xuICAgIG1pZGRsZUJ1dHRvbiA9IHdoaWNoID09PSBNT1VTRV9FVkVOVF9XSElDSF9NSURETEU7XG4gICAgcmlnaHRCdXR0b24gPSB3aGljaCA9PT0gTU9VU0VfRVZFTlRfV0hJQ0hfUklHSFQ7XG4gIH0gZWxzZSBpZiAoZXZlbnRUeXBlID09PSBNT1ZFX0VWRU5UKSB7XG4gICAgbGVmdEJ1dHRvbiA9IEJvb2xlYW4oYnV0dG9ucyAmIE1PVVNFX0VWRU5UX0JVVFRPTlNfTEVGVF9NQVNLKTtcbiAgICBtaWRkbGVCdXR0b24gPSBCb29sZWFuKGJ1dHRvbnMgJiBNT1VTRV9FVkVOVF9CVVRUT05TX01JRERMRV9NQVNLKTtcbiAgICByaWdodEJ1dHRvbiA9IEJvb2xlYW4oYnV0dG9ucyAmIE1PVVNFX0VWRU5UX0JVVFRPTlNfUklHSFRfTUFTSyk7XG4gIH0gZWxzZSBpZiAoZXZlbnRUeXBlID09PSBET1dOX0VWRU5UKSB7XG4gICAgbGVmdEJ1dHRvbiA9IGJ1dHRvbiA9PT0gTU9VU0VfRVZFTlRfQlVUVE9OX0xFRlQ7XG4gICAgbWlkZGxlQnV0dG9uID0gYnV0dG9uID09PSBNT1VTRV9FVkVOVF9CVVRUT05fTUlERExFO1xuICAgIHJpZ2h0QnV0dG9uID0gYnV0dG9uID09PSBNT1VTRV9FVkVOVF9CVVRUT05fUklHSFQ7XG4gIH1cblxuICByZXR1cm4ge2xlZnRCdXR0b24sIG1pZGRsZUJ1dHRvbiwgcmlnaHRCdXR0b259O1xufVxuXG4vKipcbiAqIENhbGN1bGF0ZSBldmVudCBwb3NpdGlvbiByZWxhdGl2ZSB0byB0aGUgcm9vdCBlbGVtZW50XG4gKi9cbmV4cG9ydCBmdW5jdGlvbiBnZXRPZmZzZXRQb3NpdGlvbihldmVudCwgcm9vdEVsZW1lbnQpIHtcbiAgY29uc3Qge3NyY0V2ZW50fSA9IGV2ZW50O1xuXG4gIC8vIGBjZW50ZXJgIGlzIGEgaGFtbWVyLmpzIGV2ZW50IHByb3BlcnR5XG4gIGlmICghZXZlbnQuY2VudGVyICYmICFOdW1iZXIuaXNGaW5pdGUoc3JjRXZlbnQuY2xpZW50WCkpIHtcbiAgICAvLyBOb3QgYSBnZXN0dXJhbCBldmVudFxuICAgIHJldHVybiBudWxsO1xuICB9XG5cbiAgY29uc3QgY2VudGVyID0gZXZlbnQuY2VudGVyIHx8IHtcbiAgICB4OiBzcmNFdmVudC5jbGllbnRYLFxuICAgIHk6IHNyY0V2ZW50LmNsaWVudFlcbiAgfTtcblxuICBjb25zdCByZWN0ID0gcm9vdEVsZW1lbnQuZ2V0Qm91bmRpbmdDbGllbnRSZWN0KCk7XG5cbiAgLy8gRml4IHNjYWxlIGZvciBtYXAgYWZmZWN0ZWQgYnkgYSBDU1MgdHJhbnNmb3JtLlxuICAvLyBTZWUgaHR0cHM6Ly9zdGFja292ZXJmbG93LmNvbS9hLzI2ODkzNjYzLzM1Mjg1MzNcbiAgY29uc3Qgc2NhbGVYID0gcmVjdC53aWR0aCAvIHJvb3RFbGVtZW50Lm9mZnNldFdpZHRoO1xuICBjb25zdCBzY2FsZVkgPSByZWN0LmhlaWdodCAvIHJvb3RFbGVtZW50Lm9mZnNldEhlaWdodDtcblxuICAvLyBDYWxjdWxhdGUgY2VudGVyIHJlbGF0aXZlIHRvIHRoZSByb290IGVsZW1lbnRcbiAgY29uc3Qgb2Zmc2V0Q2VudGVyID0ge1xuICAgIHg6IChjZW50ZXIueCAtIHJlY3QubGVmdCAtIHJvb3RFbGVtZW50LmNsaWVudExlZnQpIC8gc2NhbGVYLFxuICAgIHk6IChjZW50ZXIueSAtIHJlY3QudG9wIC0gcm9vdEVsZW1lbnQuY2xpZW50VG9wKSAvIHNjYWxlWVxuICB9O1xuXG4gIHJldHVybiB7Y2VudGVyLCBvZmZzZXRDZW50ZXJ9O1xufVxuIl19
 
/***/ }),
/* 677 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = enhancePointerEventInput;
/* harmony export (immutable) */ __webpack_exports__["b"] = enhanceMouseInput;
/**
 * This file contains overrides the default
 * hammer.js functions to add our own utility
 */
 
/* Hammer.js constants */
var INPUT_START = 1;
var INPUT_MOVE = 2;
var INPUT_END = 4;
var MOUSE_INPUT_MAP = {
  mousedown: INPUT_START,
  mousemove: INPUT_MOVE,
  mouseup: INPUT_END
};
 
/**
 * Helper function that returns true if any element in an array meets given criteria.
 * Because older browsers do not support `Array.prototype.some`
 * @params array {Array}
 * @params predict {Function}
 */
function some(array, predict) {
  for (var i = 0; i < array.length; i++) {
    if (predict(array[i])) {
      return true;
    }
  }
  return false;
}
 
/* eslint-disable no-invalid-this */
function enhancePointerEventInput(PointerEventInput) {
  var oldHandler = PointerEventInput.prototype.handler;
 
  // overrides PointerEventInput.handler to accept right mouse button
  PointerEventInput.prototype.handler = function handler(ev) {
    var store = this.store;
 
    // Allow non-left mouse buttons through
    if (ev.button > 0) {
      if (!some(store, function (e) {
        return e.pointerId === ev.pointerId;
      })) {
        store.push(ev);
      }
    }
 
    oldHandler.call(this, ev);
  };
}
 
// overrides MouseInput.handler to accept right mouse button
function enhanceMouseInput(MouseInput) {
  MouseInput.prototype.handler = function handler(ev) {
    var eventType = MOUSE_INPUT_MAP[ev.type];
 
    // on start we want to have the mouse button down
    if (eventType & INPUT_START && ev.button >= 0) {
      this.pressed = true;
    }
 
    if (eventType & INPUT_MOVE && ev.which === 0) {
      eventType = INPUT_END;
    }
 
    // mouse must be down
    if (!this.pressed) {
      return;
    }
 
    if (eventType & INPUT_END) {
      this.pressed = false;
    }
 
    this.callback(this.manager, eventType, {
      pointers: [ev],
      changedPointers: [ev],
      pointerType: 'mouse',
      srcEvent: ev
    });
  };
}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy91dGlscy9oYW1tZXItb3ZlcnJpZGVzLmpzIl0sIm5hbWVzIjpbIklOUFVUX1NUQVJUIiwiSU5QVVRfTU9WRSIsIklOUFVUX0VORCIsIk1PVVNFX0lOUFVUX01BUCIsIm1vdXNlZG93biIsIm1vdXNlbW92ZSIsIm1vdXNldXAiLCJzb21lIiwiYXJyYXkiLCJwcmVkaWN0IiwiaSIsImxlbmd0aCIsImVuaGFuY2VQb2ludGVyRXZlbnRJbnB1dCIsIlBvaW50ZXJFdmVudElucHV0Iiwib2xkSGFuZGxlciIsInByb3RvdHlwZSIsImhhbmRsZXIiLCJldiIsInN0b3JlIiwiYnV0dG9uIiwiZSIsInBvaW50ZXJJZCIsInB1c2giLCJjYWxsIiwiZW5oYW5jZU1vdXNlSW5wdXQiLCJNb3VzZUlucHV0IiwiZXZlbnRUeXBlIiwidHlwZSIsInByZXNzZWQiLCJ3aGljaCIsImNhbGxiYWNrIiwibWFuYWdlciIsInBvaW50ZXJzIiwiY2hhbmdlZFBvaW50ZXJzIiwicG9pbnRlclR5cGUiLCJzcmNFdmVudCJdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7O0FBS0E7QUFDQSxJQUFNQSxjQUFjLENBQXBCO0FBQ0EsSUFBTUMsYUFBYSxDQUFuQjtBQUNBLElBQU1DLFlBQVksQ0FBbEI7QUFDQSxJQUFNQyxrQkFBa0I7QUFDdEJDLGFBQVdKLFdBRFc7QUFFdEJLLGFBQVdKLFVBRlc7QUFHdEJLLFdBQVNKO0FBSGEsQ0FBeEI7O0FBTUE7Ozs7OztBQU1BLFNBQVNLLElBQVQsQ0FBY0MsS0FBZCxFQUFxQkMsT0FBckIsRUFBOEI7QUFDNUIsT0FBSyxJQUFJQyxJQUFJLENBQWIsRUFBZ0JBLElBQUlGLE1BQU1HLE1BQTFCLEVBQWtDRCxHQUFsQyxFQUF1QztBQUNyQyxRQUFJRCxRQUFRRCxNQUFNRSxDQUFOLENBQVIsQ0FBSixFQUF1QjtBQUNyQixhQUFPLElBQVA7QUFDRDtBQUNGO0FBQ0QsU0FBTyxLQUFQO0FBQ0Q7O0FBRUQ7QUFDQSxPQUFPLFNBQVNFLHdCQUFULENBQWtDQyxpQkFBbEMsRUFBcUQ7QUFDMUQsTUFBTUMsYUFBYUQsa0JBQWtCRSxTQUFsQixDQUE0QkMsT0FBL0M7O0FBRUE7QUFDQUgsb0JBQWtCRSxTQUFsQixDQUE0QkMsT0FBNUIsR0FBc0MsU0FBU0EsT0FBVCxDQUFpQkMsRUFBakIsRUFBcUI7QUFDekQsUUFBTUMsUUFBUSxLQUFLQSxLQUFuQjs7QUFFQTtBQUNBLFFBQUlELEdBQUdFLE1BQUgsR0FBWSxDQUFoQixFQUFtQjtBQUNqQixVQUFJLENBQUNaLEtBQUtXLEtBQUwsRUFBWTtBQUFBLGVBQUtFLEVBQUVDLFNBQUYsS0FBZ0JKLEdBQUdJLFNBQXhCO0FBQUEsT0FBWixDQUFMLEVBQXFEO0FBQ25ESCxjQUFNSSxJQUFOLENBQVdMLEVBQVg7QUFDRDtBQUNGOztBQUVESCxlQUFXUyxJQUFYLENBQWdCLElBQWhCLEVBQXNCTixFQUF0QjtBQUNELEdBWEQ7QUFZRDs7QUFFRDtBQUNBLE9BQU8sU0FBU08saUJBQVQsQ0FBMkJDLFVBQTNCLEVBQXVDO0FBQzVDQSxhQUFXVixTQUFYLENBQXFCQyxPQUFyQixHQUErQixTQUFTQSxPQUFULENBQWlCQyxFQUFqQixFQUFxQjtBQUNsRCxRQUFJUyxZQUFZdkIsZ0JBQWdCYyxHQUFHVSxJQUFuQixDQUFoQjs7QUFFQTtBQUNBLFFBQUlELFlBQVkxQixXQUFaLElBQTJCaUIsR0FBR0UsTUFBSCxJQUFhLENBQTVDLEVBQStDO0FBQzdDLFdBQUtTLE9BQUwsR0FBZSxJQUFmO0FBQ0Q7O0FBRUQsUUFBSUYsWUFBWXpCLFVBQVosSUFBMEJnQixHQUFHWSxLQUFILEtBQWEsQ0FBM0MsRUFBOEM7QUFDNUNILGtCQUFZeEIsU0FBWjtBQUNEOztBQUVEO0FBQ0EsUUFBSSxDQUFDLEtBQUswQixPQUFWLEVBQW1CO0FBQ2pCO0FBQ0Q7O0FBRUQsUUFBSUYsWUFBWXhCLFNBQWhCLEVBQTJCO0FBQ3pCLFdBQUswQixPQUFMLEdBQWUsS0FBZjtBQUNEOztBQUVELFNBQUtFLFFBQUwsQ0FBYyxLQUFLQyxPQUFuQixFQUE0QkwsU0FBNUIsRUFBdUM7QUFDckNNLGdCQUFVLENBQUNmLEVBQUQsQ0FEMkI7QUFFckNnQix1QkFBaUIsQ0FBQ2hCLEVBQUQsQ0FGb0I7QUFHckNpQixtQkFBYSxPQUh3QjtBQUlyQ0MsZ0JBQVVsQjtBQUoyQixLQUF2QztBQU1ELEdBM0JEO0FBNEJEIiwiZmlsZSI6ImhhbW1lci1vdmVycmlkZXMuanMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIFRoaXMgZmlsZSBjb250YWlucyBvdmVycmlkZXMgdGhlIGRlZmF1bHRcbiAqIGhhbW1lci5qcyBmdW5jdGlvbnMgdG8gYWRkIG91ciBvd24gdXRpbGl0eVxuICovXG5cbi8qIEhhbW1lci5qcyBjb25zdGFudHMgKi9cbmNvbnN0IElOUFVUX1NUQVJUID0gMTtcbmNvbnN0IElOUFVUX01PVkUgPSAyO1xuY29uc3QgSU5QVVRfRU5EID0gNDtcbmNvbnN0IE1PVVNFX0lOUFVUX01BUCA9IHtcbiAgbW91c2Vkb3duOiBJTlBVVF9TVEFSVCxcbiAgbW91c2Vtb3ZlOiBJTlBVVF9NT1ZFLFxuICBtb3VzZXVwOiBJTlBVVF9FTkRcbn07XG5cbi8qKlxuICogSGVscGVyIGZ1bmN0aW9uIHRoYXQgcmV0dXJucyB0cnVlIGlmIGFueSBlbGVtZW50IGluIGFuIGFycmF5IG1lZXRzIGdpdmVuIGNyaXRlcmlhLlxuICogQmVjYXVzZSBvbGRlciBicm93c2VycyBkbyBub3Qgc3VwcG9ydCBgQXJyYXkucHJvdG90eXBlLnNvbWVgXG4gKiBAcGFyYW1zIGFycmF5IHtBcnJheX1cbiAqIEBwYXJhbXMgcHJlZGljdCB7RnVuY3Rpb259XG4gKi9cbmZ1bmN0aW9uIHNvbWUoYXJyYXksIHByZWRpY3QpIHtcbiAgZm9yIChsZXQgaSA9IDA7IGkgPCBhcnJheS5sZW5ndGg7IGkrKykge1xuICAgIGlmIChwcmVkaWN0KGFycmF5W2ldKSkge1xuICAgICAgcmV0dXJuIHRydWU7XG4gICAgfVxuICB9XG4gIHJldHVybiBmYWxzZTtcbn1cblxuLyogZXNsaW50LWRpc2FibGUgbm8taW52YWxpZC10aGlzICovXG5leHBvcnQgZnVuY3Rpb24gZW5oYW5jZVBvaW50ZXJFdmVudElucHV0KFBvaW50ZXJFdmVudElucHV0KSB7XG4gIGNvbnN0IG9sZEhhbmRsZXIgPSBQb2ludGVyRXZlbnRJbnB1dC5wcm90b3R5cGUuaGFuZGxlcjtcblxuICAvLyBvdmVycmlkZXMgUG9pbnRlckV2ZW50SW5wdXQuaGFuZGxlciB0byBhY2NlcHQgcmlnaHQgbW91c2UgYnV0dG9uXG4gIFBvaW50ZXJFdmVudElucHV0LnByb3RvdHlwZS5oYW5kbGVyID0gZnVuY3Rpb24gaGFuZGxlcihldikge1xuICAgIGNvbnN0IHN0b3JlID0gdGhpcy5zdG9yZTtcblxuICAgIC8vIEFsbG93IG5vbi1sZWZ0IG1vdXNlIGJ1dHRvbnMgdGhyb3VnaFxuICAgIGlmIChldi5idXR0b24gPiAwKSB7XG4gICAgICBpZiAoIXNvbWUoc3RvcmUsIGUgPT4gZS5wb2ludGVySWQgPT09IGV2LnBvaW50ZXJJZCkpIHtcbiAgICAgICAgc3RvcmUucHVzaChldik7XG4gICAgICB9XG4gICAgfVxuXG4gICAgb2xkSGFuZGxlci5jYWxsKHRoaXMsIGV2KTtcbiAgfTtcbn1cblxuLy8gb3ZlcnJpZGVzIE1vdXNlSW5wdXQuaGFuZGxlciB0byBhY2NlcHQgcmlnaHQgbW91c2UgYnV0dG9uXG5leHBvcnQgZnVuY3Rpb24gZW5oYW5jZU1vdXNlSW5wdXQoTW91c2VJbnB1dCkge1xuICBNb3VzZUlucHV0LnByb3RvdHlwZS5oYW5kbGVyID0gZnVuY3Rpb24gaGFuZGxlcihldikge1xuICAgIGxldCBldmVudFR5cGUgPSBNT1VTRV9JTlBVVF9NQVBbZXYudHlwZV07XG5cbiAgICAvLyBvbiBzdGFydCB3ZSB3YW50IHRvIGhhdmUgdGhlIG1vdXNlIGJ1dHRvbiBkb3duXG4gICAgaWYgKGV2ZW50VHlwZSAmIElOUFVUX1NUQVJUICYmIGV2LmJ1dHRvbiA+PSAwKSB7XG4gICAgICB0aGlzLnByZXNzZWQgPSB0cnVlO1xuICAgIH1cblxuICAgIGlmIChldmVudFR5cGUgJiBJTlBVVF9NT1ZFICYmIGV2LndoaWNoID09PSAwKSB7XG4gICAgICBldmVudFR5cGUgPSBJTlBVVF9FTkQ7XG4gICAgfVxuXG4gICAgLy8gbW91c2UgbXVzdCBiZSBkb3duXG4gICAgaWYgKCF0aGlzLnByZXNzZWQpIHtcbiAgICAgIHJldHVybjtcbiAgICB9XG5cbiAgICBpZiAoZXZlbnRUeXBlICYgSU5QVVRfRU5EKSB7XG4gICAgICB0aGlzLnByZXNzZWQgPSBmYWxzZTtcbiAgICB9XG5cbiAgICB0aGlzLmNhbGxiYWNrKHRoaXMubWFuYWdlciwgZXZlbnRUeXBlLCB7XG4gICAgICBwb2ludGVyczogW2V2XSxcbiAgICAgIGNoYW5nZWRQb2ludGVyczogW2V2XSxcbiAgICAgIHBvaW50ZXJUeXBlOiAnbW91c2UnLFxuICAgICAgc3JjRXZlbnQ6IGV2XG4gICAgfSk7XG4gIH07XG59XG4iXX0=
 
/***/ }),
/* 678 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
/**
 * Copyright (c) 2013-present, Facebook, Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */
 
 
 
var emptyFunction = __webpack_require__(74);
var invariant = __webpack_require__(101);
var ReactPropTypesSecret = __webpack_require__(172);
 
module.exports = function() {
  function shim(props, propName, componentName, location, propFullName, secret) {
    if (secret === ReactPropTypesSecret) {
      // It is still safe when called from React.
      return;
    }
    invariant(
      false,
      'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
      'Use PropTypes.checkPropTypes() to call them. ' +
      'Read more at http://fb.me/use-check-prop-types'
    );
  };
  shim.isRequired = shim;
  function getShim() {
    return shim;
  };
  // Important!
  // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
  var ReactPropTypes = {
    array: shim,
    bool: shim,
    func: shim,
    number: shim,
    object: shim,
    string: shim,
    symbol: shim,
 
    any: shim,
    arrayOf: getShim,
    element: shim,
    instanceOf: getShim,
    node: shim,
    objectOf: getShim,
    oneOf: getShim,
    oneOfType: getShim,
    shape: getShim,
    exact: getShim
  };
 
  ReactPropTypes.checkPropTypes = emptyFunction;
  ReactPropTypes.PropTypes = ReactPropTypes;
 
  return ReactPropTypes;
};
 
 
/***/ }),
/* 679 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
/* WEBPACK VAR INJECTION */(function(process) {/**
 * Copyright (c) 2013-present, Facebook, Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */
 
 
 
var emptyFunction = __webpack_require__(74);
var invariant = __webpack_require__(101);
var warning = __webpack_require__(155);
var assign = __webpack_require__(171);
 
var ReactPropTypesSecret = __webpack_require__(172);
var checkPropTypes = __webpack_require__(284);
 
module.exports = function(isValidElement, throwOnDirectAccess) {
  /* global Symbol */
  var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
  var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
 
  /**
   * Returns the iterator method function contained on the iterable object.
   *
   * Be sure to invoke the function with the iterable as context:
   *
   *     var iteratorFn = getIteratorFn(myIterable);
   *     if (iteratorFn) {
   *       var iterator = iteratorFn.call(myIterable);
   *       ...
   *     }
   *
   * @param {?object} maybeIterable
   * @return {?function}
   */
  function getIteratorFn(maybeIterable) {
    var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
    if (typeof iteratorFn === 'function') {
      return iteratorFn;
    }
  }
 
  /**
   * Collection of methods that allow declaration and validation of props that are
   * supplied to React components. Example usage:
   *
   *   var Props = require('ReactPropTypes');
   *   var MyArticle = React.createClass({
   *     propTypes: {
   *       // An optional string prop named "description".
   *       description: Props.string,
   *
   *       // A required enum prop named "category".
   *       category: Props.oneOf(['News','Photos']).isRequired,
   *
   *       // A prop named "dialog" that requires an instance of Dialog.
   *       dialog: Props.instanceOf(Dialog).isRequired
   *     },
   *     render: function() { ... }
   *   });
   *
   * A more formal specification of how these methods are used:
   *
   *   type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
   *   decl := ReactPropTypes.{type}(.isRequired)?
   *
   * Each and every declaration produces a function with the same signature. This
   * allows the creation of custom validation functions. For example:
   *
   *  var MyLink = React.createClass({
   *    propTypes: {
   *      // An optional string or URI prop named "href".
   *      href: function(props, propName, componentName) {
   *        var propValue = props[propName];
   *        if (propValue != null && typeof propValue !== 'string' &&
   *            !(propValue instanceof URI)) {
   *          return new Error(
   *            'Expected a string or an URI for ' + propName + ' in ' +
   *            componentName
   *          );
   *        }
   *      }
   *    },
   *    render: function() {...}
   *  });
   *
   * @internal
   */
 
  var ANONYMOUS = '<<anonymous>>';
 
  // Important!
  // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
  var ReactPropTypes = {
    array: createPrimitiveTypeChecker('array'),
    bool: createPrimitiveTypeChecker('boolean'),
    func: createPrimitiveTypeChecker('function'),
    number: createPrimitiveTypeChecker('number'),
    object: createPrimitiveTypeChecker('object'),
    string: createPrimitiveTypeChecker('string'),
    symbol: createPrimitiveTypeChecker('symbol'),
 
    any: createAnyTypeChecker(),
    arrayOf: createArrayOfTypeChecker,
    element: createElementTypeChecker(),
    instanceOf: createInstanceTypeChecker,
    node: createNodeChecker(),
    objectOf: createObjectOfTypeChecker,
    oneOf: createEnumTypeChecker,
    oneOfType: createUnionTypeChecker,
    shape: createShapeTypeChecker,
    exact: createStrictShapeTypeChecker,
  };
 
  /**
   * inlined Object.is polyfill to avoid requiring consumers ship their own
   * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
   */
  /*eslint-disable no-self-compare*/
  function is(x, y) {
    // SameValue algorithm
    if (x === y) {
      // Steps 1-5, 7-10
      // Steps 6.b-6.e: +0 != -0
      return x !== 0 || 1 / x === 1 / y;
    } else {
      // Step 6.a: NaN == NaN
      return x !== x && y !== y;
    }
  }
  /*eslint-enable no-self-compare*/
 
  /**
   * We use an Error-like object for backward compatibility as people may call
   * PropTypes directly and inspect their output. However, we don't use real
   * Errors anymore. We don't inspect their stack anyway, and creating them
   * is prohibitively expensive if they are created too often, such as what
   * happens in oneOfType() for any type before the one that matched.
   */
  function PropTypeError(message) {
    this.message = message;
    this.stack = '';
  }
  // Make `instanceof Error` still work for returned errors.
  PropTypeError.prototype = Error.prototype;
 
  function createChainableTypeChecker(validate) {
    if (process.env.NODE_ENV !== 'production') {
      var manualPropTypeCallCache = {};
      var manualPropTypeWarningCount = 0;
    }
    function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
      componentName = componentName || ANONYMOUS;
      propFullName = propFullName || propName;
 
      if (secret !== ReactPropTypesSecret) {
        if (throwOnDirectAccess) {
          // New behavior only for users of `prop-types` package
          invariant(
            false,
            'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
            'Use `PropTypes.checkPropTypes()` to call them. ' +
            'Read more at http://fb.me/use-check-prop-types'
          );
        } else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {
          // Old behavior for people using React.PropTypes
          var cacheKey = componentName + ':' + propName;
          if (
            !manualPropTypeCallCache[cacheKey] &&
            // Avoid spamming the console because they are often not actionable except for lib authors
            manualPropTypeWarningCount < 3
          ) {
            warning(
              false,
              'You are manually calling a React.PropTypes validation ' +
              'function for the `%s` prop on `%s`. This is deprecated ' +
              'and will throw in the standalone `prop-types` package. ' +
              'You may be seeing this warning due to a third-party PropTypes ' +
              'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.',
              propFullName,
              componentName
            );
            manualPropTypeCallCache[cacheKey] = true;
            manualPropTypeWarningCount++;
          }
        }
      }
      if (props[propName] == null) {
        if (isRequired) {
          if (props[propName] === null) {
            return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
          }
          return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
        }
        return null;
      } else {
        return validate(props, propName, componentName, location, propFullName);
      }
    }
 
    var chainedCheckType = checkType.bind(null, false);
    chainedCheckType.isRequired = checkType.bind(null, true);
 
    return chainedCheckType;
  }
 
  function createPrimitiveTypeChecker(expectedType) {
    function validate(props, propName, componentName, location, propFullName, secret) {
      var propValue = props[propName];
      var propType = getPropType(propValue);
      if (propType !== expectedType) {
        // `propValue` being instance of, say, date/regexp, pass the 'object'
        // check, but we can offer a more precise error message here rather than
        // 'of type `object`'.
        var preciseType = getPreciseType(propValue);
 
        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));
      }
      return null;
    }
    return createChainableTypeChecker(validate);
  }
 
  function createAnyTypeChecker() {
    return createChainableTypeChecker(emptyFunction.thatReturnsNull);
  }
 
  function createArrayOfTypeChecker(typeChecker) {
    function validate(props, propName, componentName, location, propFullName) {
      if (typeof typeChecker !== 'function') {
        return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
      }
      var propValue = props[propName];
      if (!Array.isArray(propValue)) {
        var propType = getPropType(propValue);
        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
      }
      for (var i = 0; i < propValue.length; i++) {
        var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);
        if (error instanceof Error) {
          return error;
        }
      }
      return null;
    }
    return createChainableTypeChecker(validate);
  }
 
  function createElementTypeChecker() {
    function validate(props, propName, componentName, location, propFullName) {
      var propValue = props[propName];
      if (!isValidElement(propValue)) {
        var propType = getPropType(propValue);
        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
      }
      return null;
    }
    return createChainableTypeChecker(validate);
  }
 
  function createInstanceTypeChecker(expectedClass) {
    function validate(props, propName, componentName, location, propFullName) {
      if (!(props[propName] instanceof expectedClass)) {
        var expectedClassName = expectedClass.name || ANONYMOUS;
        var actualClassName = getClassName(props[propName]);
        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
      }
      return null;
    }
    return createChainableTypeChecker(validate);
  }
 
  function createEnumTypeChecker(expectedValues) {
    if (!Array.isArray(expectedValues)) {
      process.env.NODE_ENV !== 'production' ? warning(false, 'Invalid argument supplied to oneOf, expected an instance of array.') : void 0;
      return emptyFunction.thatReturnsNull;
    }
 
    function validate(props, propName, componentName, location, propFullName) {
      var propValue = props[propName];
      for (var i = 0; i < expectedValues.length; i++) {
        if (is(propValue, expectedValues[i])) {
          return null;
        }
      }
 
      var valuesString = JSON.stringify(expectedValues);
      return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
    }
    return createChainableTypeChecker(validate);
  }
 
  function createObjectOfTypeChecker(typeChecker) {
    function validate(props, propName, componentName, location, propFullName) {
      if (typeof typeChecker !== 'function') {
        return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
      }
      var propValue = props[propName];
      var propType = getPropType(propValue);
      if (propType !== 'object') {
        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
      }
      for (var key in propValue) {
        if (propValue.hasOwnProperty(key)) {
          var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
          if (error instanceof Error) {
            return error;
          }
        }
      }
      return null;
    }
    return createChainableTypeChecker(validate);
  }
 
  function createUnionTypeChecker(arrayOfTypeCheckers) {
    if (!Array.isArray(arrayOfTypeCheckers)) {
      process.env.NODE_ENV !== 'production' ? warning(false, 'Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;
      return emptyFunction.thatReturnsNull;
    }
 
    for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
      var checker = arrayOfTypeCheckers[i];
      if (typeof checker !== 'function') {
        warning(
          false,
          'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +
          'received %s at index %s.',
          getPostfixForTypeWarning(checker),
          i
        );
        return emptyFunction.thatReturnsNull;
      }
    }
 
    function validate(props, propName, componentName, location, propFullName) {
      for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
        var checker = arrayOfTypeCheckers[i];
        if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) {
          return null;
        }
      }
 
      return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));
    }
    return createChainableTypeChecker(validate);
  }
 
  function createNodeChecker() {
    function validate(props, propName, componentName, location, propFullName) {
      if (!isNode(props[propName])) {
        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
      }
      return null;
    }
    return createChainableTypeChecker(validate);
  }
 
  function createShapeTypeChecker(shapeTypes) {
    function validate(props, propName, componentName, location, propFullName) {
      var propValue = props[propName];
      var propType = getPropType(propValue);
      if (propType !== 'object') {
        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
      }
      for (var key in shapeTypes) {
        var checker = shapeTypes[key];
        if (!checker) {
          continue;
        }
        var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
        if (error) {
          return error;
        }
      }
      return null;
    }
    return createChainableTypeChecker(validate);
  }
 
  function createStrictShapeTypeChecker(shapeTypes) {
    function validate(props, propName, componentName, location, propFullName) {
      var propValue = props[propName];
      var propType = getPropType(propValue);
      if (propType !== 'object') {
        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
      }
      // We need to check all keys in case some are required but missing from
      // props.
      var allKeys = assign({}, props[propName], shapeTypes);
      for (var key in allKeys) {
        var checker = shapeTypes[key];
        if (!checker) {
          return new PropTypeError(
            'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +
            '\nBad object: ' + JSON.stringify(props[propName], null, '  ') +
            '\nValid keys: ' +  JSON.stringify(Object.keys(shapeTypes), null, '  ')
          );
        }
        var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
        if (error) {
          return error;
        }
      }
      return null;
    }
 
    return createChainableTypeChecker(validate);
  }
 
  function isNode(propValue) {
    switch (typeof propValue) {
      case 'number':
      case 'string':
      case 'undefined':
        return true;
      case 'boolean':
        return !propValue;
      case 'object':
        if (Array.isArray(propValue)) {
          return propValue.every(isNode);
        }
        if (propValue === null || isValidElement(propValue)) {
          return true;
        }
 
        var iteratorFn = getIteratorFn(propValue);
        if (iteratorFn) {
          var iterator = iteratorFn.call(propValue);
          var step;
          if (iteratorFn !== propValue.entries) {
            while (!(step = iterator.next()).done) {
              if (!isNode(step.value)) {
                return false;
              }
            }
          } else {
            // Iterator will provide entry [k,v] tuples rather than values.
            while (!(step = iterator.next()).done) {
              var entry = step.value;
              if (entry) {
                if (!isNode(entry[1])) {
                  return false;
                }
              }
            }
          }
        } else {
          return false;
        }
 
        return true;
      default:
        return false;
    }
  }
 
  function isSymbol(propType, propValue) {
    // Native Symbol.
    if (propType === 'symbol') {
      return true;
    }
 
    // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
    if (propValue['@@toStringTag'] === 'Symbol') {
      return true;
    }
 
    // Fallback for non-spec compliant Symbols which are polyfilled.
    if (typeof Symbol === 'function' && propValue instanceof Symbol) {
      return true;
    }
 
    return false;
  }
 
  // Equivalent of `typeof` but with special handling for array and regexp.
  function getPropType(propValue) {
    var propType = typeof propValue;
    if (Array.isArray(propValue)) {
      return 'array';
    }
    if (propValue instanceof RegExp) {
      // Old webkits (at least until Android 4.0) return 'function' rather than
      // 'object' for typeof a RegExp. We'll normalize this here so that /bla/
      // passes PropTypes.object.
      return 'object';
    }
    if (isSymbol(propType, propValue)) {
      return 'symbol';
    }
    return propType;
  }
 
  // This handles more types than `getPropType`. Only used for error messages.
  // See `createPrimitiveTypeChecker`.
  function getPreciseType(propValue) {
    if (typeof propValue === 'undefined' || propValue === null) {
      return '' + propValue;
    }
    var propType = getPropType(propValue);
    if (propType === 'object') {
      if (propValue instanceof Date) {
        return 'date';
      } else if (propValue instanceof RegExp) {
        return 'regexp';
      }
    }
    return propType;
  }
 
  // Returns a string that is postfixed to a warning about an invalid type.
  // For example, "undefined" or "of type array"
  function getPostfixForTypeWarning(value) {
    var type = getPreciseType(value);
    switch (type) {
      case 'array':
      case 'object':
        return 'an ' + type;
      case 'boolean':
      case 'date':
      case 'regexp':
        return 'a ' + type;
      default:
        return type;
    }
  }
 
  // Returns class name of the object, if any.
  function getClassName(propValue) {
    if (!propValue.constructor || !propValue.constructor.name) {
      return ANONYMOUS;
    }
    return propValue.constructor.name;
  }
 
  ReactPropTypes.checkPropTypes = checkPropTypes;
  ReactPropTypes.PropTypes = ReactPropTypes;
 
  return ReactPropTypes;
};
 
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(26)))
 
/***/ }),
/* 680 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
/* WEBPACK VAR INJECTION */(function(process) {/** @license React v16.2.0
 * react.development.js
 *
 * Copyright (c) 2013-present, Facebook, Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */
 
 
 
 
 
if (process.env.NODE_ENV !== "production") {
  (function() {
'use strict';
 
var _assign = __webpack_require__(171);
var emptyObject = __webpack_require__(233);
var invariant = __webpack_require__(101);
var warning = __webpack_require__(155);
var emptyFunction = __webpack_require__(74);
var checkPropTypes = __webpack_require__(284);
 
// TODO: this is special because it gets imported during build.
 
var ReactVersion = '16.2.0';
 
// The Symbol used to tag the ReactElement-like types. If there is no native Symbol
// nor polyfill, then a plain number is used for performance.
var hasSymbol = typeof Symbol === 'function' && Symbol['for'];
 
var REACT_ELEMENT_TYPE = hasSymbol ? Symbol['for']('react.element') : 0xeac7;
var REACT_CALL_TYPE = hasSymbol ? Symbol['for']('react.call') : 0xeac8;
var REACT_RETURN_TYPE = hasSymbol ? Symbol['for']('react.return') : 0xeac9;
var REACT_PORTAL_TYPE = hasSymbol ? Symbol['for']('react.portal') : 0xeaca;
var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol['for']('react.fragment') : 0xeacb;
 
var MAYBE_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
var FAUX_ITERATOR_SYMBOL = '@@iterator';
 
function getIteratorFn(maybeIterable) {
  if (maybeIterable === null || typeof maybeIterable === 'undefined') {
    return null;
  }
  var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
  if (typeof maybeIterator === 'function') {
    return maybeIterator;
  }
  return null;
}
 
/**
 * WARNING: DO NOT manually require this module.
 * This is a replacement for `invariant(...)` used by the error code system
 * and will _only_ be required by the corresponding babel pass.
 * It always throws.
 */
 
/**
 * Forked from fbjs/warning:
 * https://github.com/facebook/fbjs/blob/e66ba20ad5be433eb54423f2b097d829324d9de6/packages/fbjs/src/__forks__/warning.js
 *
 * Only change is we use console.warn instead of console.error,
 * and do nothing when 'console' is not supported.
 * This really simplifies the code.
 * ---
 * Similar to invariant but only logs a warning if the condition is not met.
 * This can be used to log issues in development environments in critical
 * paths. Removing the logging code for production environments will keep the
 * same logic and follow the same code paths.
 */
 
var lowPriorityWarning = function () {};
 
{
  var printWarning = function (format) {
    for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
      args[_key - 1] = arguments[_key];
    }
 
    var argIndex = 0;
    var message = 'Warning: ' + format.replace(/%s/g, function () {
      return args[argIndex++];
    });
    if (typeof console !== 'undefined') {
      console.warn(message);
    }
    try {
      // --- Welcome to debugging React ---
      // This error was thrown as a convenience so that you can use this stack
      // to find the callsite that caused this warning to fire.
      throw new Error(message);
    } catch (x) {}
  };
 
  lowPriorityWarning = function (condition, format) {
    if (format === undefined) {
      throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');
    }
    if (!condition) {
      for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
        args[_key2 - 2] = arguments[_key2];
      }
 
      printWarning.apply(undefined, [format].concat(args));
    }
  };
}
 
var lowPriorityWarning$1 = lowPriorityWarning;
 
var didWarnStateUpdateForUnmountedComponent = {};
 
function warnNoop(publicInstance, callerName) {
  {
    var constructor = publicInstance.constructor;
    var componentName = constructor && (constructor.displayName || constructor.name) || 'ReactClass';
    var warningKey = componentName + '.' + callerName;
    if (didWarnStateUpdateForUnmountedComponent[warningKey]) {
      return;
    }
    warning(false, '%s(...): Can only update a mounted or mounting component. ' + 'This usually means you called %s() on an unmounted component. ' + 'This is a no-op.\n\nPlease check the code for the %s component.', callerName, callerName, componentName);
    didWarnStateUpdateForUnmountedComponent[warningKey] = true;
  }
}
 
/**
 * This is the abstract API for an update queue.
 */
var ReactNoopUpdateQueue = {
  /**
   * Checks whether or not this composite component is mounted.
   * @param {ReactClass} publicInstance The instance we want to test.
   * @return {boolean} True if mounted, false otherwise.
   * @protected
   * @final
   */
  isMounted: function (publicInstance) {
    return false;
  },
 
  /**
   * Forces an update. This should only be invoked when it is known with
   * certainty that we are **not** in a DOM transaction.
   *
   * You may want to call this when you know that some deeper aspect of the
   * component's state has changed but `setState` was not called.
   *
   * This will not invoke `shouldComponentUpdate`, but it will invoke
   * `componentWillUpdate` and `componentDidUpdate`.
   *
   * @param {ReactClass} publicInstance The instance that should rerender.
   * @param {?function} callback Called after component is updated.
   * @param {?string} callerName name of the calling function in the public API.
   * @internal
   */
  enqueueForceUpdate: function (publicInstance, callback, callerName) {
    warnNoop(publicInstance, 'forceUpdate');
  },
 
  /**
   * Replaces all of the state. Always use this or `setState` to mutate state.
   * You should treat `this.state` as immutable.
   *
   * There is no guarantee that `this.state` will be immediately updated, so
   * accessing `this.state` after calling this method may return the old value.
   *
   * @param {ReactClass} publicInstance The instance that should rerender.
   * @param {object} completeState Next state.
   * @param {?function} callback Called after component is updated.
   * @param {?string} callerName name of the calling function in the public API.
   * @internal
   */
  enqueueReplaceState: function (publicInstance, completeState, callback, callerName) {
    warnNoop(publicInstance, 'replaceState');
  },
 
  /**
   * Sets a subset of the state. This only exists because _pendingState is
   * internal. This provides a merging strategy that is not available to deep
   * properties which is confusing. TODO: Expose pendingState or don't use it
   * during the merge.
   *
   * @param {ReactClass} publicInstance The instance that should rerender.
   * @param {object} partialState Next partial state to be merged with state.
   * @param {?function} callback Called after component is updated.
   * @param {?string} Name of the calling function in the public API.
   * @internal
   */
  enqueueSetState: function (publicInstance, partialState, callback, callerName) {
    warnNoop(publicInstance, 'setState');
  }
};
 
/**
 * Base class helpers for the updating state of a component.
 */
function Component(props, context, updater) {
  this.props = props;
  this.context = context;
  this.refs = emptyObject;
  // We initialize the default updater but the real one gets injected by the
  // renderer.
  this.updater = updater || ReactNoopUpdateQueue;
}
 
Component.prototype.isReactComponent = {};
 
/**
 * Sets a subset of the state. Always use this to mutate
 * state. You should treat `this.state` as immutable.
 *
 * There is no guarantee that `this.state` will be immediately updated, so
 * accessing `this.state` after calling this method may return the old value.
 *
 * There is no guarantee that calls to `setState` will run synchronously,
 * as they may eventually be batched together.  You can provide an optional
 * callback that will be executed when the call to setState is actually
 * completed.
 *
 * When a function is provided to setState, it will be called at some point in
 * the future (not synchronously). It will be called with the up to date
 * component arguments (state, props, context). These values can be different
 * from this.* because your function may be called after receiveProps but before
 * shouldComponentUpdate, and this new state, props, and context will not yet be
 * assigned to this.
 *
 * @param {object|function} partialState Next partial state or function to
 *        produce next partial state to be merged with current state.
 * @param {?function} callback Called after state is updated.
 * @final
 * @protected
 */
Component.prototype.setState = function (partialState, callback) {
  !(typeof partialState === 'object' || typeof partialState === 'function' || partialState == null) ? invariant(false, 'setState(...): takes an object of state variables to update or a function which returns an object of state variables.') : void 0;
  this.updater.enqueueSetState(this, partialState, callback, 'setState');
};
 
/**
 * Forces an update. This should only be invoked when it is known with
 * certainty that we are **not** in a DOM transaction.
 *
 * You may want to call this when you know that some deeper aspect of the
 * component's state has changed but `setState` was not called.
 *
 * This will not invoke `shouldComponentUpdate`, but it will invoke
 * `componentWillUpdate` and `componentDidUpdate`.
 *
 * @param {?function} callback Called after update is complete.
 * @final
 * @protected
 */
Component.prototype.forceUpdate = function (callback) {
  this.updater.enqueueForceUpdate(this, callback, 'forceUpdate');
};
 
/**
 * Deprecated APIs. These APIs used to exist on classic React classes but since
 * we would like to deprecate them, we're not going to move them over to this
 * modern base class. Instead, we define a getter that warns if it's accessed.
 */
{
  var deprecatedAPIs = {
    isMounted: ['isMounted', 'Instead, make sure to clean up subscriptions and pending requests in ' + 'componentWillUnmount to prevent memory leaks.'],
    replaceState: ['replaceState', 'Refactor your code to use setState instead (see ' + 'https://github.com/facebook/react/issues/3236).']
  };
  var defineDeprecationWarning = function (methodName, info) {
    Object.defineProperty(Component.prototype, methodName, {
      get: function () {
        lowPriorityWarning$1(false, '%s(...) is deprecated in plain JavaScript React classes. %s', info[0], info[1]);
        return undefined;
      }
    });
  };
  for (var fnName in deprecatedAPIs) {
    if (deprecatedAPIs.hasOwnProperty(fnName)) {
      defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);
    }
  }
}
 
/**
 * Base class helpers for the updating state of a component.
 */
function PureComponent(props, context, updater) {
  // Duplicated from Component.
  this.props = props;
  this.context = context;
  this.refs = emptyObject;
  // We initialize the default updater but the real one gets injected by the
  // renderer.
  this.updater = updater || ReactNoopUpdateQueue;
}
 
function ComponentDummy() {}
ComponentDummy.prototype = Component.prototype;
var pureComponentPrototype = PureComponent.prototype = new ComponentDummy();
pureComponentPrototype.constructor = PureComponent;
// Avoid an extra prototype jump for these methods.
_assign(pureComponentPrototype, Component.prototype);
pureComponentPrototype.isPureReactComponent = true;
 
function AsyncComponent(props, context, updater) {
  // Duplicated from Component.
  this.props = props;
  this.context = context;
  this.refs = emptyObject;
  // We initialize the default updater but the real one gets injected by the
  // renderer.
  this.updater = updater || ReactNoopUpdateQueue;
}
 
var asyncComponentPrototype = AsyncComponent.prototype = new ComponentDummy();
asyncComponentPrototype.constructor = AsyncComponent;
// Avoid an extra prototype jump for these methods.
_assign(asyncComponentPrototype, Component.prototype);
asyncComponentPrototype.unstable_isAsyncReactComponent = true;
asyncComponentPrototype.render = function () {
  return this.props.children;
};
 
/**
 * Keeps track of the current owner.
 *
 * The current owner is the component who should own any components that are
 * currently being constructed.
 */
var ReactCurrentOwner = {
  /**
   * @internal
   * @type {ReactComponent}
   */
  current: null
};
 
var hasOwnProperty = Object.prototype.hasOwnProperty;
 
var RESERVED_PROPS = {
  key: true,
  ref: true,
  __self: true,
  __source: true
};
 
var specialPropKeyWarningShown;
var specialPropRefWarningShown;
 
function hasValidRef(config) {
  {
    if (hasOwnProperty.call(config, 'ref')) {
      var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;
      if (getter && getter.isReactWarning) {
        return false;
      }
    }
  }
  return config.ref !== undefined;
}
 
function hasValidKey(config) {
  {
    if (hasOwnProperty.call(config, 'key')) {
      var getter = Object.getOwnPropertyDescriptor(config, 'key').get;
      if (getter && getter.isReactWarning) {
        return false;
      }
    }
  }
  return config.key !== undefined;
}
 
function defineKeyPropWarningGetter(props, displayName) {
  var warnAboutAccessingKey = function () {
    if (!specialPropKeyWarningShown) {
      specialPropKeyWarningShown = true;
      warning(false, '%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://fb.me/react-special-props)', displayName);
    }
  };
  warnAboutAccessingKey.isReactWarning = true;
  Object.defineProperty(props, 'key', {
    get: warnAboutAccessingKey,
    configurable: true
  });
}
 
function defineRefPropWarningGetter(props, displayName) {
  var warnAboutAccessingRef = function () {
    if (!specialPropRefWarningShown) {
      specialPropRefWarningShown = true;
      warning(false, '%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://fb.me/react-special-props)', displayName);
    }
  };
  warnAboutAccessingRef.isReactWarning = true;
  Object.defineProperty(props, 'ref', {
    get: warnAboutAccessingRef,
    configurable: true
  });
}
 
/**
 * Factory method to create a new React element. This no longer adheres to
 * the class pattern, so do not use new to call it. Also, no instanceof check
 * will work. Instead test $$typeof field against Symbol.for('react.element') to check
 * if something is a React Element.
 *
 * @param {*} type
 * @param {*} key
 * @param {string|object} ref
 * @param {*} self A *temporary* helper to detect places where `this` is
 * different from the `owner` when React.createElement is called, so that we
 * can warn. We want to get rid of owner and replace string `ref`s with arrow
 * functions, and as long as `this` and owner are the same, there will be no
 * change in behavior.
 * @param {*} source An annotation object (added by a transpiler or otherwise)
 * indicating filename, line number, and/or other information.
 * @param {*} owner
 * @param {*} props
 * @internal
 */
var ReactElement = function (type, key, ref, self, source, owner, props) {
  var element = {
    // This tag allow us to uniquely identify this as a React Element
    $$typeof: REACT_ELEMENT_TYPE,
 
    // Built-in properties that belong on the element
    type: type,
    key: key,
    ref: ref,
    props: props,
 
    // Record the component responsible for creating this element.
    _owner: owner
  };
 
  {
    // The validation flag is currently mutative. We put it on
    // an external backing store so that we can freeze the whole object.
    // This can be replaced with a WeakMap once they are implemented in
    // commonly used development environments.
    element._store = {};
 
    // To make comparing ReactElements easier for testing purposes, we make
    // the validation flag non-enumerable (where possible, which should
    // include every environment we run tests in), so the test framework
    // ignores it.
    Object.defineProperty(element._store, 'validated', {
      configurable: false,
      enumerable: false,
      writable: true,
      value: false
    });
    // self and source are DEV only properties.
    Object.defineProperty(element, '_self', {
      configurable: false,
      enumerable: false,
      writable: false,
      value: self
    });
    // Two elements created in two different places should be considered
    // equal for testing purposes and therefore we hide it from enumeration.
    Object.defineProperty(element, '_source', {
      configurable: false,
      enumerable: false,
      writable: false,
      value: source
    });
    if (Object.freeze) {
      Object.freeze(element.props);
      Object.freeze(element);
    }
  }
 
  return element;
};
 
/**
 * Create and return a new ReactElement of the given type.
 * See https://reactjs.org/docs/react-api.html#createelement
 */
function createElement(type, config, children) {
  var propName;
 
  // Reserved names are extracted
  var props = {};
 
  var key = null;
  var ref = null;
  var self = null;
  var source = null;
 
  if (config != null) {
    if (hasValidRef(config)) {
      ref = config.ref;
    }
    if (hasValidKey(config)) {
      key = '' + config.key;
    }
 
    self = config.__self === undefined ? null : config.__self;
    source = config.__source === undefined ? null : config.__source;
    // Remaining properties are added to a new props object
    for (propName in config) {
      if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
        props[propName] = config[propName];
      }
    }
  }
 
  // Children can be more than one argument, and those are transferred onto
  // the newly allocated props object.
  var childrenLength = arguments.length - 2;
  if (childrenLength === 1) {
    props.children = children;
  } else if (childrenLength > 1) {
    var childArray = Array(childrenLength);
    for (var i = 0; i < childrenLength; i++) {
      childArray[i] = arguments[i + 2];
    }
    {
      if (Object.freeze) {
        Object.freeze(childArray);
      }
    }
    props.children = childArray;
  }
 
  // Resolve default props
  if (type && type.defaultProps) {
    var defaultProps = type.defaultProps;
    for (propName in defaultProps) {
      if (props[propName] === undefined) {
        props[propName] = defaultProps[propName];
      }
    }
  }
  {
    if (key || ref) {
      if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {
        var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;
        if (key) {
          defineKeyPropWarningGetter(props, displayName);
        }
        if (ref) {
          defineRefPropWarningGetter(props, displayName);
        }
      }
    }
  }
  return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
}
 
/**
 * Return a function that produces ReactElements of a given type.
 * See https://reactjs.org/docs/react-api.html#createfactory
 */
 
 
function cloneAndReplaceKey(oldElement, newKey) {
  var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props);
 
  return newElement;
}
 
/**
 * Clone and return a new ReactElement using element as the starting point.
 * See https://reactjs.org/docs/react-api.html#cloneelement
 */
function cloneElement(element, config, children) {
  var propName;
 
  // Original props are copied
  var props = _assign({}, element.props);
 
  // Reserved names are extracted
  var key = element.key;
  var ref = element.ref;
  // Self is preserved since the owner is preserved.
  var self = element._self;
  // Source is preserved since cloneElement is unlikely to be targeted by a
  // transpiler, and the original source is probably a better indicator of the
  // true owner.
  var source = element._source;
 
  // Owner will be preserved, unless ref is overridden
  var owner = element._owner;
 
  if (config != null) {
    if (hasValidRef(config)) {
      // Silently steal the ref from the parent.
      ref = config.ref;
      owner = ReactCurrentOwner.current;
    }
    if (hasValidKey(config)) {
      key = '' + config.key;
    }
 
    // Remaining properties override existing props
    var defaultProps;
    if (element.type && element.type.defaultProps) {
      defaultProps = element.type.defaultProps;
    }
    for (propName in config) {
      if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
        if (config[propName] === undefined && defaultProps !== undefined) {
          // Resolve default props
          props[propName] = defaultProps[propName];
        } else {
          props[propName] = config[propName];
        }
      }
    }
  }
 
  // Children can be more than one argument, and those are transferred onto
  // the newly allocated props object.
  var childrenLength = arguments.length - 2;
  if (childrenLength === 1) {
    props.children = children;
  } else if (childrenLength > 1) {
    var childArray = Array(childrenLength);
    for (var i = 0; i < childrenLength; i++) {
      childArray[i] = arguments[i + 2];
    }
    props.children = childArray;
  }
 
  return ReactElement(element.type, key, ref, self, source, owner, props);
}
 
/**
 * Verifies the object is a ReactElement.
 * See https://reactjs.org/docs/react-api.html#isvalidelement
 * @param {?object} object
 * @return {boolean} True if `object` is a valid component.
 * @final
 */
function isValidElement(object) {
  return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
}
 
var ReactDebugCurrentFrame = {};
 
{
  // Component that is being worked on
  ReactDebugCurrentFrame.getCurrentStack = null;
 
  ReactDebugCurrentFrame.getStackAddendum = function () {
    var impl = ReactDebugCurrentFrame.getCurrentStack;
    if (impl) {
      return impl();
    }
    return null;
  };
}
 
var SEPARATOR = '.';
var SUBSEPARATOR = ':';
 
/**
 * Escape and wrap key so it is safe to use as a reactid
 *
 * @param {string} key to be escaped.
 * @return {string} the escaped key.
 */
function escape(key) {
  var escapeRegex = /[=:]/g;
  var escaperLookup = {
    '=': '=0',
    ':': '=2'
  };
  var escapedString = ('' + key).replace(escapeRegex, function (match) {
    return escaperLookup[match];
  });
 
  return '$' + escapedString;
}
 
/**
 * TODO: Test that a single child and an array with one item have the same key
 * pattern.
 */
 
var didWarnAboutMaps = false;
 
var userProvidedKeyEscapeRegex = /\/+/g;
function escapeUserProvidedKey(text) {
  return ('' + text).replace(userProvidedKeyEscapeRegex, '$&/');
}
 
var POOL_SIZE = 10;
var traverseContextPool = [];
function getPooledTraverseContext(mapResult, keyPrefix, mapFunction, mapContext) {
  if (traverseContextPool.length) {
    var traverseContext = traverseContextPool.pop();
    traverseContext.result = mapResult;
    traverseContext.keyPrefix = keyPrefix;
    traverseContext.func = mapFunction;
    traverseContext.context = mapContext;
    traverseContext.count = 0;
    return traverseContext;
  } else {
    return {
      result: mapResult,
      keyPrefix: keyPrefix,
      func: mapFunction,
      context: mapContext,
      count: 0
    };
  }
}
 
function releaseTraverseContext(traverseContext) {
  traverseContext.result = null;
  traverseContext.keyPrefix = null;
  traverseContext.func = null;
  traverseContext.context = null;
  traverseContext.count = 0;
  if (traverseContextPool.length < POOL_SIZE) {
    traverseContextPool.push(traverseContext);
  }
}
 
/**
 * @param {?*} children Children tree container.
 * @param {!string} nameSoFar Name of the key path so far.
 * @param {!function} callback Callback to invoke with each child found.
 * @param {?*} traverseContext Used to pass information throughout the traversal
 * process.
 * @return {!number} The number of children in this subtree.
 */
function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext) {
  var type = typeof children;
 
  if (type === 'undefined' || type === 'boolean') {
    // All of the above are perceived as null.
    children = null;
  }
 
  var invokeCallback = false;
 
  if (children === null) {
    invokeCallback = true;
  } else {
    switch (type) {
      case 'string':
      case 'number':
        invokeCallback = true;
        break;
      case 'object':
        switch (children.$$typeof) {
          case REACT_ELEMENT_TYPE:
          case REACT_CALL_TYPE:
          case REACT_RETURN_TYPE:
          case REACT_PORTAL_TYPE:
            invokeCallback = true;
        }
    }
  }
 
  if (invokeCallback) {
    callback(traverseContext, children,
    // If it's the only child, treat the name as if it was wrapped in an array
    // so that it's consistent if the number of children grows.
    nameSoFar === '' ? SEPARATOR + getComponentKey(children, 0) : nameSoFar);
    return 1;
  }
 
  var child;
  var nextName;
  var subtreeCount = 0; // Count of children found in the current subtree.
  var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR;
 
  if (Array.isArray(children)) {
    for (var i = 0; i < children.length; i++) {
      child = children[i];
      nextName = nextNamePrefix + getComponentKey(child, i);
      subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
    }
  } else {
    var iteratorFn = getIteratorFn(children);
    if (typeof iteratorFn === 'function') {
      {
        // Warn about using Maps as children
        if (iteratorFn === children.entries) {
          warning(didWarnAboutMaps, 'Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.%s', ReactDebugCurrentFrame.getStackAddendum());
          didWarnAboutMaps = true;
        }
      }
 
      var iterator = iteratorFn.call(children);
      var step;
      var ii = 0;
      while (!(step = iterator.next()).done) {
        child = step.value;
        nextName = nextNamePrefix + getComponentKey(child, ii++);
        subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
      }
    } else if (type === 'object') {
      var addendum = '';
      {
        addendum = ' If you meant to render a collection of children, use an array ' + 'instead.' + ReactDebugCurrentFrame.getStackAddendum();
      }
      var childrenString = '' + children;
      invariant(false, 'Objects are not valid as a React child (found: %s).%s', childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString, addendum);
    }
  }
 
  return subtreeCount;
}
 
/**
 * Traverses children that are typically specified as `props.children`, but
 * might also be specified through attributes:
 *
 * - `traverseAllChildren(this.props.children, ...)`
 * - `traverseAllChildren(this.props.leftPanelChildren, ...)`
 *
 * The `traverseContext` is an optional argument that is passed through the
 * entire traversal. It can be used to store accumulations or anything else that
 * the callback might find relevant.
 *
 * @param {?*} children Children tree object.
 * @param {!function} callback To invoke upon traversing each child.
 * @param {?*} traverseContext Context for traversal.
 * @return {!number} The number of children in this subtree.
 */
function traverseAllChildren(children, callback, traverseContext) {
  if (children == null) {
    return 0;
  }
 
  return traverseAllChildrenImpl(children, '', callback, traverseContext);
}
 
/**
 * Generate a key string that identifies a component within a set.
 *
 * @param {*} component A component that could contain a manual key.
 * @param {number} index Index that is used if a manual key is not provided.
 * @return {string}
 */
function getComponentKey(component, index) {
  // Do some typechecking here since we call this blindly. We want to ensure
  // that we don't block potential future ES APIs.
  if (typeof component === 'object' && component !== null && component.key != null) {
    // Explicit key
    return escape(component.key);
  }
  // Implicit key determined by the index in the set
  return index.toString(36);
}
 
function forEachSingleChild(bookKeeping, child, name) {
  var func = bookKeeping.func,
      context = bookKeeping.context;
 
  func.call(context, child, bookKeeping.count++);
}
 
/**
 * Iterates through children that are typically specified as `props.children`.
 *
 * See https://reactjs.org/docs/react-api.html#react.children.foreach
 *
 * The provided forEachFunc(child, index) will be called for each
 * leaf child.
 *
 * @param {?*} children Children tree container.
 * @param {function(*, int)} forEachFunc
 * @param {*} forEachContext Context for forEachContext.
 */
function forEachChildren(children, forEachFunc, forEachContext) {
  if (children == null) {
    return children;
  }
  var traverseContext = getPooledTraverseContext(null, null, forEachFunc, forEachContext);
  traverseAllChildren(children, forEachSingleChild, traverseContext);
  releaseTraverseContext(traverseContext);
}
 
function mapSingleChildIntoContext(bookKeeping, child, childKey) {
  var result = bookKeeping.result,
      keyPrefix = bookKeeping.keyPrefix,
      func = bookKeeping.func,
      context = bookKeeping.context;
 
 
  var mappedChild = func.call(context, child, bookKeeping.count++);
  if (Array.isArray(mappedChild)) {
    mapIntoWithKeyPrefixInternal(mappedChild, result, childKey, emptyFunction.thatReturnsArgument);
  } else if (mappedChild != null) {
    if (isValidElement(mappedChild)) {
      mappedChild = cloneAndReplaceKey(mappedChild,
      // Keep both the (mapped) and old keys if they differ, just as
      // traverseAllChildren used to do for objects as children
      keyPrefix + (mappedChild.key && (!child || child.key !== mappedChild.key) ? escapeUserProvidedKey(mappedChild.key) + '/' : '') + childKey);
    }
    result.push(mappedChild);
  }
}
 
function mapIntoWithKeyPrefixInternal(children, array, prefix, func, context) {
  var escapedPrefix = '';
  if (prefix != null) {
    escapedPrefix = escapeUserProvidedKey(prefix) + '/';
  }
  var traverseContext = getPooledTraverseContext(array, escapedPrefix, func, context);
  traverseAllChildren(children, mapSingleChildIntoContext, traverseContext);
  releaseTraverseContext(traverseContext);
}
 
/**
 * Maps children that are typically specified as `props.children`.
 *
 * See https://reactjs.org/docs/react-api.html#react.children.map
 *
 * The provided mapFunction(child, key, index) will be called for each
 * leaf child.
 *
 * @param {?*} children Children tree container.
 * @param {function(*, int)} func The map function.
 * @param {*} context Context for mapFunction.
 * @return {object} Object containing the ordered map of results.
 */
function mapChildren(children, func, context) {
  if (children == null) {
    return children;
  }
  var result = [];
  mapIntoWithKeyPrefixInternal(children, result, null, func, context);
  return result;
}
 
/**
 * Count the number of children that are typically specified as
 * `props.children`.
 *
 * See https://reactjs.org/docs/react-api.html#react.children.count
 *
 * @param {?*} children Children tree container.
 * @return {number} The number of children.
 */
function countChildren(children, context) {
  return traverseAllChildren(children, emptyFunction.thatReturnsNull, null);
}
 
/**
 * Flatten a children object (typically specified as `props.children`) and
 * return an array with appropriately re-keyed children.
 *
 * See https://reactjs.org/docs/react-api.html#react.children.toarray
 */
function toArray(children) {
  var result = [];
  mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument);
  return result;
}
 
/**
 * Returns the first child in a collection of children and verifies that there
 * is only one child in the collection.
 *
 * See https://reactjs.org/docs/react-api.html#react.children.only
 *
 * The current implementation of this function assumes that a single child gets
 * passed without a wrapper, but the purpose of this helper function is to
 * abstract away the particular structure of children.
 *
 * @param {?object} children Child collection structure.
 * @return {ReactElement} The first and only `ReactElement` contained in the
 * structure.
 */
function onlyChild(children) {
  !isValidElement(children) ? invariant(false, 'React.Children.only expected to receive a single React element child.') : void 0;
  return children;
}
 
var describeComponentFrame = function (name, source, ownerName) {
  return '\n    in ' + (name || 'Unknown') + (source ? ' (at ' + source.fileName.replace(/^.*[\\\/]/, '') + ':' + source.lineNumber + ')' : ownerName ? ' (created by ' + ownerName + ')' : '');
};
 
function getComponentName(fiber) {
  var type = fiber.type;
 
  if (typeof type === 'string') {
    return type;
  }
  if (typeof type === 'function') {
    return type.displayName || type.name;
  }
  return null;
}
 
/**
 * ReactElementValidator provides a wrapper around a element factory
 * which validates the props passed to the element. This is intended to be
 * used only in DEV and could be replaced by a static type checker for languages
 * that support it.
 */
 
{
  var currentlyValidatingElement = null;
 
  var propTypesMisspellWarningShown = false;
 
  var getDisplayName = function (element) {
    if (element == null) {
      return '#empty';
    } else if (typeof element === 'string' || typeof element === 'number') {
      return '#text';
    } else if (typeof element.type === 'string') {
      return element.type;
    } else if (element.type === REACT_FRAGMENT_TYPE) {
      return 'React.Fragment';
    } else {
      return element.type.displayName || element.type.name || 'Unknown';
    }
  };
 
  var getStackAddendum = function () {
    var stack = '';
    if (currentlyValidatingElement) {
      var name = getDisplayName(currentlyValidatingElement);
      var owner = currentlyValidatingElement._owner;
      stack += describeComponentFrame(name, currentlyValidatingElement._source, owner && getComponentName(owner));
    }
    stack += ReactDebugCurrentFrame.getStackAddendum() || '';
    return stack;
  };
 
  var VALID_FRAGMENT_PROPS = new Map([['children', true], ['key', true]]);
}
 
function getDeclarationErrorAddendum() {
  if (ReactCurrentOwner.current) {
    var name = getComponentName(ReactCurrentOwner.current);
    if (name) {
      return '\n\nCheck the render method of `' + name + '`.';
    }
  }
  return '';
}
 
function getSourceInfoErrorAddendum(elementProps) {
  if (elementProps !== null && elementProps !== undefined && elementProps.__source !== undefined) {
    var source = elementProps.__source;
    var fileName = source.fileName.replace(/^.*[\\\/]/, '');
    var lineNumber = source.lineNumber;
    return '\n\nCheck your code at ' + fileName + ':' + lineNumber + '.';
  }
  return '';
}
 
/**
 * Warn if there's no key explicitly set on dynamic arrays of children or
 * object keys are not valid. This allows us to keep track of children between
 * updates.
 */
var ownerHasKeyUseWarning = {};
 
function getCurrentComponentErrorInfo(parentType) {
  var info = getDeclarationErrorAddendum();
 
  if (!info) {
    var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;
    if (parentName) {
      info = '\n\nCheck the top-level render call using <' + parentName + '>.';
    }
  }
  return info;
}
 
/**
 * Warn if the element doesn't have an explicit key assigned to it.
 * This element is in an array. The array could grow and shrink or be
 * reordered. All children that haven't already been validated are required to
 * have a "key" property assigned to it. Error statuses are cached so a warning
 * will only be shown once.
 *
 * @internal
 * @param {ReactElement} element Element that requires a key.
 * @param {*} parentType element's parent's type.
 */
function validateExplicitKey(element, parentType) {
  if (!element._store || element._store.validated || element.key != null) {
    return;
  }
  element._store.validated = true;
 
  var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
  if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
    return;
  }
  ownerHasKeyUseWarning[currentComponentErrorInfo] = true;
 
  // Usually the current owner is the offender, but if it accepts children as a
  // property, it may be the creator of the child that's responsible for
  // assigning it a key.
  var childOwner = '';
  if (element && element._owner && element._owner !== ReactCurrentOwner.current) {
    // Give the component that originally created this child.
    childOwner = ' It was passed a child from ' + getComponentName(element._owner) + '.';
  }
 
  currentlyValidatingElement = element;
  {
    warning(false, 'Each child in an array or iterator should have a unique "key" prop.' + '%s%s See https://fb.me/react-warning-keys for more information.%s', currentComponentErrorInfo, childOwner, getStackAddendum());
  }
  currentlyValidatingElement = null;
}
 
/**
 * Ensure that every element either is passed in a static location, in an
 * array with an explicit keys property defined, or in an object literal
 * with valid key property.
 *
 * @internal
 * @param {ReactNode} node Statically passed child of any type.
 * @param {*} parentType node's parent's type.
 */
function validateChildKeys(node, parentType) {
  if (typeof node !== 'object') {
    return;
  }
  if (Array.isArray(node)) {
    for (var i = 0; i < node.length; i++) {
      var child = node[i];
      if (isValidElement(child)) {
        validateExplicitKey(child, parentType);
      }
    }
  } else if (isValidElement(node)) {
    // This element was passed in a valid location.
    if (node._store) {
      node._store.validated = true;
    }
  } else if (node) {
    var iteratorFn = getIteratorFn(node);
    if (typeof iteratorFn === 'function') {
      // Entry iterators used to provide implicit keys,
      // but now we print a separate warning for them later.
      if (iteratorFn !== node.entries) {
        var iterator = iteratorFn.call(node);
        var step;
        while (!(step = iterator.next()).done) {
          if (isValidElement(step.value)) {
            validateExplicitKey(step.value, parentType);
          }
        }
      }
    }
  }
}
 
/**
 * Given an element, validate that its props follow the propTypes definition,
 * provided by the type.
 *
 * @param {ReactElement} element
 */
function validatePropTypes(element) {
  var componentClass = element.type;
  if (typeof componentClass !== 'function') {
    return;
  }
  var name = componentClass.displayName || componentClass.name;
  var propTypes = componentClass.propTypes;
  if (propTypes) {
    currentlyValidatingElement = element;
    checkPropTypes(propTypes, element.props, 'prop', name, getStackAddendum);
    currentlyValidatingElement = null;
  } else if (componentClass.PropTypes !== undefined && !propTypesMisspellWarningShown) {
    propTypesMisspellWarningShown = true;
    warning(false, 'Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', name || 'Unknown');
  }
  if (typeof componentClass.getDefaultProps === 'function') {
    warning(componentClass.getDefaultProps.isReactClassApproved, 'getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');
  }
}
 
/**
 * Given a fragment, validate that it can only be provided with fragment props
 * @param {ReactElement} fragment
 */
function validateFragmentProps(fragment) {
  currentlyValidatingElement = fragment;
 
  var _iteratorNormalCompletion = true;
  var _didIteratorError = false;
  var _iteratorError = undefined;
 
  try {
    for (var _iterator = Object.keys(fragment.props)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
      var key = _step.value;
 
      if (!VALID_FRAGMENT_PROPS.has(key)) {
        warning(false, 'Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.%s', key, getStackAddendum());
        break;
      }
    }
  } catch (err) {
    _didIteratorError = true;
    _iteratorError = err;
  } finally {
    try {
      if (!_iteratorNormalCompletion && _iterator['return']) {
        _iterator['return']();
      }
    } finally {
      if (_didIteratorError) {
        throw _iteratorError;
      }
    }
  }
 
  if (fragment.ref !== null) {
    warning(false, 'Invalid attribute `ref` supplied to `React.Fragment`.%s', getStackAddendum());
  }
 
  currentlyValidatingElement = null;
}
 
function createElementWithValidation(type, props, children) {
  var validType = typeof type === 'string' || typeof type === 'function' || typeof type === 'symbol' || typeof type === 'number';
  // We warn in this case but don't throw. We expect the element creation to
  // succeed and there will likely be errors in render.
  if (!validType) {
    var info = '';
    if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
      info += ' You likely forgot to export your component from the file ' + "it's defined in, or you might have mixed up default and named imports.";
    }
 
    var sourceInfo = getSourceInfoErrorAddendum(props);
    if (sourceInfo) {
      info += sourceInfo;
    } else {
      info += getDeclarationErrorAddendum();
    }
 
    info += getStackAddendum() || '';
 
    warning(false, 'React.createElement: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', type == null ? type : typeof type, info);
  }
 
  var element = createElement.apply(this, arguments);
 
  // The result can be nullish if a mock or a custom function is used.
  // TODO: Drop this when these are no longer allowed as the type argument.
  if (element == null) {
    return element;
  }
 
  // Skip key warning if the type isn't valid since our key validation logic
  // doesn't expect a non-string/function type and can throw confusing errors.
  // We don't want exception behavior to differ between dev and prod.
  // (Rendering will throw with a helpful message and as soon as the type is
  // fixed, the key warnings will appear.)
  if (validType) {
    for (var i = 2; i < arguments.length; i++) {
      validateChildKeys(arguments[i], type);
    }
  }
 
  if (typeof type === 'symbol' && type === REACT_FRAGMENT_TYPE) {
    validateFragmentProps(element);
  } else {
    validatePropTypes(element);
  }
 
  return element;
}
 
function createFactoryWithValidation(type) {
  var validatedFactory = createElementWithValidation.bind(null, type);
  // Legacy hook TODO: Warn if this is accessed
  validatedFactory.type = type;
 
  {
    Object.defineProperty(validatedFactory, 'type', {
      enumerable: false,
      get: function () {
        lowPriorityWarning$1(false, 'Factory.type is deprecated. Access the class directly ' + 'before passing it to createFactory.');
        Object.defineProperty(this, 'type', {
          value: type
        });
        return type;
      }
    });
  }
 
  return validatedFactory;
}
 
function cloneElementWithValidation(element, props, children) {
  var newElement = cloneElement.apply(this, arguments);
  for (var i = 2; i < arguments.length; i++) {
    validateChildKeys(arguments[i], newElement.type);
  }
  validatePropTypes(newElement);
  return newElement;
}
 
var React = {
  Children: {
    map: mapChildren,
    forEach: forEachChildren,
    count: countChildren,
    toArray: toArray,
    only: onlyChild
  },
 
  Component: Component,
  PureComponent: PureComponent,
  unstable_AsyncComponent: AsyncComponent,
 
  Fragment: REACT_FRAGMENT_TYPE,
 
  createElement: createElementWithValidation,
  cloneElement: cloneElementWithValidation,
  createFactory: createFactoryWithValidation,
  isValidElement: isValidElement,
 
  version: ReactVersion,
 
  __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: {
    ReactCurrentOwner: ReactCurrentOwner,
    // Used by renderers to avoid bundling object-assign twice in UMD bundles:
    assign: _assign
  }
};
 
{
  _assign(React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, {
    // These should not be included in production.
    ReactDebugCurrentFrame: ReactDebugCurrentFrame,
    // Shim for React DOM 16.0.0 which still destructured (but not used) this.
    // TODO: remove in React 17.0.
    ReactComponentTreeHook: {}
  });
}
 
 
 
var React$2 = Object.freeze({
    default: React
});
 
var React$3 = ( React$2 && React ) || React$2;
 
// TODO: decide on the top-level export form.
// This is hacky but makes it work with both Rollup and Jest.
var react = React$3['default'] ? React$3['default'] : React$3;
 
module.exports = react;
  })();
}
 
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(26)))
 
/***/ }),
/* 681 */
/***/ (function(module, exports, __webpack_require__) {
 
"use strict";
/** @license React v16.2.0
 * react.production.min.js
 *
 * Copyright (c) 2013-present, Facebook, Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */
 
var m=__webpack_require__(171),n=__webpack_require__(233),p=__webpack_require__(74),q="function"===typeof Symbol&&Symbol["for"],r=q?Symbol["for"]("react.element"):60103,t=q?Symbol["for"]("react.call"):60104,u=q?Symbol["for"]("react.return"):60105,v=q?Symbol["for"]("react.portal"):60106,w=q?Symbol["for"]("react.fragment"):60107,x="function"===typeof Symbol&&Symbol.iterator;
function y(a){for(var b=arguments.length-1,e="Minified React error #"+a+"; visit http://facebook.github.io/react/docs/error-decoder.html?invariant\x3d"+a,c=0;c<b;c++)e+="\x26args[]\x3d"+encodeURIComponent(arguments[c+1]);b=Error(e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.");b.name="Invariant Violation";b.framesToPop=1;throw b;}
var z={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}};function A(a,b,e){this.props=a;this.context=b;this.refs=n;this.updater=e||z}A.prototype.isReactComponent={};A.prototype.setState=function(a,b){"object"!==typeof a&&"function"!==typeof a&&null!=a?y("85"):void 0;this.updater.enqueueSetState(this,a,b,"setState")};A.prototype.forceUpdate=function(a){this.updater.enqueueForceUpdate(this,a,"forceUpdate")};
function B(a,b,e){this.props=a;this.context=b;this.refs=n;this.updater=e||z}function C(){}C.prototype=A.prototype;var D=B.prototype=new C;D.constructor=B;m(D,A.prototype);D.isPureReactComponent=!0;function E(a,b,e){this.props=a;this.context=b;this.refs=n;this.updater=e||z}var F=E.prototype=new C;F.constructor=E;m(F,A.prototype);F.unstable_isAsyncReactComponent=!0;F.render=function(){return this.props.children};var G={current:null},H=Object.prototype.hasOwnProperty,I={key:!0,ref:!0,__self:!0,__source:!0};
function J(a,b,e){var c,d={},g=null,k=null;if(null!=b)for(c in void 0!==b.ref&&(k=b.ref),void 0!==b.key&&(g=""+b.key),b)H.call(b,c)&&!I.hasOwnProperty(c)&&(d[c]=b[c]);var f=arguments.length-2;if(1===f)d.children=e;else if(1<f){for(var h=Array(f),l=0;l<f;l++)h[l]=arguments[l+2];d.children=h}if(a&&a.defaultProps)for(c in f=a.defaultProps,f)void 0===d[c]&&(d[c]=f[c]);return{$$typeof:r,type:a,key:g,ref:k,props:d,_owner:G.current}}function K(a){return"object"===typeof a&&null!==a&&a.$$typeof===r}
function escape(a){var b={"\x3d":"\x3d0",":":"\x3d2"};return"$"+(""+a).replace(/[=:]/g,function(a){return b[a]})}var L=/\/+/g,M=[];function N(a,b,e,c){if(M.length){var d=M.pop();d.result=a;d.keyPrefix=b;d.func=e;d.context=c;d.count=0;return d}return{result:a,keyPrefix:b,func:e,context:c,count:0}}function O(a){a.result=null;a.keyPrefix=null;a.func=null;a.context=null;a.count=0;10>M.length&&M.push(a)}
function P(a,b,e,c){var d=typeof a;if("undefined"===d||"boolean"===d)a=null;var g=!1;if(null===a)g=!0;else switch(d){case "string":case "number":g=!0;break;case "object":switch(a.$$typeof){case r:case t:case u:case v:g=!0}}if(g)return e(c,a,""===b?"."+Q(a,0):b),1;g=0;b=""===b?".":b+":";if(Array.isArray(a))for(var k=0;k<a.length;k++){d=a[k];var f=b+Q(d,k);g+=P(d,f,e,c)}else if(null===a||"undefined"===typeof a?f=null:(f=x&&a[x]||a["@@iterator"],f="function"===typeof f?f:null),"function"===typeof f)for(a=
f.call(a),k=0;!(d=a.next()).done;)d=d.value,f=b+Q(d,k++),g+=P(d,f,e,c);else"object"===d&&(e=""+a,y("31","[object Object]"===e?"object with keys {"+Object.keys(a).join(", ")+"}":e,""));return g}function Q(a,b){return"object"===typeof a&&null!==a&&null!=a.key?escape(a.key):b.toString(36)}function R(a,b){a.func.call(a.context,b,a.count++)}
function S(a,b,e){var c=a.result,d=a.keyPrefix;a=a.func.call(a.context,b,a.count++);Array.isArray(a)?T(a,c,e,p.thatReturnsArgument):null!=a&&(K(a)&&(b=d+(!a.key||b&&b.key===a.key?"":(""+a.key).replace(L,"$\x26/")+"/")+e,a={$$typeof:r,type:a.type,key:b,ref:a.ref,props:a.props,_owner:a._owner}),c.push(a))}function T(a,b,e,c,d){var g="";null!=e&&(g=(""+e).replace(L,"$\x26/")+"/");b=N(b,g,c,d);null==a||P(a,"",S,b);O(b)}
var U={Children:{map:function(a,b,e){if(null==a)return a;var c=[];T(a,c,null,b,e);return c},forEach:function(a,b,e){if(null==a)return a;b=N(null,null,b,e);null==a||P(a,"",R,b);O(b)},count:function(a){return null==a?0:P(a,"",p.thatReturnsNull,null)},toArray:function(a){var b=[];T(a,b,null,p.thatReturnsArgument);return b},only:function(a){K(a)?void 0:y("143");return a}},Component:A,PureComponent:B,unstable_AsyncComponent:E,Fragment:w,createElement:J,cloneElement:function(a,b,e){var c=m({},a.props),
d=a.key,g=a.ref,k=a._owner;if(null!=b){void 0!==b.ref&&(g=b.ref,k=G.current);void 0!==b.key&&(d=""+b.key);if(a.type&&a.type.defaultProps)var f=a.type.defaultProps;for(h in b)H.call(b,h)&&!I.hasOwnProperty(h)&&(c[h]=void 0===b[h]&&void 0!==f?f[h]:b[h])}var h=arguments.length-2;if(1===h)c.children=e;else if(1<h){f=Array(h);for(var l=0;l<h;l++)f[l]=arguments[l+2];c.children=f}return{$$typeof:r,type:a.type,key:d,ref:g,props:c,_owner:k}},createFactory:function(a){var b=J.bind(null,a);b.type=a;return b},
isValidElement:K,version:"16.2.0",__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactCurrentOwner:G,assign:m}},V=Object.freeze({default:U}),W=V&&U||V;module.exports=W["default"]?W["default"]:W;
 
 
/***/ }),
/* 682 */
/***/ (function(module, exports) {
 
if (typeof Object.create === 'function') {
  // implementation from standard node.js 'util' module
  module.exports = function inherits(ctor, superCtor) {
    ctor.super_ = superCtor
    ctor.prototype = Object.create(superCtor.prototype, {
      constructor: {
        value: ctor,
        enumerable: false,
        writable: true,
        configurable: true
      }
    });
  };
} else {
  // old school shim for old browsers
  module.exports = function inherits(ctor, superCtor) {
    ctor.super_ = superCtor
    var TempCtor = function () {}
    TempCtor.prototype = superCtor.prototype
    ctor.prototype = new TempCtor()
    ctor.prototype.constructor = ctor
  }
}
 
 
/***/ }),
/* 683 */
/***/ (function(module, exports) {
 
module.exports = function isBuffer(arg) {
  return arg && typeof arg === 'object'
    && typeof arg.copy === 'function'
    && typeof arg.fill === 'function'
    && typeof arg.readUInt8 === 'function';
}
 
/***/ }),
/* 684 */
/***/ (function(module, exports, __webpack_require__) {
 
/* WEBPACK VAR INJECTION */(function(global, process) {// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.
 
var formatRegExp = /%[sdj%]/g;
exports.format = function(f) {
  if (!isString(f)) {
    var objects = [];
    for (var i = 0; i < arguments.length; i++) {
      objects.push(inspect(arguments[i]));
    }
    return objects.join(' ');
  }
 
  var i = 1;
  var args = arguments;
  var len = args.length;
  var str = String(f).replace(formatRegExp, function(x) {
    if (x === '%%') return '%';
    if (i >= len) return x;
    switch (x) {
      case '%s': return String(args[i++]);
      case '%d': return Number(args[i++]);
      case '%j':
        try {
          return JSON.stringify(args[i++]);
        } catch (_) {
          return '[Circular]';
        }
      default:
        return x;
    }
  });
  for (var x = args[i]; i < len; x = args[++i]) {
    if (isNull(x) || !isObject(x)) {
      str += ' ' + x;
    } else {
      str += ' ' + inspect(x);
    }
  }
  return str;
};
 
 
// Mark that a method should not be used.
// Returns a modified function which warns once by default.
// If --no-deprecation is set, then it is a no-op.
exports.deprecate = function(fn, msg) {
  // Allow for deprecating things in the process of starting up.
  if (isUndefined(global.process)) {
    return function() {
      return exports.deprecate(fn, msg).apply(this, arguments);
    };
  }
 
  if (process.noDeprecation === true) {
    return fn;
  }
 
  var warned = false;
  function deprecated() {
    if (!warned) {
      if (process.throwDeprecation) {
        throw new Error(msg);
      } else if (process.traceDeprecation) {
        console.trace(msg);
      } else {
        console.error(msg);
      }
      warned = true;
    }
    return fn.apply(this, arguments);
  }
 
  return deprecated;
};
 
 
var debugs = {};
var debugEnviron;
exports.debuglog = function(set) {
  if (isUndefined(debugEnviron))
    debugEnviron = process.env.NODE_DEBUG || '';
  set = set.toUpperCase();
  if (!debugs[set]) {
    if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) {
      var pid = process.pid;
      debugs[set] = function() {
        var msg = exports.format.apply(exports, arguments);
        console.error('%s %d: %s', set, pid, msg);
      };
    } else {
      debugs[set] = function() {};
    }
  }
  return debugs[set];
};
 
 
/**
 * Echos the value of a value. Trys to print the value out
 * in the best way possible given the different types.
 *
 * @param {Object} obj The object to print out.
 * @param {Object} opts Optional options object that alters the output.
 */
/* legacy: obj, showHidden, depth, colors*/
function inspect(obj, opts) {
  // default options
  var ctx = {
    seen: [],
    stylize: stylizeNoColor
  };
  // legacy...
  if (arguments.length >= 3) ctx.depth = arguments[2];
  if (arguments.length >= 4) ctx.colors = arguments[3];
  if (isBoolean(opts)) {
    // legacy...
    ctx.showHidden = opts;
  } else if (opts) {
    // got an "options" object
    exports._extend(ctx, opts);
  }
  // set default options
  if (isUndefined(ctx.showHidden)) ctx.showHidden = false;
  if (isUndefined(ctx.depth)) ctx.depth = 2;
  if (isUndefined(ctx.colors)) ctx.colors = false;
  if (isUndefined(ctx.customInspect)) ctx.customInspect = true;
  if (ctx.colors) ctx.stylize = stylizeWithColor;
  return formatValue(ctx, obj, ctx.depth);
}
exports.inspect = inspect;
 
 
// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics
inspect.colors = {
  'bold' : [1, 22],
  'italic' : [3, 23],
  'underline' : [4, 24],
  'inverse' : [7, 27],
  'white' : [37, 39],
  'grey' : [90, 39],
  'black' : [30, 39],
  'blue' : [34, 39],
  'cyan' : [36, 39],
  'green' : [32, 39],
  'magenta' : [35, 39],
  'red' : [31, 39],
  'yellow' : [33, 39]
};
 
// Don't use 'blue' not visible on cmd.exe
inspect.styles = {
  'special': 'cyan',
  'number': 'yellow',
  'boolean': 'yellow',
  'undefined': 'grey',
  'null': 'bold',
  'string': 'green',
  'date': 'magenta',
  // "name": intentionally not styling
  'regexp': 'red'
};
 
 
function stylizeWithColor(str, styleType) {
  var style = inspect.styles[styleType];
 
  if (style) {
    return '\u001b[' + inspect.colors[style][0] + 'm' + str +
           '\u001b[' + inspect.colors[style][1] + 'm';
  } else {
    return str;
  }
}
 
 
function stylizeNoColor(str, styleType) {
  return str;
}
 
 
function arrayToHash(array) {
  var hash = {};
 
  array.forEach(function(val, idx) {
    hash[val] = true;
  });
 
  return hash;
}
 
 
function formatValue(ctx, value, recurseTimes) {
  // Provide a hook for user-specified inspect functions.
  // Check that value is an object with an inspect function on it
  if (ctx.customInspect &&
      value &&
      isFunction(value.inspect) &&
      // Filter out the util module, it's inspect function is special
      value.inspect !== exports.inspect &&
      // Also filter out any prototype objects using the circular check.
      !(value.constructor && value.constructor.prototype === value)) {
    var ret = value.inspect(recurseTimes, ctx);
    if (!isString(ret)) {
      ret = formatValue(ctx, ret, recurseTimes);
    }
    return ret;
  }
 
  // Primitive types cannot have properties
  var primitive = formatPrimitive(ctx, value);
  if (primitive) {
    return primitive;
  }
 
  // Look up the keys of the object.
  var keys = Object.keys(value);
  var visibleKeys = arrayToHash(keys);
 
  if (ctx.showHidden) {
    keys = Object.getOwnPropertyNames(value);
  }
 
  // IE doesn't make error fields non-enumerable
  // http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx
  if (isError(value)
      && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) {
    return formatError(value);
  }
 
  // Some type of object without properties can be shortcutted.
  if (keys.length === 0) {
    if (isFunction(value)) {
      var name = value.name ? ': ' + value.name : '';
      return ctx.stylize('[Function' + name + ']', 'special');
    }
    if (isRegExp(value)) {
      return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
    }
    if (isDate(value)) {
      return ctx.stylize(Date.prototype.toString.call(value), 'date');
    }
    if (isError(value)) {
      return formatError(value);
    }
  }
 
  var base = '', array = false, braces = ['{', '}'];
 
  // Make Array say that they are Array
  if (isArray(value)) {
    array = true;
    braces = ['[', ']'];
  }
 
  // Make functions say that they are functions
  if (isFunction(value)) {
    var n = value.name ? ': ' + value.name : '';
    base = ' [Function' + n + ']';
  }
 
  // Make RegExps say that they are RegExps
  if (isRegExp(value)) {
    base = ' ' + RegExp.prototype.toString.call(value);
  }
 
  // Make dates with properties first say the date
  if (isDate(value)) {
    base = ' ' + Date.prototype.toUTCString.call(value);
  }
 
  // Make error with message first say the error
  if (isError(value)) {
    base = ' ' + formatError(value);
  }
 
  if (keys.length === 0 && (!array || value.length == 0)) {
    return braces[0] + base + braces[1];
  }
 
  if (recurseTimes < 0) {
    if (isRegExp(value)) {
      return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
    } else {
      return ctx.stylize('[Object]', 'special');
    }
  }
 
  ctx.seen.push(value);
 
  var output;
  if (array) {
    output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);
  } else {
    output = keys.map(function(key) {
      return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);
    });
  }
 
  ctx.seen.pop();
 
  return reduceToSingleString(output, base, braces);
}
 
 
function formatPrimitive(ctx, value) {
  if (isUndefined(value))
    return ctx.stylize('undefined', 'undefined');
  if (isString(value)) {
    var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '')
                                             .replace(/'/g, "\\'")
                                             .replace(/\\"/g, '"') + '\'';
    return ctx.stylize(simple, 'string');
  }
  if (isNumber(value))
    return ctx.stylize('' + value, 'number');
  if (isBoolean(value))
    return ctx.stylize('' + value, 'boolean');
  // For some reason typeof null is "object", so special case here.
  if (isNull(value))
    return ctx.stylize('null', 'null');
}
 
 
function formatError(value) {
  return '[' + Error.prototype.toString.call(value) + ']';
}
 
 
function formatArray(ctx, value, recurseTimes, visibleKeys, keys) {
  var output = [];
  for (var i = 0, l = value.length; i < l; ++i) {
    if (hasOwnProperty(value, String(i))) {
      output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,
          String(i), true));
    } else {
      output.push('');
    }
  }
  keys.forEach(function(key) {
    if (!key.match(/^\d+$/)) {
      output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,
          key, true));
    }
  });
  return output;
}
 
 
function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {
  var name, str, desc;
  desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] };
  if (desc.get) {
    if (desc.set) {
      str = ctx.stylize('[Getter/Setter]', 'special');
    } else {
      str = ctx.stylize('[Getter]', 'special');
    }
  } else {
    if (desc.set) {
      str = ctx.stylize('[Setter]', 'special');
    }
  }
  if (!hasOwnProperty(visibleKeys, key)) {
    name = '[' + key + ']';
  }
  if (!str) {
    if (ctx.seen.indexOf(desc.value) < 0) {
      if (isNull(recurseTimes)) {
        str = formatValue(ctx, desc.value, null);
      } else {
        str = formatValue(ctx, desc.value, recurseTimes - 1);
      }
      if (str.indexOf('\n') > -1) {
        if (array) {
          str = str.split('\n').map(function(line) {
            return '  ' + line;
          }).join('\n').substr(2);
        } else {
          str = '\n' + str.split('\n').map(function(line) {
            return '   ' + line;
          }).join('\n');
        }
      }
    } else {
      str = ctx.stylize('[Circular]', 'special');
    }
  }
  if (isUndefined(name)) {
    if (array && key.match(/^\d+$/)) {
      return str;
    }
    name = JSON.stringify('' + key);
    if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) {
      name = name.substr(1, name.length - 2);
      name = ctx.stylize(name, 'name');
    } else {
      name = name.replace(/'/g, "\\'")
                 .replace(/\\"/g, '"')
                 .replace(/(^"|"$)/g, "'");
      name = ctx.stylize(name, 'string');
    }
  }
 
  return name + ': ' + str;
}
 
 
function reduceToSingleString(output, base, braces) {
  var numLinesEst = 0;
  var length = output.reduce(function(prev, cur) {
    numLinesEst++;
    if (cur.indexOf('\n') >= 0) numLinesEst++;
    return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1;
  }, 0);
 
  if (length > 60) {
    return braces[0] +
           (base === '' ? '' : base + '\n ') +
           ' ' +
           output.join(',\n  ') +
           ' ' +
           braces[1];
  }
 
  return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];
}
 
 
// NOTE: These type checking functions intentionally don't use `instanceof`
// because it is fragile and can be easily faked with `Object.create()`.
function isArray(ar) {
  return Array.isArray(ar);
}
exports.isArray = isArray;
 
function isBoolean(arg) {
  return typeof arg === 'boolean';
}
exports.isBoolean = isBoolean;
 
function isNull(arg) {
  return arg === null;
}
exports.isNull = isNull;
 
function isNullOrUndefined(arg) {
  return arg == null;
}
exports.isNullOrUndefined = isNullOrUndefined;
 
function isNumber(arg) {
  return typeof arg === 'number';
}
exports.isNumber = isNumber;
 
function isString(arg) {
  return typeof arg === 'string';
}
exports.isString = isString;
 
function isSymbol(arg) {
  return typeof arg === 'symbol';
}
exports.isSymbol = isSymbol;
 
function isUndefined(arg) {
  return arg === void 0;
}
exports.isUndefined = isUndefined;
 
function isRegExp(re) {
  return isObject(re) && objectToString(re) === '[object RegExp]';
}
exports.isRegExp = isRegExp;
 
function isObject(arg) {
  return typeof arg === 'object' && arg !== null;
}
exports.isObject = isObject;
 
function isDate(d) {
  return isObject(d) && objectToString(d) === '[object Date]';
}
exports.isDate = isDate;
 
function isError(e) {
  return isObject(e) &&
      (objectToString(e) === '[object Error]' || e instanceof Error);
}
exports.isError = isError;
 
function isFunction(arg) {
  return typeof arg === 'function';
}
exports.isFunction = isFunction;
 
function isPrimitive(arg) {
  return arg === null ||
         typeof arg === 'boolean' ||
         typeof arg === 'number' ||
         typeof arg === 'string' ||
         typeof arg === 'symbol' ||  // ES6 symbol
         typeof arg === 'undefined';
}
exports.isPrimitive = isPrimitive;
 
exports.isBuffer = __webpack_require__(683);
 
function objectToString(o) {
  return Object.prototype.toString.call(o);
}
 
 
function pad(n) {
  return n < 10 ? '0' + n.toString(10) : n.toString(10);
}
 
 
var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep',
              'Oct', 'Nov', 'Dec'];
 
// 26 Feb 16:19:34
function timestamp() {
  var d = new Date();
  var time = [pad(d.getHours()),
              pad(d.getMinutes()),
              pad(d.getSeconds())].join(':');
  return [d.getDate(), months[d.getMonth()], time].join(' ');
}
 
 
// log is just a thin wrapper to console.log that prepends a timestamp
exports.log = function() {
  console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments));
};
 
 
/**
 * Inherit the prototype methods from one constructor into another.
 *
 * The Function.prototype.inherits from lang.js rewritten as a standalone
 * function (not on Function.prototype). NOTE: If this file is to be loaded
 * during bootstrapping this function needs to be rewritten using some native
 * functions as prototype setup using normal JavaScript does not work as
 * expected during bootstrapping (see mirror.js in r114903).
 *
 * @param {function} ctor Constructor function which needs to inherit the
 *     prototype.
 * @param {function} superCtor Constructor function to inherit prototype from.
 */
exports.inherits = __webpack_require__(682);
 
exports._extend = function(origin, add) {
  // Don't do anything if add isn't an object
  if (!add || !isObject(add)) return origin;
 
  var keys = Object.keys(add);
  var i = keys.length;
  while (i--) {
    origin[keys[i]] = add[keys[i]];
  }
  return origin;
};
 
function hasOwnProperty(obj, prop) {
  return Object.prototype.hasOwnProperty.call(obj, prop);
}
 
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(47), __webpack_require__(26)))
 
/***/ }),
/* 685 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = flyToViewport;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_math_gl__ = __webpack_require__(16);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__math_utils__ = __webpack_require__(118);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__web_mercator_utils__ = __webpack_require__(80);
 
 
 
 
var EPSILON = 0.01;
var VIEWPORT_TRANSITION_PROPS = ['longitude', 'latitude', 'zoom'];
 
/**
 * mapbox-gl-js flyTo : https://www.mapbox.com/mapbox-gl-js/api/#map#flyto.
 * It implements “Smooth and efficient zooming and panning.” algorithm by
 * "Jarke J. van Wijk and Wim A.A. Nuij"
*/
/* eslint-disable max-statements */
function flyToViewport(startProps, endProps, t) {
  // Equations from above paper are referred where needed.
 
  var viewport = {};
 
  // TODO: add this as an option for applications.
  var rho = 1.414;
 
  var startZoom = startProps.zoom;
  var startCenter = [startProps.longitude, startProps.latitude];
  var startScale = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__web_mercator_utils__["j" /* zoomToScale */])(startZoom);
  var endZoom = endProps.zoom;
  var endCenter = [endProps.longitude, endProps.latitude];
  var scale = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__web_mercator_utils__["j" /* zoomToScale */])(endZoom - startZoom);
 
  var startCenterXY = new __WEBPACK_IMPORTED_MODULE_0_math_gl__["Vector2"](__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__web_mercator_utils__["a" /* lngLatToWorld */])(startCenter, startScale));
  var endCenterXY = new __WEBPACK_IMPORTED_MODULE_0_math_gl__["Vector2"](__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__web_mercator_utils__["a" /* lngLatToWorld */])(endCenter, startScale));
  var uDelta = endCenterXY.subtract(startCenterXY);
 
  var w0 = Math.max(startProps.width, startProps.height);
  var w1 = w0 / scale;
  var u1 = Math.sqrt(uDelta.x * uDelta.x + uDelta.y * uDelta.y);
  // u0 is treated as '0' in Eq (9).
 
  // If change in center is too small, do linear interpolaiton.
  if (Math.abs(u1) < EPSILON) {
    var _iteratorNormalCompletion = true;
    var _didIteratorError = false;
    var _iteratorError = undefined;
 
    try {
      for (var _iterator = VIEWPORT_TRANSITION_PROPS[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
        var key = _step.value;
 
        var startValue = startProps[key];
        var endValue = endProps[key];
        viewport[key] = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__math_utils__["c" /* lerp */])(startValue, endValue, t);
      }
    } catch (err) {
      _didIteratorError = true;
      _iteratorError = err;
    } finally {
      try {
        if (!_iteratorNormalCompletion && _iterator.return) {
          _iterator.return();
        }
      } finally {
        if (_didIteratorError) {
          throw _iteratorError;
        }
      }
    }
 
    return viewport;
  }
 
  // Implement Equation (9) from above algorithm.
  var rho2 = rho * rho;
  var b0 = (w1 * w1 - w0 * w0 + rho2 * rho2 * u1 * u1) / (2 * w0 * rho2 * u1);
  var b1 = (w1 * w1 - w0 * w0 - rho2 * rho2 * u1 * u1) / (2 * w1 * rho2 * u1);
  var r0 = Math.log(Math.sqrt(b0 * b0 + 1) - b0);
  var r1 = Math.log(Math.sqrt(b1 * b1 + 1) - b1);
  var S = (r1 - r0) / rho;
  var s = t * S;
 
  var w = Math.cosh(r0) / Math.cosh(r0 + rho * s);
  var u = w0 * ((Math.cosh(r0) * Math.tanh(r0 + rho * s) - Math.sinh(r0)) / rho2) / u1;
 
  var scaleIncrement = 1 / w; // Using w method for scaling.
  var newZoom = startZoom + __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__web_mercator_utils__["k" /* scaleToZoom */])(scaleIncrement);
 
  var newCenter = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__web_mercator_utils__["b" /* worldToLngLat */])(startCenterXY.add(uDelta.scale(u)).scale(scaleIncrement), __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__web_mercator_utils__["j" /* zoomToScale */])(newZoom));
  viewport.longitude = newCenter[0];
  viewport.latitude = newCenter[1];
  viewport.zoom = newZoom;
  return viewport;
}
/* eslint-enable max-statements */
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9mbHktdG8tdmlld3BvcnQuanMiXSwibmFtZXMiOlsiVmVjdG9yMiIsImxlcnAiLCJzY2FsZVRvWm9vbSIsInpvb21Ub1NjYWxlIiwibG5nTGF0VG9Xb3JsZCIsIndvcmxkVG9MbmdMYXQiLCJFUFNJTE9OIiwiVklFV1BPUlRfVFJBTlNJVElPTl9QUk9QUyIsImZseVRvVmlld3BvcnQiLCJzdGFydFByb3BzIiwiZW5kUHJvcHMiLCJ0Iiwidmlld3BvcnQiLCJyaG8iLCJzdGFydFpvb20iLCJ6b29tIiwic3RhcnRDZW50ZXIiLCJsb25naXR1ZGUiLCJsYXRpdHVkZSIsInN0YXJ0U2NhbGUiLCJlbmRab29tIiwiZW5kQ2VudGVyIiwic2NhbGUiLCJzdGFydENlbnRlclhZIiwiZW5kQ2VudGVyWFkiLCJ1RGVsdGEiLCJzdWJ0cmFjdCIsIncwIiwiTWF0aCIsIm1heCIsIndpZHRoIiwiaGVpZ2h0IiwidzEiLCJ1MSIsInNxcnQiLCJ4IiwieSIsImFicyIsImtleSIsInN0YXJ0VmFsdWUiLCJlbmRWYWx1ZSIsInJobzIiLCJiMCIsImIxIiwicjAiLCJsb2ciLCJyMSIsIlMiLCJzIiwidyIsImNvc2giLCJ1IiwidGFuaCIsInNpbmgiLCJzY2FsZUluY3JlbWVudCIsIm5ld1pvb20iLCJuZXdDZW50ZXIiLCJhZGQiXSwibWFwcGluZ3MiOiJBQUFBLFNBQVFBLE9BQVIsUUFBc0IsU0FBdEI7QUFDQSxTQUFRQyxJQUFSLFFBQW1CLGNBQW5CO0FBQ0EsU0FDRUMsV0FERixFQUVFQyxXQUZGLEVBR0VDLGFBSEYsRUFJRUMsYUFKRixRQUtPLHNCQUxQOztBQU9BLElBQU1DLFVBQVUsSUFBaEI7QUFDQSxJQUFNQyw0QkFBNEIsQ0FBQyxXQUFELEVBQWMsVUFBZCxFQUEwQixNQUExQixDQUFsQzs7QUFFQTs7Ozs7QUFLQTtBQUNBLGVBQWUsU0FBU0MsYUFBVCxDQUF1QkMsVUFBdkIsRUFBbUNDLFFBQW5DLEVBQTZDQyxDQUE3QyxFQUFnRDtBQUM3RDs7QUFFQSxNQUFNQyxXQUFXLEVBQWpCOztBQUVBO0FBQ0EsTUFBTUMsTUFBTSxLQUFaOztBQUVBLE1BQU1DLFlBQVlMLFdBQVdNLElBQTdCO0FBQ0EsTUFBTUMsY0FBYyxDQUFDUCxXQUFXUSxTQUFaLEVBQXVCUixXQUFXUyxRQUFsQyxDQUFwQjtBQUNBLE1BQU1DLGFBQWFoQixZQUFZVyxTQUFaLENBQW5CO0FBQ0EsTUFBTU0sVUFBVVYsU0FBU0ssSUFBekI7QUFDQSxNQUFNTSxZQUFZLENBQUNYLFNBQVNPLFNBQVYsRUFBcUJQLFNBQVNRLFFBQTlCLENBQWxCO0FBQ0EsTUFBTUksUUFBUW5CLFlBQVlpQixVQUFVTixTQUF0QixDQUFkOztBQUVBLE1BQU1TLGdCQUFnQixJQUFJdkIsT0FBSixDQUFZSSxjQUFjWSxXQUFkLEVBQTJCRyxVQUEzQixDQUFaLENBQXRCO0FBQ0EsTUFBTUssY0FBYyxJQUFJeEIsT0FBSixDQUFZSSxjQUFjaUIsU0FBZCxFQUF5QkYsVUFBekIsQ0FBWixDQUFwQjtBQUNBLE1BQU1NLFNBQVNELFlBQVlFLFFBQVosQ0FBcUJILGFBQXJCLENBQWY7O0FBRUEsTUFBTUksS0FBS0MsS0FBS0MsR0FBTCxDQUFTcEIsV0FBV3FCLEtBQXBCLEVBQTJCckIsV0FBV3NCLE1BQXRDLENBQVg7QUFDQSxNQUFNQyxLQUFLTCxLQUFLTCxLQUFoQjtBQUNBLE1BQU1XLEtBQUtMLEtBQUtNLElBQUwsQ0FBV1QsT0FBT1UsQ0FBUCxHQUFXVixPQUFPVSxDQUFuQixHQUF5QlYsT0FBT1csQ0FBUCxHQUFXWCxPQUFPVyxDQUFyRCxDQUFYO0FBQ0E7O0FBRUE7QUFDQSxNQUFJUixLQUFLUyxHQUFMLENBQVNKLEVBQVQsSUFBZTNCLE9BQW5CLEVBQTRCO0FBQUE7QUFBQTtBQUFBOztBQUFBO0FBQzFCLDJCQUFrQkMseUJBQWxCLDhIQUE2QztBQUFBLFlBQWxDK0IsR0FBa0M7O0FBQzNDLFlBQU1DLGFBQWE5QixXQUFXNkIsR0FBWCxDQUFuQjtBQUNBLFlBQU1FLFdBQVc5QixTQUFTNEIsR0FBVCxDQUFqQjtBQUNBMUIsaUJBQVMwQixHQUFULElBQWdCckMsS0FBS3NDLFVBQUwsRUFBaUJDLFFBQWpCLEVBQTJCN0IsQ0FBM0IsQ0FBaEI7QUFDRDtBQUx5QjtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBOztBQU0xQixXQUFPQyxRQUFQO0FBQ0Q7O0FBRUQ7QUFDQSxNQUFNNkIsT0FBTzVCLE1BQU1BLEdBQW5CO0FBQ0EsTUFBTTZCLEtBQUssQ0FBQ1YsS0FBS0EsRUFBTCxHQUFVTCxLQUFLQSxFQUFmLEdBQW9CYyxPQUFPQSxJQUFQLEdBQWNSLEVBQWQsR0FBbUJBLEVBQXhDLEtBQStDLElBQUlOLEVBQUosR0FBU2MsSUFBVCxHQUFnQlIsRUFBL0QsQ0FBWDtBQUNBLE1BQU1VLEtBQUssQ0FBQ1gsS0FBS0EsRUFBTCxHQUFVTCxLQUFLQSxFQUFmLEdBQW9CYyxPQUFPQSxJQUFQLEdBQWNSLEVBQWQsR0FBbUJBLEVBQXhDLEtBQStDLElBQUlELEVBQUosR0FBU1MsSUFBVCxHQUFnQlIsRUFBL0QsQ0FBWDtBQUNBLE1BQU1XLEtBQUtoQixLQUFLaUIsR0FBTCxDQUFTakIsS0FBS00sSUFBTCxDQUFVUSxLQUFLQSxFQUFMLEdBQVUsQ0FBcEIsSUFBeUJBLEVBQWxDLENBQVg7QUFDQSxNQUFNSSxLQUFLbEIsS0FBS2lCLEdBQUwsQ0FBU2pCLEtBQUtNLElBQUwsQ0FBVVMsS0FBS0EsRUFBTCxHQUFVLENBQXBCLElBQXlCQSxFQUFsQyxDQUFYO0FBQ0EsTUFBTUksSUFBSSxDQUFDRCxLQUFLRixFQUFOLElBQVkvQixHQUF0QjtBQUNBLE1BQU1tQyxJQUFJckMsSUFBSW9DLENBQWQ7O0FBRUEsTUFBTUUsSUFBS3JCLEtBQUtzQixJQUFMLENBQVVOLEVBQVYsSUFBZ0JoQixLQUFLc0IsSUFBTCxDQUFVTixLQUFLL0IsTUFBTW1DLENBQXJCLENBQTNCO0FBQ0EsTUFBTUcsSUFBSXhCLE1BQU0sQ0FBQ0MsS0FBS3NCLElBQUwsQ0FBVU4sRUFBVixJQUFnQmhCLEtBQUt3QixJQUFMLENBQVVSLEtBQUsvQixNQUFNbUMsQ0FBckIsQ0FBaEIsR0FBMENwQixLQUFLeUIsSUFBTCxDQUFVVCxFQUFWLENBQTNDLElBQTRESCxJQUFsRSxJQUEwRVIsRUFBcEY7O0FBRUEsTUFBTXFCLGlCQUFpQixJQUFJTCxDQUEzQixDQTlDNkQsQ0E4Qy9CO0FBQzlCLE1BQU1NLFVBQVV6QyxZQUFZWixZQUFZb0QsY0FBWixDQUE1Qjs7QUFFQSxNQUFNRSxZQUFZbkQsY0FDZmtCLGNBQWNrQyxHQUFkLENBQWtCaEMsT0FBT0gsS0FBUCxDQUFhNkIsQ0FBYixDQUFsQixDQUFELENBQXFDN0IsS0FBckMsQ0FBMkNnQyxjQUEzQyxDQURnQixFQUVoQm5ELFlBQVlvRCxPQUFaLENBRmdCLENBQWxCO0FBR0EzQyxXQUFTSyxTQUFULEdBQXFCdUMsVUFBVSxDQUFWLENBQXJCO0FBQ0E1QyxXQUFTTSxRQUFULEdBQW9Cc0MsVUFBVSxDQUFWLENBQXBCO0FBQ0E1QyxXQUFTRyxJQUFULEdBQWdCd0MsT0FBaEI7QUFDQSxTQUFPM0MsUUFBUDtBQUNEO0FBQ0QiLCJmaWxlIjoiZmx5LXRvLXZpZXdwb3J0LmpzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHtWZWN0b3IyfSBmcm9tICdtYXRoLmdsJztcbmltcG9ydCB7bGVycH0gZnJvbSAnLi9tYXRoLXV0aWxzJztcbmltcG9ydCB7XG4gIHNjYWxlVG9ab29tLFxuICB6b29tVG9TY2FsZSxcbiAgbG5nTGF0VG9Xb3JsZCxcbiAgd29ybGRUb0xuZ0xhdFxufSBmcm9tICcuL3dlYi1tZXJjYXRvci11dGlscyc7XG5cbmNvbnN0IEVQU0lMT04gPSAwLjAxO1xuY29uc3QgVklFV1BPUlRfVFJBTlNJVElPTl9QUk9QUyA9IFsnbG9uZ2l0dWRlJywgJ2xhdGl0dWRlJywgJ3pvb20nXTtcblxuLyoqXG4gKiBtYXBib3gtZ2wtanMgZmx5VG8gOiBodHRwczovL3d3dy5tYXBib3guY29tL21hcGJveC1nbC1qcy9hcGkvI21hcCNmbHl0by5cbiAqIEl0IGltcGxlbWVudHMg4oCcU21vb3RoIGFuZCBlZmZpY2llbnQgem9vbWluZyBhbmQgcGFubmluZy7igJ0gYWxnb3JpdGhtIGJ5XG4gKiBcIkphcmtlIEouIHZhbiBXaWprIGFuZCBXaW0gQS5BLiBOdWlqXCJcbiovXG4vKiBlc2xpbnQtZGlzYWJsZSBtYXgtc3RhdGVtZW50cyAqL1xuZXhwb3J0IGRlZmF1bHQgZnVuY3Rpb24gZmx5VG9WaWV3cG9ydChzdGFydFByb3BzLCBlbmRQcm9wcywgdCkge1xuICAvLyBFcXVhdGlvbnMgZnJvbSBhYm92ZSBwYXBlciBhcmUgcmVmZXJyZWQgd2hlcmUgbmVlZGVkLlxuXG4gIGNvbnN0IHZpZXdwb3J0ID0ge307XG5cbiAgLy8gVE9ETzogYWRkIHRoaXMgYXMgYW4gb3B0aW9uIGZvciBhcHBsaWNhdGlvbnMuXG4gIGNvbnN0IHJobyA9IDEuNDE0O1xuXG4gIGNvbnN0IHN0YXJ0Wm9vbSA9IHN0YXJ0UHJvcHMuem9vbTtcbiAgY29uc3Qgc3RhcnRDZW50ZXIgPSBbc3RhcnRQcm9wcy5sb25naXR1ZGUsIHN0YXJ0UHJvcHMubGF0aXR1ZGVdO1xuICBjb25zdCBzdGFydFNjYWxlID0gem9vbVRvU2NhbGUoc3RhcnRab29tKTtcbiAgY29uc3QgZW5kWm9vbSA9IGVuZFByb3BzLnpvb207XG4gIGNvbnN0IGVuZENlbnRlciA9IFtlbmRQcm9wcy5sb25naXR1ZGUsIGVuZFByb3BzLmxhdGl0dWRlXTtcbiAgY29uc3Qgc2NhbGUgPSB6b29tVG9TY2FsZShlbmRab29tIC0gc3RhcnRab29tKTtcblxuICBjb25zdCBzdGFydENlbnRlclhZID0gbmV3IFZlY3RvcjIobG5nTGF0VG9Xb3JsZChzdGFydENlbnRlciwgc3RhcnRTY2FsZSkpO1xuICBjb25zdCBlbmRDZW50ZXJYWSA9IG5ldyBWZWN0b3IyKGxuZ0xhdFRvV29ybGQoZW5kQ2VudGVyLCBzdGFydFNjYWxlKSk7XG4gIGNvbnN0IHVEZWx0YSA9IGVuZENlbnRlclhZLnN1YnRyYWN0KHN0YXJ0Q2VudGVyWFkpO1xuXG4gIGNvbnN0IHcwID0gTWF0aC5tYXgoc3RhcnRQcm9wcy53aWR0aCwgc3RhcnRQcm9wcy5oZWlnaHQpO1xuICBjb25zdCB3MSA9IHcwIC8gc2NhbGU7XG4gIGNvbnN0IHUxID0gTWF0aC5zcXJ0KCh1RGVsdGEueCAqIHVEZWx0YS54KSArICh1RGVsdGEueSAqIHVEZWx0YS55KSk7XG4gIC8vIHUwIGlzIHRyZWF0ZWQgYXMgJzAnIGluIEVxICg5KS5cblxuICAvLyBJZiBjaGFuZ2UgaW4gY2VudGVyIGlzIHRvbyBzbWFsbCwgZG8gbGluZWFyIGludGVycG9sYWl0b24uXG4gIGlmIChNYXRoLmFicyh1MSkgPCBFUFNJTE9OKSB7XG4gICAgZm9yIChjb25zdCBrZXkgb2YgVklFV1BPUlRfVFJBTlNJVElPTl9QUk9QUykge1xuICAgICAgY29uc3Qgc3RhcnRWYWx1ZSA9IHN0YXJ0UHJvcHNba2V5XTtcbiAgICAgIGNvbnN0IGVuZFZhbHVlID0gZW5kUHJvcHNba2V5XTtcbiAgICAgIHZpZXdwb3J0W2tleV0gPSBsZXJwKHN0YXJ0VmFsdWUsIGVuZFZhbHVlLCB0KTtcbiAgICB9XG4gICAgcmV0dXJuIHZpZXdwb3J0O1xuICB9XG5cbiAgLy8gSW1wbGVtZW50IEVxdWF0aW9uICg5KSBmcm9tIGFib3ZlIGFsZ29yaXRobS5cbiAgY29uc3QgcmhvMiA9IHJobyAqIHJobztcbiAgY29uc3QgYjAgPSAodzEgKiB3MSAtIHcwICogdzAgKyByaG8yICogcmhvMiAqIHUxICogdTEpIC8gKDIgKiB3MCAqIHJobzIgKiB1MSk7XG4gIGNvbnN0IGIxID0gKHcxICogdzEgLSB3MCAqIHcwIC0gcmhvMiAqIHJobzIgKiB1MSAqIHUxKSAvICgyICogdzEgKiByaG8yICogdTEpO1xuICBjb25zdCByMCA9IE1hdGgubG9nKE1hdGguc3FydChiMCAqIGIwICsgMSkgLSBiMCk7XG4gIGNvbnN0IHIxID0gTWF0aC5sb2coTWF0aC5zcXJ0KGIxICogYjEgKyAxKSAtIGIxKTtcbiAgY29uc3QgUyA9IChyMSAtIHIwKSAvIHJobztcbiAgY29uc3QgcyA9IHQgKiBTO1xuXG4gIGNvbnN0IHcgPSAoTWF0aC5jb3NoKHIwKSAvIE1hdGguY29zaChyMCArIHJobyAqIHMpKTtcbiAgY29uc3QgdSA9IHcwICogKChNYXRoLmNvc2gocjApICogTWF0aC50YW5oKHIwICsgcmhvICogcykgLSBNYXRoLnNpbmgocjApKSAvIHJobzIpIC8gdTE7XG5cbiAgY29uc3Qgc2NhbGVJbmNyZW1lbnQgPSAxIC8gdzsgLy8gVXNpbmcgdyBtZXRob2QgZm9yIHNjYWxpbmcuXG4gIGNvbnN0IG5ld1pvb20gPSBzdGFydFpvb20gKyBzY2FsZVRvWm9vbShzY2FsZUluY3JlbWVudCk7XG5cbiAgY29uc3QgbmV3Q2VudGVyID0gd29ybGRUb0xuZ0xhdChcbiAgICAoc3RhcnRDZW50ZXJYWS5hZGQodURlbHRhLnNjYWxlKHUpKSkuc2NhbGUoc2NhbGVJbmNyZW1lbnQpLFxuICAgIHpvb21Ub1NjYWxlKG5ld1pvb20pKTtcbiAgdmlld3BvcnQubG9uZ2l0dWRlID0gbmV3Q2VudGVyWzBdO1xuICB2aWV3cG9ydC5sYXRpdHVkZSA9IG5ld0NlbnRlclsxXTtcbiAgdmlld3BvcnQuem9vbSA9IG5ld1pvb207XG4gIHJldHVybiB2aWV3cG9ydDtcbn1cbi8qIGVzbGludC1lbmFibGUgbWF4LXN0YXRlbWVudHMgKi9cbiJdfQ==
 
/***/ }),
/* 686 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = normalizeViewportProps;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__web_mercator_viewport__ = __webpack_require__(81);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__math_utils__ = __webpack_require__(118);
 
 
 
// defined by mapbox-gl
var MAX_LATITUDE = 85.05113;
var MIN_LATITUDE = -85.05113;
 
// Apply mathematical constraints to viewport props
/* eslint-disable complexity */
function normalizeViewportProps(_ref) {
  var width = _ref.width,
      height = _ref.height,
      longitude = _ref.longitude,
      latitude = _ref.latitude,
      zoom = _ref.zoom,
      _ref$pitch = _ref.pitch,
      pitch = _ref$pitch === undefined ? 0 : _ref$pitch,
      _ref$bearing = _ref.bearing,
      bearing = _ref$bearing === undefined ? 0 : _ref$bearing;
 
  // Normalize degrees
  if (longitude < -180 || longitude > 180) {
    longitude = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__math_utils__["d" /* mod */])(longitude + 180, 360) - 180;
  }
  if (bearing < -180 || bearing > 180) {
    bearing = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__math_utils__["d" /* mod */])(bearing + 180, 360) - 180;
  }
 
  // Constrain zoom and shift center at low zoom levels
  var flatViewport = new __WEBPACK_IMPORTED_MODULE_0__web_mercator_viewport__["a" /* default */]({ width: width, height: height, longitude: longitude, latitude: latitude, zoom: zoom });
  var topY = flatViewport.project([longitude, MAX_LATITUDE])[1];
  var bottomY = flatViewport.project([longitude, MIN_LATITUDE])[1];
  var shiftY = 0;
 
  if (bottomY - topY < height) {
    // Map height must not be smaller than viewport height
    // Zoom out map to fit map height into viewport
    zoom += Math.log2(height / (bottomY - topY));
 
    // Calculate top and bottom using new zoom
    flatViewport = new __WEBPACK_IMPORTED_MODULE_0__web_mercator_viewport__["a" /* default */]({ width: width, height: height, longitude: longitude, latitude: latitude, zoom: zoom });
    topY = flatViewport.project([longitude, MAX_LATITUDE])[1];
    bottomY = flatViewport.project([longitude, MIN_LATITUDE])[1];
  }
  if (topY > 0) {
    // Compensate for white gap on top
    shiftY = topY;
  } else if (bottomY < height) {
    // Compensate for white gap on bottom
    shiftY = bottomY - height;
  }
  if (shiftY) {
    latitude = flatViewport.unproject([width / 2, height / 2 + shiftY])[1];
  }
 
  return { width: width, height: height, longitude: longitude, latitude: latitude, zoom: zoom, pitch: pitch, bearing: bearing };
}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9ub3JtYWxpemUtdmlld3BvcnQtcHJvcHMuanMiXSwibmFtZXMiOlsiV2ViTWVyY2F0b3JWaWV3cG9ydCIsIm1vZCIsIk1BWF9MQVRJVFVERSIsIk1JTl9MQVRJVFVERSIsIm5vcm1hbGl6ZVZpZXdwb3J0UHJvcHMiLCJ3aWR0aCIsImhlaWdodCIsImxvbmdpdHVkZSIsImxhdGl0dWRlIiwiem9vbSIsInBpdGNoIiwiYmVhcmluZyIsImZsYXRWaWV3cG9ydCIsInRvcFkiLCJwcm9qZWN0IiwiYm90dG9tWSIsInNoaWZ0WSIsIk1hdGgiLCJsb2cyIiwidW5wcm9qZWN0Il0sIm1hcHBpbmdzIjoiQUFBQSxPQUFPQSxtQkFBUCxNQUFnQyx5QkFBaEM7QUFDQSxTQUFRQyxHQUFSLFFBQW1CLGNBQW5COztBQUVBO0FBQ0EsSUFBTUMsZUFBZSxRQUFyQjtBQUNBLElBQU1DLGVBQWUsQ0FBQyxRQUF0Qjs7QUFFQTtBQUNBO0FBQ0EsZUFBZSxTQUFTQyxzQkFBVCxPQVFaO0FBQUEsTUFQREMsS0FPQyxRQVBEQSxLQU9DO0FBQUEsTUFOREMsTUFNQyxRQU5EQSxNQU1DO0FBQUEsTUFMREMsU0FLQyxRQUxEQSxTQUtDO0FBQUEsTUFKREMsUUFJQyxRQUpEQSxRQUlDO0FBQUEsTUFIREMsSUFHQyxRQUhEQSxJQUdDO0FBQUEsd0JBRkRDLEtBRUM7QUFBQSxNQUZEQSxLQUVDLDhCQUZPLENBRVA7QUFBQSwwQkFEREMsT0FDQztBQUFBLE1BRERBLE9BQ0MsZ0NBRFMsQ0FDVDs7QUFDRDtBQUNBLE1BQUlKLFlBQVksQ0FBQyxHQUFiLElBQW9CQSxZQUFZLEdBQXBDLEVBQXlDO0FBQ3ZDQSxnQkFBWU4sSUFBSU0sWUFBWSxHQUFoQixFQUFxQixHQUFyQixJQUE0QixHQUF4QztBQUNEO0FBQ0QsTUFBSUksVUFBVSxDQUFDLEdBQVgsSUFBa0JBLFVBQVUsR0FBaEMsRUFBcUM7QUFDbkNBLGNBQVVWLElBQUlVLFVBQVUsR0FBZCxFQUFtQixHQUFuQixJQUEwQixHQUFwQztBQUNEOztBQUVEO0FBQ0EsTUFBSUMsZUFBZSxJQUFJWixtQkFBSixDQUF3QixFQUFDSyxZQUFELEVBQVFDLGNBQVIsRUFBZ0JDLG9CQUFoQixFQUEyQkMsa0JBQTNCLEVBQXFDQyxVQUFyQyxFQUF4QixDQUFuQjtBQUNBLE1BQUlJLE9BQU9ELGFBQWFFLE9BQWIsQ0FBcUIsQ0FBQ1AsU0FBRCxFQUFZTCxZQUFaLENBQXJCLEVBQWdELENBQWhELENBQVg7QUFDQSxNQUFJYSxVQUFVSCxhQUFhRSxPQUFiLENBQXFCLENBQUNQLFNBQUQsRUFBWUosWUFBWixDQUFyQixFQUFnRCxDQUFoRCxDQUFkO0FBQ0EsTUFBSWEsU0FBUyxDQUFiOztBQUVBLE1BQUlELFVBQVVGLElBQVYsR0FBaUJQLE1BQXJCLEVBQTZCO0FBQzNCO0FBQ0E7QUFDQUcsWUFBUVEsS0FBS0MsSUFBTCxDQUFVWixVQUFVUyxVQUFVRixJQUFwQixDQUFWLENBQVI7O0FBRUE7QUFDQUQsbUJBQWUsSUFBSVosbUJBQUosQ0FBd0IsRUFBQ0ssWUFBRCxFQUFRQyxjQUFSLEVBQWdCQyxvQkFBaEIsRUFBMkJDLGtCQUEzQixFQUFxQ0MsVUFBckMsRUFBeEIsQ0FBZjtBQUNBSSxXQUFPRCxhQUFhRSxPQUFiLENBQXFCLENBQUNQLFNBQUQsRUFBWUwsWUFBWixDQUFyQixFQUFnRCxDQUFoRCxDQUFQO0FBQ0FhLGNBQVVILGFBQWFFLE9BQWIsQ0FBcUIsQ0FBQ1AsU0FBRCxFQUFZSixZQUFaLENBQXJCLEVBQWdELENBQWhELENBQVY7QUFDRDtBQUNELE1BQUlVLE9BQU8sQ0FBWCxFQUFjO0FBQ1o7QUFDQUcsYUFBU0gsSUFBVDtBQUNELEdBSEQsTUFHTyxJQUFJRSxVQUFVVCxNQUFkLEVBQXNCO0FBQzNCO0FBQ0FVLGFBQVNELFVBQVVULE1BQW5CO0FBQ0Q7QUFDRCxNQUFJVSxNQUFKLEVBQVk7QUFDVlIsZUFBV0ksYUFBYU8sU0FBYixDQUF1QixDQUFDZCxRQUFRLENBQVQsRUFBWUMsU0FBUyxDQUFULEdBQWFVLE1BQXpCLENBQXZCLEVBQXlELENBQXpELENBQVg7QUFDRDs7QUFFRCxTQUFPLEVBQUNYLFlBQUQsRUFBUUMsY0FBUixFQUFnQkMsb0JBQWhCLEVBQTJCQyxrQkFBM0IsRUFBcUNDLFVBQXJDLEVBQTJDQyxZQUEzQyxFQUFrREMsZ0JBQWxELEVBQVA7QUFDRCIsImZpbGUiOiJub3JtYWxpemUtdmlld3BvcnQtcHJvcHMuanMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgV2ViTWVyY2F0b3JWaWV3cG9ydCBmcm9tICcuL3dlYi1tZXJjYXRvci12aWV3cG9ydCc7XG5pbXBvcnQge21vZH0gIGZyb20gJy4vbWF0aC11dGlscyc7XG5cbi8vIGRlZmluZWQgYnkgbWFwYm94LWdsXG5jb25zdCBNQVhfTEFUSVRVREUgPSA4NS4wNTExMztcbmNvbnN0IE1JTl9MQVRJVFVERSA9IC04NS4wNTExMztcblxuLy8gQXBwbHkgbWF0aGVtYXRpY2FsIGNvbnN0cmFpbnRzIHRvIHZpZXdwb3J0IHByb3BzXG4vKiBlc2xpbnQtZGlzYWJsZSBjb21wbGV4aXR5ICovXG5leHBvcnQgZGVmYXVsdCBmdW5jdGlvbiBub3JtYWxpemVWaWV3cG9ydFByb3BzKHtcbiAgd2lkdGgsXG4gIGhlaWdodCxcbiAgbG9uZ2l0dWRlLFxuICBsYXRpdHVkZSxcbiAgem9vbSxcbiAgcGl0Y2ggPSAwLFxuICBiZWFyaW5nID0gMFxufSkge1xuICAvLyBOb3JtYWxpemUgZGVncmVlc1xuICBpZiAobG9uZ2l0dWRlIDwgLTE4MCB8fCBsb25naXR1ZGUgPiAxODApIHtcbiAgICBsb25naXR1ZGUgPSBtb2QobG9uZ2l0dWRlICsgMTgwLCAzNjApIC0gMTgwO1xuICB9XG4gIGlmIChiZWFyaW5nIDwgLTE4MCB8fCBiZWFyaW5nID4gMTgwKSB7XG4gICAgYmVhcmluZyA9IG1vZChiZWFyaW5nICsgMTgwLCAzNjApIC0gMTgwO1xuICB9XG5cbiAgLy8gQ29uc3RyYWluIHpvb20gYW5kIHNoaWZ0IGNlbnRlciBhdCBsb3cgem9vbSBsZXZlbHNcbiAgbGV0IGZsYXRWaWV3cG9ydCA9IG5ldyBXZWJNZXJjYXRvclZpZXdwb3J0KHt3aWR0aCwgaGVpZ2h0LCBsb25naXR1ZGUsIGxhdGl0dWRlLCB6b29tfSk7XG4gIGxldCB0b3BZID0gZmxhdFZpZXdwb3J0LnByb2plY3QoW2xvbmdpdHVkZSwgTUFYX0xBVElUVURFXSlbMV07XG4gIGxldCBib3R0b21ZID0gZmxhdFZpZXdwb3J0LnByb2plY3QoW2xvbmdpdHVkZSwgTUlOX0xBVElUVURFXSlbMV07XG4gIGxldCBzaGlmdFkgPSAwO1xuXG4gIGlmIChib3R0b21ZIC0gdG9wWSA8IGhlaWdodCkge1xuICAgIC8vIE1hcCBoZWlnaHQgbXVzdCBub3QgYmUgc21hbGxlciB0aGFuIHZpZXdwb3J0IGhlaWdodFxuICAgIC8vIFpvb20gb3V0IG1hcCB0byBmaXQgbWFwIGhlaWdodCBpbnRvIHZpZXdwb3J0XG4gICAgem9vbSArPSBNYXRoLmxvZzIoaGVpZ2h0IC8gKGJvdHRvbVkgLSB0b3BZKSk7XG5cbiAgICAvLyBDYWxjdWxhdGUgdG9wIGFuZCBib3R0b20gdXNpbmcgbmV3IHpvb21cbiAgICBmbGF0Vmlld3BvcnQgPSBuZXcgV2ViTWVyY2F0b3JWaWV3cG9ydCh7d2lkdGgsIGhlaWdodCwgbG9uZ2l0dWRlLCBsYXRpdHVkZSwgem9vbX0pO1xuICAgIHRvcFkgPSBmbGF0Vmlld3BvcnQucHJvamVjdChbbG9uZ2l0dWRlLCBNQVhfTEFUSVRVREVdKVsxXTtcbiAgICBib3R0b21ZID0gZmxhdFZpZXdwb3J0LnByb2plY3QoW2xvbmdpdHVkZSwgTUlOX0xBVElUVURFXSlbMV07XG4gIH1cbiAgaWYgKHRvcFkgPiAwKSB7XG4gICAgLy8gQ29tcGVuc2F0ZSBmb3Igd2hpdGUgZ2FwIG9uIHRvcFxuICAgIHNoaWZ0WSA9IHRvcFk7XG4gIH0gZWxzZSBpZiAoYm90dG9tWSA8IGhlaWdodCkge1xuICAgIC8vIENvbXBlbnNhdGUgZm9yIHdoaXRlIGdhcCBvbiBib3R0b21cbiAgICBzaGlmdFkgPSBib3R0b21ZIC0gaGVpZ2h0O1xuICB9XG4gIGlmIChzaGlmdFkpIHtcbiAgICBsYXRpdHVkZSA9IGZsYXRWaWV3cG9ydC51bnByb2plY3QoW3dpZHRoIC8gMiwgaGVpZ2h0IC8gMiArIHNoaWZ0WV0pWzFdO1xuICB9XG5cbiAgcmV0dXJuIHt3aWR0aCwgaGVpZ2h0LCBsb25naXR1ZGUsIGxhdGl0dWRlLCB6b29tLCBwaXRjaCwgYmVhcmluZ307XG59XG4iXX0=
 
/***/ }),
/* 687 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_math_gl__ = __webpack_require__(16);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__math_utils__ = __webpack_require__(118);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__web_mercator_utils__ = __webpack_require__(80);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_gl_mat4_scale__ = __webpack_require__(77);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_gl_mat4_scale___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_gl_mat4_scale__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_gl_mat4_translate__ = __webpack_require__(78);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_gl_mat4_translate___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_gl_mat4_translate__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_gl_mat4_multiply__ = __webpack_require__(75);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_gl_mat4_multiply___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_gl_mat4_multiply__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_gl_mat4_invert__ = __webpack_require__(156);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_gl_mat4_invert___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_gl_mat4_invert__);
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
 
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
 
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
 
// View and Projection Matrix management
 
/* eslint-disable camelcase */
 
 
 
 
 
 
 
 
 
var IDENTITY = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__math_utils__["a" /* createMat4 */])();
 
var Viewport = function () {
  /**
   * @classdesc
   * Manages coordinate system transformations for deck.gl.
   *
   * Note: The Viewport is immutable in the sense that it only has accessors.
   * A new viewport instance should be created if any parameters have changed.
   *
   * @class
   * @param {Object} opt - options
   * @param {Boolean} mercator=true - Whether to use mercator projection
   *
   * @param {Number} opt.width=1 - Width of "viewport" or window
   * @param {Number} opt.height=1 - Height of "viewport" or window
   * @param {Array} opt.center=[0, 0] - Center of viewport
   *   [longitude, latitude] or [x, y]
   * @param {Number} opt.scale=1 - Either use scale or zoom
   * @param {Number} opt.pitch=0 - Camera angle in degrees (0 is straight down)
   * @param {Number} opt.bearing=0 - Map rotation in degrees (0 means north is up)
   * @param {Number} opt.altitude= - Altitude of camera in screen units
   *
   * Web mercator projection short-hand parameters
   * @param {Number} opt.latitude - Center of viewport on map (alternative to opt.center)
   * @param {Number} opt.longitude - Center of viewport on map (alternative to opt.center)
   * @param {Number} opt.zoom - Scale = Math.pow(2,zoom) on map (alternative to opt.scale)
   */
  /* eslint-disable complexity */
  function Viewport() {
    var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
        width = _ref.width,
        height = _ref.height,
        _ref$viewMatrix = _ref.viewMatrix,
        viewMatrix = _ref$viewMatrix === undefined ? IDENTITY : _ref$viewMatrix,
        _ref$projectionMatrix = _ref.projectionMatrix,
        //iclient
        isGeographicCoordinateSystem=_ref.isGeographicCoordinateSystem,
        projectionMatrix = _ref$projectionMatrix === undefined ? IDENTITY : _ref$projectionMatrix;
 
    _classCallCheck(this, Viewport);
 
    // Silently allow apps to send in 0,0
    this.width = width || 1;
    this.height = height || 1;
    this.scale = 1;
 
    this.viewMatrix = viewMatrix;
    this.projectionMatrix = projectionMatrix;
    this.isGeographicCoordinateSystem = isGeographicCoordinateSystem;
 
    // Note: As usual, matrix operations should be applied in "reverse" order
    // since vectors will be multiplied in from the right during transformation
    var vpm = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__math_utils__["a" /* createMat4 */])();
    __WEBPACK_IMPORTED_MODULE_5_gl_mat4_multiply___default()(vpm, vpm, this.projectionMatrix);
    __WEBPACK_IMPORTED_MODULE_5_gl_mat4_multiply___default()(vpm, vpm, this.viewMatrix);
    this.viewProjectionMatrix = vpm;
 
    // Calculate matrices and scales needed for projection
    /**
     * Builds matrices that converts preprojected lngLats to screen pixels
     * and vice versa.
     * Note: Currently returns bottom-left coordinates!
     * Note: Starts with the GL projection matrix and adds steps to the
     *       scale and translate that matrix onto the window.
     * Note: WebGL controls clip space to screen projection with gl.viewport
     *       and does not need this step.
     */
    var m = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__math_utils__["a" /* createMat4 */])();
 
    // matrix for conversion from location to screen coordinates
    __WEBPACK_IMPORTED_MODULE_3_gl_mat4_scale___default()(m, m, [this.width / 2, -this.height / 2, 1]);
    __WEBPACK_IMPORTED_MODULE_4_gl_mat4_translate___default()(m, m, [1, -1, 0]);
 
    __WEBPACK_IMPORTED_MODULE_5_gl_mat4_multiply___default()(m, m, this.viewProjectionMatrix);
 
    var mInverse = __WEBPACK_IMPORTED_MODULE_6_gl_mat4_invert___default()(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__math_utils__["a" /* createMat4 */])(), m);
    if (!mInverse) {
      throw new Error('Pixel project matrix not invertible');
    }
 
    this.pixelProjectionMatrix = m;
    this.pixelUnprojectionMatrix = mInverse;
 
    // Bind methods for easy access
    this.equals = this.equals.bind(this);
    this.project = this.project.bind(this);
    this.unproject = this.unproject.bind(this);
    this.projectFlat = this.projectFlat.bind(this);
    this.unprojectFlat = this.unprojectFlat.bind(this);
  }
  /* eslint-enable complexity */
 
  // Two viewports are equal if width and height are identical, and if
  // their view and projection matrices are (approximately) equal.
 
 
  _createClass(Viewport, [{
    key: 'equals',
    value: function equals(viewport) {
      if (!(viewport instanceof Viewport)) {
        return false;
      }
 
      return viewport.width === this.width && viewport.height === this.height && __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0_math_gl__["equals"])(viewport.projectionMatrix, this.projectionMatrix) && __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0_math_gl__["equals"])(viewport.viewMatrix, this.viewMatrix);
    }
 
    /**
     * Projects xyz (possibly latitude and longitude) to pixel coordinates in window
     * using viewport projection parameters
     * - [longitude, latitude] to [x, y]
     * - [longitude, latitude, Z] => [x, y, z]
     * Note: By default, returns top-left coordinates for canvas/SVG type render
     *
     * @param {Array} lngLatZ - [lng, lat] or [lng, lat, Z]
     * @param {Object} opts - options
     * @param {Object} opts.topLeft=true - Whether projected coords are top left
     * @return {Array} - screen coordinates [x, y] or [x, y, z], z as pixel depth
     */
 
  }, {
    key: 'project',
    value: function project(xyz) {
      debugger
      var _ref2 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
          _ref2$topLeft = _ref2.topLeft,
          topLeft = _ref2$topLeft === undefined ? true : _ref2$topLeft;
 
      var _xyz = _slicedToArray(xyz, 3),
          x0 = _xyz[0],
          y0 = _xyz[1],
          z0 = _xyz[2];
 
      var _projectFlat = this.projectFlat([x0, y0]),
          _projectFlat2 = _slicedToArray(_projectFlat, 2),
          X = _projectFlat2[0],
          Y = _projectFlat2[1];
 
      var coord = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__web_mercator_utils__["c" /* worldToPixels */])([X, Y, z0], this.pixelProjectionMatrix);
 
      var _coord = _slicedToArray(coord, 2),
          x = _coord[0],
          y = _coord[1];
 
      var y2 = topLeft ? y : this.height - y;
      return xyz.length === 2 ? [x, y2] : [x, y2, coord[2]];
    }
 
    /**
     * Unproject pixel coordinates on screen onto world coordinates,
     * (possibly [lon, lat]) on map.
     * - [x, y] => [lng, lat]
     * - [x, y, z] => [lng, lat, Z]
     * @param {Array} xyz - screen coordinates, z as pixel depth
     * @param {Object} opts - options
     * @param {Object} opts.topLeft=true - Whether projected coords are top left
     * @param {Object} opts.targetZ=0 - If pixel depth is unknown, targetZ is used as
     *   the elevation plane to unproject onto
     * @return {Array} - [lng, lat, Z] or [X, Y, Z]
     */
 
  }, {
    key: 'unproject',
    value: function unproject(xyz) {
      debugger
      var _ref3 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
          _ref3$topLeft = _ref3.topLeft,
          topLeft = _ref3$topLeft === undefined ? true : _ref3$topLeft,
          targetZ = _ref3.targetZ;
 
      var _xyz2 = _slicedToArray(xyz, 3),
          x = _xyz2[0],
          y = _xyz2[1],
          z = _xyz2[2];
 
      var y2 = topLeft ? y : this.height - y;
      var coord = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__web_mercator_utils__["d" /* pixelsToWorld */])([x, y2, z], this.pixelUnprojectionMatrix, targetZ);
 
      var _unprojectFlat = this.unprojectFlat(coord),
          _unprojectFlat2 = _slicedToArray(_unprojectFlat, 2),
          X = _unprojectFlat2[0],
          Y = _unprojectFlat2[1];
 
      if (Number.isFinite(z)) {
        // Has depth component
        return [X, Y, coord[2]];
      }
 
      return Number.isFinite(targetZ) ? [X, Y, targetZ] : [X, Y];
    }
 
    // NON_LINEAR PROJECTION HOOKS
    // Used for web meractor projection
 
    /**
     * Project map coordinates to world coordinates.
     * This should be overridden by each viewport that implements a specific
     * geographic projection.
     * @param {Array} xyz - map coordinates
     * @return {Array} [x,y,z] world coordinates.
     */
 
  }, {
    key: 'projectFlat',
    value: function projectFlat(xyz) {
      var scale = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.scale;
 
      return xyz;
    }
 
    /**
     * Project world coordinates to map coordinates.
     * This should be overridden by each viewport that implements a specific
     * geographic projection.
     * @param {Array} xyz - world coordinates
     * @return {Array} [x,y,z] map coordinates.
     */
 
  }, {
    key: 'unprojectFlat',
    value: function unprojectFlat(xyz) {
      var scale = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.scale;
 
      return xyz;
    }
  }]);
 
  return Viewport;
}();
 
/* harmony default export */ __webpack_exports__["a"] = (Viewport);
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy92aWV3cG9ydC5qcyJdLCJuYW1lcyI6WyJlcXVhbHMiLCJjcmVhdGVNYXQ0Iiwid29ybGRUb1BpeGVscyIsInBpeGVsc1RvV29ybGQiLCJtYXQ0X3NjYWxlIiwibWF0NF90cmFuc2xhdGUiLCJtYXQ0X211bHRpcGx5IiwibWF0NF9pbnZlcnQiLCJJREVOVElUWSIsIlZpZXdwb3J0Iiwid2lkdGgiLCJoZWlnaHQiLCJ2aWV3TWF0cml4IiwicHJvamVjdGlvbk1hdHJpeCIsInNjYWxlIiwidnBtIiwidmlld1Byb2plY3Rpb25NYXRyaXgiLCJtIiwibUludmVyc2UiLCJFcnJvciIsInBpeGVsUHJvamVjdGlvbk1hdHJpeCIsInBpeGVsVW5wcm9qZWN0aW9uTWF0cml4IiwiYmluZCIsInByb2plY3QiLCJ1bnByb2plY3QiLCJwcm9qZWN0RmxhdCIsInVucHJvamVjdEZsYXQiLCJ2aWV3cG9ydCIsInh5eiIsInRvcExlZnQiLCJ4MCIsInkwIiwiejAiLCJYIiwiWSIsImNvb3JkIiwieCIsInkiLCJ5MiIsImxlbmd0aCIsInRhcmdldFoiLCJ6IiwiTnVtYmVyIiwiaXNGaW5pdGUiXSwibWFwcGluZ3MiOiI7Ozs7OztBQUFBOztBQUVBO0FBQ0EsU0FBUUEsaUJBQVIsUUFBcUIsU0FBckI7QUFDQSxTQUFRQyxVQUFSLFFBQXlCLGNBQXpCO0FBQ0EsU0FBUUMsYUFBUixFQUF1QkMsYUFBdkIsUUFBMkMsc0JBQTNDOztBQUVBLE9BQU9DLFVBQVAsTUFBdUIsZUFBdkI7QUFDQSxPQUFPQyxjQUFQLE1BQTJCLG1CQUEzQjtBQUNBLE9BQU9DLGFBQVAsTUFBMEIsa0JBQTFCO0FBQ0EsT0FBT0MsV0FBUCxNQUF3QixnQkFBeEI7O0FBRUEsSUFBTUMsV0FBV1AsWUFBakI7O0lBRXFCUSxRO0FBQ25COzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBeUJBO0FBQ0Esc0JBT1E7QUFBQSxtRkFBSixFQUFJO0FBQUEsUUFMTkMsS0FLTSxRQUxOQSxLQUtNO0FBQUEsUUFKTkMsTUFJTSxRQUpOQSxNQUlNO0FBQUEsK0JBRk5DLFVBRU07QUFBQSxRQUZOQSxVQUVNLG1DQUZPSixRQUVQO0FBQUEscUNBRE5LLGdCQUNNO0FBQUEsUUFETkEsZ0JBQ00seUNBRGFMLFFBQ2I7O0FBQUE7O0FBQ047QUFDQSxTQUFLRSxLQUFMLEdBQWFBLFNBQVMsQ0FBdEI7QUFDQSxTQUFLQyxNQUFMLEdBQWNBLFVBQVUsQ0FBeEI7QUFDQSxTQUFLRyxLQUFMLEdBQWEsQ0FBYjs7QUFFQSxTQUFLRixVQUFMLEdBQWtCQSxVQUFsQjtBQUNBLFNBQUtDLGdCQUFMLEdBQXdCQSxnQkFBeEI7O0FBRUE7QUFDQTtBQUNBLFFBQU1FLE1BQU1kLFlBQVo7QUFDQUssa0JBQWNTLEdBQWQsRUFBbUJBLEdBQW5CLEVBQXdCLEtBQUtGLGdCQUE3QjtBQUNBUCxrQkFBY1MsR0FBZCxFQUFtQkEsR0FBbkIsRUFBd0IsS0FBS0gsVUFBN0I7QUFDQSxTQUFLSSxvQkFBTCxHQUE0QkQsR0FBNUI7O0FBRUE7QUFDQTs7Ozs7Ozs7O0FBU0EsUUFBTUUsSUFBSWhCLFlBQVY7O0FBRUE7QUFDQUcsZUFBV2EsQ0FBWCxFQUFjQSxDQUFkLEVBQWlCLENBQUMsS0FBS1AsS0FBTCxHQUFhLENBQWQsRUFBaUIsQ0FBQyxLQUFLQyxNQUFOLEdBQWUsQ0FBaEMsRUFBbUMsQ0FBbkMsQ0FBakI7QUFDQU4sbUJBQWVZLENBQWYsRUFBa0JBLENBQWxCLEVBQXFCLENBQUMsQ0FBRCxFQUFJLENBQUMsQ0FBTCxFQUFRLENBQVIsQ0FBckI7O0FBRUFYLGtCQUFjVyxDQUFkLEVBQWlCQSxDQUFqQixFQUFvQixLQUFLRCxvQkFBekI7O0FBRUEsUUFBTUUsV0FBV1gsWUFBWU4sWUFBWixFQUEwQmdCLENBQTFCLENBQWpCO0FBQ0EsUUFBSSxDQUFDQyxRQUFMLEVBQWU7QUFDYixZQUFNLElBQUlDLEtBQUosQ0FBVSxxQ0FBVixDQUFOO0FBQ0Q7O0FBRUQsU0FBS0MscUJBQUwsR0FBNkJILENBQTdCO0FBQ0EsU0FBS0ksdUJBQUwsR0FBK0JILFFBQS9COztBQUVBO0FBQ0EsU0FBS2xCLE1BQUwsR0FBYyxLQUFLQSxNQUFMLENBQVlzQixJQUFaLENBQWlCLElBQWpCLENBQWQ7QUFDQSxTQUFLQyxPQUFMLEdBQWUsS0FBS0EsT0FBTCxDQUFhRCxJQUFiLENBQWtCLElBQWxCLENBQWY7QUFDQSxTQUFLRSxTQUFMLEdBQWlCLEtBQUtBLFNBQUwsQ0FBZUYsSUFBZixDQUFvQixJQUFwQixDQUFqQjtBQUNBLFNBQUtHLFdBQUwsR0FBbUIsS0FBS0EsV0FBTCxDQUFpQkgsSUFBakIsQ0FBc0IsSUFBdEIsQ0FBbkI7QUFDQSxTQUFLSSxhQUFMLEdBQXFCLEtBQUtBLGFBQUwsQ0FBbUJKLElBQW5CLENBQXdCLElBQXhCLENBQXJCO0FBQ0Q7QUFDRDs7QUFFQTtBQUNBOzs7OzsyQkFDT0ssUSxFQUFVO0FBQ2YsVUFBSSxFQUFFQSxvQkFBb0JsQixRQUF0QixDQUFKLEVBQXFDO0FBQ25DLGVBQU8sS0FBUDtBQUNEOztBQUVELGFBQU9rQixTQUFTakIsS0FBVCxLQUFtQixLQUFLQSxLQUF4QixJQUNMaUIsU0FBU2hCLE1BQVQsS0FBb0IsS0FBS0EsTUFEcEIsSUFFTFgsUUFBTzJCLFNBQVNkLGdCQUFoQixFQUFrQyxLQUFLQSxnQkFBdkMsQ0FGSyxJQUdMYixRQUFPMkIsU0FBU2YsVUFBaEIsRUFBNEIsS0FBS0EsVUFBakMsQ0FIRjtBQUlEOztBQUVEOzs7Ozs7Ozs7Ozs7Ozs7NEJBWVFnQixHLEVBQTRCO0FBQUEsc0ZBQUosRUFBSTtBQUFBLGdDQUF0QkMsT0FBc0I7QUFBQSxVQUF0QkEsT0FBc0IsaUNBQVosSUFBWTs7QUFBQSxnQ0FDYkQsR0FEYTtBQUFBLFVBQzNCRSxFQUQyQjtBQUFBLFVBQ3ZCQyxFQUR1QjtBQUFBLFVBQ25CQyxFQURtQjs7QUFBQSx5QkFHbkIsS0FBS1AsV0FBTCxDQUFpQixDQUFDSyxFQUFELEVBQUtDLEVBQUwsQ0FBakIsQ0FIbUI7QUFBQTtBQUFBLFVBRzNCRSxDQUgyQjtBQUFBLFVBR3hCQyxDQUh3Qjs7QUFJbEMsVUFBTUMsUUFBUWpDLGNBQWMsQ0FBQytCLENBQUQsRUFBSUMsQ0FBSixFQUFPRixFQUFQLENBQWQsRUFBMEIsS0FBS1oscUJBQS9CLENBQWQ7O0FBSmtDLGtDQU1uQmUsS0FObUI7QUFBQSxVQU0zQkMsQ0FOMkI7QUFBQSxVQU14QkMsQ0FOd0I7O0FBT2xDLFVBQU1DLEtBQUtULFVBQVVRLENBQVYsR0FBYyxLQUFLMUIsTUFBTCxHQUFjMEIsQ0FBdkM7QUFDQSxhQUFPVCxJQUFJVyxNQUFKLEtBQWUsQ0FBZixHQUFtQixDQUFDSCxDQUFELEVBQUlFLEVBQUosQ0FBbkIsR0FBNkIsQ0FBQ0YsQ0FBRCxFQUFJRSxFQUFKLEVBQVFILE1BQU0sQ0FBTixDQUFSLENBQXBDO0FBQ0Q7O0FBRUQ7Ozs7Ozs7Ozs7Ozs7Ozs4QkFZVVAsRyxFQUFxQztBQUFBLHNGQUFKLEVBQUk7QUFBQSxnQ0FBL0JDLE9BQStCO0FBQUEsVUFBL0JBLE9BQStCLGlDQUFyQixJQUFxQjtBQUFBLFVBQWZXLE9BQWUsU0FBZkEsT0FBZTs7QUFBQSxpQ0FDM0JaLEdBRDJCO0FBQUEsVUFDdENRLENBRHNDO0FBQUEsVUFDbkNDLENBRG1DO0FBQUEsVUFDaENJLENBRGdDOztBQUc3QyxVQUFNSCxLQUFLVCxVQUFVUSxDQUFWLEdBQWMsS0FBSzFCLE1BQUwsR0FBYzBCLENBQXZDO0FBQ0EsVUFBTUYsUUFBUWhDLGNBQWMsQ0FBQ2lDLENBQUQsRUFBSUUsRUFBSixFQUFRRyxDQUFSLENBQWQsRUFBMEIsS0FBS3BCLHVCQUEvQixFQUF3RG1CLE9BQXhELENBQWQ7O0FBSjZDLDJCQUs5QixLQUFLZCxhQUFMLENBQW1CUyxLQUFuQixDQUw4QjtBQUFBO0FBQUEsVUFLdENGLENBTHNDO0FBQUEsVUFLbkNDLENBTG1DOztBQU83QyxVQUFJUSxPQUFPQyxRQUFQLENBQWdCRixDQUFoQixDQUFKLEVBQXdCO0FBQ3RCO0FBQ0EsZUFBTyxDQUFDUixDQUFELEVBQUlDLENBQUosRUFBT0MsTUFBTSxDQUFOLENBQVAsQ0FBUDtBQUNEOztBQUVELGFBQU9PLE9BQU9DLFFBQVAsQ0FBZ0JILE9BQWhCLElBQTJCLENBQUNQLENBQUQsRUFBSUMsQ0FBSixFQUFPTSxPQUFQLENBQTNCLEdBQTZDLENBQUNQLENBQUQsRUFBSUMsQ0FBSixDQUFwRDtBQUNEOztBQUVEO0FBQ0E7O0FBRUE7Ozs7Ozs7Ozs7Z0NBT1lOLEcsRUFBeUI7QUFBQSxVQUFwQmQsS0FBb0IsdUVBQVosS0FBS0EsS0FBTzs7QUFDbkMsYUFBT2MsR0FBUDtBQUNEOztBQUVEOzs7Ozs7Ozs7O2tDQU9jQSxHLEVBQXlCO0FBQUEsVUFBcEJkLEtBQW9CLHVFQUFaLEtBQUtBLEtBQU87O0FBQ3JDLGFBQU9jLEdBQVA7QUFDRDs7Ozs7O2VBM0trQm5CLFEiLCJmaWxlIjoidmlld3BvcnQuanMiLCJzb3VyY2VzQ29udGVudCI6WyIvLyBWaWV3IGFuZCBQcm9qZWN0aW9uIE1hdHJpeCBtYW5hZ2VtZW50XG5cbi8qIGVzbGludC1kaXNhYmxlIGNhbWVsY2FzZSAqL1xuaW1wb3J0IHtlcXVhbHN9IGZyb20gJ21hdGguZ2wnO1xuaW1wb3J0IHtjcmVhdGVNYXQ0fSBmcm9tICcuL21hdGgtdXRpbHMnO1xuaW1wb3J0IHt3b3JsZFRvUGl4ZWxzLCBwaXhlbHNUb1dvcmxkfSBmcm9tICcuL3dlYi1tZXJjYXRvci11dGlscyc7XG5cbmltcG9ydCBtYXQ0X3NjYWxlIGZyb20gJ2dsLW1hdDQvc2NhbGUnO1xuaW1wb3J0IG1hdDRfdHJhbnNsYXRlIGZyb20gJ2dsLW1hdDQvdHJhbnNsYXRlJztcbmltcG9ydCBtYXQ0X211bHRpcGx5IGZyb20gJ2dsLW1hdDQvbXVsdGlwbHknO1xuaW1wb3J0IG1hdDRfaW52ZXJ0IGZyb20gJ2dsLW1hdDQvaW52ZXJ0JztcblxuY29uc3QgSURFTlRJVFkgPSBjcmVhdGVNYXQ0KCk7XG5cbmV4cG9ydCBkZWZhdWx0IGNsYXNzIFZpZXdwb3J0IHtcbiAgLyoqXG4gICAqIEBjbGFzc2Rlc2NcbiAgICogTWFuYWdlcyBjb29yZGluYXRlIHN5c3RlbSB0cmFuc2Zvcm1hdGlvbnMgZm9yIGRlY2suZ2wuXG4gICAqXG4gICAqIE5vdGU6IFRoZSBWaWV3cG9ydCBpcyBpbW11dGFibGUgaW4gdGhlIHNlbnNlIHRoYXQgaXQgb25seSBoYXMgYWNjZXNzb3JzLlxuICAgKiBBIG5ldyB2aWV3cG9ydCBpbnN0YW5jZSBzaG91bGQgYmUgY3JlYXRlZCBpZiBhbnkgcGFyYW1ldGVycyBoYXZlIGNoYW5nZWQuXG4gICAqXG4gICAqIEBjbGFzc1xuICAgKiBAcGFyYW0ge09iamVjdH0gb3B0IC0gb3B0aW9uc1xuICAgKiBAcGFyYW0ge0Jvb2xlYW59IG1lcmNhdG9yPXRydWUgLSBXaGV0aGVyIHRvIHVzZSBtZXJjYXRvciBwcm9qZWN0aW9uXG4gICAqXG4gICAqIEBwYXJhbSB7TnVtYmVyfSBvcHQud2lkdGg9MSAtIFdpZHRoIG9mIFwidmlld3BvcnRcIiBvciB3aW5kb3dcbiAgICogQHBhcmFtIHtOdW1iZXJ9IG9wdC5oZWlnaHQ9MSAtIEhlaWdodCBvZiBcInZpZXdwb3J0XCIgb3Igd2luZG93XG4gICAqIEBwYXJhbSB7QXJyYXl9IG9wdC5jZW50ZXI9WzAsIDBdIC0gQ2VudGVyIG9mIHZpZXdwb3J0XG4gICAqICAgW2xvbmdpdHVkZSwgbGF0aXR1ZGVdIG9yIFt4LCB5XVxuICAgKiBAcGFyYW0ge051bWJlcn0gb3B0LnNjYWxlPTEgLSBFaXRoZXIgdXNlIHNjYWxlIG9yIHpvb21cbiAgICogQHBhcmFtIHtOdW1iZXJ9IG9wdC5waXRjaD0wIC0gQ2FtZXJhIGFuZ2xlIGluIGRlZ3JlZXMgKDAgaXMgc3RyYWlnaHQgZG93bilcbiAgICogQHBhcmFtIHtOdW1iZXJ9IG9wdC5iZWFyaW5nPTAgLSBNYXAgcm90YXRpb24gaW4gZGVncmVlcyAoMCBtZWFucyBub3J0aCBpcyB1cClcbiAgICogQHBhcmFtIHtOdW1iZXJ9IG9wdC5hbHRpdHVkZT0gLSBBbHRpdHVkZSBvZiBjYW1lcmEgaW4gc2NyZWVuIHVuaXRzXG4gICAqXG4gICAqIFdlYiBtZXJjYXRvciBwcm9qZWN0aW9uIHNob3J0LWhhbmQgcGFyYW1ldGVyc1xuICAgKiBAcGFyYW0ge051bWJlcn0gb3B0LmxhdGl0dWRlIC0gQ2VudGVyIG9mIHZpZXdwb3J0IG9uIG1hcCAoYWx0ZXJuYXRpdmUgdG8gb3B0LmNlbnRlcilcbiAgICogQHBhcmFtIHtOdW1iZXJ9IG9wdC5sb25naXR1ZGUgLSBDZW50ZXIgb2Ygdmlld3BvcnQgb24gbWFwIChhbHRlcm5hdGl2ZSB0byBvcHQuY2VudGVyKVxuICAgKiBAcGFyYW0ge051bWJlcn0gb3B0Lnpvb20gLSBTY2FsZSA9IE1hdGgucG93KDIsem9vbSkgb24gbWFwIChhbHRlcm5hdGl2ZSB0byBvcHQuc2NhbGUpXG4gICAqL1xuICAvKiBlc2xpbnQtZGlzYWJsZSBjb21wbGV4aXR5ICovXG4gIGNvbnN0cnVjdG9yKHtcbiAgICAvLyBXaW5kb3cgd2lkdGgvaGVpZ2h0IGluIHBpeGVscyAoZm9yIHBpeGVsIHByb2plY3Rpb24pXG4gICAgd2lkdGgsXG4gICAgaGVpZ2h0LFxuICAgIC8vIERlc2NcbiAgICB2aWV3TWF0cml4ID0gSURFTlRJVFksXG4gICAgcHJvamVjdGlvbk1hdHJpeCA9IElERU5USVRZXG4gIH0gPSB7fSkge1xuICAgIC8vIFNpbGVudGx5IGFsbG93IGFwcHMgdG8gc2VuZCBpbiAwLDBcbiAgICB0aGlzLndpZHRoID0gd2lkdGggfHwgMTtcbiAgICB0aGlzLmhlaWdodCA9IGhlaWdodCB8fCAxO1xuICAgIHRoaXMuc2NhbGUgPSAxO1xuXG4gICAgdGhpcy52aWV3TWF0cml4ID0gdmlld01hdHJpeDtcbiAgICB0aGlzLnByb2plY3Rpb25NYXRyaXggPSBwcm9qZWN0aW9uTWF0cml4O1xuXG4gICAgLy8gTm90ZTogQXMgdXN1YWwsIG1hdHJpeCBvcGVyYXRpb25zIHNob3VsZCBiZSBhcHBsaWVkIGluIFwicmV2ZXJzZVwiIG9yZGVyXG4gICAgLy8gc2luY2UgdmVjdG9ycyB3aWxsIGJlIG11bHRpcGxpZWQgaW4gZnJvbSB0aGUgcmlnaHQgZHVyaW5nIHRyYW5zZm9ybWF0aW9uXG4gICAgY29uc3QgdnBtID0gY3JlYXRlTWF0NCgpO1xuICAgIG1hdDRfbXVsdGlwbHkodnBtLCB2cG0sIHRoaXMucHJvamVjdGlvbk1hdHJpeCk7XG4gICAgbWF0NF9tdWx0aXBseSh2cG0sIHZwbSwgdGhpcy52aWV3TWF0cml4KTtcbiAgICB0aGlzLnZpZXdQcm9qZWN0aW9uTWF0cml4ID0gdnBtO1xuXG4gICAgLy8gQ2FsY3VsYXRlIG1hdHJpY2VzIGFuZCBzY2FsZXMgbmVlZGVkIGZvciBwcm9qZWN0aW9uXG4gICAgLyoqXG4gICAgICogQnVpbGRzIG1hdHJpY2VzIHRoYXQgY29udmVydHMgcHJlcHJvamVjdGVkIGxuZ0xhdHMgdG8gc2NyZWVuIHBpeGVsc1xuICAgICAqIGFuZCB2aWNlIHZlcnNhLlxuICAgICAqIE5vdGU6IEN1cnJlbnRseSByZXR1cm5zIGJvdHRvbS1sZWZ0IGNvb3JkaW5hdGVzIVxuICAgICAqIE5vdGU6IFN0YXJ0cyB3aXRoIHRoZSBHTCBwcm9qZWN0aW9uIG1hdHJpeCBhbmQgYWRkcyBzdGVwcyB0byB0aGVcbiAgICAgKiAgICAgICBzY2FsZSBhbmQgdHJhbnNsYXRlIHRoYXQgbWF0cml4IG9udG8gdGhlIHdpbmRvdy5cbiAgICAgKiBOb3RlOiBXZWJHTCBjb250cm9scyBjbGlwIHNwYWNlIHRvIHNjcmVlbiBwcm9qZWN0aW9uIHdpdGggZ2wudmlld3BvcnRcbiAgICAgKiAgICAgICBhbmQgZG9lcyBub3QgbmVlZCB0aGlzIHN0ZXAuXG4gICAgICovXG4gICAgY29uc3QgbSA9IGNyZWF0ZU1hdDQoKTtcblxuICAgIC8vIG1hdHJpeCBmb3IgY29udmVyc2lvbiBmcm9tIGxvY2F0aW9uIHRvIHNjcmVlbiBjb29yZGluYXRlc1xuICAgIG1hdDRfc2NhbGUobSwgbSwgW3RoaXMud2lkdGggLyAyLCAtdGhpcy5oZWlnaHQgLyAyLCAxXSk7XG4gICAgbWF0NF90cmFuc2xhdGUobSwgbSwgWzEsIC0xLCAwXSk7XG5cbiAgICBtYXQ0X211bHRpcGx5KG0sIG0sIHRoaXMudmlld1Byb2plY3Rpb25NYXRyaXgpO1xuXG4gICAgY29uc3QgbUludmVyc2UgPSBtYXQ0X2ludmVydChjcmVhdGVNYXQ0KCksIG0pO1xuICAgIGlmICghbUludmVyc2UpIHtcbiAgICAgIHRocm93IG5ldyBFcnJvcignUGl4ZWwgcHJvamVjdCBtYXRyaXggbm90IGludmVydGlibGUnKTtcbiAgICB9XG5cbiAgICB0aGlzLnBpeGVsUHJvamVjdGlvbk1hdHJpeCA9IG07XG4gICAgdGhpcy5waXhlbFVucHJvamVjdGlvbk1hdHJpeCA9IG1JbnZlcnNlO1xuXG4gICAgLy8gQmluZCBtZXRob2RzIGZvciBlYXN5IGFjY2Vzc1xuICAgIHRoaXMuZXF1YWxzID0gdGhpcy5lcXVhbHMuYmluZCh0aGlzKTtcbiAgICB0aGlzLnByb2plY3QgPSB0aGlzLnByb2plY3QuYmluZCh0aGlzKTtcbiAgICB0aGlzLnVucHJvamVjdCA9IHRoaXMudW5wcm9qZWN0LmJpbmQodGhpcyk7XG4gICAgdGhpcy5wcm9qZWN0RmxhdCA9IHRoaXMucHJvamVjdEZsYXQuYmluZCh0aGlzKTtcbiAgICB0aGlzLnVucHJvamVjdEZsYXQgPSB0aGlzLnVucHJvamVjdEZsYXQuYmluZCh0aGlzKTtcbiAgfVxuICAvKiBlc2xpbnQtZW5hYmxlIGNvbXBsZXhpdHkgKi9cblxuICAvLyBUd28gdmlld3BvcnRzIGFyZSBlcXVhbCBpZiB3aWR0aCBhbmQgaGVpZ2h0IGFyZSBpZGVudGljYWwsIGFuZCBpZlxuICAvLyB0aGVpciB2aWV3IGFuZCBwcm9qZWN0aW9uIG1hdHJpY2VzIGFyZSAoYXBwcm94aW1hdGVseSkgZXF1YWwuXG4gIGVxdWFscyh2aWV3cG9ydCkge1xuICAgIGlmICghKHZpZXdwb3J0IGluc3RhbmNlb2YgVmlld3BvcnQpKSB7XG4gICAgICByZXR1cm4gZmFsc2U7XG4gICAgfVxuXG4gICAgcmV0dXJuIHZpZXdwb3J0LndpZHRoID09PSB0aGlzLndpZHRoICYmXG4gICAgICB2aWV3cG9ydC5oZWlnaHQgPT09IHRoaXMuaGVpZ2h0ICYmXG4gICAgICBlcXVhbHModmlld3BvcnQucHJvamVjdGlvbk1hdHJpeCwgdGhpcy5wcm9qZWN0aW9uTWF0cml4KSAmJlxuICAgICAgZXF1YWxzKHZpZXdwb3J0LnZpZXdNYXRyaXgsIHRoaXMudmlld01hdHJpeCk7XG4gIH1cblxuICAvKipcbiAgICogUHJvamVjdHMgeHl6IChwb3NzaWJseSBsYXRpdHVkZSBhbmQgbG9uZ2l0dWRlKSB0byBwaXhlbCBjb29yZGluYXRlcyBpbiB3aW5kb3dcbiAgICogdXNpbmcgdmlld3BvcnQgcHJvamVjdGlvbiBwYXJhbWV0ZXJzXG4gICAqIC0gW2xvbmdpdHVkZSwgbGF0aXR1ZGVdIHRvIFt4LCB5XVxuICAgKiAtIFtsb25naXR1ZGUsIGxhdGl0dWRlLCBaXSA9PiBbeCwgeSwgel1cbiAgICogTm90ZTogQnkgZGVmYXVsdCwgcmV0dXJucyB0b3AtbGVmdCBjb29yZGluYXRlcyBmb3IgY2FudmFzL1NWRyB0eXBlIHJlbmRlclxuICAgKlxuICAgKiBAcGFyYW0ge0FycmF5fSBsbmdMYXRaIC0gW2xuZywgbGF0XSBvciBbbG5nLCBsYXQsIFpdXG4gICAqIEBwYXJhbSB7T2JqZWN0fSBvcHRzIC0gb3B0aW9uc1xuICAgKiBAcGFyYW0ge09iamVjdH0gb3B0cy50b3BMZWZ0PXRydWUgLSBXaGV0aGVyIHByb2plY3RlZCBjb29yZHMgYXJlIHRvcCBsZWZ0XG4gICAqIEByZXR1cm4ge0FycmF5fSAtIHNjcmVlbiBjb29yZGluYXRlcyBbeCwgeV0gb3IgW3gsIHksIHpdLCB6IGFzIHBpeGVsIGRlcHRoXG4gICAqL1xuICBwcm9qZWN0KHh5eiwge3RvcExlZnQgPSB0cnVlfSA9IHt9KSB7XG4gICAgY29uc3QgW3gwLCB5MCwgejBdID0geHl6O1xuXG4gICAgY29uc3QgW1gsIFldID0gdGhpcy5wcm9qZWN0RmxhdChbeDAsIHkwXSk7XG4gICAgY29uc3QgY29vcmQgPSB3b3JsZFRvUGl4ZWxzKFtYLCBZLCB6MF0sIHRoaXMucGl4ZWxQcm9qZWN0aW9uTWF0cml4KTtcblxuICAgIGNvbnN0IFt4LCB5XSA9IGNvb3JkO1xuICAgIGNvbnN0IHkyID0gdG9wTGVmdCA/IHkgOiB0aGlzLmhlaWdodCAtIHk7XG4gICAgcmV0dXJuIHh5ei5sZW5ndGggPT09IDIgPyBbeCwgeTJdIDogW3gsIHkyLCBjb29yZFsyXV07XG4gIH1cblxuICAvKipcbiAgICogVW5wcm9qZWN0IHBpeGVsIGNvb3JkaW5hdGVzIG9uIHNjcmVlbiBvbnRvIHdvcmxkIGNvb3JkaW5hdGVzLFxuICAgKiAocG9zc2libHkgW2xvbiwgbGF0XSkgb24gbWFwLlxuICAgKiAtIFt4LCB5XSA9PiBbbG5nLCBsYXRdXG4gICAqIC0gW3gsIHksIHpdID0+IFtsbmcsIGxhdCwgWl1cbiAgICogQHBhcmFtIHtBcnJheX0geHl6IC0gc2NyZWVuIGNvb3JkaW5hdGVzLCB6IGFzIHBpeGVsIGRlcHRoXG4gICAqIEBwYXJhbSB7T2JqZWN0fSBvcHRzIC0gb3B0aW9uc1xuICAgKiBAcGFyYW0ge09iamVjdH0gb3B0cy50b3BMZWZ0PXRydWUgLSBXaGV0aGVyIHByb2plY3RlZCBjb29yZHMgYXJlIHRvcCBsZWZ0XG4gICAqIEBwYXJhbSB7T2JqZWN0fSBvcHRzLnRhcmdldFo9MCAtIElmIHBpeGVsIGRlcHRoIGlzIHVua25vd24sIHRhcmdldFogaXMgdXNlZCBhc1xuICAgKiAgIHRoZSBlbGV2YXRpb24gcGxhbmUgdG8gdW5wcm9qZWN0IG9udG9cbiAgICogQHJldHVybiB7QXJyYXl9IC0gW2xuZywgbGF0LCBaXSBvciBbWCwgWSwgWl1cbiAgICovXG4gIHVucHJvamVjdCh4eXosIHt0b3BMZWZ0ID0gdHJ1ZSwgdGFyZ2V0Wn0gPSB7fSkge1xuICAgIGNvbnN0IFt4LCB5LCB6XSA9IHh5ejtcblxuICAgIGNvbnN0IHkyID0gdG9wTGVmdCA/IHkgOiB0aGlzLmhlaWdodCAtIHk7XG4gICAgY29uc3QgY29vcmQgPSBwaXhlbHNUb1dvcmxkKFt4LCB5Miwgel0sIHRoaXMucGl4ZWxVbnByb2plY3Rpb25NYXRyaXgsIHRhcmdldFopO1xuICAgIGNvbnN0IFtYLCBZXSA9IHRoaXMudW5wcm9qZWN0RmxhdChjb29yZCk7XG5cbiAgICBpZiAoTnVtYmVyLmlzRmluaXRlKHopKSB7XG4gICAgICAvLyBIYXMgZGVwdGggY29tcG9uZW50XG4gICAgICByZXR1cm4gW1gsIFksIGNvb3JkWzJdXTtcbiAgICB9XG5cbiAgICByZXR1cm4gTnVtYmVyLmlzRmluaXRlKHRhcmdldFopID8gW1gsIFksIHRhcmdldFpdIDogW1gsIFldO1xuICB9XG5cbiAgLy8gTk9OX0xJTkVBUiBQUk9KRUNUSU9OIEhPT0tTXG4gIC8vIFVzZWQgZm9yIHdlYiBtZXJhY3RvciBwcm9qZWN0aW9uXG5cbiAgLyoqXG4gICAqIFByb2plY3QgbWFwIGNvb3JkaW5hdGVzIHRvIHdvcmxkIGNvb3JkaW5hdGVzLlxuICAgKiBUaGlzIHNob3VsZCBiZSBvdmVycmlkZGVuIGJ5IGVhY2ggdmlld3BvcnQgdGhhdCBpbXBsZW1lbnRzIGEgc3BlY2lmaWNcbiAgICogZ2VvZ3JhcGhpYyBwcm9qZWN0aW9uLlxuICAgKiBAcGFyYW0ge0FycmF5fSB4eXogLSBtYXAgY29vcmRpbmF0ZXNcbiAgICogQHJldHVybiB7QXJyYXl9IFt4LHksel0gd29ybGQgY29vcmRpbmF0ZXMuXG4gICAqL1xuICBwcm9qZWN0RmxhdCh4eXosIHNjYWxlID0gdGhpcy5zY2FsZSkge1xuICAgIHJldHVybiB4eXo7XG4gIH1cblxuICAvKipcbiAgICogUHJvamVjdCB3b3JsZCBjb29yZGluYXRlcyB0byBtYXAgY29vcmRpbmF0ZXMuXG4gICAqIFRoaXMgc2hvdWxkIGJlIG92ZXJyaWRkZW4gYnkgZWFjaCB2aWV3cG9ydCB0aGF0IGltcGxlbWVudHMgYSBzcGVjaWZpY1xuICAgKiBnZW9ncmFwaGljIHByb2plY3Rpb24uXG4gICAqIEBwYXJhbSB7QXJyYXl9IHh5eiAtIHdvcmxkIGNvb3JkaW5hdGVzXG4gICAqIEByZXR1cm4ge0FycmF5fSBbeCx5LHpdIG1hcCBjb29yZGluYXRlcy5cbiAgICovXG4gIHVucHJvamVjdEZsYXQoeHl6LCBzY2FsZSA9IHRoaXMuc2NhbGUpIHtcbiAgICByZXR1cm4geHl6O1xuICB9XG5cbn1cbiJdfQ==
 
/***/ }),
/* 688 */
/***/ (function(module, exports, __webpack_require__) {
 
/* WEBPACK VAR INJECTION */(function(global) {/*
** Copyright (c) 2012 The Khronos Group Inc.
**
** Permission is hereby granted, free of charge, to any person obtaining a
** copy of this software and/or associated documentation files (the
** "Materials"), to deal in the Materials without restriction, including
** without limitation the rights to use, copy, modify, merge, publish,
** distribute, sublicense, and/or sell copies of the Materials, and to
** permit persons to whom the Materials are furnished to do so, subject to
** the following conditions:
**
** The above copyright notice and this permission notice shall be included
** in all copies or substantial portions of the Materials.
**
** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
*/
 
//Ported to node by Marcin Ignac on 2016-05-20
 
// Various functions for helping debug WebGL apps.
 
WebGLDebugUtils = function() {
var window
 
//polyfill window in node
if (typeof(window) == 'undefined') {
    window = global;
}
 
/**
 * Wrapped logging function.
 * @param {string} msg Message to log.
 */
var log = function(msg) {
  if (window.console && window.console.log) {
    window.console.log(msg);
  }
};
 
/**
 * Wrapped error logging function.
 * @param {string} msg Message to log.
 */
var error = function(msg) {
  if (window.console && window.console.error) {
    window.console.error(msg);
  } else {
    log(msg);
  }
};
 
 
/**
 * Which arguments are enums based on the number of arguments to the function.
 * So
 *    'texImage2D': {
 *       9: { 0:true, 2:true, 6:true, 7:true },
 *       6: { 0:true, 2:true, 3:true, 4:true },
 *    },
 *
 * means if there are 9 arguments then 6 and 7 are enums, if there are 6
 * arguments 3 and 4 are enums
 *
 * @type {!Object.<number, !Object.<number, string>}
 */
var glValidEnumContexts = {
  // Generic setters and getters
 
  'enable': {1: { 0:true }},
  'disable': {1: { 0:true }},
  'getParameter': {1: { 0:true }},
 
  // Rendering
 
  'drawArrays': {3:{ 0:true }},
  'drawElements': {4:{ 0:true, 2:true }},
 
  // Shaders
 
  'createShader': {1: { 0:true }},
  'getShaderParameter': {2: { 1:true }},
  'getProgramParameter': {2: { 1:true }},
  'getShaderPrecisionFormat': {2: { 0: true, 1:true }},
 
  // Vertex attributes
 
  'getVertexAttrib': {2: { 1:true }},
  'vertexAttribPointer': {6: { 2:true }},
 
  // Textures
 
  'bindTexture': {2: { 0:true }},
  'activeTexture': {1: { 0:true }},
  'getTexParameter': {2: { 0:true, 1:true }},
  'texParameterf': {3: { 0:true, 1:true }},
  'texParameteri': {3: { 0:true, 1:true, 2:true }},
  // texImage2D and texSubImage2D are defined below with WebGL 2 entrypoints
  'copyTexImage2D': {8: { 0:true, 2:true }},
  'copyTexSubImage2D': {8: { 0:true }},
  'generateMipmap': {1: { 0:true }},
  // compressedTexImage2D and compressedTexSubImage2D are defined below with WebGL 2 entrypoints
 
  // Buffer objects
 
  'bindBuffer': {2: { 0:true }},
  // bufferData and bufferSubData are defined below with WebGL 2 entrypoints
  'getBufferParameter': {2: { 0:true, 1:true }},
 
  // Renderbuffers and framebuffers
 
  'pixelStorei': {2: { 0:true, 1:true }},
  // readPixels is defined below with WebGL 2 entrypoints
  'bindRenderbuffer': {2: { 0:true }},
  'bindFramebuffer': {2: { 0:true }},
  'checkFramebufferStatus': {1: { 0:true }},
  'framebufferRenderbuffer': {4: { 0:true, 1:true, 2:true }},
  'framebufferTexture2D': {5: { 0:true, 1:true, 2:true }},
  'getFramebufferAttachmentParameter': {3: { 0:true, 1:true, 2:true }},
  'getRenderbufferParameter': {2: { 0:true, 1:true }},
  'renderbufferStorage': {4: { 0:true, 1:true }},
 
  // Frame buffer operations (clear, blend, depth test, stencil)
 
  'clear': {1: { 0: { 'enumBitwiseOr': ['COLOR_BUFFER_BIT', 'DEPTH_BUFFER_BIT', 'STENCIL_BUFFER_BIT'] }}},
  'depthFunc': {1: { 0:true }},
  'blendFunc': {2: { 0:true, 1:true }},
  'blendFuncSeparate': {4: { 0:true, 1:true, 2:true, 3:true }},
  'blendEquation': {1: { 0:true }},
  'blendEquationSeparate': {2: { 0:true, 1:true }},
  'stencilFunc': {3: { 0:true }},
  'stencilFuncSeparate': {4: { 0:true, 1:true }},
  'stencilMaskSeparate': {2: { 0:true }},
  'stencilOp': {3: { 0:true, 1:true, 2:true }},
  'stencilOpSeparate': {4: { 0:true, 1:true, 2:true, 3:true }},
 
  // Culling
 
  'cullFace': {1: { 0:true }},
  'frontFace': {1: { 0:true }},
 
  // ANGLE_instanced_arrays extension
 
  'drawArraysInstancedANGLE': {4: { 0:true }},
  'drawElementsInstancedANGLE': {5: { 0:true, 2:true }},
 
  // EXT_blend_minmax extension
 
  'blendEquationEXT': {1: { 0:true }},
 
  // WebGL 2 Buffer objects
 
  'bufferData': {
    3: { 0:true, 2:true }, // WebGL 1
    4: { 0:true, 2:true }, // WebGL 2
    5: { 0:true, 2:true }  // WebGL 2
  },
  'bufferSubData': {
    3: { 0:true }, // WebGL 1
    4: { 0:true }, // WebGL 2
    5: { 0:true }  // WebGL 2
  },
  'copyBufferSubData': {5: { 0:true, 1:true }},
  'getBufferSubData': {3: { 0:true }, 4: { 0:true }, 5: { 0:true }},
 
  // WebGL 2 Framebuffer objects
 
  'blitFramebuffer': {10: { 8: { 'enumBitwiseOr': ['COLOR_BUFFER_BIT', 'DEPTH_BUFFER_BIT', 'STENCIL_BUFFER_BIT'] }, 9:true }},
  'framebufferTextureLayer': {5: { 0:true, 1:true }},
  'invalidateFramebuffer': {2: { 0:true }},
  'invalidateSubFramebuffer': {6: { 0:true }},
  'readBuffer': {1: { 0:true }},
 
  // WebGL 2 Renderbuffer objects
 
  'getInternalformatParameter': {3: { 0:true, 1:true, 2:true }},
  'renderbufferStorageMultisample': {5: { 0:true, 2:true }},
 
  // WebGL 2 Texture objects
 
  'texStorage2D': {5: { 0:true, 2:true }},
  'texStorage3D': {6: { 0:true, 2:true }},
  'texImage2D': {
    9: { 0:true, 2:true, 6:true, 7:true }, // WebGL 1 & 2
    6: { 0:true, 2:true, 3:true, 4:true }, // WebGL 1
    10: { 0:true, 2:true, 6:true, 7:true } // WebGL 2
  },
  'texImage3D': {
    10: { 0:true, 2:true, 7:true, 8:true },
    11: { 0:true, 2:true, 7:true, 8:true }
  },
  'texSubImage2D': {
    9: { 0:true, 6:true, 7:true }, // WebGL 1 & 2
    7: { 0:true, 4:true, 5:true }, // WebGL 1
    10: { 0:true, 6:true, 7:true } // WebGL 2
  },
  'texSubImage3D': {
    11: { 0:true, 8:true, 9:true },
    12: { 0:true, 8:true, 9:true }
  },
  'copyTexSubImage3D': {9: { 0:true }},
  'compressedTexImage2D': {
    7: { 0: true, 2:true }, // WebGL 1 & 2
    8: { 0: true, 2:true }, // WebGL 2
    9: { 0: true, 2:true }  // WebGL 2
  },
  'compressedTexImage3D': {
    8: { 0: true, 2:true },
    9: { 0: true, 2:true },
    10: { 0: true, 2:true }
  },
  'compressedTexSubImage2D': {
    8: { 0: true, 6:true }, // WebGL 1 & 2
    9: { 0: true, 6:true }, // WebGL 2
    10: { 0: true, 6:true } // WebGL 2
  },
  'compressedTexSubImage3D': {
    10: { 0: true, 8:true },
    11: { 0: true, 8:true },
    12: { 0: true, 8:true }
  },
 
  // WebGL 2 Vertex attribs
 
  'vertexAttribIPointer': {5: { 2:true }},
 
  // WebGL 2 Writing to the drawing buffer
 
  'drawArraysInstanced': {4: { 0:true }},
  'drawElementsInstanced': {5: { 0:true, 2:true }},
  'drawRangeElements': {6: { 0:true, 4:true }},
 
  // WebGL 2 Reading back pixels
 
  'readPixels': {
    7: { 4:true, 5:true }, // WebGL 1 & 2
    8: { 4:true, 5:true }  // WebGL 2
  },
 
  // WebGL 2 Multiple Render Targets
 
  'clearBufferfv': {3: { 0:true }, 4: { 0:true }},
  'clearBufferiv': {3: { 0:true }, 4: { 0:true }},
  'clearBufferuiv': {3: { 0:true }, 4: { 0:true }},
  'clearBufferfi': {4: { 0:true }},
 
  // WebGL 2 Query objects
 
  'beginQuery': {2: { 0:true }},
  'endQuery': {1: { 0:true }},
  'getQuery': {2: { 0:true, 1:true }},
  'getQueryParameter': {2: { 1:true }},
 
  // WebGL 2 Sampler objects
 
  'samplerParameteri': {3: { 1:true, 2:true }},
  'samplerParameterf': {3: { 1:true }},
  'getSamplerParameter': {2: { 1:true }},
 
  // WebGL 2 Sync objects
 
  'fenceSync': {2: { 0:true, 1: { 'enumBitwiseOr': [] } }},
  'clientWaitSync': {3: { 1: { 'enumBitwiseOr': ['SYNC_FLUSH_COMMANDS_BIT'] } }},
  'waitSync': {3: { 1: { 'enumBitwiseOr': [] } }},
  'getSyncParameter': {2: { 1:true }},
 
  // WebGL 2 Transform Feedback
 
  'bindTransformFeedback': {2: { 0:true }},
  'beginTransformFeedback': {1: { 0:true }},
  'transformFeedbackVaryings': {3: { 2:true }},
 
  // WebGL2 Uniform Buffer Objects and Transform Feedback Buffers
 
  'bindBufferBase': {3: { 0:true }},
  'bindBufferRange': {5: { 0:true }},
  'getIndexedParameter': {2: { 0:true }},
  'getActiveUniforms': {3: { 2:true }},
  'getActiveUniformBlockParameter': {3: { 2:true }}
};
 
/**
 * Map of numbers to names.
 * @type {Object}
 */
var glEnums = null;
 
/**
 * Map of names to numbers.
 * @type {Object}
 */
var enumStringToValue = null;
 
/**
 * Initializes this module. Safe to call more than once.
 * @param {!WebGLRenderingContext} ctx A WebGL context. If
 *    you have more than one context it doesn't matter which one
 *    you pass in, it is only used to pull out constants.
 */
function init(ctx) {
  if (glEnums == null) {
    glEnums = { };
    enumStringToValue = { };
    for (var propertyName in ctx) {
      if (typeof ctx[propertyName] == 'number') {
        glEnums[ctx[propertyName]] = propertyName;
        enumStringToValue[propertyName] = ctx[propertyName];
      }
    }
  }
}
 
/**
 * Checks the utils have been initialized.
 */
function checkInit() {
  if (glEnums == null) {
    throw 'WebGLDebugUtils.init(ctx) not called';
  }
}
 
/**
 * Returns true or false if value matches any WebGL enum
 * @param {*} value Value to check if it might be an enum.
 * @return {boolean} True if value matches one of the WebGL defined enums
 */
function mightBeEnum(value) {
  checkInit();
  return (glEnums[value] !== undefined);
}
 
/**
 * Gets an string version of an WebGL enum.
 *
 * Example:
 *   var str = WebGLDebugUtil.glEnumToString(ctx.getError());
 *
 * @param {number} value Value to return an enum for
 * @return {string} The string version of the enum.
 */
function glEnumToString(value) {
  checkInit();
  var name = glEnums[value];
  return (name !== undefined) ? ("gl." + name) :
      ("/*UNKNOWN WebGL ENUM*/ 0x" + value.toString(16) + "");
}
 
/**
 * Returns the string version of a WebGL argument.
 * Attempts to convert enum arguments to strings.
 * @param {string} functionName the name of the WebGL function.
 * @param {number} numArgs the number of arguments passed to the function.
 * @param {number} argumentIndx the index of the argument.
 * @param {*} value The value of the argument.
 * @return {string} The value as a string.
 */
function glFunctionArgToString(functionName, numArgs, argumentIndex, value) {
  var funcInfo = glValidEnumContexts[functionName];
  if (funcInfo !== undefined) {
    var funcInfo = funcInfo[numArgs];
    if (funcInfo !== undefined) {
      if (funcInfo[argumentIndex]) {
        if (typeof funcInfo[argumentIndex] === 'object' &&
            funcInfo[argumentIndex]['enumBitwiseOr'] !== undefined) {
          var enums = funcInfo[argumentIndex]['enumBitwiseOr'];
          var orResult = 0;
          var orEnums = [];
          for (var i = 0; i < enums.length; ++i) {
            var enumValue = enumStringToValue[enums[i]];
            if ((value & enumValue) !== 0) {
              orResult |= enumValue;
              orEnums.push(glEnumToString(enumValue));
            }
          }
          if (orResult === value) {
            return orEnums.join(' | ');
          } else {
            return glEnumToString(value);
          }
        } else {
          return glEnumToString(value);
        }
      }
    }
  }
  if (value === null) {
    return "null";
  } else if (value === undefined) {
    return "undefined";
  } else {
    return value.toString();
  }
}
 
/**
 * Converts the arguments of a WebGL function to a string.
 * Attempts to convert enum arguments to strings.
 *
 * @param {string} functionName the name of the WebGL function.
 * @param {number} args The arguments.
 * @return {string} The arguments as a string.
 */
function glFunctionArgsToString(functionName, args) {
  // apparently we can't do args.join(",");
  var argStr = "";
  var numArgs = args.length;
  for (var ii = 0; ii < numArgs; ++ii) {
    argStr += ((ii == 0) ? '' : ', ') +
        glFunctionArgToString(functionName, numArgs, ii, args[ii]);
  }
  return argStr;
};
 
 
function makePropertyWrapper(wrapper, original, propertyName) {
  //log("wrap prop: " + propertyName);
  wrapper.__defineGetter__(propertyName, function() {
    return original[propertyName];
  });
  // TODO(gmane): this needs to handle properties that take more than
  // one value?
  wrapper.__defineSetter__(propertyName, function(value) {
    //log("set: " + propertyName);
    original[propertyName] = value;
  });
}
 
// Makes a function that calls a function on another object.
function makeFunctionWrapper(original, functionName) {
  //log("wrap fn: " + functionName);
  var f = original[functionName];
  return function() {
    //log("call: " + functionName);
    var result = f.apply(original, arguments);
    return result;
  };
}
 
/**
 * Given a WebGL context returns a wrapped context that calls
 * gl.getError after every command and calls a function if the
 * result is not gl.NO_ERROR.
 *
 * @param {!WebGLRenderingContext} ctx The webgl context to
 *        wrap.
 * @param {!function(err, funcName, args): void} opt_onErrorFunc
 *        The function to call when gl.getError returns an
 *        error. If not specified the default function calls
 *        console.log with a message.
 * @param {!function(funcName, args): void} opt_onFunc The
 *        function to call when each webgl function is called.
 *        You can use this to log all calls for example.
 * @param {!WebGLRenderingContext} opt_err_ctx The webgl context
 *        to call getError on if different than ctx.
 */
function makeDebugContext(ctx, opt_onErrorFunc, opt_onFunc, opt_err_ctx) {
  opt_err_ctx = opt_err_ctx || ctx;
  init(ctx);
  opt_onErrorFunc = opt_onErrorFunc || function(err, functionName, args) {
        // apparently we can't do args.join(",");
        var argStr = "";
        var numArgs = args.length;
        for (var ii = 0; ii < numArgs; ++ii) {
          argStr += ((ii == 0) ? '' : ', ') +
              glFunctionArgToString(functionName, numArgs, ii, args[ii]);
        }
        error("WebGL error "+ glEnumToString(err) + " in "+ functionName +
              "(" + argStr + ")");
      };
 
  // Holds booleans for each GL error so after we get the error ourselves
  // we can still return it to the client app.
  var glErrorShadow = { };
 
  // Makes a function that calls a WebGL function and then calls getError.
  function makeErrorWrapper(ctx, functionName) {
    return function() {
      if (opt_onFunc) {
        opt_onFunc(functionName, arguments);
      }
      var result = ctx[functionName].apply(ctx, arguments);
      var err = opt_err_ctx.getError();
      if (err != 0) {
        glErrorShadow[err] = true;
        opt_onErrorFunc(err, functionName, arguments);
      }
      return result;
    };
  }
 
  // Make a an object that has a copy of every property of the WebGL context
  // but wraps all functions.
  var wrapper = {};
  for (var propertyName in ctx) {
    if (typeof ctx[propertyName] == 'function') {
      if (propertyName != 'getExtension') {
        wrapper[propertyName] = makeErrorWrapper(ctx, propertyName);
      } else {
        var wrapped = makeErrorWrapper(ctx, propertyName);
        wrapper[propertyName] = function () {
          var result = wrapped.apply(ctx, arguments);
          if (!result) {
            return null;
          }
          return makeDebugContext(result, opt_onErrorFunc, opt_onFunc, opt_err_ctx);
        };
      }
    } else {
      makePropertyWrapper(wrapper, ctx, propertyName);
    }
  }
 
  // Override the getError function with one that returns our saved results.
  wrapper.getError = function() {
    for (var err in glErrorShadow) {
      if (glErrorShadow.hasOwnProperty(err)) {
        if (glErrorShadow[err]) {
          glErrorShadow[err] = false;
          return err;
        }
      }
    }
    return ctx.NO_ERROR;
  };
 
  return wrapper;
}
 
function resetToInitialState(ctx) {
  var isWebGL2RenderingContext = !!ctx.createTransformFeedback;
 
  if (isWebGL2RenderingContext) {
    ctx.bindVertexArray(null);
  }
 
  var numAttribs = ctx.getParameter(ctx.MAX_VERTEX_ATTRIBS);
  var tmp = ctx.createBuffer();
  ctx.bindBuffer(ctx.ARRAY_BUFFER, tmp);
  for (var ii = 0; ii < numAttribs; ++ii) {
    ctx.disableVertexAttribArray(ii);
    ctx.vertexAttribPointer(ii, 4, ctx.FLOAT, false, 0, 0);
    ctx.vertexAttrib1f(ii, 0);
    if (isWebGL2RenderingContext) {
      ctx.vertexAttribDivisor(ii, 0);
    }
  }
  ctx.deleteBuffer(tmp);
 
  var numTextureUnits = ctx.getParameter(ctx.MAX_TEXTURE_IMAGE_UNITS);
  for (var ii = 0; ii < numTextureUnits; ++ii) {
    ctx.activeTexture(ctx.TEXTURE0 + ii);
    ctx.bindTexture(ctx.TEXTURE_CUBE_MAP, null);
    ctx.bindTexture(ctx.TEXTURE_2D, null);
    if (isWebGL2RenderingContext) {
      ctx.bindTexture(ctx.TEXTURE_2D_ARRAY, null);
      ctx.bindTexture(ctx.TEXTURE_3D, null);
      ctx.bindSampler(ii, null);
    }
  }
 
  ctx.activeTexture(ctx.TEXTURE0);
  ctx.useProgram(null);
  ctx.bindBuffer(ctx.ARRAY_BUFFER, null);
  ctx.bindBuffer(ctx.ELEMENT_ARRAY_BUFFER, null);
  ctx.bindFramebuffer(ctx.FRAMEBUFFER, null);
  ctx.bindRenderbuffer(ctx.RENDERBUFFER, null);
  ctx.disable(ctx.BLEND);
  ctx.disable(ctx.CULL_FACE);
  ctx.disable(ctx.DEPTH_TEST);
  ctx.disable(ctx.DITHER);
  ctx.disable(ctx.SCISSOR_TEST);
  ctx.blendColor(0, 0, 0, 0);
  ctx.blendEquation(ctx.FUNC_ADD);
  ctx.blendFunc(ctx.ONE, ctx.ZERO);
  ctx.clearColor(0, 0, 0, 0);
  ctx.clearDepth(1);
  ctx.clearStencil(-1);
  ctx.colorMask(true, true, true, true);
  ctx.cullFace(ctx.BACK);
  ctx.depthFunc(ctx.LESS);
  ctx.depthMask(true);
  ctx.depthRange(0, 1);
  ctx.frontFace(ctx.CCW);
  ctx.hint(ctx.GENERATE_MIPMAP_HINT, ctx.DONT_CARE);
  ctx.lineWidth(1);
  ctx.pixelStorei(ctx.PACK_ALIGNMENT, 4);
  ctx.pixelStorei(ctx.UNPACK_ALIGNMENT, 4);
  ctx.pixelStorei(ctx.UNPACK_FLIP_Y_WEBGL, false);
  ctx.pixelStorei(ctx.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false);
  // TODO: Delete this IF.
  if (ctx.UNPACK_COLORSPACE_CONVERSION_WEBGL) {
    ctx.pixelStorei(ctx.UNPACK_COLORSPACE_CONVERSION_WEBGL, ctx.BROWSER_DEFAULT_WEBGL);
  }
  ctx.polygonOffset(0, 0);
  ctx.sampleCoverage(1, false);
  ctx.scissor(0, 0, ctx.canvas.width, ctx.canvas.height);
  ctx.stencilFunc(ctx.ALWAYS, 0, 0xFFFFFFFF);
  ctx.stencilMask(0xFFFFFFFF);
  ctx.stencilOp(ctx.KEEP, ctx.KEEP, ctx.KEEP);
  ctx.viewport(0, 0, ctx.canvas.width, ctx.canvas.height);
  ctx.clear(ctx.COLOR_BUFFER_BIT | ctx.DEPTH_BUFFER_BIT | ctx.STENCIL_BUFFER_BIT);
 
  if (isWebGL2RenderingContext) {
    ctx.drawBuffers([ctx.BACK]);
    ctx.readBuffer(ctx.BACK);
    ctx.bindBuffer(ctx.COPY_READ_BUFFER, null);
    ctx.bindBuffer(ctx.COPY_WRITE_BUFFER, null);
    ctx.bindBuffer(ctx.PIXEL_PACK_BUFFER, null);
    ctx.bindBuffer(ctx.PIXEL_UNPACK_BUFFER, null);
    var numTransformFeedbacks = ctx.getParameter(ctx.MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS);
    for (var ii = 0; ii < numTransformFeedbacks; ++ii) {
      ctx.bindBufferBase(ctx.TRANSFORM_FEEDBACK_BUFFER, ii, null);
    }
    var numUBOs = ctx.getParameter(ctx.MAX_UNIFORM_BUFFER_BINDINGS);
    for (var ii = 0; ii < numUBOs; ++ii) {
      ctx.bindBufferBase(ctx.UNIFORM_BUFFER, ii, null);
    }
    ctx.disable(ctx.RASTERIZER_DISCARD);
    ctx.pixelStorei(ctx.UNPACK_IMAGE_HEIGHT, 0);
    ctx.pixelStorei(ctx.UNPACK_SKIP_IMAGES, 0);
    ctx.pixelStorei(ctx.UNPACK_ROW_LENGTH, 0);
    ctx.pixelStorei(ctx.UNPACK_SKIP_ROWS, 0);
    ctx.pixelStorei(ctx.UNPACK_SKIP_PIXELS, 0);
    ctx.pixelStorei(ctx.PACK_ROW_LENGTH, 0);
    ctx.pixelStorei(ctx.PACK_SKIP_ROWS, 0);
    ctx.pixelStorei(ctx.PACK_SKIP_PIXELS, 0);
    ctx.hint(ctx.FRAGMENT_SHADER_DERIVATIVE_HINT, ctx.DONT_CARE);
  }
 
  // TODO: This should NOT be needed but Firefox fails with 'hint'
  while(ctx.getError());
}
 
function makeLostContextSimulatingCanvas(canvas) {
  var unwrappedContext_;
  var wrappedContext_;
  var onLost_ = [];
  var onRestored_ = [];
  var wrappedContext_ = {};
  var contextId_ = 1;
  var contextLost_ = false;
  var resourceId_ = 0;
  var resourceDb_ = [];
  var numCallsToLoseContext_ = 0;
  var numCalls_ = 0;
  var canRestore_ = false;
  var restoreTimeout_ = 0;
  var isWebGL2RenderingContext;
 
  // Holds booleans for each GL error so can simulate errors.
  var glErrorShadow_ = { };
 
  canvas.getContext = function(f) {
    return function() {
      var ctx = f.apply(canvas, arguments);
      // Did we get a context and is it a WebGL context?
      if ((ctx instanceof WebGLRenderingContext) || (window.WebGL2RenderingContext && (ctx instanceof WebGL2RenderingContext))) {
        if (ctx != unwrappedContext_) {
          if (unwrappedContext_) {
            throw "got different context"
          }
          isWebGL2RenderingContext = window.WebGL2RenderingContext && (ctx instanceof WebGL2RenderingContext);
          unwrappedContext_ = ctx;
          wrappedContext_ = makeLostContextSimulatingContext(unwrappedContext_);
        }
        return wrappedContext_;
      }
      return ctx;
    }
  }(canvas.getContext);
 
  function wrapEvent(listener) {
    if (typeof(listener) == "function") {
      return listener;
    } else {
      return function(info) {
        listener.handleEvent(info);
      }
    }
  }
 
  var addOnContextLostListener = function(listener) {
    onLost_.push(wrapEvent(listener));
  };
 
  var addOnContextRestoredListener = function(listener) {
    onRestored_.push(wrapEvent(listener));
  };
 
 
  function wrapAddEventListener(canvas) {
    var f = canvas.addEventListener;
    canvas.addEventListener = function(type, listener, bubble) {
      switch (type) {
        case 'webglcontextlost':
          addOnContextLostListener(listener);
          break;
        case 'webglcontextrestored':
          addOnContextRestoredListener(listener);
          break;
        default:
          f.apply(canvas, arguments);
      }
    };
  }
 
  wrapAddEventListener(canvas);
 
  canvas.loseContext = function() {
    if (!contextLost_) {
      contextLost_ = true;
      numCallsToLoseContext_ = 0;
      ++contextId_;
      while (unwrappedContext_.getError());
      clearErrors();
      glErrorShadow_[unwrappedContext_.CONTEXT_LOST_WEBGL] = true;
      var event = makeWebGLContextEvent("context lost");
      var callbacks = onLost_.slice();
      setTimeout(function() {
          //log("numCallbacks:" + callbacks.length);
          for (var ii = 0; ii < callbacks.length; ++ii) {
            //log("calling callback:" + ii);
            callbacks[ii](event);
          }
          if (restoreTimeout_ >= 0) {
            setTimeout(function() {
                canvas.restoreContext();
              }, restoreTimeout_);
          }
        }, 0);
    }
  };
 
  canvas.restoreContext = function() {
    if (contextLost_) {
      if (onRestored_.length) {
        setTimeout(function() {
            if (!canRestore_) {
              throw "can not restore. webglcontestlost listener did not call event.preventDefault";
            }
            freeResources();
            resetToInitialState(unwrappedContext_);
            contextLost_ = false;
            numCalls_ = 0;
            canRestore_ = false;
            var callbacks = onRestored_.slice();
            var event = makeWebGLContextEvent("context restored");
            for (var ii = 0; ii < callbacks.length; ++ii) {
              callbacks[ii](event);
            }
          }, 0);
      }
    }
  };
 
  canvas.loseContextInNCalls = function(numCalls) {
    if (contextLost_) {
      throw "You can not ask a lost contet to be lost";
    }
    numCallsToLoseContext_ = numCalls_ + numCalls;
  };
 
  canvas.getNumCalls = function() {
    return numCalls_;
  };
 
  canvas.setRestoreTimeout = function(timeout) {
    restoreTimeout_ = timeout;
  };
 
  function isWebGLObject(obj) {
    //return false;
    return (obj instanceof WebGLBuffer ||
            obj instanceof WebGLFramebuffer ||
            obj instanceof WebGLProgram ||
            obj instanceof WebGLRenderbuffer ||
            obj instanceof WebGLShader ||
            obj instanceof WebGLTexture);
  }
 
  function checkResources(args) {
    for (var ii = 0; ii < args.length; ++ii) {
      var arg = args[ii];
      if (isWebGLObject(arg)) {
        return arg.__webglDebugContextLostId__ == contextId_;
      }
    }
    return true;
  }
 
  function clearErrors() {
    var k = Object.keys(glErrorShadow_);
    for (var ii = 0; ii < k.length; ++ii) {
      delete glErrorShadow_[k[ii]];
    }
  }
 
  function loseContextIfTime() {
    ++numCalls_;
    if (!contextLost_) {
      if (numCallsToLoseContext_ == numCalls_) {
        canvas.loseContext();
      }
    }
  }
 
  // Makes a function that simulates WebGL when out of context.
  function makeLostContextFunctionWrapper(ctx, functionName) {
    var f = ctx[functionName];
    return function() {
      // log("calling:" + functionName);
      // Only call the functions if the context is not lost.
      loseContextIfTime();
      if (!contextLost_) {
        //if (!checkResources(arguments)) {
        //  glErrorShadow_[wrappedContext_.INVALID_OPERATION] = true;
        //  return;
        //}
        var result = f.apply(ctx, arguments);
        return result;
      }
    };
  }
 
  function freeResources() {
    for (var ii = 0; ii < resourceDb_.length; ++ii) {
      var resource = resourceDb_[ii];
      if (resource instanceof WebGLBuffer) {
        unwrappedContext_.deleteBuffer(resource);
      } else if (resource instanceof WebGLFramebuffer) {
        unwrappedContext_.deleteFramebuffer(resource);
      } else if (resource instanceof WebGLProgram) {
        unwrappedContext_.deleteProgram(resource);
      } else if (resource instanceof WebGLRenderbuffer) {
        unwrappedContext_.deleteRenderbuffer(resource);
      } else if (resource instanceof WebGLShader) {
        unwrappedContext_.deleteShader(resource);
      } else if (resource instanceof WebGLTexture) {
        unwrappedContext_.deleteTexture(resource);
      }
      else if (isWebGL2RenderingContext) {
        if (resource instanceof WebGLQuery) {
          unwrappedContext_.deleteQuery(resource);
        } else if (resource instanceof WebGLSampler) {
          unwrappedContext_.deleteSampler(resource);
        } else if (resource instanceof WebGLSync) {
          unwrappedContext_.deleteSync(resource);
        } else if (resource instanceof WebGLTransformFeedback) {
          unwrappedContext_.deleteTransformFeedback(resource);
        } else if (resource instanceof WebGLVertexArrayObject) {
          unwrappedContext_.deleteVertexArray(resource);
        }
      }
    }
  }
 
  function makeWebGLContextEvent(statusMessage) {
    return {
      statusMessage: statusMessage,
      preventDefault: function() {
          canRestore_ = true;
        }
    };
  }
 
  return canvas;
 
  function makeLostContextSimulatingContext(ctx) {
    // copy all functions and properties to wrapper
    for (var propertyName in ctx) {
      if (typeof ctx[propertyName] == 'function') {
         wrappedContext_[propertyName] = makeLostContextFunctionWrapper(
             ctx, propertyName);
       } else {
         makePropertyWrapper(wrappedContext_, ctx, propertyName);
       }
    }
 
    // Wrap a few functions specially.
    wrappedContext_.getError = function() {
      loseContextIfTime();
      if (!contextLost_) {
        var err;
        while (err = unwrappedContext_.getError()) {
          glErrorShadow_[err] = true;
        }
      }
      for (var err in glErrorShadow_) {
        if (glErrorShadow_[err]) {
          delete glErrorShadow_[err];
          return err;
        }
      }
      return wrappedContext_.NO_ERROR;
    };
 
    var creationFunctions = [
      "createBuffer",
      "createFramebuffer",
      "createProgram",
      "createRenderbuffer",
      "createShader",
      "createTexture"
    ];
    if (isWebGL2RenderingContext) {
      creationFunctions.push(
        "createQuery",
        "createSampler",
        "fenceSync",
        "createTransformFeedback",
        "createVertexArray"
      );
    }
    for (var ii = 0; ii < creationFunctions.length; ++ii) {
      var functionName = creationFunctions[ii];
      wrappedContext_[functionName] = function(f) {
        return function() {
          loseContextIfTime();
          if (contextLost_) {
            return null;
          }
          var obj = f.apply(ctx, arguments);
          obj.__webglDebugContextLostId__ = contextId_;
          resourceDb_.push(obj);
          return obj;
        };
      }(ctx[functionName]);
    }
 
    var functionsThatShouldReturnNull = [
      "getActiveAttrib",
      "getActiveUniform",
      "getBufferParameter",
      "getContextAttributes",
      "getAttachedShaders",
      "getFramebufferAttachmentParameter",
      "getParameter",
      "getProgramParameter",
      "getProgramInfoLog",
      "getRenderbufferParameter",
      "getShaderParameter",
      "getShaderInfoLog",
      "getShaderSource",
      "getTexParameter",
      "getUniform",
      "getUniformLocation",
      "getVertexAttrib"
    ];
    if (isWebGL2RenderingContext) {
      functionsThatShouldReturnNull.push(
        "getInternalformatParameter",
        "getQuery",
        "getQueryParameter",
        "getSamplerParameter",
        "getSyncParameter",
        "getTransformFeedbackVarying",
        "getIndexedParameter",
        "getUniformIndices",
        "getActiveUniforms",
        "getActiveUniformBlockParameter",
        "getActiveUniformBlockName"
      );
    }
    for (var ii = 0; ii < functionsThatShouldReturnNull.length; ++ii) {
      var functionName = functionsThatShouldReturnNull[ii];
      wrappedContext_[functionName] = function(f) {
        return function() {
          loseContextIfTime();
          if (contextLost_) {
            return null;
          }
          return f.apply(ctx, arguments);
        }
      }(wrappedContext_[functionName]);
    }
 
    var isFunctions = [
      "isBuffer",
      "isEnabled",
      "isFramebuffer",
      "isProgram",
      "isRenderbuffer",
      "isShader",
      "isTexture"
    ];
    if (isWebGL2RenderingContext) {
      isFunctions.push(
        "isQuery",
        "isSampler",
        "isSync",
        "isTransformFeedback",
        "isVertexArray"
      );
    }
    for (var ii = 0; ii < isFunctions.length; ++ii) {
      var functionName = isFunctions[ii];
      wrappedContext_[functionName] = function(f) {
        return function() {
          loseContextIfTime();
          if (contextLost_) {
            return false;
          }
          return f.apply(ctx, arguments);
        }
      }(wrappedContext_[functionName]);
    }
 
    wrappedContext_.checkFramebufferStatus = function(f) {
      return function() {
        loseContextIfTime();
        if (contextLost_) {
          return wrappedContext_.FRAMEBUFFER_UNSUPPORTED;
        }
        return f.apply(ctx, arguments);
      };
    }(wrappedContext_.checkFramebufferStatus);
 
    wrappedContext_.getAttribLocation = function(f) {
      return function() {
        loseContextIfTime();
        if (contextLost_) {
          return -1;
        }
        return f.apply(ctx, arguments);
      };
    }(wrappedContext_.getAttribLocation);
 
    wrappedContext_.getVertexAttribOffset = function(f) {
      return function() {
        loseContextIfTime();
        if (contextLost_) {
          return 0;
        }
        return f.apply(ctx, arguments);
      };
    }(wrappedContext_.getVertexAttribOffset);
 
    wrappedContext_.isContextLost = function() {
      return contextLost_;
    };
 
    if (isWebGL2RenderingContext) {
      wrappedContext_.getFragDataLocation = function(f) {
        return function() {
          loseContextIfTime();
          if (contextLost_) {
            return -1;
          }
          return f.apply(ctx, arguments);
        };
      }(wrappedContext_.getFragDataLocation);
 
      wrappedContext_.clientWaitSync = function(f) {
        return function() {
          loseContextIfTime();
          if (contextLost_) {
            return wrappedContext_.WAIT_FAILED;
          }
          return f.apply(ctx, arguments);
        };
      }(wrappedContext_.clientWaitSync);
 
      wrappedContext_.getUniformBlockIndex = function(f) {
        return function() {
          loseContextIfTime();
          if (contextLost_) {
            return wrappedContext_.INVALID_INDEX;
          }
          return f.apply(ctx, arguments);
        };
      }(wrappedContext_.getUniformBlockIndex);
    }
 
    return wrappedContext_;
  }
}
 
return {
  /**
   * Initializes this module. Safe to call more than once.
   * @param {!WebGLRenderingContext} ctx A WebGL context. If
   *    you have more than one context it doesn't matter which one
   *    you pass in, it is only used to pull out constants.
   */
  'init': init,
 
  /**
   * Returns true or false if value matches any WebGL enum
   * @param {*} value Value to check if it might be an enum.
   * @return {boolean} True if value matches one of the WebGL defined enums
   */
  'mightBeEnum': mightBeEnum,
 
  /**
   * Gets an string version of an WebGL enum.
   *
   * Example:
   *   WebGLDebugUtil.init(ctx);
   *   var str = WebGLDebugUtil.glEnumToString(ctx.getError());
   *
   * @param {number} value Value to return an enum for
   * @return {string} The string version of the enum.
   */
  'glEnumToString': glEnumToString,
 
  /**
   * Converts the argument of a WebGL function to a string.
   * Attempts to convert enum arguments to strings.
   *
   * Example:
   *   WebGLDebugUtil.init(ctx);
   *   var str = WebGLDebugUtil.glFunctionArgToString('bindTexture', 2, 0, gl.TEXTURE_2D);
   *
   * would return 'TEXTURE_2D'
   *
   * @param {string} functionName the name of the WebGL function.
   * @param {number} numArgs The number of arguments
   * @param {number} argumentIndx the index of the argument.
   * @param {*} value The value of the argument.
   * @return {string} The value as a string.
   */
  'glFunctionArgToString': glFunctionArgToString,
 
  /**
   * Converts the arguments of a WebGL function to a string.
   * Attempts to convert enum arguments to strings.
   *
   * @param {string} functionName the name of the WebGL function.
   * @param {number} args The arguments.
   * @return {string} The arguments as a string.
   */
  'glFunctionArgsToString': glFunctionArgsToString,
 
  /**
   * Given a WebGL context returns a wrapped context that calls
   * gl.getError after every command and calls a function if the
   * result is not NO_ERROR.
   *
   * You can supply your own function if you want. For example, if you'd like
   * an exception thrown on any GL error you could do this
   *
   *    function throwOnGLError(err, funcName, args) {
   *      throw WebGLDebugUtils.glEnumToString(err) +
   *            " was caused by call to " + funcName;
   *    };
   *
   *    ctx = WebGLDebugUtils.makeDebugContext(
   *        canvas.getContext("webgl"), throwOnGLError);
   *
   * @param {!WebGLRenderingContext} ctx The webgl context to wrap.
   * @param {!function(err, funcName, args): void} opt_onErrorFunc The function
   *     to call when gl.getError returns an error. If not specified the default
   *     function calls console.log with a message.
   * @param {!function(funcName, args): void} opt_onFunc The
   *     function to call when each webgl function is called. You
   *     can use this to log all calls for example.
   */
  'makeDebugContext': makeDebugContext,
 
  /**
   * Given a canvas element returns a wrapped canvas element that will
   * simulate lost context. The canvas returned adds the following functions.
   *
   * loseContext:
   *   simulates a lost context event.
   *
   * restoreContext:
   *   simulates the context being restored.
   *
   * lostContextInNCalls:
   *   loses the context after N gl calls.
   *
   * getNumCalls:
   *   tells you how many gl calls there have been so far.
   *
   * setRestoreTimeout:
   *   sets the number of milliseconds until the context is restored
   *   after it has been lost. Defaults to 0. Pass -1 to prevent
   *   automatic restoring.
   *
   * @param {!Canvas} canvas The canvas element to wrap.
   */
  'makeLostContextSimulatingCanvas': makeLostContextSimulatingCanvas,
 
  /**
   * Resets a context to the initial state.
   * @param {!WebGLRenderingContext} ctx The webgl context to
   *     reset.
   */
  'resetToInitialState': resetToInitialState
};
 
}();
 
module.exports = WebGLDebugUtils;
 
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(47)))
 
/***/ })
/******/ ]);
});